analytica.click 0.0.535 → 0.0.537

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.
@@ -1,6 +1,8 @@
1
1
  import 'cross-fetch/polyfill';
2
- import type { TEvent, TPage } from '../types';
2
+ import type { TEvent, TMetric, TPage } from '../types';
3
3
  /** used for tracking arbitrary events */
4
4
  export declare const event: TEvent;
5
5
  /** used for tracking visits to a page */
6
6
  export declare const page: TPage;
7
+ /** used for tracking custom metrics */
8
+ export declare const metric: TMetric;
@@ -1 +1 @@
1
- "use strict";var g=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var l=(e,r)=>{for(var n in r)g(e,n,{get:r[n],enumerable:!0})},u=(e,r,n,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of p(r))!f.call(e,i)&&i!==n&&g(e,i,{get:()=>r[i],enumerable:!(c=w(r,i))||c.enumerable});return e};var y=e=>u(g({},"__esModule",{value:!0}),e);var m={};l(m,{event:()=>h,page:()=>v});module.exports=y(m);var T=require("cross-fetch/polyfill"),s=require("ag-common/dist/common/helpers/log"),h=async e=>{let{analyticaToken:r,overrideBaseUrl:n="https://analytica.click/api",eventName:c,devMode:i,valueOverrides:a}=e;if(!i&&typeof window<"u"&&window.location.hostname==="localhost")return(0,s.debug)(`local page ignored: ${JSON.stringify(e)}, to ${n}`),{};let t={eventName:c,browserFingerprint:a?.browserFingerprint,pageLocation:""};typeof window<"u"&&(t={...t,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof navigator<"u"&&(t={...t,browser:navigator.userAgent});try{let o=await fetch(`${n}/site/event`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:t})});if(!o.ok){let d=await o.text();return(0,s.warn)("tracking error:"+d),{error:d}}}catch(o){let d=o instanceof Error?o.message:"Unknown error";return(0,s.warn)("tracking error:"+d),{error:d}}return{}},v=async e=>{let{analyticaToken:r,overrideBaseUrl:n="https://analytica.click/api",devMode:c,valueOverrides:i}=e;if(!c&&typeof window<"u"&&window.location.hostname==="localhost")return(0,s.debug)(`local page ignored: ${JSON.stringify(e)}, to ${n}`),{};let a={pageLocation:"",browserFingerprint:i?.browserFingerprint};if(typeof window<"u"&&(a={...a,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof document<"u"&&(a={...a,pageReferrer:document.referrer,pageTitle:document.title}),typeof navigator<"u"&&(a={...a,browserLanguage:navigator.language,browser:navigator.userAgent}),!a.pageLocation)return(0,s.warn)("no pageLocation"),{};try{let t=await fetch(`${n}/site/tracking`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:a})});if(!t.ok){let o=await t.text();return(0,s.warn)("tracking error:"+o),{error:o}}}catch(t){let o=t instanceof Error?t.message:"Unknown error";return(0,s.warn)("tracking error:"+o),{error:o}}return{}};0&&(module.exports={event,page});
1
+ "use strict";var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var y=(e,r)=>{for(var t in r)p(e,t,{get:r[t],enumerable:!0})},h=(e,r,t,d)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of w(r))!l.call(e,s)&&s!==t&&p(e,s,{get:()=>r[s],enumerable:!(d=f(r,s))||d.enumerable});return e};var u=e=>h(p({},"__esModule",{value:!0}),e);var T={};y(T,{event:()=>m,metric:()=>k,page:()=>v});module.exports=u(T);var P=require("cross-fetch/polyfill"),a=require("ag-common/dist/common/helpers/log"),m=async e=>{let{analyticaToken:r,overrideBaseUrl:t="https://analytica.click/api",eventName:d,devMode:s,valueOverrides:i}=e;if(!s&&typeof window<"u"&&window.location.hostname==="localhost")return(0,a.debug)(`local page ignored: ${JSON.stringify(e)}, to ${t}`),{};let o={eventName:d,browserFingerprint:i?.browserFingerprint,pageLocation:""};typeof window<"u"&&(o={...o,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof navigator<"u"&&(o={...o,browser:navigator.userAgent});try{let n=await fetch(`${t}/site/event`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:o})});if(!n.ok){let c=await n.text();return(0,a.warn)("tracking error:"+c),{error:c}}}catch(n){let c=n instanceof Error?n.message:"Unknown error";return(0,a.warn)("tracking error:"+c),{error:c}}return{}},v=async e=>{let{analyticaToken:r,overrideBaseUrl:t="https://analytica.click/api",devMode:d,valueOverrides:s}=e;if(!d&&typeof window<"u"&&window.location.hostname==="localhost")return(0,a.debug)(`local page ignored: ${JSON.stringify(e)}, to ${t}`),{};let i={pageLocation:"",browserFingerprint:s?.browserFingerprint};if(typeof window<"u"&&(i={...i,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof document<"u"&&(i={...i,pageReferrer:document.referrer,pageTitle:document.title}),typeof navigator<"u"&&(i={...i,browserLanguage:navigator.language,browser:navigator.userAgent}),!i.pageLocation)return(0,a.warn)("no pageLocation"),{};try{let o=await fetch(`${t}/site/tracking`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:i})});if(!o.ok){let n=await o.text();return(0,a.warn)("tracking error:"+n),{error:n}}}catch(o){let n=o instanceof Error?o.message:"Unknown error";return(0,a.warn)("tracking error:"+n),{error:n}}return{}},k=async e=>{let{analyticaToken:r,overrideBaseUrl:t="https://analytica.click/api",type:d,name:s,value:i,devMode:o}=e;if(!o&&typeof window<"u"&&window.location.hostname==="localhost")return(0,a.debug)(`local metric ignored: ${JSON.stringify(e)}, to ${t}`),{};if(d==="health")return(0,a.warn)('Type "health" is reserved for system metrics'),{error:'Type "health" is reserved for system metrics'};let n={type:d,name:s,value:i};try{let c=await fetch(`${t}/site/metric`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:n})});if(!c.ok){let g=await c.text();return(0,a.warn)("metric tracking error:"+g),{error:g}}}catch(c){let g=c instanceof Error?c.message:"Unknown error";return(0,a.warn)("metric tracking error:"+g),{error:g}}return{}};0&&(module.exports={event,metric,page});
package/dist/index.d.ts CHANGED
@@ -102,18 +102,21 @@ declare module 'analytica.click/dist/helpers/object' {
102
102
  }
