@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.
Files changed (88) 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.d.ts +30 -0
  5. package/dist/components/ui/color-picker.js +386 -0
  6. package/dist/components/ui/copy-button.js +4 -4
  7. package/dist/components/ui/data-table.js +468 -455
  8. package/dist/components/ui/editing-locale-switcher.js +10 -10
  9. package/dist/components/ui/effect-form.js +186 -185
  10. package/dist/components/ui/error-component.js +10 -18
  11. package/dist/components/ui/file-picker.js +2 -2
  12. package/dist/components/ui/form.d.ts +131 -335
  13. package/dist/components/ui/form.js +137 -136
  14. package/dist/components/ui/google-map.js +38 -6
  15. package/dist/components/ui/icon-input.js +48 -45
  16. package/dist/components/ui/krakstack-provider.js +2 -2
  17. package/dist/components/ui/locale-switcher.js +4 -4
  18. package/dist/components/ui/pagination.js +2 -2
  19. package/dist/components/ui/search-menu.js +2 -2
  20. package/dist/components/ui/sidebar-layout.js +82 -80
  21. package/dist/components/ui/theme-switcher.js +6 -6
  22. package/dist/components/ui/virtualized-combobox.js +34 -31
  23. package/dist/lib/docs.d.ts +2 -2
  24. package/dist/lib/docs.js +187 -185
  25. package/dist/lib/docs.server.js +45 -23
  26. package/dist/lib/documentation-toolkit.d.ts +2 -2
  27. package/dist/lib/documentation-toolkit.js +45 -23
  28. package/dist/lib/httpapi-adapter.d.ts +11 -3
  29. package/dist/lib/httpapi-adapter.js +42 -15
  30. package/dist/lib/httpapi-cli.d.ts +13 -4
  31. package/dist/lib/httpapi-cli.js +70 -28
  32. package/dist/lib/httpapi-toolkit.js +40 -13
  33. package/dist/lib/query.d.ts +4 -4
  34. package/dist/lib/query.js +13 -13
  35. package/dist/lib/seo.js +2 -2
  36. package/dist/lib/webfetch-toolkit.js +7 -7
  37. package/dist/oxlint/anti-slop/index.js +2 -2
  38. package/dist/services/agent/client/index.js +155 -153
  39. package/dist/services/agent/index.js +3 -3
  40. package/dist/services/agent/schema.js +5 -5
  41. package/dist/services/events/browser.js +38 -23
  42. package/dist/services/events/client/audit-log-table.js +472 -459
  43. package/dist/services/events/client/tracking-notice.js +9 -4
  44. package/dist/services/events/index.d.ts +3 -1
  45. package/dist/services/events/index.js +79 -74
  46. package/dist/services/events/migrations.js +2 -2
  47. package/dist/services/events/record.js +2 -2
  48. package/dist/services/events/schema.d.ts +18 -10
  49. package/dist/services/events/schema.js +42 -42
  50. package/dist/services/file-extraction/index.js +4 -4
  51. package/dist/services/file-extraction/schema.d.ts +3 -1
  52. package/dist/services/file-extraction/schema.js +2 -2
  53. package/dist/services/health/api.builder.d.ts +8 -8
  54. package/dist/services/health/api.group.d.ts +8 -8
  55. package/dist/services/health/index.d.ts +10 -6
  56. package/dist/services/health/index.js +17 -13
  57. package/dist/services/health/schema.d.ts +7 -7
  58. package/dist/services/notification/channels/ses/index.js +2 -2
  59. package/dist/services/notification/channels/ses/schema.js +2 -2
  60. package/dist/services/notification/client/index.js +5 -5
  61. package/dist/services/notification/index.js +3 -3
  62. package/dist/services/notification/persistence/drizzle.js +2 -2
  63. package/dist/services/notification/persistence/index.js +15 -15
  64. package/dist/services/notification/persistence/schema.js +12 -12
  65. package/dist/services/notification/public.js +8 -8
  66. package/dist/services/notification/schema.d.ts +3 -1
  67. package/dist/services/notification/schema.js +2 -2
  68. package/dist/services/opentelemetry/api.js +7 -5
  69. package/dist/services/opentelemetry/browser.js +9 -9
  70. package/dist/services/opentelemetry/index.js +2 -2
  71. package/dist/services/opentelemetry/processor.d.ts +3 -1
  72. package/dist/services/opentelemetry/web-vitals.js +12 -7
  73. package/dist/services/s3/index.js +2 -2
  74. package/dist/services/s3/schema.d.ts +3 -1
  75. package/dist/services/s3/schema.js +2 -2
  76. package/dist/services/speech/api.js +3 -1
  77. package/dist/services/speech/index.js +15 -8
  78. package/dist/services/speech/schema.d.ts +3 -1
  79. package/dist/services/speech/schema.js +12 -10
  80. package/dist/services/webhooks/client/delivery-table.js +506 -493
  81. package/dist/services/webhooks/http-client.js +5 -5
  82. package/dist/services/webhooks/index.js +47 -47
  83. package/dist/services/webhooks/migrations.js +5 -5
  84. package/dist/services/webhooks/receiver.d.ts +6 -2
  85. package/dist/services/webhooks/schema.d.ts +7 -5
  86. package/dist/services/webhooks/schema.js +22 -22
  87. package/dist/services/webhooks/url.js +5 -5
  88. package/package.json +6 -1
