@01.software/sdk 0.13.0 → 0.14.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.
@@ -20,6 +20,7 @@ interface Config {
20
20
  tenants: Tenant;
21
21
  'tenant-metadata': TenantMetadatum;
22
22
  'api-usage': ApiUsage;
23
+ 'tenant-analytics-daily': TenantAnalyticsDaily;
23
24
  subscriptions: Subscription;
24
25
  'billing-history': BillingHistory;
25
26
  'tenant-logos': TenantLogo;
@@ -148,6 +149,7 @@ interface Config {
148
149
  tenants: TenantsSelect<false> | TenantsSelect<true>;
149
150
  'tenant-metadata': TenantMetadataSelect<false> | TenantMetadataSelect<true>;
150
151
  'api-usage': ApiUsageSelect<false> | ApiUsageSelect<true>;
152
+ 'tenant-analytics-daily': TenantAnalyticsDailySelect<false> | TenantAnalyticsDailySelect<true>;
151
153
  subscriptions: SubscriptionsSelect<false> | SubscriptionsSelect<true>;
152
154
  'billing-history': BillingHistorySelect<false> | BillingHistorySelect<true>;
153
155
  'tenant-logos': TenantLogosSelect<false> | TenantLogosSelect<true>;
@@ -429,6 +431,16 @@ interface Tenant {
429
431
  hasNextPage?: boolean;
430
432
  totalDocs?: number;
431
433
  };
434
+ webAnalytics?: {
435
+ enabled?: boolean | null;
436
+ /**
437
+ * Empty = browser analytics disabled (fail-closed)
438
+ */
439
+ allowedOrigins?: {
440
+ origin: string;
441
+ id?: string | null;
442
+ }[] | null;
443
+ };
432
444
  updatedAt: string;
433
445
  createdAt: string;
434
446
  }
@@ -969,6 +981,45 @@ interface ApiUsage {
969
981
  updatedAt: string;
970
982
  createdAt: string;
971
983
  }
984
+ /**
985
+ * This interface was referenced by `Config`'s JSON-Schema
986
+ * via the `definition` "tenant-analytics-daily".
987
+ */
988
+ interface TenantAnalyticsDaily {
989
+ id: string;
990
+ tenant?: (string | null) | Tenant;
991
+ /**
992
+ * YYYY-MM-DD (UTC)
993
+ */
994
+ date: string;
995
+ pageviews: number;
996
+ /**
997
+ * Estimated via HyperLogLog (±0.81%)
998
+ */
999
+ visitors: number;
1000
+ topPages?: {
1001
+ pathname: string;
1002
+ views: number;
1003
+ id?: string | null;
1004
+ }[] | null;
1005
+ topReferrers?: {
1006
+ source: string;
1007
+ views: number;
1008
+ id?: string | null;
1009
+ }[] | null;
1010
+ topEvents?: {
1011
+ name: string;
1012
+ count: number;
1013
+ id?: string | null;
1014
+ }[] | null;
1015
+ eventsDropped?: {
1016
+ cardinality?: number | null;
1017
+ schema?: number | null;
1018
+ };
1019
+ snapshottedAt?: string | null;
1020
+ updatedAt: string;
1021
+ createdAt: string;
1022
+ }
972
1023
  /**
973
1024
  * This interface was referenced by `Config`'s JSON-Schema
974
1025
  * via the `definition` "subscriptions".
@@ -4089,6 +4140,9 @@ interface PayloadLockedDocument {
4089
4140
  } | null) | ({
4090
4141
  relationTo: 'api-usage';
4091
4142
  value: string | ApiUsage;
4143
+ } | null) | ({
4144
+ relationTo: 'tenant-analytics-daily';
4145
+ value: string | TenantAnalyticsDaily;
4092
4146
  } | null) | ({
4093
4147
  relationTo: 'subscriptions';
4094
4148
  value: string | Subscription;
@@ -4591,6 +4645,13 @@ interface TenantsSelect<T extends boolean = true> {
4591
4645
  id?: T;
4592
4646
  };
4593
4647
  members?: T;
4648
+ webAnalytics?: T | {
4649
+ enabled?: T;
4650
+ allowedOrigins?: T | {
4651
+ origin?: T;
4652
+ id?: T;
4653
+ };
4654
+ };
4594
4655
  updatedAt?: T;
4595
4656
  createdAt?: T;
4596
4657
  }
@@ -4679,6 +4740,38 @@ interface ApiUsageSelect<T extends boolean = true> {
4679
4740
  updatedAt?: T;
4680
4741
  createdAt?: T;
4681
4742
  }
4743
+ /**
4744
+ * This interface was referenced by `Config`'s JSON-Schema
4745
+ * via the `definition` "tenant-analytics-daily_select".
4746
+ */
4747
+ interface TenantAnalyticsDailySelect<T extends boolean = true> {
4748
+ tenant?: T;
4749
+ date?: T;
4750
+ pageviews?: T;
4751
+ visitors?: T;
4752
+ topPages?: T | {
4753
+ pathname?: T;
4754
+ views?: T;
4755
+ id?: T;
4756
+ };
4757
+ topReferrers?: T | {
4758
+ source?: T;
4759
+ views?: T;
4760
+ id?: T;
4761
+ };
4762
+ topEvents?: T | {
4763
+ name?: T;
4764
+ count?: T;
4765
+ id?: T;
4766
+ };
4767
+ eventsDropped?: T | {
4768
+ cardinality?: T;
4769
+ schema?: T;
4770
+ };
4771
+ snapshottedAt?: T;
4772
+ updatedAt?: T;
4773
+ createdAt?: T;
4774
+ }
4682
4775
  /**
4683
4776
  * This interface was referenced by `Config`'s JSON-Schema
4684
4777
  * via the `definition` "subscriptions_select".
@@ -20,6 +20,7 @@ interface Config {
20
20
  tenants: Tenant;
21
21
  'tenant-metadata': TenantMetadatum;
22
22
  'api-usage': ApiUsage;
23
+ 'tenant-analytics-daily': TenantAnalyticsDaily;
23
24
  subscriptions: Subscription;
24
25
  'billing-history': BillingHistory;
25
26
  'tenant-logos': TenantLogo;
@@ -148,6 +149,7 @@ interface Config {
148
149
  tenants: TenantsSelect<false> | TenantsSelect<true>;
149
150
  'tenant-metadata': TenantMetadataSelect<false> | TenantMetadataSelect<true>;
150
151
  'api-usage': ApiUsageSelect<false> | ApiUsageSelect<true>;
152
+ 'tenant-analytics-daily': TenantAnalyticsDailySelect<false> | TenantAnalyticsDailySelect<true>;
151
153
  subscriptions: SubscriptionsSelect<false> | SubscriptionsSelect<true>;
152
154
  'billing-history': BillingHistorySelect<false> | BillingHistorySelect<true>;
153
155
  'tenant-logos': TenantLogosSelect<false> | TenantLogosSelect<true>;
@@ -429,6 +431,16 @@ interface Tenant {
429
431
  hasNextPage?: boolean;
430
432
  totalDocs?: number;
431
433
  };
434
+ webAnalytics?: {
435
+ enabled?: boolean | null;
436
+ /**
437
+ * Empty = browser analytics disabled (fail-closed)
438
+ */
439
+ allowedOrigins?: {
440
+ origin: string;
441
+ id?: string | null;
442
+ }[] | null;
443
+ };
432
444
  updatedAt: string;