103
103
  declare module 'analytica.click/dist/helpers/server' {
104
104
  import 'cross-fetch/polyfill';
105
- import type { TEvent, TPage } from 'analytica.click/dist/types';
105
+ import type { TEvent, TMetric, TPage } from 'analytica.click/dist/types';
106
106
  /** used for tracking arbitrary events */
107
107
  export const event: TEvent;
108
108
  /** used for tracking visits to a page */
109
109
  export const page: TPage;
110
+ /** used for tracking custom metrics */
111
+ export const metric: TMetric;
110
112
 
111
113
  }
112
114
  declare module 'analytica.click/dist/helpers/useAnalytica' {
113
- import type { IEvent, IPage } from 'analytica.click/dist/types';
115
+ import type { IEvent, IMetric, IPage } from 'analytica.click/dist/types';
114
116
  export const useAnalytica: () => {
115
117
  event: (d: Omit<IEvent, "analyticaToken" | "overrideBaseUrl">) => void;
116
118
  page: (d: Omit<IPage, "analyticaToken" | "overrideBaseUrl">) => void;
119
+ metric: (d: Omit<IMetric, "analyticaToken" | "overrideBaseUrl">) => void;
117
120
  };
118
121
 
119
122
  }
@@ -149,6 +152,18 @@ declare module 'analytica.click/dist/types' {
149
152
  browserFingerprint?: string;
150
153
  };
151
154
  }
155
+ export type TMetric = (p: IMetric) => Promise<{
156
+ error?: string;
157
+ }>;
158
+ export interface IMetric {
159
+ analyticaToken: string;
160
+ overrideBaseUrl?: string;
161
+ type: string;
162
+ name: string;
163
+ value: number;
164
+ /** internal testing only. also allows local sending of errors */
165
+ devMode?: boolean;
166
+ }
152
167
  export type TErrorMessage = (m: ErrorEvent) => Promise<void>;
153
168
  export interface IAnalyticaConfig {
154
169
  analyticaToken: string;
@@ -304,13 +319,43 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
304
319
  count: z.ZodNumber;
305
320
  category: z.ZodString;
306
321
  }, z.core.$strip>;
307
- export const HealthSchema: z.ZodObject<{
308
- account: z.ZodOptional<z.ZodString>;
309
- datetime: z.ZodNumber;
310
- site: z.ZodString;
322
+ export const HealthMetricSchema: z.ZodObject<{
323
+ type: z.ZodLiteral<"health">;
324
+ responseTimeMs: z.ZodNumber;
325
+ success: z.ZodBoolean;
326
+ }, z.core.$strip>;
327
+ export const UserMetricSchema: z.ZodObject<{
328
+ type: z.ZodString;
329
+ name: z.ZodString;
330
+ value: z.ZodNumber;
331
+ }, z.core.$strip>;
332
+ export const MetricItemSchema: z.ZodUnion<readonly [z.ZodObject<{
333
+ type: z.ZodLiteral<"health">;
311
334
  responseTimeMs: z.ZodNumber;
312
335
  success: z.ZodBoolean;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ type: z.ZodString;
338
+ name: z.ZodString;
339
+ value: z.ZodNumber;
340
+ }, z.core.$strip>]>;
341
+ export const MetricSchema: z.ZodObject<{
342
+ account: z.ZodOptional<z.ZodString>;
343
+ site: z.ZodString;
344
+ datetime: z.ZodNumber;
345
+ metric: z.ZodUnion<readonly [z.ZodObject<{
346
+ type: z.ZodLiteral<"health">;
347
+ responseTimeMs: z.ZodNumber;
348
+ success: z.ZodBoolean;
349
+ }, z.core.$strip>, z.ZodObject<{
350
+ type: z.ZodString;
351
+ name: z.ZodString;
352
+ value: z.ZodNumber;
353
+ }, z.core.$strip>]>;
313
354
  }, z.core.$strip>;
355
+ export interface IMetric extends z.infer<typeof MetricSchema> {
356
+ }
357
+ export interface IHealthMetric extends z.infer<typeof HealthMetricSchema> {
358
+ }
314
359
  export const ModelErrorSchema: z.ZodObject<{
315
360
  PK: z.ZodString;
316
361
  messageHash: z.ZodOptional<z.ZodString>;
@@ -362,6 +407,11 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
362
407
  href: z.ZodString;
363
408
  count: z.ZodNumber;
364
409
  }, z.core.$strip>;
410
+ export const RollupMetricSummarySchema: z.ZodObject<{
411
+ count: z.ZodNumber;
412
+ sum: z.ZodNumber;
413
+ average: z.ZodNumber;
414
+ }, z.core.$strip>;
365
415
  export const RollupSchema: z.ZodObject<{
366
416
  account: z.ZodString;
367
417
  site: z.ZodString;
@@ -403,7 +453,11 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
403
453
  href: z.ZodString;
404
454
  count: z.ZodNumber;
405
455
  }, z.core.$strip>>>;
406
- averageResponseTimeMs: z.ZodOptional<z.ZodNumber>;
456
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
457
+ count: z.ZodNumber;
458
+ sum: z.ZodNumber;
459
+ average: z.ZodNumber;
460
+ }, z.core.$strip>>>;
407
461
  }, z.core.$strip>;
