@krak-stack/registry 0.2.0 → 0.2.1

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/components/ui/app-brand.js +17 -17
  3. package/dist/components/ui/code-block.js +6 -6
  4. package/dist/components/ui/color-picker.js +26 -28
  5. package/dist/components/ui/copy-button.js +4 -4
  6. package/dist/components/ui/data-table.js +441 -442
  7. package/dist/components/ui/editing-locale-switcher.js +10 -10
  8. package/dist/components/ui/effect-form.js +183 -184
  9. package/dist/components/ui/error-component.js +6 -6
  10. package/dist/components/ui/file-picker.js +2 -2
  11. package/dist/components/ui/form.d.ts +5 -5
  12. package/dist/components/ui/form.js +136 -137
  13. package/dist/components/ui/google-map.js +2 -2
  14. package/dist/components/ui/icon-input.js +45 -48
  15. package/dist/components/ui/krakstack-provider.js +2 -2
  16. package/dist/components/ui/locale-switcher.js +4 -4
  17. package/dist/components/ui/pagination.js +2 -2
  18. package/dist/components/ui/search-menu.js +2 -2
  19. package/dist/components/ui/sidebar-layout.js +67 -72
  20. package/dist/components/ui/theme-switcher.js +6 -6
  21. package/dist/components/ui/virtualized-combobox.js +31 -34
  22. package/dist/lib/docs.js +166 -171
  23. package/dist/lib/docs.server.js +18 -40
  24. package/dist/lib/documentation-toolkit.js +19 -41
  25. package/dist/lib/httpapi-adapter.js +2 -2
  26. package/dist/lib/httpapi-cli.js +7 -7
  27. package/dist/lib/query.js +11 -11
  28. package/dist/lib/seo.js +2 -2
  29. package/dist/lib/webfetch-toolkit.js +6 -6
  30. package/dist/oxlint/anti-slop/index.js +2 -2
  31. package/dist/services/agent/client/index.js +153 -155
  32. package/dist/services/agent/index.js +2 -2
  33. package/dist/services/agent/schema.js +5 -5
  34. package/dist/services/events/browser.js +6 -6
  35. package/dist/services/events/client/audit-log-table.js +445 -446
  36. package/dist/services/events/index.js +59 -59
  37. package/dist/services/events/migrations.js +2 -2
  38. package/dist/services/events/record.js +2 -2
  39. package/dist/services/events/schema.js +39 -39
  40. package/dist/services/file-extraction/index.js +4 -4
  41. package/dist/services/file-extraction/schema.js +2 -2
  42. package/dist/services/health/index.js +9 -9
  43. package/dist/services/notification/channels/ses/index.js +2 -2
  44. package/dist/services/notification/channels/ses/schema.js +2 -2
  45. package/dist/services/notification/client/index.js +5 -5
  46. package/dist/services/notification/index.js +2 -2
  47. package/dist/services/notification/persistence/drizzle.js +2 -2
  48. package/dist/services/notification/persistence/index.js +15 -15
  49. package/dist/services/notification/persistence/schema.js +12 -12
  50. package/dist/services/notification/public.js +7 -7
  51. package/dist/services/notification/schema.js +2 -2
  52. package/dist/services/opentelemetry/api.js +2 -2
  53. package/dist/services/opentelemetry/browser.js +7 -7
  54. package/dist/services/opentelemetry/web-vitals.js +2 -2
  55. package/dist/services/s3/index.js +2 -2
  56. package/dist/services/s3/schema.js +2 -2
  57. package/dist/services/speech/schema.js +9 -9
  58. package/dist/services/webhooks/client/delivery-table.js +479 -480
  59. package/dist/services/webhooks/http-client.js +5 -5
  60. package/dist/services/webhooks/index.js +34 -34
  61. package/dist/services/webhooks/migrations.js +5 -5
  62. package/dist/services/webhooks/schema.js +20 -20
  63. package/dist/services/webhooks/url.js +5 -5
  64. package/package.json +1 -1