@@ -33,11 +33,11 @@ var isLoopbackWebhookUrl = (url) => ["http:", "https:"].includes(url.protocol) &
33
33
  var isPublicWebhookDestination = Effect.fn("Webhooks.isPublicDestination")(function* (url) {
34
34
  if (!isPublicWebhookUrl(url))
35
35
  return false;
36
- const hostname = url.hostname.replace(/^\[|\]$/g, "");
37
- if (Result.isSuccess(NetAddress.ipFromString(hostname)))
36
+ const hostname2 = url.hostname.replace(/^\[|\]$/g, "");
37
+ if (Result.isSuccess(NetAddress.ipFromString(hostname2)))
38
38
  return true;
39
39
  const dns = yield* Dns.Dns;
40
- return yield* dns.lookup(hostname).pipe(Effect.map((addresses) => addresses.every((address) => isPublicIpAddress(NetAddress.formatIp(address)))), Effect.catch(() => Effect.succeed(false)));
40
+ return yield* dns.lookup(hostname2).pipe(Effect.map((addresses) => addresses.every((address) => isPublicIpAddress(NetAddress.formatIp(address)))), Effect.orElseSucceed(() => false));
41
41
  });
42
42
  var isAllowedWebhookDestination = Effect.fn("Webhooks.isAllowedDestination")(function* (url) {
43
43
  if ((yield* WebhookAllowLoopback) && isLoopbackWebhookUrl(url))
@@ -63,7 +63,7 @@ var layer = Layer.effect(HttpClient.HttpClient, Effect.gen(function* () {
63
63
  })));
64
64
  })).pipe(Layer.provide(FetchHttpClient.layer));
65
65
  export {
66
- isAllowedWebhookDestination,
66
+ layer,
67
67
  isPublicWebhookDestination,
68
- layer
68
+ isAllowedWebhookDestination
69
69
  };
@@ -120,11 +120,11 @@ import { FetchHttpClient, HttpClient, HttpClientError } from "effect/http";
120
120
  var isPublicWebhookDestination = Effect2.fn("Webhooks.isPublicDestination")(function* (url) {
121
121
  if (!isPublicWebhookUrl(url))
122
122
  return false;
123
- const hostname = url.hostname.replace(/^\[|\]$/g, "");
124
- if (Result.isSuccess(NetAddress.ipFromString(hostname)))
123
+ const hostname2 = url.hostname.replace(/^\[|\]$/g, "");
124
+ if (Result.isSuccess(NetAddress.ipFromString(hostname2)))
125
125
  return true;
126
126
  const dns = yield* Dns.Dns;
127
- return yield* dns.lookup(hostname).pipe(Effect2.map((addresses) => addresses.every((address) => isPublicIpAddress(NetAddress.formatIp(address)))), Effect2.catch(() => Effect2.succeed(false)));
127
+ return yield* dns.lookup(hostname2).pipe(Effect2.map((addresses) => addresses.every((address) => isPublicIpAddress(NetAddress.formatIp(address)))), Effect2.orElseSucceed(() => false));
128
128
  });