408
462
  export const PostEventDataSchema: z.ZodObject<{
409
463
  eventName: z.ZodString;
@@ -466,6 +520,19 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
466
520
  }, z.core.$strip>;
467
521
  key: z.ZodString;
468
522
  }, z.core.$strip>;
523
+ export const PostMetricDataSchema: z.ZodObject<{
524
+ type: z.ZodString;
525
+ name: z.ZodString;
526
+ value: z.ZodNumber;
527
+ }, z.core.$strip>;
528
+ export const PostMetricSchema: z.ZodObject<{
529
+ key: z.ZodString;
530
+ data: z.ZodObject<{
531
+ type: z.ZodString;
532
+ name: z.ZodString;
533
+ value: z.ZodNumber;
534
+ }, z.core.$strip>;
535
+ }, z.core.$strip>;
469
536
  export const SiteDetailsSchema: z.ZodObject<{
470
537
  site: z.ZodString;
471
538
  account: z.ZodString;
@@ -555,12 +622,19 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
555
622
  count: z.ZodNumber;
556
623
  category: z.ZodString;
557
624
  }, z.core.$strip>>>;
558
- health: z.ZodOptional<z.ZodArray<z.ZodObject<{
625
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
559
626
  account: z.ZodOptional<z.ZodString>;
560
- datetime: z.ZodNumber;
561
627
  site: z.ZodString;
562
- responseTimeMs: z.ZodNumber;
563
- success: z.ZodBoolean;
628
+ datetime: z.ZodNumber;
629
+ metric: z.ZodUnion<readonly [z.ZodObject<{
630
+ type: z.ZodLiteral<"health">;
631
+ responseTimeMs: z.ZodNumber;
632
+ success: z.ZodBoolean;
633
+ }, z.core.$strip>, z.ZodObject<{
634
+ type: z.ZodString;
635
+ name: z.ZodString;
636
+ value: z.ZodNumber;
637
+ }, z.core.$strip>]>;
564
638
  }, z.core.$strip>>>;
565
639
  languages: z.ZodOptional<z.ZodArray<z.ZodObject<{
566
640
  account: z.ZodOptional<z.ZodString>;
@@ -611,7 +685,11 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
611
685
  href: z.ZodString;
612
686
  count: z.ZodNumber;
613
687
  }, z.core.$strip>>>;
614
- averageResponseTimeMs: z.ZodOptional<z.ZodNumber>;
688
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
689
+ count: z.ZodNumber;
690
+ sum: z.ZodNumber;
691
+ average: z.ZodNumber;
692
+ }, z.core.$strip>>>;
615
693
  }, z.core.$strip>>>;
616
694
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
617
695
  PK: z.ZodString;
@@ -733,8 +811,10 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
733
811
  export type Language = z.infer<typeof LanguageSchema>;
734
812
  export type Fingerprint = z.infer<typeof FingerprintSchema>;
735
813
  export type Event = z.infer<typeof EventSchema>;
736
- export type Health = z.infer<typeof HealthSchema>;
814
+ export type MetricItem = z.infer<typeof MetricItemSchema>;
815
+ export type Metric = z.infer<typeof MetricSchema>;
737
816
  export type ModelError = z.infer<typeof ModelErrorSchema>;
817
+ export type RollupMetricSummary = z.infer<typeof RollupMetricSummarySchema>;
738
818
  export type Rollup = z.infer<typeof RollupSchema>;
739
819
  export type SiteData = z.infer<typeof SiteDataSchema>;
740
820
  export type SiteDetails = z.infer<typeof SiteDetailsSchema>;
