@krak-stack/registry 0.1.53 → 0.1.55

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 CHANGED
@@ -1,5 +1,36 @@
1
1
  # @krak-stack/registry
2
2
 
3
+ ## 0.1.55
4
+
5
+ ### Patch Changes
6
+
7
+ - 9ec74fb: Default the activity history dateTime column to America/New_York, expose a timeZone override, and use Activity history titles in English and French.
8
+
9
+ Display event-time OpenTelemetry user.full_name, user.name, user.email and user.id attributes in activity history without resolving or linking Auth profiles. Preserve those trusted server annotations for audit events, while omitting them from analytics. Remove the separate actors prop.
10
+
11
+ Replace Events.listAudit / ListAudit with Events.list / ListEvents and require an explicit audit or analytics category. Preserve server pagination and service/tenant isolation; audit results remain restricted to server events.
12
+
13
+ Support an optional exact eventName filter, combined with category and search before counting and pagination.
14
+
15
+ Add an Action dropdown with a filter icon as the first toolbar menu in controlled AuditLogTable instances. Accept an application-owned events catalog of { value, label } options, use the labels in both the dropdown and Action column, and include All actions to clear the selection. Reset pagination when the event changes and preserve it across table query updates. Export EventQuery and EventQueryStandard for shared table and route state.
16
+
17
+ Display recorded target names with type and ID as secondary text. For older events whose target name is missing or duplicates the ID, show the target type above the ID instead. Target names remain event-time snapshots, not current entity lookups.
18
+
19
+ Migration required: replace Events.listAudit with Events.list({ ...query, organizationId, category: "audit" }), replace ListAudit with ListEvents, remove AuditActor/actors wiring, and use EventQuery / EventQueryStandard through API, client, and route query state to preserve eventName. Populate events with the full application event catalog and localized labels. Existing events are not backfilled.
20
+
21
+ ## 0.1.54
22
+
23
+ ### Patch Changes
24
+
25
+ - Emit newly persisted server events through `Otlp.event` as well as SQL, preserving enriched attributes, event IDs, timestamps, and trace context in the application event scope. Duplicate retries and conflicts do not emit again. OTLP delivery remains best effort and is not atomic with an outer application transaction.
26
+ - Export server events when SQL persistence is not configured; `inserted: false` then means no database row was written, not that telemetry was suppressed.
27
+
28
+ - Add `TrackingNotice` with English/French defaults, optional copy overrides, a custom privacy-policy link, and persistent analytics preferences. Import it from `@krak-stack/registry/events/tracking-notice`.
29
+ - Require consent by default for BrowserEvents and BrowserWebVitals. Remember choices for 180 days, honor DNT/GPC, and invalidate unsent events after withdrawal. Existing consumers must mount the notice or explicitly configure `requireConsent: false`.
30
+ - Add optional server consent enforcement through `Events.layerWith({ requireConsent: true })`, while preserving necessary audit recording. Keep essential browser error reporting independent, with sanitized messages and stack locations.
31
+ - Collect Web Vitals only when consent predates navigation; withdrawal disables it for the rest of the document. Already-started exports, including retries, may finish after withdrawal.
32
+ - Reorganize Events and OpenTelemetry documentation around setup and practical examples.
33
+
3
34
  ## 0.1.53
4
35
 
5
36
  ### Patch Changes
@@ -289,10 +289,13 @@ var ErrorComponent = ({
289
289
  ...messages?.[locale.split("-")[0] ?? locale],
290
290
  ...messages?.[locale]
291
291
  }), [locale, messages]);
292
- const reference = diagnostics?.reference ?? getErrorTraceId(error);
292
+ const standardError = error instanceof Error ? error : undefined;
293
+ const errorName = standardError?.name ?? labels.errorLabel;
294
+ const errorMessage = standardError?.message.trim() || labels.description;
295
+ const reference = diagnostics?.reference ?? (standardError ? getErrorTraceId(standardError) : undefined);
293
296
  const report = useMemo(() => [
294
- `${labels.errorLabel}: ${error.name}`,
295
- `${labels.messageLabel}: ${error.message.trim() || labels.description}`,
297
+ `${labels.errorLabel}: ${errorName}`,
298
+ `${labels.messageLabel}: ${errorMessage}`,
296
299
  "",
297
300
  `${labels.pageLabel}: ${pathname}`,
298
301
  `${labels.timeLabel}: ${new Date().toISOString()}`,
@@ -302,7 +305,8 @@ var ErrorComponent = ({
302
305
  ...reference ? [`${labels.referenceLabel}: ${reference}`] : []
303
306
  ].join(`
304
307
  `), [
305
- error,
308
+ errorName,
309
+ errorMessage,
306
310
  pathname,
307
311
  locale,
308
312
  labels,
@@ -328,7 +332,7 @@ var ErrorComponent = ({
328
332
  })
329
333
  }),
330
334
  /* @__PURE__ */ jsx5(EmptyDescription, {
331
- children: error.message.trim() || labels.description
335
+ children: errorMessage
332
336
  })
333
337
  ]
334
338
  }),
