@krak-stack/registry 0.1.61 → 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 +6 -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.js +506 -493
- package/dist/services/webhooks/http-client.js +5 -5
- package/dist/services/webhooks/index.js +47 -47
- package/dist/services/webhooks/migrations.js +5 -5
- package/dist/services/webhooks/receiver.d.ts +6 -2
- package/dist/services/webhooks/schema.d.ts +7 -5
- package/dist/services/webhooks/schema.js +22 -22
- package/dist/services/webhooks/url.js +5 -5
- package/package.json +6 -1
|
@@ -179,11 +179,11 @@ var ColumnFilters = Schema2.declare(Schema2.is(ColumnFiltersArray), {
|
|
|
179
179
|
toCodecStringTree: () => Schema2.link()(Schema2.fromJsonString(ColumnFiltersArray), SchemaTransformation.passthrough())
|
|
180
180
|
});
|
|
181
181
|
var Query = Schema2.Struct({
|
|
182
|
-
page: Schema2.optional(Schema2.Union([Schema2.
|
|
182
|
+
page: Schema2.optional(Schema2.Union([Schema2.Finite, Schema2.FiniteFromString]).check(Schema2.isInt(), Schema2.isGreaterThanOrEqualTo(0))).pipe(Schema2.decodeTo(Schema2.Int.check(Schema2.isGreaterThanOrEqualTo(0)), {
|
|
183
183
|
decode: SchemaGetter.withDefault(Effect.succeed(0)),
|
|
184
184
|
encode: SchemaGetter.transformOptional(Option.filter((page) => page !== 0))
|
|
185
185
|
})),
|
|
186
|
-
pageSize: Schema2.optional(Schema2.Union([Schema2.
|
|
186
|
+
pageSize: Schema2.optional(Schema2.Union([Schema2.Finite, Schema2.FiniteFromString]).check(Schema2.isInt(), Schema2.isBetween({ minimum: 1, maximum: 100 }))).pipe(Schema2.decodeTo(Schema2.Int.check(Schema2.isBetween({ minimum: 1, maximum: 100 })), {
|
|
187
187
|
decode: SchemaGetter.withDefault(Effect.succeed(20)),
|
|
188
188
|
encode: SchemaGetter.transformOptional(Option.filter((pageSize) => pageSize !== 20))
|
|
189
189
|
})),
|
|
@@ -227,7 +227,7 @@ var EventIdentity = Schema3.Struct({
|
|
|
227
227
|
userId: Schema3.optional(Schema3.NonEmptyString),
|
|
228
228
|
organizationId: Schema3.optional(Schema3.NonEmptyString)
|
|
229
229
|
}).annotate({ identifier: "EventIdentity" });
|
|
230
|
-
var EventIpAddress = Schema3.String.check(Schema3.makeFilter((value) => Option2.isSome(Schema3.
|
|
230
|
+
var EventIpAddress = Schema3.String.check(Schema3.makeFilter((value) => Option2.isSome(Schema3.decodeOption(Schema3.IpAddressFromString)(value)) || "Invalid IP address")).annotate({ identifier: "EventIpAddress" });
|
|
231
231
|
var EventCountry = Schema3.String.check(Schema3.isPattern(/^[A-Z]{2}$/), Schema3.makeFilter((value) => !["XX", "T1"].includes(value) || "Unknown country")).annotate({ identifier: "EventCountry" });
|
|
232
232
|
var EventRegion = Schema3.String.check(Schema3.isPattern(/^[A-Z0-9]{1,3}$/)).annotate({ identifier: "EventRegion" });
|
|
233
233
|
var EventCity = Schema3.NonEmptyString.check(Schema3.isMaxLength(128)).annotate({ identifier: "EventCity" });
|
|
@@ -422,44 +422,44 @@ var VisitorEventSession = Schema3.Struct({
|
|
|
422
422
|
received_at: Schema3.Finite
|
|
423
423
|
}).annotate({ identifier: "VisitorEventSession" });
|
|
424
424
|
export {
|
|
425
|
-
|
|
426
|
-
AuditCount,
|
|
427
|
-
AuditSortId,
|
|
428
|
-
AuditTarget,
|
|
429
|
-
BrowserEventLogRecord,
|
|
430
|
-
BrowserEventOptions,
|
|
431
|
-
BrowserEventPath,
|
|
432
|
-
BrowserPage,
|
|
433
|
-
EventActionFilter,
|
|
434
|
-
EventAttribute,
|
|
435
|
-
EventCity,
|
|
436
|
-
EventColumnFilter,
|
|
437
|
-
EventConflictError,
|
|
438
|
-
EventCountry,
|
|
439
|
-
EventGeolocation,
|
|
440
|
-
EventGeolocationError,
|
|
441
|
-
EventId,
|
|
442
|
-
EventIdentity,
|
|
443
|
-
EventInputProperties,
|
|
444
|
-
EventIpAddress,
|
|
445
|
-
EventLogRecord,
|
|
446
|
-
EventQuery,
|
|
447
|
-
EventQueryStandard,
|
|
448
|
-
EventRegion,
|
|
449
|
-
EventSource,
|
|
450
|
-
EventSubscriberError,
|
|
451
|
-
EventSubscription,
|
|
452
|
-
EventUuid,
|
|
453
|
-
EventsPersistenceError,
|
|
454
|
-
ExistingEventRequest,
|
|
455
|
-
ListEvents,
|
|
456
|
-
OtlpLogs,
|
|
457
|
-
RequestActorAttribution,
|
|
458
|
-
StoredEventId,
|
|
459
|
-
StoredEventPayload,
|
|
460
|
-
StoredEventRequest,
|
|
461
|
-
TrackEvent,
|
|
462
|
-
TrackEventInput,
|
|
425
|
+
VisitorEventsRequest,
|
|
463
426
|
VisitorEventSession,
|
|
464
|
-
|
|
427
|
+
TrackEventInput,
|
|
428
|
+
TrackEvent,
|
|
429
|
+
StoredEventRequest,
|
|
430
|
+
StoredEventPayload,
|
|
431
|
+
StoredEventId,
|
|
432
|
+
RequestActorAttribution,
|
|
433
|
+
OtlpLogs,
|
|
434
|
+
ListEvents,
|
|
435
|
+
ExistingEventRequest,
|
|
436
|
+
EventsPersistenceError,
|
|
437
|
+
EventUuid,
|
|
438
|
+
EventSubscription,
|
|
439
|
+
EventSubscriberError,
|
|
440
|
+
EventSource,
|
|
441
|
+
EventRegion,
|
|
442
|
+
EventQueryStandard,
|
|
443
|
+
EventQuery,
|
|
444
|
+
EventLogRecord,
|
|
445
|
+
EventIpAddress,
|
|
446
|
+
EventInputProperties,
|
|
447
|
+
EventIdentity,
|
|
448
|
+
EventId,
|
|
449
|
+
EventGeolocationError,
|
|
450
|
+
EventGeolocation,
|
|
451
|
+
EventCountry,
|
|
452
|
+
EventConflictError,
|
|
453
|
+
EventColumnFilter,
|
|
454
|
+
EventCity,
|
|
455
|
+
EventAttribute,
|
|
456
|
+
EventActionFilter,
|
|
457
|
+
BrowserPage,
|
|
458
|
+
BrowserEventPath,
|
|
459
|
+
BrowserEventOptions,
|
|
460
|
+
BrowserEventLogRecord,
|
|
461
|
+
AuditTarget,
|
|
462
|
+
AuditSortId,
|
|
463
|
+
AuditCount,
|
|
464
|
+
AuditAttribution
|
|
465
465
|
};
|
|
@@ -111,9 +111,9 @@ class FileExtractionService extends Context.Service()("FileExtractionService", {
|
|
|
111
111
|
static testLayer = (service) => Layer.succeed(this, service);
|
|
112
112
|
}
|
|
113
113
|
export {
|
|
114
|
-
|
|
115
|
-
FileExtractionFailed,
|
|
116
|
-
FileExtractionService,
|
|
114
|
+
defaultFileExtractionOptions,
|
|
117
115
|
OutputFormat2 as OutputFormat,
|
|
118
|
-
|
|
116
|
+
FileExtractionService,
|
|
117
|
+
FileExtractionFailed,
|
|
118
|
+
FileExtractedTextSchema
|
|
119
119
|
};
|
|
@@ -7,7 +7,9 @@ export declare const FileExtractedTextSchema: Schema.Struct<{
|
|
|
7
7
|
export type FileExtractedText = typeof FileExtractedTextSchema.Type;
|
|
8
8
|
declare const FileExtractionFailed_base: Schema.Class<FileExtractionFailed, Schema.TaggedStruct<"FileExtractionFailed", {
|
|
9
9
|
readonly message: Schema.String;
|
|
10
|
-
}>, import("effect/Cause").YieldableError
|
|
10
|
+
}>, import("effect/Cause").YieldableError & {
|
|
11
|
+
readonly brand: unique symbol;
|
|
12
|
+
}>;
|
|
11
13
|
export declare class FileExtractionFailed extends FileExtractionFailed_base {
|
|
12
14
|
}
|
|
13
15
|
export {};
|
|
@@ -9,6 +9,6 @@ var FileExtractedTextSchema = Schema.Struct({
|
|
|
9
9
|
class FileExtractionFailed extends Schema.TaggedError()("FileExtractionFailed", { message: Schema.String }) {
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
FileExtractionFailed,
|
|
13
|
+
FileExtractedTextSchema
|
|
14
14
|
};
|
|
@@ -8,14 +8,14 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
8
8
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
9
9
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
10
10
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
11
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
11
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
12
12
|
}>>;
|
|
13
13
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
14
14
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
15
15
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
16
16
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
17
17
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
18
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
18
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
19
19
|
}>>;
|
|
20
20
|
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
21
21
|
readonly getLiveness: import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getLiveness", "GET", `${Prefix}/health/live`, never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
@@ -23,14 +23,14 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
23
23
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
24
24
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
25
25
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
26
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
26
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
27
27
|
}>>;
|
|
28
28
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
29
29
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
30
30
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
31
31
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
32
32
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
33
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
33
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
34
34
|
}>>;
|
|
35
35
|
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
36
36
|
readonly getReadiness: import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getReadiness", "GET", `${Prefix}/health/ready`, never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
@@ -38,14 +38,14 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
38
38
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
39
39
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
40
40
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
41
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
41
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
42
42
|
}>>;
|
|
43
43
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
44
44
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
45
45
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
46
46
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
47
47
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
48
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
48
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
49
49
|
}>>;
|
|
50
50
|
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
51
51
|
readonly getStartup: import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getStartup", "GET", `${Prefix}/health/started`, never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
@@ -53,14 +53,14 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
53
53
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
54
54
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
55
55
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
56
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
56
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
57
57
|
}>>;
|
|
58
58
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
59
59
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
60
60
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
61
61
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
62
62
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
63
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
63
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
64
64
|
}>>;
|
|
65
65
|
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
66
66
|
}, "getHealth" | "getLiveness" | "getReadiness" | "getStartup">;
|
|
@@ -4,55 +4,55 @@ export declare const HealthApiGroup: HttpApiGroup.HttpApiGroup<"health", HttpApi
|
|
|
4
4
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
5
5
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
6
6
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
7
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
7
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
8
8
|
}>>;
|
|
9
9
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
10
10
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
11
11
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
12
12
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
13
13
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
14
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
14
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
15
15
|
}>>;
|
|
16
16
|
}> | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getLiveness", "GET", "/health/live", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
17
17
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
18
18
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
19
19
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
20
20
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
21
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
21
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
22
22
|
}>>;
|
|
23
23
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
24
24
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
25
25
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
26
26
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
27
27
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
28
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
28
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
29
29
|
}>>;
|
|
30
30
|
}> | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getReadiness", "GET", "/health/ready", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
31
31
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
32
32
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
33
33
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
34
34
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
35
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
35
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
36
36
|
}>>;
|
|
37
37
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
38
38
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
39
39
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
40
40
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
41
41
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
42
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
42
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
43
43
|
}>>;
|
|
44
44
|
}> | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getStartup", "GET", "/health/started", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
45
45
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
46
46
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
47
47
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
48
48
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
49
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
49
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
50
50
|
}>>;
|
|
51
51
|
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
52
52
|
readonly status: import("effect/Schema").Literal<"DOWN">;
|
|
53
53
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
54
54
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
55
55
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
56
|
-
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").
|
|
56
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Finite]>>>;
|
|
57
57
|
}>>;
|
|
58
58
|
}> | typeof HttpApiError.InternalServerError>, never, never>, false>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Context, Effect, Layer } from "effect";
|
|
1
|
+
import { Context, Effect, Exit, Layer } from "effect";
|
|
2
2
|
import type { HealthCheckData, HealthCheckOutcome } from "./schema.js";
|
|
3
|
-
export type HealthCheck<Requirements = never> = {
|
|
3
|
+
export type HealthCheck<Requirements = never, E = unknown> = {
|
|
4
4
|
readonly name: string;
|
|
5
|
-
readonly check: Effect.Effect<HealthCheckOutcome,
|
|
5
|
+
readonly check: Effect.Effect<HealthCheckOutcome, E, Requirements>;
|
|
6
6
|
};
|
|
7
7
|
export type HealthServiceChecks<Requirements = never> = {
|
|
8
8
|
readonly live?: ReadonlyArray<HealthCheck<Requirements>>;
|
|
@@ -12,10 +12,14 @@ export type HealthServiceChecks<Requirements = never> = {
|
|
|
12
12
|
export type HealthServiceOptions<Requirements = never> = {
|
|
13
13
|
readonly checks?: HealthServiceChecks<Requirements>;
|
|
14
14
|
};
|
|
15
|
+
type RegisteredHealthCheck = {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly check: Effect.Effect<Exit.Exit<HealthCheckOutcome, unknown>>;
|
|
18
|
+
};
|
|
15
19
|
type RegisteredHealthChecks = {
|
|
16
|
-
readonly live: ReadonlyArray<
|
|
17
|
-
readonly ready: ReadonlyArray<
|
|
18
|
-
readonly started: ReadonlyArray<
|
|
20
|
+
readonly live: ReadonlyArray<RegisteredHealthCheck>;
|
|
21
|
+
readonly ready: ReadonlyArray<RegisteredHealthCheck>;
|
|
22
|
+
readonly started: ReadonlyArray<RegisteredHealthCheck>;
|
|
19
23
|
};
|
|
20
24
|
declare const HealthServiceConfig_base: Context.ServiceClass<HealthServiceConfig, "@krak-stack/registry/HealthServiceConfig", RegisteredHealthChecks>;
|
|
21
25
|
declare class HealthServiceConfig extends HealthServiceConfig_base {
|
|
@@ -3,7 +3,11 @@ import { Context, Effect as Effect2, Exit, Layer } from "effect";
|
|
|
3
3
|
|
|
4
4
|
// ../../src/services/health/api.builder.ts
|
|
5
5
|
import { Effect } from "effect";
|
|
6
|
-
var respond = (check) => check.pipe(Effect.flatMap((response) =>
|
|
6
|
+
var respond = (check) => check.pipe(Effect.flatMap((response) => Effect.gen(function* () {
|
|
7
|
+
if (response.status === "DOWN")
|
|
8
|
+
return yield* Effect.fail(response);
|
|
9
|
+
return response;
|
|
10
|
+
})));
|
|
7
11
|
var healthHandler = (handlers) => handlers.handle("getHealth", () => Effect.flatMap(HealthService, ({ aggregate }) => respond(aggregate()))).handle("getLiveness", () => Effect.flatMap(HealthService, ({ live }) => respond(live()))).handle("getReadiness", () => Effect.flatMap(HealthService, ({ ready }) => respond(ready()))).handle("getStartup", () => Effect.flatMap(HealthService, ({ started }) => respond(started())));
|
|
8
12
|
// ../../src/services/health/api.group.ts
|
|
9
13
|
import {
|
|
@@ -21,7 +25,7 @@ var HealthStatus = Schema.Literals(["UP", "DOWN"]).annotate({
|
|
|
21
25
|
title: "Health Status",
|
|
22
26
|
description: "Whether a health check is up or down"
|
|
23
27
|
});
|
|
24
|
-
var HealthCheckData = Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Boolean, Schema.
|
|
28
|
+
var HealthCheckData = Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Boolean, Schema.Finite])).annotate({
|
|
25
29
|
identifier: "HealthCheckData",
|
|
26
30
|
title: "Health Check Data",
|
|
27
31
|
description: "Non-sensitive diagnostic values for a health check"
|
|
@@ -114,7 +118,7 @@ class HealthServiceConfig extends Context.Service()("@krak-stack/registry/Health
|
|
|
114
118
|
const services = yield* Effect2.context();
|
|
115
119
|
const resolve = (registered) => (registered ?? []).map(({ name, check }) => ({
|
|
116
120
|
name,
|
|
117
|
-
check: Effect2.provide(
|
|
121
|
+
check: Effect2.exit(check).pipe(Effect2.provide(services))
|
|
118
122
|
}));
|
|
119
123
|
return {
|
|
120
124
|
live: resolve(checks.live),
|
|
@@ -129,7 +133,7 @@ class HealthService extends Context.Service()("@krak-stack/registry/HealthServic
|
|
|
129
133
|
const checks = yield* HealthServiceConfig;
|
|
130
134
|
const allChecks = Array.from(new Set([...checks.live, ...checks.ready, ...checks.started]));
|
|
131
135
|
const execute = Effect2.fn("HealthService.execute")(function* (healthCheck) {
|
|
132
|
-
const exit = yield*
|
|
136
|
+
const exit = yield* healthCheck.check;
|
|
133
137
|
if (!Exit.isSuccess(exit)) {
|
|
134
138
|
return {
|
|
135
139
|
name: healthCheck.name,
|
|
@@ -173,14 +177,14 @@ class HealthService extends Context.Service()("@krak-stack/registry/HealthServic
|
|
|
173
177
|
static layerWith = (options) => Layer.effect(this, this.make).pipe(Layer.provide(HealthServiceConfig.layerWith(options)));
|
|
174
178
|
}
|
|
175
179
|
export {
|
|
176
|
-
|
|
177
|
-
HealthCheckData,
|
|
178
|
-
HealthCheckOutcome,
|
|
179
|
-
HealthCheckResult,
|
|
180
|
-
HealthDownResponse,
|
|
181
|
-
HealthResponse,
|
|
182
|
-
HealthService,
|
|
183
|
-
HealthStatus,
|
|
180
|
+
healthHandler,
|
|
184
181
|
HealthUpResponse,
|
|
185
|
-
|
|
182
|
+
HealthStatus,
|
|
183
|
+
HealthService,
|
|
184
|
+
HealthResponse,
|
|
185
|
+
HealthDownResponse,
|
|
186
|
+
HealthCheckResult,
|
|
187
|
+
HealthCheckOutcome,
|
|
188
|
+
HealthCheckData,
|
|
189
|
+
HealthApiGroup
|
|
186
190
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
export declare const HealthStatus: Schema.Literals<readonly ["UP", "DOWN"]>;
|
|
3
3
|
export type HealthStatus = typeof HealthStatus.Type;
|
|
4
|
-
export declare const HealthCheckData: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.
|
|
4
|
+
export declare const HealthCheckData: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.Finite]>>;
|
|
5
5
|
export type HealthCheckData = typeof HealthCheckData.Type;
|
|
6
6
|
export declare const HealthCheckOutcome: Schema.Struct<{
|
|
7
7
|
readonly status: Schema.Literals<readonly ["UP", "DOWN"]>;
|
|
8
|
-
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.
|
|
8
|
+
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.Finite]>>>;
|
|
9
9
|
}>;
|
|
10
10
|
export type HealthCheckOutcome = typeof HealthCheckOutcome.Type;
|
|
11
11
|
export declare const HealthCheckResult: Schema.Struct<{
|
|
12
12
|
readonly name: Schema.NonEmptyString;
|
|
13
13
|
readonly status: Schema.Literals<readonly ["UP", "DOWN"]>;
|
|
14
|
-
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.
|
|
14
|
+
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.Finite]>>>;
|
|
15
15
|
}>;
|
|
16
16
|
export type HealthCheckResult = typeof HealthCheckResult.Type;
|
|
17
17
|
export declare const HealthUpResponse: Schema.Struct<{
|
|
@@ -19,7 +19,7 @@ export declare const HealthUpResponse: Schema.Struct<{
|
|
|
19
19
|
readonly checks: Schema.$Array<Schema.Struct<{
|
|
20
20
|
readonly name: Schema.NonEmptyString;
|
|
21
21
|
readonly status: Schema.Literals<readonly ["UP", "DOWN"]>;
|
|
22
|
-
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.
|
|
22
|
+
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.Finite]>>>;
|
|
23
23
|
}>>;
|
|
24
24
|
}>;
|
|
25
25
|
export type HealthUpResponse = typeof HealthUpResponse.Type;
|
|
@@ -28,7 +28,7 @@ export declare const HealthDownResponse: Schema.Struct<{
|
|
|
28
28
|
readonly checks: Schema.$Array<Schema.Struct<{
|
|
29
29
|
readonly name: Schema.NonEmptyString;
|
|
30
30
|
readonly status: Schema.Literals<readonly ["UP", "DOWN"]>;
|
|
31
|
-
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.
|
|
31
|
+
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.Finite]>>>;
|
|
32
32
|
}>>;
|
|
33
33
|
}>;
|
|
34
34
|
export type HealthDownResponse = typeof HealthDownResponse.Type;
|
|
@@ -37,14 +37,14 @@ export declare const HealthResponse: Schema.Union<readonly [Schema.Struct<{
|
|
|
37
37
|
readonly checks: Schema.$Array<Schema.Struct<{
|
|
38
38
|
readonly name: Schema.NonEmptyString;
|
|
39
39
|
readonly status: Schema.Literals<readonly ["UP", "DOWN"]>;
|
|
40
|
-
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.
|
|
40
|
+
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.Finite]>>>;
|
|
41
41
|
}>>;
|
|
42
42
|
}>, Schema.Struct<{
|
|
43
43
|
readonly status: Schema.Literal<"DOWN">;
|
|
44
44
|
readonly checks: Schema.$Array<Schema.Struct<{
|
|
45
45
|
readonly name: Schema.NonEmptyString;
|
|
46
46
|
readonly status: Schema.Literals<readonly ["UP", "DOWN"]>;
|
|
47
|
-
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.
|
|
47
|
+
readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.Finite]>>>;
|
|
48
48
|
}>>;
|
|
49
49
|
}>]>;
|
|
50
50
|
export type HealthResponse = typeof HealthResponse.Type;
|
|
@@ -682,10 +682,10 @@ var formatNotificationDate = (value, locale) => {
|
|
|
682
682
|
};
|
|
683
683
|
var notificationTitle = (notification) => Schema.is(Schema.String)(notification.title) ? notification.title : defaultMessages.en.notifications;
|
|
684
684
|
export {
|
|
685
|
-
|
|
686
|
-
NotificationList,
|
|
687
|
-
NotificationListItem,
|
|
688
|
-
NotificationMenu,
|
|
685
|
+
notificationMenuMessages,
|
|
689
686
|
NotificationMenuTrigger,
|
|
690
|
-
|
|
687
|
+
NotificationMenu,
|
|
688
|
+
NotificationListItem,
|
|
689
|
+
NotificationList,
|
|
690
|
+
NotificationEmpty
|
|
691
691
|
};
|
|
@@ -82,7 +82,7 @@ class NotificationService extends Context2.Service()("NotificationService", {
|
|
|
82
82
|
store
|
|
83
83
|
}) => this.layer.pipe(Layer2.provide(NotificationChannelRegistry.layer(channels)), Layer2.provide(NotificationPersistenceStore.layer(store)));
|
|
84
84
|
static noopLayer = Layer2.succeed(this, {
|
|
85
|
-
send: () => Effect2.
|
|
85
|
+
send: () => Effect2.undefined
|
|
86
86
|
});
|
|
87
87
|
static localLayer = this.makeLayer([
|
|
88
88
|
{
|
|
@@ -92,6 +92,6 @@ class NotificationService extends Context2.Service()("NotificationService", {
|
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
94
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
NotificationService,
|
|
96
|
+
NotificationPersistenceStore
|
|
97
97
|
};
|
|
@@ -208,7 +208,7 @@ var notificationDeliveries = pgTable("notification_deliveries", {
|
|
|
208
208
|
check("notification_deliveries_lease_check", sql`(${table.claimedBy} is null and ${table.leaseExpiresAt} is null) or (${table.claimedBy} is not null and ${table.leaseExpiresAt} is not null)`)
|
|
209
209
|
]);
|
|
210
210
|
export {
|
|
211
|
-
|
|
211
|
+
notifications,
|
|
212
212
|
notificationSettings,
|
|
213
|
-
|
|
213
|
+
notificationDeliveries
|
|
214
214
|
};
|
|
@@ -208,20 +208,20 @@ var notificationDeliveries = pgTable("notification_deliveries", {
|
|
|
208
208
|
check("notification_deliveries_lease_check", sql`(${table.claimedBy} is null and ${table.leaseExpiresAt} is null) or (${table.claimedBy} is not null and ${table.leaseExpiresAt} is not null)`)
|
|
209
209
|
]);
|
|
210
210
|
export {
|
|
211
|
-
|
|
212
|
-
InboxNotificationSchema,
|
|
213
|
-
NOTIFICATION_DELIVERY_PURPOSES,
|
|
214
|
-
NOTIFICATION_DELIVERY_STATUSES,
|
|
215
|
-
NotificationDeliveryId,
|
|
216
|
-
NotificationDeliveryPurpose,
|
|
217
|
-
NotificationDeliverySchema,
|
|
218
|
-
NotificationDeliveryStatus,
|
|
219
|
-
NotificationId,
|
|
220
|
-
NotificationSettingId,
|
|
221
|
-
NotificationSettingSchema,
|
|
222
|
-
PersistedNotificationDeliveryPayload,
|
|
223
|
-
decodeNotificationDeliveryPayload,
|
|
224
|
-
notificationDeliveries,
|
|
211
|
+
notifications,
|
|
225
212
|
notificationSettings,
|
|
226
|
-
|
|
213
|
+
notificationDeliveries,
|
|
214
|
+
decodeNotificationDeliveryPayload,
|
|
215
|
+
PersistedNotificationDeliveryPayload,
|
|
216
|
+
NotificationSettingSchema,
|
|
217
|
+
NotificationSettingId,
|
|
218
|
+
NotificationId,
|
|
219
|
+
NotificationDeliveryStatus,
|
|
220
|
+
NotificationDeliverySchema,
|
|
221
|
+
NotificationDeliveryPurpose,
|
|
222
|
+
NotificationDeliveryId,
|
|
223
|
+
NOTIFICATION_DELIVERY_STATUSES,
|
|
224
|
+
NOTIFICATION_DELIVERY_PURPOSES,
|
|
225
|
+
InboxNotificationSchema,
|
|
226
|
+
EmailDeliveryPayloadV1
|
|
227
227
|
};
|
|
@@ -102,17 +102,17 @@ var PersistedNotificationDeliveryPayload = Schema.Union([
|
|
|
102
102
|
]).annotate({ identifier: "PersistedNotificationDeliveryPayload" });
|
|
103
103
|
var decodeNotificationDeliveryPayload = Schema.decodeUnknownEffect(PersistedNotificationDeliveryPayload);
|
|
104
104
|
export {
|
|
105
|
-
|
|
106
|
-
InboxNotificationSchema,
|
|
107
|
-
NOTIFICATION_DELIVERY_PURPOSES,
|
|
108
|
-
NOTIFICATION_DELIVERY_STATUSES,
|
|
109
|
-
NotificationDeliveryId,
|
|
110
|
-
NotificationDeliveryPurpose,
|
|
111
|
-
NotificationDeliverySchema,
|
|
112
|
-
NotificationDeliveryStatus,
|
|
113
|
-
NotificationId,
|
|
114
|
-
NotificationSettingId,
|
|
115
|
-
NotificationSettingSchema,
|
|
105
|
+
decodeNotificationDeliveryPayload,
|
|
116
106
|
PersistedNotificationDeliveryPayload,
|
|
117
|
-
|
|
107
|
+
NotificationSettingSchema,
|
|
108
|
+
NotificationSettingId,
|
|
109
|
+
NotificationId,
|
|
110
|
+
NotificationDeliveryStatus,
|
|
111
|
+
NotificationDeliverySchema,
|
|
112
|
+
NotificationDeliveryPurpose,
|
|
113
|
+
NotificationDeliveryId,
|
|
114
|
+
NOTIFICATION_DELIVERY_STATUSES,
|
|
115
|
+
NOTIFICATION_DELIVERY_PURPOSES,
|
|
116
|
+
InboxNotificationSchema,
|
|
117
|
+
EmailDeliveryPayloadV1
|
|
118
118
|
};
|
|
@@ -82,7 +82,7 @@ class NotificationService extends Context2.Service()("NotificationService", {
|
|
|
82
82
|
store
|
|
83
83
|
}) => this.layer.pipe(Layer2.provide(NotificationChannelRegistry.layer(channels)), Layer2.provide(NotificationPersistenceStore.layer(store)));
|
|
84
84
|
static noopLayer = Layer2.succeed(this, {
|
|
85
|
-
send: () => Effect2.
|
|
85
|
+
send: () => Effect2.undefined
|
|
86
86
|
});
|
|
87
87
|
static localLayer = this.makeLayer([
|
|
88
88
|
{
|
|
@@ -775,12 +775,12 @@ var formatNotificationDate = (value, locale) => {
|
|
|
775
775
|
};
|
|
776
776
|
var notificationTitle = (notification) => Schema2.is(Schema2.String)(notification.title) ? notification.title : defaultMessages.en.notifications;
|
|
777
777
|
export {
|
|
778
|
-
|
|
779
|
-
NotificationList,
|
|
780
|
-
NotificationListItem,
|
|
781
|
-
NotificationMenu,
|
|
782
|
-
NotificationMenuTrigger,
|
|
783
|
-
NotificationPersistenceStore,
|
|
778
|
+
notificationMenuMessages,
|
|
784
779
|
NotificationService,
|
|
785
|
-
|
|
780
|
+
NotificationPersistenceStore,
|
|
781
|
+
NotificationMenuTrigger,
|
|
782
|
+
NotificationMenu,
|
|
783
|
+
NotificationListItem,
|
|
784
|
+
NotificationList,
|
|
785
|
+
NotificationEmpty
|
|
786
786
|
};
|
|
@@ -4,7 +4,9 @@ declare const NotificationSendError_base: Schema.Class<NotificationSendError, Sc
|
|
|
4
4
|
readonly message: Schema.String;
|
|
5
5
|
readonly channel: Schema.optional<Schema.String>;
|
|
6
6
|
readonly error: Schema.optional<Schema.Defect>;
|
|
7
|
-
}>, import("effect/Cause").YieldableError
|
|
7
|
+
}>, import("effect/Cause").YieldableError & {
|
|
8
|
+
readonly brand: unique symbol;
|
|
9
|
+
}>;
|
|
8
10
|
export declare class NotificationSendError extends NotificationSendError_base {
|
|
9
11
|
}
|
|
10
12
|
export type { NotificationMessage, NotificationSendInput } from "./channels/index.js";
|