@@ -744,6 +824,8 @@ declare module 'analytica.click/dist/ui/src/server/schema/index' {
744
824
  export type PostSiteTrack = z.infer<typeof PostSiteTrackSchema>;
745
825
  export type PostErrorData = z.infer<typeof PostErrorDataSchema>;
746
826
  export type PostError = z.infer<typeof PostErrorSchema>;
827
+ export type PostMetricData = z.infer<typeof PostMetricDataSchema>;
828
+ export type PostMetric = z.infer<typeof PostMetricSchema>;
747
829
  export type PostAccount = z.infer<typeof PostAccountSchema>;
748
830
  export type DeleteAccount = z.infer<typeof DeleteAccountSchema>;
749
831
  export type ArchiveErrors = z.infer<typeof ArchiveErrorsSchema>;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- 'use client';"use strict";var Q=Object.create;var w=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var re=(e,r)=>{for(var o in r)w(e,o,{get:r[o],enumerable:!0})},A=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Z(r))!ee.call(e,i)&&i!==o&&w(e,i,{get:()=>r[i],enumerable:!(t=Y(r,i))||t.enumerable});return e};var oe=(e,r,o)=>(o=e!=null?Q(V(e)):{},A(r||!e||!e.__esModule?w(o,"default",{value:e,enumerable:!0}):o,e)),te=e=>A(w({},"__esModule",{value:!0}),e);var ce={};re(ce,{AnalyticaClickProvider:()=>ie,AnalyticaConfigContext:()=>g,Modal:()=>C,errorTrack:()=>l,event:()=>I,getErrorKey:()=>D,page:()=>R,tokenMissing:()=>y,useAnalytica:()=>se});module.exports=te(ce);var _=require("react");var k=require("ag-common/dist/common/helpers/log"),v=oe(require("react"));var F=require("react");var le=require("cross-fetch/polyfill"),E=require("ag-common/dist/common/helpers/hashCode"),c=require("ag-common/dist/common/helpers/log"),M=require("ag-common/dist/common/helpers/object"),B=require("ag-common/dist/common/helpers/string/contains");var N=(e,r)=>{let o=[],t={},i=0;return Object.entries(e).forEach(([n,a])=>{i<r?o.push(a):t[n]=a,i+=1}),{part:o,rest:t}};var J=typeof window<"u"&&window.location.hostname==="localhost",m={},T,x,L=async()=>{try{if(Object.keys(m).length>100){let t=Object.keys(m)[0],i=m[t],n=await fetch(`${x}/errors`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify([{key:i.key,data:{...i.data,message:`error overload!: ${i.data.message||"?"}`}}])});if(m={},!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return{}}let{part:e,rest:r}=N(m,10);m=r;let o=await fetch(`${x}/errors`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify(e)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`)}catch(e){let r=e;return{error:r?.message??r.message}}finally{Object.keys(m).length>0?T=setTimeout(L,1e3):T=void 0}},l=async({data:e,overrideBaseUrl:r="https://analytica.click/api",ignoreBrowserErrors:o=["will be removed","performing full reload","tracking error","fetch RSC payload","perform a full reload","warnings#debug_enabled",'"digest"',"punycode"],devMode:t})=>{if(r||(r="https://analytica.click/api"),r.startsWith("/")&&typeof window>"u"&&(r="https://analytica.click/api"),o.length>0){let n=(0,B.containsInsensitive)(e.data.message,...o);if(n){(0,c.debug)("ignoring error, contains=",n);return}}if(J&&t)(0,c.debug)("allowing local error tracking due to devmode=true");else if(J)return(0,c.debug)(`local error tracking ignored:${e.data.message} ${JSON.stringify(e)}, to ${r}`),{};if(!ne(e.data.message))return{};(0,c.debug)("error track",e.data.message,JSON.stringify(e));let i=D({...e.data,name:e.data.name??"unknown"});return m[i]=e,x=r,T??=setTimeout(L,500),{}};function ne(e){return e?e.match(/^"?[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}"?$/)?((0,c.info)("ignoring react devtools message"),!1):e===JSON.stringify([{}])?((0,c.info)("empty message payload?"),!1):!0:((0,c.info)("no message?"),!1)}var D=e=>{try{let r=/^\[?[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}\]?$/gim,o=/(at \S+?) \(\S+\)\s/gim,t=/^((%[cs])+\s*)+$/gim,i=/^color:/gim,n=[],a=e.message;(0,M.isJson)(a)?n=JSON.parse(a):n=[a];let s=n.findIndex(f=>f.match(t)),d=n.findIndex(f=>f.match(i));s>=0&&d>=0&&d===s+1&&(n=n.filter((f,G)=>![s,d].includes(G))),n=n.map(f=>f.includes(".js:")||f.includes("node_modules")?f.replace(o,"$1 (stacktrace)"):f.replace(r,"[date]")),a=JSON.stringify(n);let $=(0,E.hashCode)(a).toString();return(0,c.debug)("got errorKey=",a,$),$}catch{return(0,E.hashCode)(e.message).toString()}};async function b({ev:e,values:r}){if(!r.analyticaToken)return;let o={message:e.message,href:window.location.href,filename:e.filename,name:"",stack:e.error.stack};await l({...r,data:{key:r.analyticaToken,data:o}})}function z(e){(0,F.useEffect)(()=>{let r=o=>b({ev:o,values:e});if(e.analyticaToken)return window.addEventListener("error",r),()=>{try{window.removeEventListener("error",r)}catch{}}},[])}var H=require("react");function j(e){(0,H.useEffect)(()=>{if(window.consoleset||!e.analyticaToken)return;window.consoleset=!0;let r=window.console.error;window.console.error=(...t)=>{l({...e,data:{data:{href:window.location.href,message:JSON.stringify(t)},key:e.analyticaToken}}),r(...t)};let o=window.console.warn;window.console.warn=(...t)=>{l({...e,data:{data:{href:window.location.href,message:JSON.stringify(t)},key:e.analyticaToken}}),o(...t)}},[])}var y=e=>`[Analytica.${e}] Please load analytica token in AnalyticaClickProvider to use this component`;function W(e){if(global.nodeset||typeof window<"u"||!e.analyticaToken)return;global.nodeset=!0;let r=global.console.error;global.console.error=(...t)=>{l({...e,data:{data:{href:"server",message:JSON.stringify(t)},key:e.analyticaToken}}),r(...t)};let o=global.console.warn;global.console.warn=(...t)=>{l({...e,data:{data:{href:"server",message:JSON.stringify(t)},key:e.analyticaToken}}),o(...t)}}var K=require("react");var u=require("react/jsx-runtime"),ae={fontSize:"2rem"},h=class extends K.Component{constructor(r){super(r),this.state={hasError:void 0},this.seenError=!1}static getDerivedStateFromError(r){let o=typeof window<"u"&&window.location.href;return{hasError:{...r,message:r?.message??r,...r?.stack&&{error:{stack:r?.stack}},...o&&{href:o}}}}render(){let{hasError:r}=this.state,{children:o,notify:t}=this.props;return r?(t&&t(r),(0,u.jsx)(C,{open:!0,setOpen:()=>{},children:(0,u.jsxs)("div",{style:ae,children:["A fatal error has occurred - the admin has been notified.",(0,u.jsx)("button",{type:"button",onClick:()=>window.location.reload(),children:"Press here to restart app"})]})})):o}};var O=require("react/jsx-runtime"),U=({children:e})=>{let r=(0,v.useContext)(g);return j(r),z(r),W(r),(0,k.debug)("installed analytica.click error handlers"),r.analyticaToken?(0,O.jsx)(h,{notify:o=>b({ev:o,values:r}),children:e}):((0,k.warn)(y("ErrorBoundary")),(0,O.jsx)(v.default.Fragment,{children:e}))};var P=require("react/jsx-runtime"),g=(0,_.createContext)(void 0),ie=({children:e,values:r})=>(0,P.jsx)(g.Provider,{value:r,children:(0,P.jsx)(U,{children:e})});var S=require("react/jsx-runtime"),C=({open:e,setOpen:r,children:o})=>e?(0,S.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onClick:()=>r(!1),children:(0,S.jsx)("div",{style:{backgroundColor:"white",padding:"2rem",borderRadius:"8px",maxWidth:"500px",maxHeight:"80vh",overflow:"auto",position:"relative",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.2)"},onClick:t=>t.stopPropagation(),children:o})}):null;var De=require("cross-fetch/polyfill"),p=require("ag-common/dist/common/helpers/log"),I=async e=>{let{analyticaToken:r,overrideBaseUrl:o="https://analytica.click/api",eventName:t,devMode:i,valueOverrides:n}=e;if(!i&&typeof window<"u"&&window.location.hostname==="localhost")return(0,p.debug)(`local page ignored: ${JSON.stringify(e)}, to ${o}`),{};let a={eventName:t,browserFingerprint:n?.browserFingerprint,pageLocation:""};typeof window<"u"&&(a={...a,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof navigator<"u"&&(a={...a,browser:navigator.userAgent});try{let s=await fetch(`${o}/site/event`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:a})});if(!s.ok){let d=await s.text();return(0,p.warn)("tracking error:"+d),{error:d}}}catch(s){let d=s instanceof Error?s.message:"Unknown error";return(0,p.warn)("tracking error:"+d),{error:d}}return{}},R=async e=>{let{analyticaToken:r,overrideBaseUrl:o="https://analytica.click/api",devMode:t,valueOverrides:i}=e;if(!t&&typeof window<"u"&&window.location.hostname==="localhost")return(0,p.debug)(`local page ignored: ${JSON.stringify(e)}, to ${o}`),{};let n={pageLocation:"",browserFingerprint:i?.browserFingerprint};if(typeof window<"u"&&(n={...n,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof document<"u"&&(n={...n,pageReferrer:document.referrer,pageTitle:document.title}),typeof navigator<"u"&&(n={...n,browserLanguage:navigator.language,browser:navigator.userAgent}),!n.pageLocation)return(0,p.warn)("no pageLocation"),{};try{let a=await fetch(`${o}/site/tracking`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:n})});if(!a.ok){let s=await a.text();return(0,p.warn)("tracking error:"+s),{error:s}}}catch(a){let s=a instanceof Error?a.message:"Unknown error";return(0,p.warn)("tracking error:"+s),{error:s}}return{}};var X=require("ag-common/dist/common/helpers/log"),q=require("react");var se=()=>{let e=(0,q.useContext)(g);if(!e.analyticaToken){(0,X.warn)(y("useAnalytica"));let r=async()=>({error:"no token"});return{event:r,page:r}}return{event:r=>I({...r,...e}),page:r=>R({...r,...e})}};0&&(module.exports={AnalyticaClickProvider,AnalyticaConfigContext,Modal,errorTrack,event,getErrorKey,page,tokenMissing,useAnalytica});
1
+ 'use client';"use strict";var Y=Object.create;var h=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var te=(e,r)=>{for(var t in r)h(e,t,{get:r[t],enumerable:!0})},N=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of V(r))!re.call(e,i)&&i!==t&&h(e,i,{get:()=>r[i],enumerable:!(o=Z(r,i))||o.enumerable});return e};var oe=(e,r,t)=>(t=e!=null?Y(ee(e)):{},N(r||!e||!e.__esModule?h(t,"default",{value:e,enumerable:!0}):t,e)),ne=e=>N(h({},"__esModule",{value:!0}),e);var de={};te(de,{AnalyticaClickProvider:()=>se,AnalyticaConfigContext:()=>y,Modal:()=>O,errorTrack:()=>p,event:()=>M,getErrorKey:()=>F,metric:()=>R,page:()=>$,tokenMissing:()=>u,useAnalytica:()=>ce});module.exports=ne(de);var X=require("react");var v=require("ag-common/dist/common/helpers/log"),T=oe(require("react"));var z=require("react");var pe=require("cross-fetch/polyfill"),E=require("ag-common/dist/common/helpers/hashCode"),f=require("ag-common/dist/common/helpers/log"),B=require("ag-common/dist/common/helpers/object"),D=require("ag-common/dist/common/helpers/string/contains");var A=(e,r)=>{let t=[],o={},i=0;return Object.entries(e).forEach(([n,a])=>{i<r?t.push(a):o[n]=a,i+=1}),{part:t,rest:o}};var J=typeof window<"u"&&window.location.hostname==="localhost",g={},x,b,L=async()=>{try{if(Object.keys(g).length>100){let o=Object.keys(g)[0],i=g[o],n=await fetch(`${b}/errors`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify([{key:i.key,data:{...i.data,message:`error overload!: ${i.data.message||"?"}`}}])});if(g={},!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return{}}let{part:e,rest:r}=A(g,10);g=r;let t=await fetch(`${b}/errors`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify(e)});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`)}catch(e){let r=e;return{error:r?.message??r.message}}finally{Object.keys(g).length>0?x=setTimeout(L,1e3):x=void 0}},p=async({data:e,overrideBaseUrl:r="https://analytica.click/api",ignoreBrowserErrors:t=["will be removed","performing full reload","tracking error","fetch RSC payload","perform a full reload","warnings#debug_enabled",'"digest"',"punycode"],devMode:o})=>{if(r||(r="https://analytica.click/api"),r.startsWith("/")&&typeof window>"u"&&(r="https://analytica.click/api"),t.length>0){let n=(0,D.containsInsensitive)(e.data.message,...t);if(n){(0,f.debug)("ignoring error, contains=",n);return}}if(J&&o)(0,f.debug)("allowing local error tracking due to devmode=true");else if(J)return(0,f.debug)(`local error tracking ignored:${e.data.message} ${JSON.stringify(e)}, to ${r}`),{};if(!ae(e.data.message))return{};(0,f.debug)("error track",e.data.message,JSON.stringify(e));let i=F({...e.data,name:e.data.name??"unknown"});return g[i]=e,b=r,x??=setTimeout(L,500),{}};function ae(e){return e?e.match(/^"?[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}"?$/)?((0,f.info)("ignoring react devtools message"),!1):e===JSON.stringify([{}])?((0,f.info)("empty message payload?"),!1):!0:((0,f.info)("no message?"),!1)}var F=e=>{try{let r=/^\[?[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}\]?$/gim,t=/(at \S+?) \(\S+\)\s/gim,o=/^((%[cs])+\s*)+$/gim,i=/^color:/gim,n=[],a=e.message;(0,B.isJson)(a)?n=JSON.parse(a):n=[a];let s=n.findIndex(l=>l.match(o)),c=n.findIndex(l=>l.match(i));s>=0&&c>=0&&c===s+1&&(n=n.filter((l,Q)=>![s,c].includes(Q))),n=n.map(l=>l.includes(".js:")||l.includes("node_modules")?l.replace(t,"$1 (stacktrace)"):l.replace(r,"[date]")),a=JSON.stringify(n);let m=(0,E.hashCode)(a).toString();return(0,f.debug)("got errorKey=",a,m),m}catch{return(0,E.hashCode)(e.message).toString()}};async function C({ev:e,values:r}){if(!r.analyticaToken)return;let t={message:e.message,href:window.location.href,filename:e.filename,name:"",stack:e.error.stack};await p({...r,data:{key:r.analyticaToken,data:t}})}function H(e){(0,z.useEffect)(()=>{let r=t=>C({ev:t,values:e});if(e.analyticaToken)return window.addEventListener("error",r),()=>{try{window.removeEventListener("error",r)}catch{}}},[])}var U=require("react");function j(e){(0,U.useEffect)(()=>{if(window.consoleset||!e.analyticaToken)return;window.consoleset=!0;let r=window.console.error;window.console.error=(...o)=>{p({...e,data:{data:{href:window.location.href,message:JSON.stringify(o)},key:e.analyticaToken}}),r(...o)};let t=window.console.warn;window.console.warn=(...o)=>{p({...e,data:{data:{href:window.location.href,message:JSON.stringify(o)},key:e.analyticaToken}}),t(...o)}},[])}var u=e=>`[Analytica.${e}] Please load analytica token in AnalyticaClickProvider to use this component`;function W(e){if(global.nodeset||typeof window<"u"||!e.analyticaToken)return;global.nodeset=!0;let r=global.console.error;global.console.error=(...o)=>{p({...e,data:{data:{href:"server",message:JSON.stringify(o)},key:e.analyticaToken}}),r(...o)};let t=global.console.warn;global.console.warn=(...o)=>{p({...e,data:{data:{href:"server",message:JSON.stringify(o)},key:e.analyticaToken}}),t(...o)}}var K=require("react");var w=require("react/jsx-runtime"),ie={fontSize:"2rem"},k=class extends K.Component{constructor(r){super(r),this.state={hasError:void 0},this.seenError=!1}static getDerivedStateFromError(r){let t=typeof window<"u"&&window.location.href;return{hasError:{...r,message:r?.message??r,...r?.stack&&{error:{stack:r?.stack}},...t&&{href:t}}}}render(){let{hasError:r}=this.state,{children:t,notify:o}=this.props;return r?(o&&o(r),(0,w.jsx)(O,{open:!0,setOpen:()=>{},children:(0,w.jsxs)("div",{style:ie,children:["A fatal error has occurred - the admin has been notified.",(0,w.jsx)("button",{type:"button",onClick:()=>window.location.reload(),children:"Press here to restart app"})]})})):t}};var P=require("react/jsx-runtime"),_=({children:e})=>{let r=(0,T.useContext)(y);return j(r),H(r),W(r),(0,v.debug)("installed analytica.click error handlers"),r.analyticaToken?(0,P.jsx)(k,{notify:t=>C({ev:t,values:r}),children:e}):((0,v.warn)(u("ErrorBoundary")),(0,P.jsx)(T.default.Fragment,{children:e}))};var S=require("react/jsx-runtime"),y=(0,X.createContext)(void 0),se=({children:e,values:r})=>(0,S.jsx)(y.Provider,{value:r,children:(0,S.jsx)(_,{children:e})});var I=require("react/jsx-runtime"),O=({open:e,setOpen:r,children:t})=>e?(0,I.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onClick:()=>r(!1),children:(0,I.jsx)("div",{style:{backgroundColor:"white",padding:"2rem",borderRadius:"8px",maxWidth:"500px",maxHeight:"80vh",overflow:"auto",position:"relative",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.2)"},onClick:o=>o.stopPropagation(),children:t})}):null;var Fe=require("cross-fetch/polyfill"),d=require("ag-common/dist/common/helpers/log"),M=async e=>{let{analyticaToken:r,overrideBaseUrl:t="https://analytica.click/api",eventName:o,devMode:i,valueOverrides:n}=e;if(!i&&typeof window<"u"&&window.location.hostname==="localhost")return(0,d.debug)(`local page ignored: ${JSON.stringify(e)}, to ${t}`),{};let a={eventName:o,browserFingerprint:n?.browserFingerprint,pageLocation:""};typeof window<"u"&&(a={...a,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof navigator<"u"&&(a={...a,browser:navigator.userAgent});try{let s=await fetch(`${t}/site/event`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:a})});if(!s.ok){let c=await s.text();return(0,d.warn)("tracking error:"+c),{error:c}}}catch(s){let c=s instanceof Error?s.message:"Unknown error";return(0,d.warn)("tracking error:"+c),{error:c}}return{}},$=async e=>{let{analyticaToken:r,overrideBaseUrl:t="https://analytica.click/api",devMode:o,valueOverrides:i}=e;if(!o&&typeof window<"u"&&window.location.hostname==="localhost")return(0,d.debug)(`local page ignored: ${JSON.stringify(e)}, to ${t}`),{};let n={pageLocation:"",browserFingerprint:i?.browserFingerprint};if(typeof window<"u"&&(n={...n,pageLocation:window.location.href,browserResolution:`${window.screen.width}:${window.screen.height}`}),typeof document<"u"&&(n={...n,pageReferrer:document.referrer,pageTitle:document.title}),typeof navigator<"u"&&(n={...n,browserLanguage:navigator.language,browser:navigator.userAgent}),!n.pageLocation)return(0,d.warn)("no pageLocation"),{};try{let a=await fetch(`${t}/site/tracking`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:n})});if(!a.ok){let s=await a.text();return(0,d.warn)("tracking error:"+s),{error:s}}}catch(a){let s=a instanceof Error?a.message:"Unknown error";return(0,d.warn)("tracking error:"+s),{error:s}}return{}},R=async e=>{let{analyticaToken:r,overrideBaseUrl:t="https://analytica.click/api",type:o,name:i,value:n,devMode:a}=e;if(!a&&typeof window<"u"&&window.location.hostname==="localhost")return(0,d.debug)(`local metric ignored: ${JSON.stringify(e)}, to ${t}`),{};if(o==="health")return(0,d.warn)('Type "health" is reserved for system metrics'),{error:'Type "health" is reserved for system metrics'};let s={type:o,name:i,value:n};try{let c=await fetch(`${t}/site/metric`,{method:"POST",headers:{"Content-Type":"application/json",authorization:""},body:JSON.stringify({key:r,data:s})});if(!c.ok){let m=await c.text();return(0,d.warn)("metric tracking error:"+m),{error:m}}}catch(c){let m=c instanceof Error?c.message:"Unknown error";return(0,d.warn)("metric tracking error:"+m),{error:m}}return{}};var q=require("ag-common/dist/common/helpers/log"),G=require("react");var ce=()=>{let e=(0,G.useContext)(y);if(!e.analyticaToken){(0,q.warn)(u("useAnalytica"));let r=async()=>({error:"no token"});return{event:r,page:r,metric:r}}return{event:r=>M({...r,...e}),page:r=>$({...r,...e}),metric:r=>R({...r,...e})}};0&&(module.exports={AnalyticaClickProvider,AnalyticaConfigContext,Modal,errorTrack,event,getErrorKey,metric,page,tokenMissing,useAnalytica});
@@ -136,13 +136,43 @@ export declare const EventSchema: z.ZodObject<{
136
136
  count: z.ZodNumber;
137
137
  category: z.ZodString;
138
138
  }, z.core.$strip>;
139
- export declare const HealthSchema: z.ZodObject<{
140
- account: z.ZodOptional<z.ZodString>;
141
- datetime: z.ZodNumber;
142
- site: z.ZodString;
139
+ export declare const HealthMetricSchema: z.ZodObject<{
140
+ type: z.ZodLiteral<"health">;
143
141
  responseTimeMs: z.ZodNumber;
144
142
  success: z.ZodBoolean;
145
143
  }, z.core.$strip>;
144
+ export declare const UserMetricSchema: z.ZodObject<{
145
+ type: z.ZodString;
146
+ name: z.ZodString;
147
+ value: z.ZodNumber;
148
+ }, z.core.$strip>;
149
+ export declare const MetricItemSchema: z.ZodUnion<readonly [z.ZodObject<{
150
+ type: z.ZodLiteral<"health">;
151
+ responseTimeMs: z.ZodNumber;
152
+ success: z.ZodBoolean;
153
+ }, z.core.$strip>, z.ZodObject<{
154
+ type: z.ZodString;
155
+ name: z.ZodString;
156
+ value: z.ZodNumber;
157
+ }, z.core.$strip>]>;
158
+ export declare const MetricSchema: z.ZodObject<{
159
+ account: z.ZodOptional<z.ZodString>;
160
+ site: z.ZodString;
161
+ datetime: z.ZodNumber;
162
+ metric: z.ZodUnion<readonly [z.ZodObject<{
163
+ type: z.ZodLiteral<"health">;
164
+ responseTimeMs: z.ZodNumber;
165
+ success: z.ZodBoolean;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ type: z.ZodString;
168
+ name: z.ZodString;
169
+ value: z.ZodNumber;
170
+ }, z.core.$strip>]>;
171
+ }, z.core.$strip>;
172
+ export interface IMetric extends z.infer<typeof MetricSchema> {
173
+ }
174
+ export interface IHealthMetric extends z.infer<typeof HealthMetricSchema> {
175
+ }
146
176
  export declare const ModelErrorSchema: z.ZodObject<{
147
177
  PK: z.ZodString;
148
178
  messageHash: z.ZodOptional<z.ZodString>;
@@ -194,6 +224,11 @@ export declare const RollupTopErrorsSchema: z.ZodObject<{
194
224
  href: z.ZodString;
195
225
  count: z.ZodNumber;
196
226
  }, z.core.$strip>;
227
+ export declare const RollupMetricSummarySchema: z.ZodObject<{
228
+ count: z.ZodNumber;
229
+ sum: z.ZodNumber;
230
+ average: z.ZodNumber;
231
+ }, z.core.$strip>;
197
232
  export declare const RollupSchema: z.ZodObject<{
198
233
  account: z.ZodString;
199
234
  site: z.ZodString;
@@ -235,7 +270,11 @@ export declare const RollupSchema: z.ZodObject<{
235
270
  href: z.ZodString;
236
271
  count: z.ZodNumber;
237
272
  }, z.core.$strip>>>;
238
- averageResponseTimeMs: z.ZodOptional<z.ZodNumber>;
273
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
274
+ count: z.ZodNumber;
275
+ sum: z.ZodNumber;
276
+ average: z.ZodNumber;
277
+ }, z.core.$strip>>>;
239
278
  }, z.core.$strip>;
240
279
  export declare const PostEventDataSchema: z.ZodObject<{
241
280
  eventName: z.ZodString;
@@ -298,6 +337,19 @@ export declare const PostErrorSchema: z.ZodObject<{
298
337
  }, z.core.$strip>;
299
338
  key: z.ZodString;
300
339
  }, z.core.$strip>;
340
+ export declare const PostMetricDataSchema: z.ZodObject<{
341
+ type: z.ZodString;
342
+ name: z.ZodString;
343
+ value: z.ZodNumber;
344
+ }, z.core.$strip>;
345
+ export declare const PostMetricSchema: z.ZodObject<{
346
+ key: z.ZodString;
347
+ data: z.ZodObject<{
348
+ type: z.ZodString;
349
+ name: z.ZodString;
350
+ value: z.ZodNumber;
351
+ }, z.core.$strip>;
352
+ }, z.core.$strip>;
301
353
  export declare const SiteDetailsSchema: z.ZodObject<{
302
354
  site: z.ZodString;
303
355
  account: z.ZodString;
@@ -387,12 +439,19 @@ export declare const SiteDataSchema: z.ZodObject<{
387
439
  count: z.ZodNumber;
388
440
  category: z.ZodString;
389
441
  }, z.core.$strip>>>;
390
- health: z.ZodOptional<z.ZodArray<z.ZodObject<{
442
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
391
443
  account: z.ZodOptional<z.ZodString>;
392
- datetime: z.ZodNumber;
393
444
  site: z.ZodString;
394
- responseTimeMs: z.ZodNumber;
395
- success: z.ZodBoolean;
445
+ datetime: z.ZodNumber;
446
+ metric: z.ZodUnion<readonly [z.ZodObject<{
447
+ type: z.ZodLiteral<"health">;
448
+ responseTimeMs: z.ZodNumber;
449
+ success: z.ZodBoolean;
450
+ }, z.core.$strip>, z.ZodObject<{
451
+ type: z.ZodString;
452
+ name: z.ZodString;
453
+ value: z.ZodNumber;
454
+ }, z.core.$strip>]>;
396
455
  }, z.core.$strip>>>;
397
456
  languages: z.ZodOptional<z.ZodArray<z.ZodObject<{
398
457
  account: z.ZodOptional<z.ZodString>;
@@ -443,7 +502,11 @@ export declare const SiteDataSchema: z.ZodObject<{
443
502
  href: z.ZodString;
444
503
  count: z.ZodNumber;
445
504
  }, z.core.$strip>>>;
446
- averageResponseTimeMs: z.ZodOptional<z.ZodNumber>;
505
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
506
+ count: z.ZodNumber;
507
+ sum: z.ZodNumber;
508
+ average: z.ZodNumber;
509
+ }, z.core.$strip>>>;
447
510
  }, z.core.$strip>>>;
448
511
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
449
512
  PK: z.ZodString;
@@ -565,8 +628,10 @@ export type Location = z.infer<typeof LocationSchema>;
565
628
  export type Language = z.infer<typeof LanguageSchema>;
566
629
  export type Fingerprint = z.infer<typeof FingerprintSchema>;
567
630
  export type Event = z.infer<typeof EventSchema>;
568
- export type Health = z.infer<typeof HealthSchema>;
631
+ export type MetricItem = z.infer<typeof MetricItemSchema>;
632
+ export type Metric = z.infer<typeof MetricSchema>;
569
633
  export type ModelError = z.infer<typeof ModelErrorSchema>;
634
+ export type RollupMetricSummary = z.infer<typeof RollupMetricSummarySchema>;
570
635
  export type Rollup = z.infer<typeof RollupSchema>;
571
636
  export type SiteData = z.infer<typeof SiteDataSchema>;
572
637
  export type SiteDetails = z.infer<typeof SiteDetailsSchema>;
@@ -576,6 +641,8 @@ export type PostSiteTrackData = z.infer<typeof PostSiteTrackDataSchema>;
576
641
  export type PostSiteTrack = z.infer<typeof PostSiteTrackSchema>;
577
642
  export type PostErrorData = z.infer<typeof PostErrorDataSchema>;
578
643
  export type PostError = z.infer<typeof PostErrorSchema>;
644
+ export type PostMetricData = z.infer<typeof PostMetricDataSchema>;
645
+ export type PostMetric = z.infer<typeof PostMetricSchema>;
579
646
  export type PostAccount = z.infer<typeof PostAccountSchema>;
580
647
  export type DeleteAccount = z.infer<typeof DeleteAccountSchema>;
581
648
  export type ArchiveErrors = z.infer<typeof ArchiveErrorsSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analytica.click",
3
- "version": "0.0.535",
3
+ "version": "0.0.537",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -17,8 +17,8 @@
17
17
  "typescript": "^5"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/node": "24.3.3",
21
- "esbuild": "0.25.9",
20
+ "@types/node": "24.5.2",
21
+ "esbuild": "0.25.10",
22
22
  "esbuild-node-externals": "1.18.0",
23
23
  "esbuild-plugin-d.ts": "1.1.0",
24
24
  "eslint": "8.57.1",