129
129
  var isAllowedWebhookDestination = Effect2.fn("Webhooks.isAllowedDestination")(function* (url) {
130
130
  if ((yield* WebhookAllowLoopback) && isLoopbackWebhookUrl(url))
@@ -280,11 +280,11 @@ var ColumnFilters = Schema.declare(Schema.is(ColumnFiltersArray), {
280
280
  toCodecStringTree: () => Schema.link()(Schema.fromJsonString(ColumnFiltersArray), SchemaTransformation.passthrough())
281
281
  });
282
282
  var Query = Schema.Struct({
283
- page: Schema.optional(Schema.Union([Schema.Number, Schema.NumberFromString]).check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)), {
283
+ page: Schema.optional(Schema.Union([Schema.Finite, Schema.FiniteFromString]).check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)), {
284
284
  decode: SchemaGetter.withDefault(Effect3.succeed(0)),
285
285
  encode: SchemaGetter.transformOptional(Option.filter((page) => page !== 0))
286
286
  })),
287
- pageSize: Schema.optional(Schema.Union([Schema.Number, Schema.NumberFromString]).check(Schema.isInt(), Schema.isBetween({ minimum: 1, maximum: 100 }))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 })), {
287
+ pageSize: Schema.optional(Schema.Union([Schema.Finite, Schema.FiniteFromString]).check(Schema.isInt(), Schema.isBetween({ minimum: 1, maximum: 100 }))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 })), {
288
288
  decode: SchemaGetter.withDefault(Effect3.succeed(20)),
289
289
  encode: SchemaGetter.transformOptional(Option.filter((pageSize) => pageSize !== 20))
290
290
  })),