@@ -103,7 +103,7 @@ export declare const FieldWrapper: ({ children, legend, localized, description,
103
103
  value: string;
104
104
  }[];
105
105
  }) => JSX.Element;
106
- declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/react-form").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
106
+ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/form-core").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
107
107
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
108
108
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
109
109
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -160,7 +160,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
160
160
  locale?: string;
161
161
  messages?: FormMessageTranslations;
162
162
  }) => JSX.Element;
163
- }>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
163
+ }>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
164
164
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
165
165
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
166
166
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -218,7 +218,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
218
218
  messages?: FormMessageTranslations;
219
219
  }) => JSX.Element;
220
220
  }, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
221
- form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
221
+ form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
222
222
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
223
223
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
224
224
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -333,8 +333,8 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
333
333
  locale?: string;
334
334
  messages?: FormMessageTranslations;
335
335
  }) => JSX.Element;
336
- }, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/react-form").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/react-form").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
337
- form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/react-form").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
336
+ }, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/form-core").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/form-core").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
337
+ form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/form-core").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
338
338
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
339
339
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
340
340
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -1,11 +1,14 @@
1
1
  import type { EventAttributes } from "../opentelemetry/schema.js";
2
2
  import { OtlpEvents } from "../opentelemetry/events.js";
3
3
  import { Context, Effect, Layer, Schema } from "effect";
4
+ export { analyticsAllowed, analyticsConsentSnapshot, saveAnalyticsPreference, subscribeAnalyticsConsent, } from "../opentelemetry/consent.js";
4
5
  import { BrowserEventOptions, type BrowserPageOptions } from "./schema.js";
5
6
  export type { BrowserEventOptions, BrowserPageOptions } from "./schema.js";
6
7
  export type { EventAttributes } from "../opentelemetry/schema.js";
7
8
  export interface BrowserEventsOptions {
8
9
  readonly enabled?: boolean;
10
+ /** Opt in to the shared notice policy. Defaults to true. */
11
+ readonly requireConsent?: boolean;
9
12
  readonly respectDoNotTrack?: boolean;
10
13
  readonly pageViews?: boolean;
11
14
  readonly locale?: () => string;
@@ -14,6 +17,7 @@ export interface BrowserEventsOptions {
14
17
  }
15
18
  declare const BrowserEventsClient_base: Context.ServiceClass<BrowserEventsClient, "krakstack/events/BrowserEventsClient", {
16
19
  readonly events: OtlpEvents["Service"];
20
+ readonly allowed: () => boolean;
17
21
  readonly context: (name: string, properties?: EventAttributes) => EventAttributes;
18
22
  }>;
19
23
  declare class BrowserEventsClient extends BrowserEventsClient_base {
@@ -22,5 +26,5 @@ export declare class BrowserEvents {
22
26
  static readonly track: (name: string, properties?: EventAttributes, options?: BrowserEventOptions) => Effect.Effect<void, Schema.SchemaError, never>;
23
27
  static readonly page: (options?: BrowserPageOptions) => Effect.Effect<void, Schema.SchemaError, never>;
24
28
  /** Requires BrowserOtlp; no identifiers are persisted. */
25
- static readonly layer: ({ enabled, respectDoNotTrack, pageViews, locale, sanitizePath, }?: BrowserEventsOptions) => Layer.Layer<BrowserEventsClient, never, OtlpEvents>;
29
+ static readonly layer: ({ enabled, requireConsent, respectDoNotTrack, pageViews, locale, sanitizePath, }?: BrowserEventsOptions) => Layer.Layer<BrowserEventsClient, never, OtlpEvents>;
26
30
  }