433
445
  createdAt: string;
434
446
  }
@@ -969,6 +981,45 @@ interface ApiUsage {
969
981
  updatedAt: string;
970
982
  createdAt: string;
971
983
  }
984
+ /**
985
+ * This interface was referenced by `Config`'s JSON-Schema
986
+ * via the `definition` "tenant-analytics-daily".
987
+ */
988
+ interface TenantAnalyticsDaily {
989
+ id: string;
990
+ tenant?: (string | null) | Tenant;
991
+ /**
992
+ * YYYY-MM-DD (UTC)
993
+ */
994
+ date: string;
995
+ pageviews: number;
996
+ /**
997
+ * Estimated via HyperLogLog (±0.81%)
998
+ */
999
+ visitors: number;
1000
+ topPages?: {
1001
+ pathname: string;
1002
+ views: number;
1003
+ id?: string | null;
1004
+ }[] | null;
1005
+ topReferrers?: {
1006
+ source: string;
1007
+ views: number;
1008
+ id?: string | null;
1009
+ }[] | null;
1010
+ topEvents?: {
1011
+ name: string;
1012
+ count: number;
1013
+ id?: string | null;
1014
+ }[] | null;
1015
+ eventsDropped?: {
1016
+ cardinality?: number | null;
1017
+ schema?: number | null;
1018
+ };
1019
+ snapshottedAt?: string | null;
1020
+ updatedAt: string;
1021
+ createdAt: string;
1022
+ }
972
1023
  /**
973
1024
  * This interface was referenced by `Config`'s JSON-Schema
974
1025
  * via the `definition` "subscriptions".
@@ -4089,6 +4140,9 @@ interface PayloadLockedDocument {
4089
4140
  } | null) | ({
4090
4141
  relationTo: 'api-usage';
4091
4142
  value: string | ApiUsage;
4143
+ } | null) | ({
4144
+ relationTo: 'tenant-analytics-daily';
4145
+ value: string | TenantAnalyticsDaily;
4092
4146
  } | null) | ({
4093
4147
  relationTo: 'subscriptions';
4094
4148
  value: string | Subscription;
@@ -4591,6 +4645,13 @@ interface TenantsSelect<T extends boolean = true> {
4591
4645
  id?: T;
4592
4646
  };
4593
4647
  members?: T;
4648
+ webAnalytics?: T | {
4649
+ enabled?: T;
4650
+ allowedOrigins?: T | {
4651
+ origin?: T;
4652
+ id?: T;
4653
+ };
4654
+ };
4594
4655
  updatedAt?: T;
4595
4656
  createdAt?: T;
4596
4657
  }
@@ -4679,6 +4740,38 @@ interface ApiUsageSelect<T extends boolean = true> {
4679
4740
  updatedAt?: T;
4680
4741
  createdAt?: T;
4681
4742
  }
4743
+ /**
4744
+ * This interface was referenced by `Config`'s JSON-Schema
4745
+ * via the `definition` "tenant-analytics-daily_select".
4746
+ */
4747
+ interface TenantAnalyticsDailySelect<T extends boolean = true> {
4748
+ tenant?: T;
4749
+ date?: T;
4750
+ pageviews?: T;
4751
+ visitors?: T;
4752
+ topPages?: T | {
4753
+ pathname?: T;
4754
+ views?: T;
4755
+ id?: T;
4756
+ };
4757
+ topReferrers?: T | {
4758
+ source?: T;
4759
+ views?: T;
4760
+ id?: T;
4761
+ };
4762
+ topEvents?: T | {
4763
+ name?: T;
4764
+ count?: T;
4765
+ id?: T;
4766
+ };
4767
+ eventsDropped?: T | {
4768
+ cardinality?: T;
4769
+ schema?: T;
4770
+ };
4771
+ snapshottedAt?: T;
4772
+ updatedAt?: T;
4773
+ createdAt?: T;
4774
+ }
4682
4775
  /**
4683
4776
  * This interface was referenced by `Config`'s JSON-Schema
4684
4777
  * via the `definition` "subscriptions_select".
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.cjs';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
3
- import { P as PublicCollection } from './const-DqcpKgSA.cjs';
4
- import './payload-types-DqX4iuTW.cjs';
3
+ import { P as PublicCollection } from './const-CxpAy8X_.cjs';
4
+ import './payload-types-DH1fKdM3.cjs';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.js';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.js';
3
- import { P as PublicCollection } from './const-DSTPrI77.js';
4
- import './payload-types-DqX4iuTW.js';
3
+ import { P as PublicCollection } from './const-CigSm8e_.js';
4
+ import './payload-types-DH1fKdM3.js';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { F as Form } from '../payload-types-DqX4iuTW.cjs';
2
+ import { F as Form } from '../payload-types-DH1fKdM3.cjs';
3
3
  import { RichTextData } from './rich-text.cjs';
4
4
  import '@payloadcms/richtext-lexical';
5
5
  import '@payloadcms/richtext-lexical/lexical';
package/dist/ui/form.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { F as Form } from '../payload-types-DqX4iuTW.js';
2
+ import { F as Form } from '../payload-types-DH1fKdM3.js';
3
3
  import { RichTextData } from './rich-text.js';
4
4
  import '@payloadcms/richtext-lexical';
5
5
  import '@payloadcms/richtext-lexical/lexical';
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
3
3
  export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
4
- import { V as Video } from '../payload-types-DqX4iuTW.cjs';
4
+ import { V as Video } from '../payload-types-DH1fKdM3.cjs';
5
5
  export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from '../video-DbLL8yuc.cjs';
6
6
 
7
7
  interface VideoPlayerCSSProperties extends CSSProperties {
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
3
3
  export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
4
- import { V as Video } from '../payload-types-DqX4iuTW.js';
4
+ import { V as Video } from '../payload-types-DH1fKdM3.js';
5
5
  export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from '../video-DbLL8yuc.js';
6
6
 
7
7
  interface VideoPlayerCSSProperties extends CSSProperties {
@@ -1,5 +1,5 @@
1
- import { C as Collection } from './const-DSTPrI77.js';
2
- import { C as Config } from './payload-types-DqX4iuTW.js';
1
+ import { C as Collection } from './const-CigSm8e_.js';
2
+ import { C as Config } from './payload-types-DH1fKdM3.js';
3
3
 
4
4
  type CollectionType<T extends string> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
5
5
 
@@ -1,5 +1,5 @@
1
- import { C as Collection } from './const-DqcpKgSA.cjs';
2
- import { C as Config } from './payload-types-DqX4iuTW.cjs';
1
+ import { C as Collection } from './const-CxpAy8X_.cjs';
2
+ import { C as Config } from './payload-types-DH1fKdM3.cjs';
3
3
 
4
4
  type CollectionType<T extends string> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
5
5
 
@@ -1,3 +1,3 @@
1
- export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-mXjcW86I.cjs';
2
- import './const-DqcpKgSA.cjs';
3
- import './payload-types-DqX4iuTW.cjs';
1
+ export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-IX2MGQj2.cjs';
2
+ import './const-CxpAy8X_.cjs';
3
+ import './payload-types-DH1fKdM3.cjs';
package/dist/webhook.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-CX21PpBt.js';
2
- import './const-DSTPrI77.js';
3
- import './payload-types-DqX4iuTW.js';
1
+ export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-CmJWfLjs.js';
2
+ import './const-CigSm8e_.js';
3
+ import './payload-types-DH1fKdM3.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@01.software/sdk",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "01.software SDK",
5
5
  "author": "<office@01.works>",
6
6
  "keywords": [],
@@ -19,6 +19,16 @@
19
19
  "default": "./dist/index.cjs"
20
20
  }
21
21
  },
22
+ "./analytics": {
23
+ "import": {
24
+ "types": "./dist/analytics.d.ts",
25
+ "default": "./dist/analytics.js"
26
+ },
27
+ "require": {
28
+ "types": "./dist/analytics.d.cts",
29
+ "default": "./dist/analytics.cjs"
30
+ }
31
+ },
22
32
  "./webhook": {
23
33
  "import": {
24
34
  "types": "./dist/webhook.d.ts",
@@ -138,8 +148,8 @@
138
148
  "shadcn": "^3.6.3",
139
149
  "tsup": "^8.3.7",
140
150
  "vitest": "^3.2.3",
141
- "@repo/eslint-config": "0.0.0",
142
- "@repo/typescript-config": "0.0.0"
151
+ "@repo/typescript-config": "0.0.0",
152
+ "@repo/eslint-config": "0.0.0"
143
153
  },
144
154
  "dependencies": {
145
155
  "@payloadcms/richtext-lexical": ">=3.82.0",