@@ -820,8 +820,8 @@ class Events extends Context4.Service()("krakstack/events/Events", {
820
820
  const insertEvent = SqlSchema.findOneOption({
821
821
  Request: StoredEventRequest,
822
822
  Result: StoredEventId,
823
- execute: (event2) => sql`
824
- INSERT INTO events ${sql.insert({ service_name: configuration.serviceName, ...event2 })}
823
+ execute: (event) => sql`
824
+ INSERT INTO events ${sql.insert({ service_name: configuration.serviceName, ...event })}
825
825
  ON CONFLICT (service_name, source, event_id) DO NOTHING RETURNING event_id
826
826
  `
827
827
  });
@@ -910,7 +910,7 @@ class Events extends Context4.Service()("krakstack/events/Events", {
910
910
  error: EventSubscriberError,
911
911
  idempotencyKey: ({ eventId }) => eventId
912
912
  });
913
- yield* engine.register(workflow, ({ event: event2, eventId }) => Effect8.gen(function* () {
913
+ yield* engine.register(workflow, ({ event, eventId }) => Effect8.gen(function* () {
914
914
  const step = yield* Schedule.toStep(Schedule.min([
915
915
  Schedule.exponential("5 seconds", 4),
916
916
  Schedule.spaced("10 hours")
@@ -920,7 +920,7 @@ class Events extends Context4.Service()("krakstack/events/Events", {
920
920
  name: `HandleEventV1-${attempt}`,
921
921
  success: Schema9.Void,
922
922
  error: EventSubscriberError,
923
- execute: definition.handle({ ...event2, eventId }).pipe(Effect8.scoped, Effect8.updateContext(() => subscriberContext), Effect8.asVoid, Effect8.mapError(() => new EventSubscriberError({
923
+ execute: definition.handle({ ...event, eventId }).pipe(Effect8.scoped, Effect8.updateContext(() => subscriberContext), Effect8.asVoid, Effect8.mapError(() => new EventSubscriberError({
924
924
  subscription: subscription.name
925
925
  })))
926
926
  }).pipe(Effect8.result);
@@ -939,7 +939,7 @@ class Events extends Context4.Service()("krakstack/events/Events", {
939
939
  }));
940
940
  const registered = {
941
941
  events: new Set(subscription.events),
942
- dispatch: (event2) => workflow.execute({ event: event2, eventId: event2.eventId }, { discard: true }).pipe(Effect8.provideService(WorkflowEngine.WorkflowEngine, engine), Effect8.catchCause((cause) => Cause.hasInterruptsOnly(cause) ? Effect8.interrupt : Effect8.fail(new EventsPersistenceError({
942
+ dispatch: (event) => workflow.execute({ event, eventId: event.eventId }, { discard: true }).pipe(Effect8.provideService(WorkflowEngine.WorkflowEngine, engine), Effect8.catchCause((cause) => Cause.hasInterruptsOnly(cause) ? Effect8.interrupt : Effect8.fail(new EventsPersistenceError({
943
943
  operation: "subscriber.dispatch"
944
944
  }))), Effect8.asVoid)
945
945
  };
@@ -952,12 +952,12 @@ class Events extends Context4.Service()("krakstack/events/Events", {
952
952
  const track = Effect8.fn("Events.track")(function* (input) {
953
953
  const decoded = yield* Schema9.decodeEffect(TrackEventInput)(input);
954
954
  const properties = decoded.properties === undefined ? undefined : yield* Schema9.encodeEffect(Schema9.fromJsonString(EventInputProperties))(decoded.properties).pipe(Effect8.flatMap(Schema9.decodeUnknownEffect(Schema9.fromJsonString(EventPropertiesSchema))));
955
- const event2 = yield* Schema9.decodeEffect(TrackEvent)({
955
+ const event = yield* Schema9.decodeEffect(TrackEvent)({
956
956
  ...decoded,
957
957
  properties
958
958
  });
959
- const eventId = event2.eventId ?? (yield* random.uuidV7());
960
- const category = event2.category ?? "analytics";
959
+ const eventId = event.eventId ?? (yield* random.uuidV7());
960
+ const category = event.category ?? "analytics";
961
961
  const receivedAt = yield* DateTime3.now;
962
962
  const now = DateTime3.toEpochMillis(receivedAt);
963
963
  const request = yield* Effect8.serviceOption(HttpServerRequest.HttpServerRequest);
@@ -973,12 +973,12 @@ class Events extends Context4.Service()("krakstack/events/Events", {
973
973
  const identity = hasIdentity ? yield* Schema9.decodeUnknownEffect(EventIdentity)({
974
974
  userId: annotations["user.id"],
975
975
  organizationId: annotations["organization.id"]
976
- }) : event2.identity;
976
+ }) : event.identity;
977
977
  if (category === "audit") {
978
978
  yield* Schema9.decodeUnknownEffect(AuditAttribution)(annotations);
979
979
  }
980
980
  const attributes = {};
981
- for (const [key, value] of Object.entries(event2.properties ?? {})) {
981
+ for (const [key, value] of Object.entries(event.properties ?? {})) {
982
982
  const name = key.startsWith("app.") ? key : `app.${key}`;
983
983
  if (!reservedBrowserAttribute(name))
984
984
  attributes[name] = value;
@@ -986,10 +986,10 @@ class Events extends Context4.Service()("krakstack/events/Events", {
986
986
  Object.assign(attributes, identityAttributes(identity));
987
987
  Object.assign(attributes, Object.fromEntries(Object.entries(annotations).filter(([key]) => (category === "audit" || !["user.full_name", "user.name", "user.email"].includes(key)) && key !== "user.image" && key !== "app.user.image")));
988
988
  attributes["log.record.uid"] = eventId;
989
- if (event2.category === "audit") {
990
- attributes["app.audit.target.id"] = event2.target.id;
991
- attributes["app.audit.target.name"] = event2.target.name;
992
- attributes["app.audit.target.type"] = event2.target.type;
989
+ if (event.category === "audit") {
990
+ attributes["app.audit.target.id"] = event.target.id;
991
+ attributes["app.audit.target.name"] = event.target.name;
992
+ attributes["app.audit.target.type"] = event.target.type;
993
993
  }
994
994
  attributes["app.event.schema.version"] = "1";
995
995
  attributes["app.event.type"] = "track";
@@ -998,8 +998,8 @@ class Events extends Context4.Service()("krakstack/events/Events", {
998
998
  const span = yield* Effect8.currentSpan.pipe(Effect8.option);
999
999
  const location2 = Option6.isSome(request) && (!options.requireConsent || hasAnalyticsConsent(request.value.headers.cookie ?? "", request.value.headers)) ? yield* resolveGeolocation(request.value).pipe(Effect8.mapError(() => new EventsPersistenceError({ operation: "geolocation" }))) : null;
1000
1000
  const entry = {
1001
- eventName: event2.name,
1002
- timeUnixNano: (BigInt(event2.timestamp ? DateTime3.toEpochMillis(event2.timestamp) : now) * 1000000n).toString(),
1001
+ eventName: event.name,
1002
+ timeUnixNano: (BigInt(event.timestamp ? DateTime3.toEpochMillis(event.timestamp) : now) * 1000000n).toString(),
1003
1003
  observedTimeUnixNano: (BigInt(now) * 1000000n).toString()
1004
1004
  };
1005
1005
  return yield* Effect8.gen(function* () {
@@ -1012,7 +1012,7 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1012
1012
  });
1013
1013
  const result = storage ? yield* storage.persist({
1014
1014
  source: "server",
1015
- compareTimestamp: event2.timestamp !== undefined,
1015
+ compareTimestamp: event.timestamp !== undefined,
1016
1016
  record: validated,
1017
1017
  now,
1018
1018
  payload: {
@@ -1030,28 +1030,28 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1030
1030
  }
1031
1031
  }) : { eventId, inserted: false };
1032
1032
  for (const subscriber of subscribers.values()) {
1033
- if (!subscriber.events.has(event2.name))
1033
+ if (!subscriber.events.has(event.name))
1034
1034
  continue;
1035
1035
  yield* subscriber.dispatch({
1036
- ...event2,
1036
+ ...event,
1037
1037
  eventId,
1038
1038
  identity,
1039
- timestamp: event2.timestamp ?? receivedAt
1039
+ timestamp: event.timestamp ?? receivedAt
1040
1040
  });
1041
1041
  }
1042
1042
  return {
1043
1043
  ...result,
1044
1044
  attributes: { ...requestContext, ...attributes }
1045
1045
  };
1046
- }).pipe((effect) => storage ? storage.sql.withTransaction(effect) : effect, Effect8.tap((result) => !storage || result.inserted ? Otlp.event(event2.name, result.attributes, {
1046
+ }).pipe((effect) => storage ? storage.sql.withTransaction(effect) : effect, Effect8.tap((result) => !storage || result.inserted ? Otlp.event(event.name, result.attributes, {
1047
1047
  messageId: result.eventId,
1048
- timestamp: event2.timestamp ?? receivedAt
1048
+ timestamp: event.timestamp ?? receivedAt
1049
1049
  }).pipe(Effect8.provideService(OtlpEvents, {
1050
1050
  push: (record) => exporter.push({
1051
1051
  ...record,
1052
1052
  scopeName: "krakstack.application.events"
1053
1053
  })
1054
- }), Effect8.provideService(References2.CurrentLogAnnotations, {})) : Effect8.void), Effect8.map(({ eventId: eventId2, inserted }) => ({ eventId: eventId2, inserted })), Effect8.mapError((error) => error._tag === "EventConflictError" ? error : new EventsPersistenceError({
1054
+ }), Effect8.provideService(References2.CurrentLogAnnotations, {})) : Effect8.void), Effect8.map(({ eventId, inserted }) => ({ eventId, inserted })), Effect8.mapError((error) => error._tag === "EventConflictError" ? error : new EventsPersistenceError({
1055
1055
  operation: "track"
1056
1056
  })));
1057
1057
  });
@@ -1085,29 +1085,29 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1085
1085
  return sql`${sortColumns[id]} ${sql.literal(part.direction === "desc" ? "DESC" : "ASC")}`;
1086
1086
  }));
1087
1087
  const source = request.category === "audit" ? sql`AND source = 'server'` : sql``;
1088
- const event2 = request.eventName ? sql`AND event_name = ${request.eventName}` : sql``;
1088
+ const event = request.eventName ? sql`AND event_name = ${request.eventName}` : sql``;
1089
1089
  const actorName = sql`COALESCE(NULLIF(${text("user.full_name")}, ''), NULLIF(${text("user.name")}, ''), NULLIF(${text("user.email")}, ''), ${text("app.actor.type")}, '')`;
1090
1090
  const actor = sql`${actorName} || ' ' || COALESCE(${text("user.email")}, '') || ' ' || COALESCE(${text("app.actor.id")}, ${text("user.id")}, '')`;
1091
1091
  const record = sql`COALESCE(${text("app.audit.target.name")}, '') || ' ' || COALESCE(${text("app.audit.target.type")}, '') || ' ' || COALESCE(${text("app.audit.target.id")}, '')`;
1092
1092
  const method = sql`CASE WHEN ${text("app.auth.method")} IN ('session', 'api_key') THEN ${text("app.auth.method")} ELSE 'unknown' END`;
1093
- const predicates = columnFilters.map((filter2) => {
1094
- switch (filter2.kind) {
1093
+ const predicates = columnFilters.map((filter) => {
1094
+ switch (filter.kind) {
1095
1095
  case "values": {
1096
- const column = filter2.id === "eventName" ? sql`event_name` : method;
1097
- return sql`AND ${sql.or(filter2.values.map((value) => sql`${column} = ${value}`))}`;
1096
+ const column = filter.id === "eventName" ? sql`event_name` : method;
1097
+ return sql`AND ${sql.or(filter.values.map((value) => sql`${column} = ${value}`))}`;
1098
1098
  }
1099
1099
  case "date": {
1100
- const from = filter2.from ? sql`AND occurred_at >= ${new Date(`${filter2.from}T00:00:00.000Z`).getTime()}` : sql``;
1101
- const to = filter2.to ? sql`AND occurred_at < ${new Date(`${filter2.to}T00:00:00.000Z`).getTime() + 86400000}` : sql``;
1100
+ const from = filter.from ? sql`AND occurred_at >= ${new Date(`${filter.from}T00:00:00.000Z`).getTime()}` : sql``;
1101
+ const to = filter.to ? sql`AND occurred_at < ${new Date(`${filter.to}T00:00:00.000Z`).getTime() + 86400000}` : sql``;
1102
1102
  return sql`${from} ${to}`;
1103
1103
  }
1104
1104
  case "text": {
1105
- const column = filter2.id === "actor" ? actor : record;
1106
- const value = filter2.value.toLowerCase();
1107
- if (filter2.operator === "equals")
1105
+ const column = filter.id === "actor" ? actor : record;
1106
+ const value = filter.value.toLowerCase();
1107
+ if (filter.operator === "equals")
1108
1108
  return sql`AND LOWER(${column}) = ${value}`;
1109
1109
  const escaped = value.replace(/[\\%_]/g, "\\$&");
1110
- const pattern = filter2.operator === "startsWith" ? `${escaped}%` : filter2.operator === "endsWith" ? `%${escaped}` : `%${escaped}%`;
1110
+ const pattern = filter.operator === "startsWith" ? `${escaped}%` : filter.operator === "endsWith" ? `%${escaped}` : `%${escaped}%`;
1111
1111
  return sql`AND LOWER(${column}) LIKE ${pattern} ESCAPE ${"\\"}`;
1112
1112
  }
1113
1113
  default:
@@ -1128,7 +1128,7 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1128
1128
  ].map((key) => sql`LOWER(${text(key)}) LIKE ${`%${search.toLowerCase()}%`}`)
1129
1129
  ])}` : sql``;
1130
1130
  const predicate = sql`service_name = ${configuration.serviceName} AND organization_id = ${request.organizationId}
1131
- AND ${text("app.event.category")} = ${request.category} ${source} ${event2} ${actions} ${filter}`;
1131
+ AND ${text("app.event.category")} = ${request.category} ${source} ${event} ${actions} ${filter}`;
1132
1132
  const total = yield* SqlSchema.findOne({
1133
1133
  Request: ListEvents,
1134
1134
  Result: AuditCount,
@@ -1145,7 +1145,7 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1145
1145
  `
1146
1146
  });
1147
1147
  const rows = yield* find(request);
1148
- const data = yield* Effect8.forEach(rows, (row) => Schema9.decodeUnknownEffect(EventLogRecord)(row.payload_json.resourceLogs.flatMap((resource2) => resource2.scopeLogs.flatMap((scope) => scope.logRecords))[0]));
1148
+ const data = yield* Effect8.forEach(rows, (row) => Schema9.decodeUnknownEffect(EventLogRecord)(row.payload_json.resourceLogs.flatMap((resource) => resource.scopeLogs.flatMap((scope) => scope.logRecords))[0]));
1149
1149
  return {
1150
1150
  data,
1151
1151
  meta: {
@@ -1162,9 +1162,9 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1162
1162
  if (options.requireConsent && !hasAnalyticsConsent(request.headers.cookie ?? "", request.headers)) {
1163
1163
  payload = {
1164
1164
  ...payload,
1165
- resourceLogs: payload.resourceLogs.map((resource2) => ({
1166
- ...resource2,
1167
- scopeLogs: resource2.scopeLogs.filter((scope) => scope.scope?.name !== "krakstack.application.events").map((scope) => ({
1165
+ resourceLogs: payload.resourceLogs.map((resource) => ({
1166
+ ...resource,
1167
+ scopeLogs: resource.scopeLogs.filter((scope) => scope.scope?.name !== "krakstack.application.events").map((scope) => ({
1168
1168
  ...scope,
1169
1169
  logRecords: scope.logRecords.filter((record) => {
1170
1170
  const parsed = Schema9.decodeUnknownOption(Schema9.Struct({
@@ -1180,7 +1180,7 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1180
1180
  persisted: false
1181
1181
  };
1182
1182
  }
1183
- const analyticsScopes = payload.resourceLogs.flatMap((resource2) => resource2.scopeLogs).filter((scope) => scope.scope?.name === "krakstack.application.events");
1183
+ const analyticsScopes = payload.resourceLogs.flatMap((resource) => resource.scopeLogs).filter((scope) => scope.scope?.name === "krakstack.application.events");
1184
1184
  if (analyticsScopes.length === 0)
1185
1185
  return { body, persisted: false };
1186
1186
  if (request.headers.origin !== configuration.origin.origin || request.headers["sec-fetch-site"] === "cross-site") {
@@ -1215,9 +1215,9 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1215
1215
  const ingest = Effect8.gen(function* () {
1216
1216
  const requestContext = yield* resolveRequestContext(request, now, location2);
1217
1217
  let index = 0;
1218
- const resourceLogs = payload.resourceLogs.map((resource2) => ({
1219
- ...resource2,
1220
- scopeLogs: resource2.scopeLogs.map((scope) => scope.scope?.name !== "krakstack.application.events" ? scope : {
1218
+ const resourceLogs = payload.resourceLogs.map((resource) => ({
1219
+ ...resource,
1220
+ scopeLogs: resource.scopeLogs.map((scope) => scope.scope?.name !== "krakstack.application.events" ? scope : {
1221
1221
  ...scope,
1222
1222
  logRecords: scope.logRecords.map(() => {
1223
1223
  const record = records[index++];
@@ -1246,13 +1246,13 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1246
1246
  }));
1247
1247
  const persistedRecords = new Map;
1248
1248
  if (storage) {
1249
- for (const resource2 of resourceLogs) {
1250
- for (const scope of resource2.scopeLogs) {
1249
+ for (const resource of resourceLogs) {
1250
+ for (const scope of resource.scopeLogs) {
1251
1251
  if (scope.scope?.name !== "krakstack.application.events")
1252
1252
  continue;
1253
1253
  for (const raw of scope.logRecords) {
1254
1254
  const record = yield* Schema9.decodeUnknownEffect(EventLogRecord)(raw);
1255
- const persisted2 = yield* storage.persist({
1255
+ const persisted = yield* storage.persist({
1256
1256
  source: "browser",
1257
1257
  record,
1258
1258
  now: nowMillis,
@@ -1260,28 +1260,28 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1260
1260
  ...payload,
1261
1261
  resourceLogs: [
1262
1262
  {
1263
- ...resource2,
1263
+ ...resource,
1264
1264
  scopeLogs: [{ ...scope, logRecords: [record] }]
1265
1265
  }
1266
1266
  ]
1267
1267
  }
1268
1268
  });
1269
- persistedRecords.set(raw, persisted2.record);
1269
+ persistedRecords.set(raw, persisted.record);
1270
1270
  }
1271
1271
  }
1272
1272
  }
1273
1273
  }
1274
1274
  const encoded = yield* Schema9.encodeEffect(codec2)({
1275
1275
  ...payload,
1276
- resourceLogs: resourceLogs.map((resource2) => ({
1277
- ...resource2,
1278
- scopeLogs: resource2.scopeLogs.map((scope) => ({
1276
+ resourceLogs: resourceLogs.map((resource) => ({
1277
+ ...resource,
1278
+ scopeLogs: resource.scopeLogs.map((scope) => ({
1279
1279
  ...scope,
1280
1280
  logRecords: scope.logRecords.map((raw) => persistedRecords.get(raw) ?? raw)
1281
1281
  }))
1282
1282
  }))
1283
1283
  });
1284
- const persisted = Boolean(storage) && payload.resourceLogs.every((resource2) => resource2.scopeLogs.every((scope) => scope.scope?.name === "krakstack.application.events" || scope.logRecords.length === 0));
1284
+ const persisted = Boolean(storage) && payload.resourceLogs.every((resource) => resource.scopeLogs.every((scope) => scope.scope?.name === "krakstack.application.events" || scope.logRecords.length === 0));
1285
1285
  return { body: new TextEncoder().encode(encoded), persisted };
1286
1286
  });
1287
1287
  return yield* (storage ? ingest.pipe(storage.sql.withTransaction) : ingest).pipe(Effect8.mapError((error) => new OtlpProcessingError({
@@ -1317,12 +1317,12 @@ class Events extends Context4.Service()("krakstack/events/Events", {
1317
1317
  static subscribe = (definition) => Layer3.effectDiscard(Effect8.flatMap(Events, (events) => events.subscribe(definition)));
1318
1318
  }
1319
1319
  export {
1320
- dailyVisitorId,
1321
- TrackEvent,
1322
- SESSION_TIMEOUT_MS,
1323
- ListEvents,
1324
- EventsConfigurationError,
1325
- Events,
1320
+ AuditTarget,
1326
1321
  EventLogRecord,
1327
- AuditTarget
1322
+ Events,
1323
+ EventsConfigurationError,
1324
+ ListEvents,
1325
+ SESSION_TIMEOUT_MS,
1326
+ TrackEvent,
1327
+ dailyVisitorId
1328
1328
  };
@@ -37,6 +37,6 @@ var migrateEvents = Migrator.make({})({
37
37
  table: "events_migrations"
38
38
  });
39
39
  export {
40
- migrateEvents,
41
- eventsMigrations
40
+ eventsMigrations,
41
+ migrateEvents
42
42
  };
@@ -9,6 +9,6 @@ var TextArrayValue = Schema.Struct({
9
9
  var eventTextAttribute = (record, key) => Schema.decodeUnknownOption(TextValue)(record.attributes.find((attribute) => attribute.key === key)?.value).pipe(Option.map((value) => value.stringValue), Option.getOrNull);
10
10
  var eventStringArrayAttribute = (record, key) => Schema.decodeUnknownOption(TextArrayValue)(record.attributes.find((attribute) => attribute.key === key)?.value).pipe(Option.map((value) => value.arrayValue.values.map((item) => item.stringValue)), Option.getOrElse(() => []));
11
11
  export {
12
- eventTextAttribute,
13
- eventStringArrayAttribute
12
+ eventStringArrayAttribute,
13
+ eventTextAttribute
14
14
  };
@@ -422,44 +422,44 @@ var VisitorEventSession = Schema3.Struct({
422
422
  received_at: Schema3.Finite
423
423
  }).annotate({ identifier: "VisitorEventSession" });
424
424
  export {
425
- VisitorEventsRequest,
426
- VisitorEventSession,
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,
425
+ AuditAttribution,
463
426
  AuditCount,
464
- AuditAttribution
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,
463
+ VisitorEventSession,
464
+ VisitorEventsRequest
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
- defaultFileExtractionOptions,
115
- OutputFormat2 as OutputFormat,
116
- FileExtractionService,
114
+ FileExtractedTextSchema,
117
115
  FileExtractionFailed,
118
- FileExtractedTextSchema
116
+ FileExtractionService,
117
+ OutputFormat2 as OutputFormat,
118
+ defaultFileExtractionOptions
119
119
  };
@@ -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
- FileExtractionFailed,
13
- FileExtractedTextSchema
12
+ FileExtractedTextSchema,
13
+ FileExtractionFailed
14
14
  };
@@ -177,14 +177,14 @@ class HealthService extends Context.Service()("@krak-stack/registry/HealthServic
177
177
  static layerWith = (options) => Layer.effect(this, this.make).pipe(Layer.provide(HealthServiceConfig.layerWith(options)));
178
178
  }
179
179
  export {
180
- healthHandler,
181
- HealthUpResponse,
182
- HealthStatus,
183
- HealthService,
184
- HealthResponse,
185
- HealthDownResponse,
186
- HealthCheckResult,
187
- HealthCheckOutcome,
180
+ HealthApiGroup,
188
181
  HealthCheckData,
189
- HealthApiGroup
182
+ HealthCheckOutcome,
183
+ HealthCheckResult,
184
+ HealthDownResponse,
185
+ HealthResponse,
186
+ HealthService,
187
+ HealthStatus,
188
+ HealthUpResponse,
189
+ healthHandler
190
190
  };
@@ -144,6 +144,6 @@ var buildDestination = (email) => {
144
144
  return destination;
145
145
  };
146
146
  export {
147
- SesNotificationConfig,
148
- SesNotificationChannel
147
+ SesNotificationChannel,
148
+ SesNotificationConfig
149
149
  };
@@ -30,6 +30,6 @@ var SesEmailNotification = Schema.Struct({
30
30
  ]
31
31
  });
32
32
  export {
33
- SesEmailNotification,
34
- SesEmailAddress
33
+ SesEmailAddress,
34
+ SesEmailNotification
35
35
  };
@@ -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
- notificationMenuMessages,
686
- NotificationMenuTrigger,
687
- NotificationMenu,
688
- NotificationListItem,
685
+ NotificationEmpty,
689
686
  NotificationList,
690
- NotificationEmpty
687
+ NotificationListItem,
688
+ NotificationMenu,
689
+ NotificationMenuTrigger,
690
+ notificationMenuMessages
691
691
  };
@@ -92,6 +92,6 @@ class NotificationService extends Context2.Service()("NotificationService", {
92
92
  ]);
93
93
  }
94
94
  export {
95
- NotificationService,
96
- NotificationPersistenceStore
95
+ NotificationPersistenceStore,
96
+ NotificationService
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
- notifications,
211
+ notificationDeliveries,
212
212
  notificationSettings,
213
- notificationDeliveries
213
+ notifications
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
- notifications,
212
- notificationSettings,
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,
211
+ EmailDeliveryPayloadV1,
225
212
  InboxNotificationSchema,
226
- EmailDeliveryPayloadV1
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,
225
+ notificationSettings,
226
+ notifications
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
- decodeNotificationDeliveryPayload,
106
- PersistedNotificationDeliveryPayload,
107
- NotificationSettingSchema,
108
- NotificationSettingId,
109
- NotificationId,
110
- NotificationDeliveryStatus,
111
- NotificationDeliverySchema,
112
- NotificationDeliveryPurpose,
113
- NotificationDeliveryId,
114
- NOTIFICATION_DELIVERY_STATUSES,
115
- NOTIFICATION_DELIVERY_PURPOSES,
105
+ EmailDeliveryPayloadV1,
116
106
  InboxNotificationSchema,
117
- EmailDeliveryPayloadV1
107
+ NOTIFICATION_DELIVERY_PURPOSES,
108
+ NOTIFICATION_DELIVERY_STATUSES,
109
+ NotificationDeliveryId,
110
+ NotificationDeliveryPurpose,
111
+ NotificationDeliverySchema,
112
+ NotificationDeliveryStatus,
113
+ NotificationId,
114
+ NotificationSettingId,
115
+ NotificationSettingSchema,
116
+ PersistedNotificationDeliveryPayload,
117
+ decodeNotificationDeliveryPayload
118
118
  };
@@ -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
- notificationMenuMessages,
779
- NotificationService,
780
- NotificationPersistenceStore,
781
- NotificationMenuTrigger,
782
- NotificationMenu,
783
- NotificationListItem,
778
+ NotificationEmpty,
784
779
  NotificationList,
785
- NotificationEmpty
780
+ NotificationListItem,
781
+ NotificationMenu,
782
+ NotificationMenuTrigger,
783
+ NotificationPersistenceStore,
784
+ NotificationService,
785
+ notificationMenuMessages
786
786
  };
@@ -25,6 +25,6 @@ class NotificationSendError extends Schema.TaggedError()("NotificationSendError"
25
25
  }) {
26
26
  }
27
27
  export {
28
- NotificationSendError,
29
- NotificationMessageSchema
28
+ NotificationMessageSchema,
29
+ NotificationSendError
30
30
  };
@@ -283,7 +283,7 @@ class HttpApiOtlp {
283
283
  static layer = Layer3.mergeAll(otlpProxyLayer, serverServices);
284
284
  }
285
285
  export {
286
- OtlpProcessingError,
286
+ HttpApiOtlp,
287
287
  OtlpLogsProcessor,
288
- HttpApiOtlp
288
+ OtlpProcessingError
289
289
  };
@@ -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((event2) => {
186
- const error = event2.error;
185
+ }).pipe(Stream.map((event) => {
186
+ const error = event.error;
187
187
  return new BrowserReportedError({
188
188
  type: "window.error",
189
- message: event2.message,
189
+ message: event.message,
190
190
  stack: Predicate.isError(error) ? error.stack : undefined
191
191
  });
192
- })), Stream.fromEventListener(globalThis, "unhandledrejection", { bufferSize: 100 }).pipe(Stream.map((event2) => {
193
- const reason = event2.reason;
192
+ })), Stream.fromEventListener(globalThis, "unhandledrejection", { bufferSize: 100 }).pipe(Stream.map((event) => {
193
+ const reason = event.reason;
194
194
  return new BrowserReportedError(Predicate.isError(reason) ? {
195
195
  type: "unhandledrejection",
196
196
  message: reason.message,
@@ -271,6 +271,6 @@ class BrowserOtlp {
271
271
  };
272
272
  }
273
273
  export {
274
- sanitizeBrowserException,
275
- BrowserOtlp
274
+ BrowserOtlp,
275
+ sanitizeBrowserException
276
276
  };