@@ -491,8 +491,8 @@ class WebhooksReceiver extends Context2.Service()("krakstack/webhooks/WebhooksRe
491
491
  const valid = yield* mac.verify(key, signature, new TextEncoder().encode(`${headers["webhook-id"]}.${timestamp}.${input.body}`));
492
492
  if (!valid)
493
493
  return yield* new WebhookVerificationError({ reason: "signature" });
494
- const payload = yield* Schema3.decodeUnknownEffect(Schema3.fromJsonString(input.schema))(input.body).pipe(Effect4.mapError(() => new WebhookVerificationError({ reason: "payload" })));
495
- const request = yield* Schema3.decodeUnknownEffect(ReceiptRequest)({
494
+ const payload = yield* Schema3.decodeEffect(Schema3.fromJsonString(input.schema))(input.body).pipe(Effect4.mapError(() => new WebhookVerificationError({ reason: "payload" })));
495
+ const request = yield* Schema3.decodeEffect(ReceiptRequest)({
496
496
  receiver: input.receiver,
497
497
  eventId: headers["webhook-id"],
498
498
  bodyHash: yield* digest.digestHex(Digest.sha256, new TextEncoder().encode(input.body))
@@ -562,8 +562,8 @@ var processDelivery = Effect5.fn("Webhooks.processDelivery")(function* (input) {
562
562
  return null;
563
563
  const endpoint = found.value;
564
564
  if (!endpoint.enabled || delivery.retries >= maxDeliveryAttempts) {
565
- const error = !endpoint.enabled ? "Webhook endpoint is disabled" : delivery.error ?? "Delivery attempt limit reached";
566
- yield* sql`UPDATE webhook_deliveries SET status = 'failed', error = ${error}, completed_at = now(), updated_at = now() WHERE id = ${input.id}`;
565
+ const error2 = !endpoint.enabled ? "Webhook endpoint is disabled" : delivery.error ?? "Delivery attempt limit reached";
566
+ yield* sql`UPDATE webhook_deliveries SET status = 'failed', error = ${error2}, completed_at = now(), updated_at = now() WHERE id = ${input.id}`;
567
567
  return null;
568
568
  }
569
569
  const body = yield* Schema4.encodeEffect(Schema4.fromJsonString(Schema4.Json))({
@@ -581,7 +581,7 @@ var processDelivery = Effect5.fn("Webhooks.processDelivery")(function* (input) {
581
581
  "webhook-id": delivery.id,
582
582
  "webhook-timestamp": timestamp,
583
583
  "webhook-signature": signature
584
- }), HttpClientRequest.bodyText(body, "application/json"))).pipe(Effect5.map((response) => response.status >= 200 && response.status < 300 ? null : `HTTP ${response.status}`), Effect5.timeout("30 seconds"), Effect5.catch((error) => Effect5.succeed(error._tag === "TimeoutError" ? "Request timed out after 30 seconds" : error.reason._tag === "TransportError" && error.reason.description === "Webhook destination is not public" ? "Webhook destination is not public" : error.reason._tag === "InvalidUrlError" ? "Invalid webhook URL" : "Webhook network request failed")), Effect5.scoped) : "Webhook destination is not public";
584
+ }), HttpClientRequest.bodyText(body, "application/json"))).pipe(Effect5.map((response) => response.status >= 200 && response.status < 300 ? null : `HTTP ${response.status}`), Effect5.timeout("30 seconds"), Effect5.catch((error2) => Effect5.succeed(error2._tag === "TimeoutError" ? "Request timed out after 30 seconds" : error2.reason._tag === "TransportError" && error2.reason.description === "Webhook destination is not public" ? "Webhook destination is not public" : error2.reason._tag === "InvalidUrlError" ? "Invalid webhook URL" : "Webhook network request failed")), Effect5.scoped) : "Webhook destination is not public";
585
585
  if (error === null) {
586
586
  yield* sql`UPDATE webhook_deliveries SET status = 'success', error = NULL, completed_at = now(), updated_at = now() WHERE id = ${input.id}`;
587
587
  return null;
@@ -593,8 +593,8 @@ var processDelivery = Effect5.fn("Webhooks.processDelivery")(function* (input) {
593
593
  const step = yield* Schedule.toStep(retrySchedule);
594
594
  let duration = Duration.zero;
595
595
  for (let attempt = 0;attempt <= delivery.retries; attempt++) {
596
- const [, delay] = yield* step(DateTime3.toEpochMillis(now), undefined).pipe(Effect5.orDie);
597
- duration = delay;
596
+ const [, delay2] = yield* step(DateTime3.toEpochMillis(now), undefined).pipe(Effect5.orDie);
597
+ duration = delay2;
598
598
  }
599
599
  const delay = Duration.toMillis(duration);
600
600
  yield* sql`UPDATE webhook_deliveries SET retries = retries + 1, error = ${error}, retry_at = now() + ${delay} * interval '1 millisecond', updated_at = now() WHERE id = ${input.id}`;
@@ -610,7 +610,7 @@ var workflowLayer = DeliverWebhookV1.toLayer((input) => Effect5.gen(function* ()
610
610
  for (let step = 0;; step++) {
611
611
  const wait = yield* Activity.make({
612
612
  name: `DeliverWebhookAttemptV1-${step}`,
613
- success: Schema4.NullOr(Schema4.Number),
613
+ success: Schema4.NullOr(Schema4.Finite),
614
614
  error: WebhookError,
615
615
  execute: processDelivery(input).pipe(Effect5.mapError(() => new WebhookError({
616
616
  message: "Webhook delivery persistence failed"
@@ -669,7 +669,7 @@ class Webhooks extends Context3.Service()("krakstack/webhooks/Webhooks", {
669
669
  });
670
670
  const status = sql`CASE WHEN d.status = 'pending' AND d.retries > 0 THEN 'failed' ELSE d.status END`;
671
671
  const listDeliveries = Effect5.fn("Webhooks.listDeliveries")(function* (input) {
672
- const request = yield* Schema4.decodeUnknownEffect(ListWebhookDeliveries)(input);
672
+ const request = yield* Schema4.decodeEffect(ListWebhookDeliveries)(input);
673
673
  if (Option3.isNone(yield* find(request)))
674
674
  return;
675
675
  const columns = {
@@ -730,7 +730,7 @@ class Webhooks extends Context3.Service()("krakstack/webhooks/Webhooks", {
730
730
  };
731
731
  });
732
732
  const statistics = Effect5.fn("Webhooks.statistics")(function* (input) {
733
- const request = yield* Schema4.decodeUnknownEffect(WebhookStatisticsRequest)(input);
733
+ const request = yield* Schema4.decodeEffect(WebhookStatisticsRequest)(input);
734
734
  if (Option3.isNone(yield* find(request)))
735
735
  return;
736
736
  const totals = yield* SqlSchema2.findOne({
@@ -775,8 +775,8 @@ class Webhooks extends Context3.Service()("krakstack/webhooks/Webhooks", {
775
775
  return { ...totals, buckets };
776
776
  });
777
777
  const create = Effect5.fn("Webhooks.create")(function* (input) {
778
- const { organizationId } = yield* Schema4.decodeUnknownEffect(WebhookScope)(input);
779
- const payload = yield* Schema4.decodeUnknownEffect(configuredPayload)(input.payload);
778
+ const { organizationId } = yield* Schema4.decodeEffect(WebhookScope)(input);
779
+ const payload = yield* Schema4.decodeEffect(configuredPayload)(input.payload);
780
780
  const id = yield* random.uuidV7();
781
781
  const secret = Hex2.encode(yield* random.randomBytes(32));
782
782
  yield* sql`INSERT INTO webhooks (id, organization_id, name, url, description, enabled, events, headers, secret)
@@ -785,8 +785,8 @@ class Webhooks extends Context3.Service()("krakstack/webhooks/Webhooks", {
785
785
  return { id };
786
786
  });
787
787
  const update = Effect5.fn("Webhooks.update")(function* (input) {
788
- const { organizationId, id } = yield* Schema4.decodeUnknownEffect(WebhookRequest)(input);
789
- const payload = yield* Schema4.decodeUnknownEffect(configuredPayload)(input.payload);
788
+ const { organizationId, id } = yield* Schema4.decodeEffect(WebhookRequest)(input);
789
+ const payload = yield* Schema4.decodeEffect(configuredPayload)(input.payload);
790
790
  return yield* SqlSchema2.findOneOption({
791
791
  Request: Schema4.Void,
792
792
  Result: Webhook,
@@ -796,12 +796,12 @@ class Webhooks extends Context3.Service()("krakstack/webhooks/Webhooks", {
796
796
  })().pipe(Effect5.map(Option3.getOrNull));
797
797
  });
798
798
  const remove = Effect5.fn("Webhooks.delete")(function* (input) {
799
- const { organizationId, id } = yield* Schema4.decodeUnknownEffect(WebhookRequest)(input);
799
+ const { organizationId, id } = yield* Schema4.decodeEffect(WebhookRequest)(input);
800
800
  const rows = yield* sql`DELETE FROM webhooks WHERE organization_id = ${organizationId} AND id = ${id} RETURNING id`;
801
801
  return rows.length ? { success: true } : null;
802
802
  });
803
803
  const publish = Effect5.fn("Webhooks.publish")(function* (input) {
804
- const { organizationId, eventId, event, data } = yield* Schema4.decodeUnknownEffect(PublishWebhook)(input);
804
+ const { organizationId, eventId, event, data } = yield* Schema4.decodeEffect(PublishWebhook)(input);
805
805
  const inserted = yield* sql`INSERT INTO webhook_publications (organization_id, event_id, event, data)
806
806
  VALUES (${organizationId}, ${eventId}, ${event}, ${pg.json(data)}) ON CONFLICT DO NOTHING RETURNING event_id`;
807
807
  if (!inserted.length) {
@@ -842,31 +842,31 @@ class Webhooks extends Context3.Service()("krakstack/webhooks/Webhooks", {
842
842
  static layer = this.layerWithoutMigrations.pipe(Layer4.provide(layer), Layer4.provide(webhookMigrationsLayer));
843
843
  }
844
844
  export {
845
- DeliverWebhookV1,
846
- ListWebhookDeliveries,
847
- PublishWebhook,
848
- Webhook,
849
- WebhookAllowLoopback,
850
- WebhookDeliveries,
851
- WebhookDeliveriesQuery,
852
- WebhookDelivery,
853
- WebhookDeliveryBucket,
854
- WebhookDeliveryCounts,
855
- WebhookDeliverySortId,
856
- WebhookError,
857
- WebhookEventCount,
858
- WebhookName,
859
- WebhookPayload,
860
- WebhookReceiptConflict,
861
- WebhookRequest,
862
- WebhookScope,
863
- WebhookStatistics,
864
- WebhookStatisticsInterval,
865
- WebhookStatisticsRequest,
866
- WebhookVerificationError,
867
- Webhooks,
868
- WebhooksReceiver,
869
- deliveryColumns,
845
+ webhookPayloadSchema,
870
846
  webhookColumns,
871
- webhookPayloadSchema
847
+ deliveryColumns,
848
+ WebhooksReceiver,
849
+ Webhooks,
850
+ WebhookVerificationError,
851
+ WebhookStatisticsRequest,
852
+ WebhookStatisticsInterval,
853
+ WebhookStatistics,
854
+ WebhookScope,
855
+ WebhookRequest,
856
+ WebhookReceiptConflict,
857
+ WebhookPayload,
858
+ WebhookName,
859
+ WebhookEventCount,
860
+ WebhookError,
861
+ WebhookDeliverySortId,
862
+ WebhookDeliveryCounts,
863
+ WebhookDeliveryBucket,
864
+ WebhookDelivery,
865
+ WebhookDeliveriesQuery,
866
+ WebhookDeliveries,
867
+ WebhookAllowLoopback,
868
+ Webhook,
869
+ PublishWebhook,
870
+ ListWebhookDeliveries,
871
+ DeliverWebhookV1
872
872
  };
@@ -54,10 +54,10 @@ var migrateWebhookReceiver = Migrator.make({})({
54
54
  });
55
55
  var webhookReceiverMigrationsLayer = Layer.effectDiscard(migrateWebhookReceiver);
56
56
  export {
57
- migrateWebhookReceiver,
58
- migrateWebhooks,
59
- webhookMigrations,
60
- webhookMigrationsLayer,
57
+ webhookReceiverMigrationsLayer,
61
58
  webhookReceiverMigrations,
62
- webhookReceiverMigrationsLayer
59
+ webhookMigrationsLayer,
60
+ webhookMigrations,
61
+ migrateWebhooks,
62
+ migrateWebhookReceiver
63
63
  };
@@ -2,10 +2,14 @@ import { Context, Effect, Layer, Redacted, Schema } from "effect";
2
2
  import { SqlClient } from "effect/sql";
3
3
  declare const WebhookVerificationError_base: Schema.Class<WebhookVerificationError, Schema.TaggedStruct<"WebhookVerificationError", {
4
4
  readonly reason: Schema.Literals<readonly ["headers", "timestamp", "signature", "payload"]>;
5
- }>, import("effect/Cause").YieldableError>;
5
+ }>, import("effect/Cause").YieldableError & {
6
+ readonly brand: unique symbol;
7
+ }>;
6
8
  export declare class WebhookVerificationError extends WebhookVerificationError_base {
7
9
  }
8
- declare const WebhookReceiptConflict_base: Schema.Class<WebhookReceiptConflict, Schema.TaggedStruct<"WebhookReceiptConflict", {}>, import("effect/Cause").YieldableError>;
10
+ declare const WebhookReceiptConflict_base: Schema.Class<WebhookReceiptConflict, Schema.TaggedStruct<"WebhookReceiptConflict", {}>, import("effect/Cause").YieldableError & {
11
+ readonly brand: unique symbol;
12
+ }>;
9
13
  export declare class WebhookReceiptConflict extends WebhookReceiptConflict_base {
10
14
  }
11
15
  declare const WebhooksReceiver_base: Context.ServiceClass<WebhooksReceiver, "krakstack/webhooks/WebhooksReceiver", {
@@ -94,8 +94,8 @@ export declare const WebhookDelivery: Schema.Struct<{
94
94
  }>;
95
95
  export declare const WebhookDeliverySortId: Schema.Literals<readonly ["id", "event", "status", "createdAt", "completedAt"]>;
96
96
  export declare const WebhookDeliveriesQuery: Schema.Struct<{
97
- readonly page: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
98
- readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
97
+ readonly page: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Finite, Schema.FiniteFromString]>>, never, never>;
98
+ readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Finite, Schema.FiniteFromString]>>, never, never>;
99
99
  readonly globalFilter: Schema.optional<Schema.String>;
100
100
  readonly filters: Schema.optional<Schema.declare<readonly ({
101
101
  readonly id: string;
@@ -153,8 +153,8 @@ export declare const WebhookDeliveriesQuery: Schema.Struct<{
153
153
  }[]>>;
154
154
  }>;
155
155
  export declare const ListWebhookDeliveries: Schema.Struct<{
156
- readonly page: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
157
- readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
156
+ readonly page: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Finite, Schema.FiniteFromString]>>, never, never>;
157
+ readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Finite, Schema.FiniteFromString]>>, never, never>;
158
158
  readonly globalFilter: Schema.optional<Schema.String>;
159
159
  readonly organizationId: Schema.NonEmptyString;
160
160
  readonly id: Schema.NonEmptyString;
@@ -242,7 +242,9 @@ export declare const PublishWebhook: Schema.Struct<{
242
242
  }>;
243
243
  declare const WebhookError_base: Schema.Class<WebhookError, Schema.TaggedStruct<"WebhookError", {
244
244
  readonly message: Schema.String;
245
- }>, import("effect/Cause").YieldableError>;
245
+ }>, import("effect/Cause").YieldableError & {
246
+ readonly brand: unique symbol;
247
+ }>;
246
248
  export declare class WebhookError extends WebhookError_base {
247
249
  }
248
250
  export type Webhook = typeof Webhook.Type;
@@ -169,11 +169,11 @@ var ColumnFilters = Schema.declare(Schema.is(ColumnFiltersArray), {
169
169
  toCodecStringTree: () => Schema.link()(Schema.fromJsonString(ColumnFiltersArray), SchemaTransformation.passthrough())
170
170
  });
171
171
  var Query = Schema.Struct({
172
- page: Schema.optional(Schema.Union([Schema.Number, Schema.NumberFromString]).check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)), {
172
+ page: Schema.optional(Schema.Union([Schema.Finite, Schema.FiniteFromString]).check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)), {
173
173
  decode: SchemaGetter.withDefault(Effect.succeed(0)),
174
174
  encode: SchemaGetter.transformOptional(Option.filter((page) => page !== 0))
175
175
  })),
176
- pageSize: Schema.optional(Schema.Union([Schema.Number, Schema.NumberFromString]).check(Schema.isInt(), Schema.isBetween({ minimum: 1, maximum: 100 }))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 })), {
176
+ pageSize: Schema.optional(Schema.Union([Schema.Finite, Schema.FiniteFromString]).check(Schema.isInt(), Schema.isBetween({ minimum: 1, maximum: 100 }))).pipe(Schema.decodeTo(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 })), {
177
177
  decode: SchemaGetter.withDefault(Effect.succeed(20)),
178
178
  encode: SchemaGetter.transformOptional(Option.filter((pageSize) => pageSize !== 20))
179
179
  })),
@@ -329,25 +329,25 @@ class WebhookError extends Schema2.TaggedError()("WebhookError", {
329
329
  }) {
330
330
  }
331
331
  export {
332
- ListWebhookDeliveries,
333
- PublishWebhook,
334
- Webhook,
335
- WebhookDeliveries,
336
- WebhookDeliveriesQuery,
337
- WebhookDelivery,
338
- WebhookDeliveryBucket,
339
- WebhookDeliveryCounts,
340
- WebhookDeliverySortId,
341
- WebhookError,
342
- WebhookEventCount,
343
- WebhookName,
344
- WebhookPayload,
345
- WebhookRequest,
346
- WebhookScope,
347
- WebhookStatistics,
348
- WebhookStatisticsInterval,
349
- WebhookStatisticsRequest,
350
- deliveryColumns,
332
+ webhookPayloadSchema,
351
333
  webhookColumns,
352
- webhookPayloadSchema
334
+ deliveryColumns,
335
+ WebhookStatisticsRequest,
336
+ WebhookStatisticsInterval,
337
+ WebhookStatistics,
338
+ WebhookScope,
339
+ WebhookRequest,
340
+ WebhookPayload,
341
+ WebhookName,
342
+ WebhookEventCount,
343
+ WebhookError,
344
+ WebhookDeliverySortId,
345
+ WebhookDeliveryCounts,
346
+ WebhookDeliveryBucket,
347
+ WebhookDelivery,
348
+ WebhookDeliveriesQuery,
349
+ WebhookDeliveries,
350
+ Webhook,
351
+ PublishWebhook,
352
+ ListWebhookDeliveries
353
353
  };
@@ -39,10 +39,10 @@ var WebhookAllowLoopback = Context.Reference("Webhooks/AllowLoopback", {
39
39
  });
40
40
  var isLoopbackWebhookUrl = (url) => ["http:", "https:"].includes(url.protocol) && !url.username && !url.password && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
41
41
  export {
42
- WebhookAllowLoopback,
43
- isAllowedWebhookUrlString,
44
- isLoopbackWebhookUrl,
45
- isPublicIpAddress,
42
+ isPublicWebhookUrlString,
46
43
  isPublicWebhookUrl,
47
- isPublicWebhookUrlString
44
+ isPublicIpAddress,
45
+ isLoopbackWebhookUrl,
46
+ isAllowedWebhookUrlString,
47
+ WebhookAllowLoopback
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krak-stack/registry",
3
- "version": "0.1.61",
3
+ "version": "0.2.0",
4
4
  "description": "Tree-shakable KrakStack components and Effect services.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -160,6 +160,10 @@
160
160
  "types": "./dist/components/ui/copy-button.d.ts",
161
161
  "import": "./dist/components/ui/copy-button.js"
162
162
  },
163
+ "./color-picker": {
164
+ "types": "./dist/components/ui/color-picker.d.ts",
165
+ "import": "./dist/components/ui/color-picker.js"
166
+ },
163
167
  "./data-table": {
164
168
  "types": "./dist/components/ui/data-table.d.ts",
165
169
  "import": "./dist/components/ui/data-table.js"
@@ -302,6 +306,7 @@
302
306
  "dependencies": {
303
307
  "@oxlint/plugins": "1.78.0",
304
308
  "bowser": "^2.14.1",
309
+ "react-colorful": "^5.8.1",
305
310
  "web-vitals": "^5.1.0"
306
311
  },
307
312
  "peerDependencies": {