@shware/analytics 2.15.5 → 2.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -22,8 +22,6 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  ALL_ENVIRONMENTS: () => import_schema.ALL_ENVIRONMENTS,
24
24
  ALL_PLATFORMS: () => import_schema.ALL_PLATFORMS,
25
- Environment: () => import_schema.Environment,
26
- Platform: () => import_schema.Platform,
27
25
  createFeedbackSchema: () => import_schema.createFeedbackSchema,
28
26
  createLink: () => import_link.createLink,
29
27
  createLinkSchema: () => import_schema.createLinkSchema,
@@ -52,8 +50,6 @@ var import_stripe = require("./utils/stripe.cjs");
52
50
  0 && (module.exports = {
53
51
  ALL_ENVIRONMENTS,
54
52
  ALL_PLATFORMS,
55
- Environment,
56
- Platform,
57
53
  createFeedbackSchema,
58
54
  createLink,
59
55
  createLinkSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { setupAnalytics } from './setup/index';\nexport { track, trackAsync } from './track/index';\nexport { getVisitor, setVisitor } from './visitor/index';\nexport { sendFeedback } from './feedback/index';\nexport { createLink, getLink, type Link } from './link/index';\nexport {\n Platform,\n Environment,\n ALL_PLATFORMS,\n ALL_ENVIRONMENTS,\n createTrackEventSchemaV1,\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n createLinkSchema,\n type CreateFeedbackDTO,\n type CreateLinkDTO,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\n\nexport type {\n TrackProperties,\n TrackTags,\n AllowedPropertyValues,\n UserProvidedData,\n} from './track/types';\nexport type { VisitorProperties } from './visitor/types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,mBAAkC;AAClC,qBAAuC;AACvC,sBAA6B;AAC7B,kBAA+C;AAC/C,oBAaO;AACP,oBAAiC;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { setupAnalytics } from './setup/index';\nexport { track, trackAsync } from './track/index';\nexport { getVisitor, setVisitor } from './visitor/index';\nexport { sendFeedback } from './feedback/index';\nexport { createLink, getLink, type Link } from './link/index';\nexport {\n ALL_PLATFORMS,\n ALL_ENVIRONMENTS,\n createTrackEventSchemaV1,\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n createLinkSchema,\n type CreateFeedbackDTO,\n type CreateLinkDTO,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\n\nexport type {\n Platform,\n Environment,\n TrackTags,\n TrackProperties,\n AllowedPropertyValues,\n UserProvidedData,\n} from './track/types';\nexport type { VisitorProperties } from './visitor/types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,mBAAkC;AAClC,qBAAuC;AACvC,sBAA6B;AAC7B,kBAA+C;AAC/C,oBAWO;AACP,oBAAiC;","names":[]}
package/dist/index.d.cts CHANGED
@@ -3,9 +3,9 @@ export { track, trackAsync } from './track/index.cjs';
3
3
  export { getVisitor, setVisitor } from './visitor/index.cjs';
4
4
  export { sendFeedback } from './feedback/index.cjs';
5
5
  export { Link, createLink, getLink } from './link/index.cjs';
6
- export { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, Environment, Platform, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, updateVisitorSchema } from './schema/index.cjs';
6
+ export { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, updateVisitorSchema } from './schema/index.cjs';
7
7
  export { stripeMinorUnits } from './utils/stripe.cjs';
8
- export { AllowedPropertyValues, TrackProperties, TrackTags, UserProvidedData } from './track/types.cjs';
8
+ export { AllowedPropertyValues, Environment, Platform, TrackProperties, TrackTags, UserProvidedData } from './track/types.cjs';
9
9
  export { VisitorProperties } from './visitor/types.cjs';
10
10
  import 'zod/mini';
11
11
  import './track/gtag.cjs';
package/dist/index.d.ts CHANGED
@@ -3,9 +3,9 @@ export { track, trackAsync } from './track/index.js';
3
3
  export { getVisitor, setVisitor } from './visitor/index.js';
4
4
  export { sendFeedback } from './feedback/index.js';
5
5
  export { Link, createLink, getLink } from './link/index.js';
6
- export { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, Environment, Platform, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, updateVisitorSchema } from './schema/index.js';
6
+ export { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, updateVisitorSchema } from './schema/index.js';
7
7
  export { stripeMinorUnits } from './utils/stripe.js';
8
- export { AllowedPropertyValues, TrackProperties, TrackTags, UserProvidedData } from './track/types.js';
8
+ export { AllowedPropertyValues, Environment, Platform, TrackProperties, TrackTags, UserProvidedData } from './track/types.js';
9
9
  export { VisitorProperties } from './visitor/types.js';
10
10
  import 'zod/mini';
11
11
  import './track/gtag.js';
package/dist/index.mjs CHANGED
@@ -5,8 +5,6 @@ import { getVisitor, setVisitor } from "./visitor/index.mjs";
5
5
  import { sendFeedback } from "./feedback/index.mjs";
6
6
  import { createLink, getLink } from "./link/index.mjs";
7
7
  import {
8
- Platform,
9
- Environment,
10
8
  ALL_PLATFORMS,
11
9
  ALL_ENVIRONMENTS,
12
10
  createTrackEventSchemaV1,
@@ -20,8 +18,6 @@ import { stripeMinorUnits } from "./utils/stripe.mjs";
20
18
  export {
21
19
  ALL_ENVIRONMENTS,
22
20
  ALL_PLATFORMS,
23
- Environment,
24
- Platform,
25
21
  createFeedbackSchema,
26
22
  createLink,
27
23
  createLinkSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { setupAnalytics } from './setup/index';\nexport { track, trackAsync } from './track/index';\nexport { getVisitor, setVisitor } from './visitor/index';\nexport { sendFeedback } from './feedback/index';\nexport { createLink, getLink, type Link } from './link/index';\nexport {\n Platform,\n Environment,\n ALL_PLATFORMS,\n ALL_ENVIRONMENTS,\n createTrackEventSchemaV1,\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n createLinkSchema,\n type CreateFeedbackDTO,\n type CreateLinkDTO,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\n\nexport type {\n TrackProperties,\n TrackTags,\n AllowedPropertyValues,\n UserProvidedData,\n} from './track/types';\nexport type { VisitorProperties } from './visitor/types';\n"],"mappings":";AAAA,SAAS,sBAAsB;AAC/B,SAAS,OAAO,kBAAkB;AAClC,SAAS,YAAY,kBAAkB;AACvC,SAAS,oBAAoB;AAC7B,SAAS,YAAY,eAA0B;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,wBAAwB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { setupAnalytics } from './setup/index';\nexport { track, trackAsync } from './track/index';\nexport { getVisitor, setVisitor } from './visitor/index';\nexport { sendFeedback } from './feedback/index';\nexport { createLink, getLink, type Link } from './link/index';\nexport {\n ALL_PLATFORMS,\n ALL_ENVIRONMENTS,\n createTrackEventSchemaV1,\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n createLinkSchema,\n type CreateFeedbackDTO,\n type CreateLinkDTO,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\n\nexport type {\n Platform,\n Environment,\n TrackTags,\n TrackProperties,\n AllowedPropertyValues,\n UserProvidedData,\n} from './track/types';\nexport type { VisitorProperties } from './visitor/types';\n"],"mappings":";AAAA,SAAS,sBAAsB;AAC/B,SAAS,OAAO,kBAAkB;AAClC,SAAS,YAAY,kBAAkB;AACvC,SAAS,oBAAoB;AAC7B,SAAS,YAAY,eAA0B;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,wBAAwB;","names":[]}
@@ -22,8 +22,6 @@ var schema_exports = {};
22
22
  __export(schema_exports, {
23
23
  ALL_ENVIRONMENTS: () => ALL_ENVIRONMENTS,
24
24
  ALL_PLATFORMS: () => ALL_PLATFORMS,
25
- Environment: () => Environment,
26
- Platform: () => Platform,
27
25
  createFeedbackSchema: () => createFeedbackSchema,
28
26
  createLinkSchema: () => createLinkSchema,
29
27
  createTrackEventSchema: () => createTrackEventSchema,
@@ -41,31 +39,16 @@ var items = (0, import_mini.array)(
41
39
  (0, import_mini.union)([(0, import_mini.string)().check((0, import_mini.maxLength)(512)), (0, import_mini.number)(), (0, import_mini.boolean)(), (0, import_mini.null)()])
42
40
  )
43
41
  );
44
- var Platform = /* @__PURE__ */ ((Platform2) => {
45
- Platform2["ios"] = "ios";
46
- Platform2["android"] = "android";
47
- Platform2["web"] = "web";
48
- Platform2["macos"] = "macos";
49
- Platform2["windows"] = "windows";
50
- Platform2["linux"] = "linux";
51
- Platform2["unknown"] = "unknown";
52
- return Platform2;
53
- })(Platform || {});
54
- var Environment = /* @__PURE__ */ ((Environment2) => {
55
- Environment2["development"] = "development";
56
- Environment2["production"] = "production";
57
- return Environment2;
58
- })(Environment || {});
59
42
  var ALL_PLATFORMS = [
60
- "ios" /* ios */,
61
- "android" /* android */,
62
- "web" /* web */,
63
- "macos" /* macos */,
64
- "windows" /* windows */,
65
- "linux" /* linux */,
66
- "unknown" /* unknown */
43
+ "ios",
44
+ "android",
45
+ "web",
46
+ "macos",
47
+ "windows",
48
+ "linux",
49
+ "unknown"
67
50
  ];
68
- var ALL_ENVIRONMENTS = ["development" /* development */, "production" /* production */];
51
+ var ALL_ENVIRONMENTS = ["development", "production"];
69
52
  var tagsSchema = (0, import_mini.object)({
70
53
  os: (0, import_mini.optional)((0, import_mini.string)()),
71
54
  os_name: (0, import_mini.optional)((0, import_mini.string)()),
@@ -73,7 +56,7 @@ var tagsSchema = (0, import_mini.object)({
73
56
  browser: (0, import_mini.optional)((0, import_mini.string)()),
74
57
  browser_name: (0, import_mini.optional)((0, import_mini.string)()),
75
58
  browser_version: (0, import_mini.optional)((0, import_mini.string)()),
76
- platform: (0, import_mini.enum)(Platform),
59
+ platform: (0, import_mini.enum)(ALL_PLATFORMS),
77
60
  device: (0, import_mini.optional)((0, import_mini.string)()),
78
61
  device_id: (0, import_mini.optional)((0, import_mini.string)().check((0, import_mini.trim)(), (0, import_mini.minLength)(1), (0, import_mini.maxLength)(36))),
79
62
  device_type: (0, import_mini.optional)((0, import_mini.string)()),
@@ -90,7 +73,7 @@ var tagsSchema = (0, import_mini.object)({
90
73
  release: (0, import_mini.optional)((0, import_mini.string)()),
91
74
  language: (0, import_mini.optional)((0, import_mini.string)()),
92
75
  time_zone: (0, import_mini.optional)((0, import_mini.string)()),
93
- environment: (0, import_mini.enum)(Environment),
76
+ environment: (0, import_mini.enum)(ALL_ENVIRONMENTS),
94
77
  source_url: (0, import_mini.optional)((0, import_mini.string)()),
95
78
  source: (0, import_mini.optional)((0, import_mini.enum)(["web", "app", "offline"])),
96
79
  // app info
@@ -148,6 +131,8 @@ var createTrackEventSchemaV1 = (0, import_mini.array)(
148
131
  name: (0, import_mini.string)().check((0, import_mini.trim)(), (0, import_mini.minLength)(1), (0, import_mini.maxLength)(64)),
149
132
  visitor_id: import_mini.coerce.bigint(),
150
133
  session_id: (0, import_mini.uuid)(),
134
+ platform: (0, import_mini.enum)(ALL_PLATFORMS),
135
+ environment: (0, import_mini.enum)(ALL_ENVIRONMENTS),
151
136
  timestamp: import_mini.iso.datetime(),
152
137
  tags: tagsSchema,
153
138
  properties: propertiesSchema
@@ -158,6 +143,8 @@ var createTrackEventSchema = (0, import_mini.array)(
158
143
  name: (0, import_mini.string)().check((0, import_mini.trim)(), (0, import_mini.minLength)(1), (0, import_mini.maxLength)(64)),
159
144
  visitor_id: (0, import_mini.uuid)(),
160
145
  session_id: (0, import_mini.uuid)(),
146
+ platform: (0, import_mini.enum)(ALL_PLATFORMS),
147
+ environment: (0, import_mini.enum)(ALL_ENVIRONMENTS),
161
148
  timestamp: import_mini.iso.datetime(),
162
149
  tags: tagsSchema,
163
150
  properties: propertiesSchema
@@ -165,6 +152,8 @@ var createTrackEventSchema = (0, import_mini.array)(
165
152
  ).check((0, import_mini.minLength)(1), (0, import_mini.maxLength)(100));
166
153
  var createVisitorSchema = (0, import_mini.object)({
167
154
  device_id: (0, import_mini.string)().check((0, import_mini.trim)(), (0, import_mini.minLength)(1), (0, import_mini.maxLength)(36)),
155
+ platform: (0, import_mini.enum)(ALL_PLATFORMS),
156
+ environment: (0, import_mini.enum)(ALL_ENVIRONMENTS),
168
157
  properties: (0, import_mini.optional)(
169
158
  (0, import_mini.record)(
170
159
  (0, import_mini.string)().check((0, import_mini.trim)(), (0, import_mini.minLength)(1), (0, import_mini.maxLength)(128)),
@@ -238,8 +227,6 @@ var createLinkSchema = (0, import_mini.object)({
238
227
  0 && (module.exports = {
239
228
  ALL_ENVIRONMENTS,
240
229
  ALL_PLATFORMS,
241
- Environment,
242
- Platform,
243
230
  createFeedbackSchema,
244
231
  createLinkSchema,
245
232
  createTrackEventSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n enum as _enum,\n null as _null,\n array,\n boolean,\n coerce,\n email,\n iso,\n maxLength,\n minLength,\n number,\n object,\n optional,\n pipe,\n record,\n refine,\n regex,\n string,\n transform,\n trim,\n union,\n url,\n uuid,\n type z,\n} from 'zod/mini';\n\nconst items = array(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null()])\n )\n);\n\nexport enum Platform {\n ios = 'ios',\n android = 'android',\n web = 'web',\n macos = 'macos',\n windows = 'windows',\n linux = 'linux',\n unknown = 'unknown',\n}\n\nexport enum Environment {\n development = 'development',\n production = 'production',\n}\n\nexport const ALL_PLATFORMS = [\n Platform.ios,\n Platform.android,\n Platform.web,\n Platform.macos,\n Platform.windows,\n Platform.linux,\n Platform.unknown,\n] as const;\n\nexport const ALL_ENVIRONMENTS = [Environment.development, Environment.production] as const;\n\nexport const tagsSchema = object({\n os: optional(string()),\n os_name: optional(string()),\n os_version: optional(string()),\n browser: optional(string()),\n browser_name: optional(string()),\n browser_version: optional(string()),\n platform: _enum(Platform),\n device: optional(string()),\n device_id: optional(string().check(trim(), minLength(1), maxLength(36))),\n device_type: optional(string()),\n device_vendor: optional(string()),\n device_pixel_ratio: optional(number()),\n screen_width: optional(number()),\n screen_height: optional(number()),\n screen_resolution: optional(\n pipe(\n string().check(regex(/^\\d+x\\d+$/)),\n transform((v) => v as `${number}x${number}`)\n )\n ),\n release: optional(string()),\n language: optional(string()),\n time_zone: optional(string()),\n environment: _enum(Environment),\n source_url: optional(string()),\n source: optional(_enum(['web', 'app', 'offline'])),\n // app info\n advertising_id: optional(string()),\n install_referrer: optional(string()),\n // meta ads\n fbc: optional(string()),\n fbp: optional(string()),\n fbclid: optional(string()),\n ad_id: optional(string()),\n ad_name: optional(string()),\n adset_id: optional(string()),\n adset_name: optional(string()),\n campaign_id: optional(string()),\n campaign_name: optional(string()),\n placement: optional(string()),\n site_source_name: optional(string()),\n // google ads\n gclid: optional(string()),\n gclsrc: optional(string()),\n gad_source: optional(string()),\n gad_campaignid: optional(string()),\n // reddit ads\n rdt_cid: optional(string()),\n rdt_uuid: optional(string()),\n // click ids\n dclid: optional(string()),\n ko_click_id: optional(string()),\n li_fat_id: optional(string()),\n msclkid: optional(string()),\n sccid: optional(string()),\n ttclid: optional(string()),\n twclid: optional(string()),\n wbraid: optional(string()),\n yclid: optional(string()),\n // utm params\n utm_source: optional(string()),\n utm_medium: optional(string()),\n utm_campaign: optional(string()),\n utm_term: optional(string()),\n utm_content: optional(string()),\n utm_id: optional(string()),\n utm_source_platform: optional(string()),\n utm_creative_format: optional(string()),\n utm_marketing_tactic: optional(string()),\n});\n\nexport const propertiesSchema = optional(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null(), items])\n ).check(refine((data) => Object.keys(data).length <= 64))\n);\n\n/** @deprecated */\nexport const createTrackEventSchemaV1 = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: coerce.bigint(),\n session_id: uuid(),\n timestamp: iso.datetime(),\n tags: tagsSchema,\n properties: propertiesSchema,\n })\n).check(minLength(1), maxLength(100));\n\nexport const createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\n session_id: uuid(),\n timestamp: iso.datetime(),\n tags: tagsSchema,\n properties: propertiesSchema,\n })\n).check(minLength(1), maxLength(100));\n\nexport const createVisitorSchema = object({\n device_id: string().check(trim(), minLength(1), maxLength(36)),\n properties: optional(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null()])\n ).check(refine((data) => Object.keys(data).length <= 64))\n ),\n});\n\nexport const updateVisitorSchema = object({\n user_id: optional(uuid()),\n distinct_id: optional(string().check(trim(), minLength(1), maxLength(36))),\n properties: optional(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null()])\n ).check(refine((data) => Object.keys(data).length <= 64))\n ),\n});\n\nexport const createFeedbackSchema = object({\n name: string().check(minLength(1), maxLength(256)),\n email: email().check(maxLength(320)),\n message: string().check(minLength(1), maxLength(65536)),\n});\n\nconst noEmptyString = pipe(\n string().check(maxLength(256)),\n transform((v) => (v ? v : undefined))\n);\n\n/**\n * The schema for creating a link.\n * @see https://support.google.com/analytics/answer/10917952\n * */\nexport const createLinkSchema = object({\n /** The URL that the user is redirected to. */\n url: url().check(minLength(1), maxLength(1024)), // required\n\n /**\n * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4\n * data import. Use the same IDs that you use when uploading campaign cost data.\n */\n utm_id: optional(noEmptyString),\n\n /** Referrer, for example: google, newsletter4, billboard */\n utm_source: string().check(minLength(1), maxLength(256)), // required\n\n /** Marketing medium, for example: cpc, banner, email */\n utm_medium: string().check(minLength(1), maxLength(256)), // required\n\n /** Product, slogan, promo code, for example: spring_sale */\n utm_campaign: string().check(minLength(1), maxLength(256)), // required\n\n /** Paid keyword */\n utm_term: optional(noEmptyString),\n\n /**\n * Use to differentiate creatives. For example, if you have two call-to-action links within the\n * same email message, you can use utm_content and set different values for each so you can tell\n * which version is more effective.\n */\n utm_content: optional(noEmptyString),\n\n /**\n * The platform responsible for directing traffic to a given Analytics property (such as a buying\n * platform that sets budgets and targeting criteria or a platform that manages organic traffic\n * data). For example: Search Ads 360 or Display & Video 360.\n */\n utm_source_platform: optional(noEmptyString),\n\n /**\n * Type of creative, for example: display, native, video, search, utm_creative_format is not\n * currently reported in Google Analytics 4 properties.\n */\n utm_creative_format: optional(noEmptyString),\n\n /**\n * Targeting criteria applied to a campaign, for example: remarketing, prospecting,\n * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.\n * */\n utm_marketing_tactic: optional(noEmptyString),\n});\n\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\nexport type CreateLinkDTO = z.output<typeof createLinkSchema>;\n"],"mappings":";;;;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AA;AAAA,EAGvD,kBAAc,oBAAO,EAAE,UAAM,uBAAU,CAAC,OAAG,uBAAU,GAAG,CAAC;AAAA;AAAA;AAAA,EAGzD,cAAU,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOhC,iBAAa,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnC,yBAAqB,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3C,yBAAqB,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3C,0BAAsB,sBAAS,aAAa;AAC9C,CAAC;","names":["_null","Platform","Environment","_enum"]}
1
+ {"version":3,"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n enum as _enum,\n null as _null,\n array,\n boolean,\n coerce,\n email,\n iso,\n maxLength,\n minLength,\n number,\n object,\n optional,\n pipe,\n record,\n refine,\n regex,\n string,\n transform,\n trim,\n union,\n url,\n uuid,\n type z,\n} from 'zod/mini';\nimport type { Environment, Platform } from '../track/types';\n\nconst items = array(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null()])\n )\n);\n\nexport const ALL_PLATFORMS = [\n 'ios',\n 'android',\n 'web',\n 'macos',\n 'windows',\n 'linux',\n 'unknown',\n] as const satisfies Platform[];\n\nexport const ALL_ENVIRONMENTS = ['development', 'production'] as const satisfies Environment[];\n\nexport const tagsSchema = object({\n os: optional(string()),\n os_name: optional(string()),\n os_version: optional(string()),\n browser: optional(string()),\n browser_name: optional(string()),\n browser_version: optional(string()),\n platform: _enum(ALL_PLATFORMS),\n device: optional(string()),\n device_id: optional(string().check(trim(), minLength(1), maxLength(36))),\n device_type: optional(string()),\n device_vendor: optional(string()),\n device_pixel_ratio: optional(number()),\n screen_width: optional(number()),\n screen_height: optional(number()),\n screen_resolution: optional(\n pipe(\n string().check(regex(/^\\d+x\\d+$/)),\n transform((v) => v as `${number}x${number}`)\n )\n ),\n release: optional(string()),\n language: optional(string()),\n time_zone: optional(string()),\n environment: _enum(ALL_ENVIRONMENTS),\n source_url: optional(string()),\n source: optional(_enum(['web', 'app', 'offline'])),\n // app info\n advertising_id: optional(string()),\n install_referrer: optional(string()),\n // meta ads\n fbc: optional(string()),\n fbp: optional(string()),\n fbclid: optional(string()),\n ad_id: optional(string()),\n ad_name: optional(string()),\n adset_id: optional(string()),\n adset_name: optional(string()),\n campaign_id: optional(string()),\n campaign_name: optional(string()),\n placement: optional(string()),\n site_source_name: optional(string()),\n // google ads\n gclid: optional(string()),\n gclsrc: optional(string()),\n gad_source: optional(string()),\n gad_campaignid: optional(string()),\n // reddit ads\n rdt_cid: optional(string()),\n rdt_uuid: optional(string()),\n // click ids\n dclid: optional(string()),\n ko_click_id: optional(string()),\n li_fat_id: optional(string()),\n msclkid: optional(string()),\n sccid: optional(string()),\n ttclid: optional(string()),\n twclid: optional(string()),\n wbraid: optional(string()),\n yclid: optional(string()),\n // utm params\n utm_source: optional(string()),\n utm_medium: optional(string()),\n utm_campaign: optional(string()),\n utm_term: optional(string()),\n utm_content: optional(string()),\n utm_id: optional(string()),\n utm_source_platform: optional(string()),\n utm_creative_format: optional(string()),\n utm_marketing_tactic: optional(string()),\n});\n\nexport const propertiesSchema = optional(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null(), items])\n ).check(refine((data) => Object.keys(data).length <= 64))\n);\n\n/** @deprecated */\nexport const createTrackEventSchemaV1 = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: coerce.bigint(),\n session_id: uuid(),\n platform: _enum(ALL_PLATFORMS),\n environment: _enum(ALL_ENVIRONMENTS),\n timestamp: iso.datetime(),\n tags: tagsSchema,\n properties: propertiesSchema,\n })\n).check(minLength(1), maxLength(100));\n\nexport const createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\n session_id: uuid(),\n platform: _enum(ALL_PLATFORMS),\n environment: _enum(ALL_ENVIRONMENTS),\n timestamp: iso.datetime(),\n tags: tagsSchema,\n properties: propertiesSchema,\n })\n).check(minLength(1), maxLength(100));\n\nexport const createVisitorSchema = object({\n device_id: string().check(trim(), minLength(1), maxLength(36)),\n platform: _enum(ALL_PLATFORMS),\n environment: _enum(ALL_ENVIRONMENTS),\n properties: optional(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null()])\n ).check(refine((data) => Object.keys(data).length <= 64))\n ),\n});\n\nexport const updateVisitorSchema = object({\n user_id: optional(uuid()),\n distinct_id: optional(string().check(trim(), minLength(1), maxLength(36))),\n properties: optional(\n record(\n string().check(trim(), minLength(1), maxLength(128)),\n union([string().check(maxLength(512)), number(), boolean(), _null()])\n ).check(refine((data) => Object.keys(data).length <= 64))\n ),\n});\n\nexport const createFeedbackSchema = object({\n name: string().check(minLength(1), maxLength(256)),\n email: email().check(maxLength(320)),\n message: string().check(minLength(1), maxLength(65536)),\n});\n\nconst noEmptyString = pipe(\n string().check(maxLength(256)),\n transform((v) => (v ? v : undefined))\n);\n\n/**\n * The schema for creating a link.\n * @see https://support.google.com/analytics/answer/10917952\n * */\nexport const createLinkSchema = object({\n /** The URL that the user is redirected to. */\n url: url().check(minLength(1), maxLength(1024)), // required\n\n /**\n * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4\n * data import. Use the same IDs that you use when uploading campaign cost data.\n */\n utm_id: optional(noEmptyString),\n\n /** Referrer, for example: google, newsletter4, billboard */\n utm_source: string().check(minLength(1), maxLength(256)), // required\n\n /** Marketing medium, for example: cpc, banner, email */\n utm_medium: string().check(minLength(1), maxLength(256)), // required\n\n /** Product, slogan, promo code, for example: spring_sale */\n utm_campaign: string().check(minLength(1), maxLength(256)), // required\n\n /** Paid keyword */\n utm_term: optional(noEmptyString),\n\n /**\n * Use to differentiate creatives. For example, if you have two call-to-action links within the\n * same email message, you can use utm_content and set different values for each so you can tell\n * which version is more effective.\n */\n utm_content: optional(noEmptyString),\n\n /**\n * The platform responsible for directing traffic to a given Analytics property (such as a buying\n * platform that sets budgets and targeting criteria or a platform that manages organic traffic\n * data). For example: Search Ads 360 or Display & Video 360.\n */\n utm_source_platform: optional(noEmptyString),\n\n /**\n * Type of creative, for example: display, native, video, search, utm_creative_format is not\n * currently reported in Google Analytics 4 properties.\n */\n utm_creative_format: optional(noEmptyString),\n\n /**\n * Targeting criteria applied to a campaign, for example: remarketing, prospecting,\n * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.\n * */\n utm_marketing_tactic: optional(noEmptyString),\n});\n\nexport type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\nexport type CreateLinkDTO = z.output<typeof createLinkSchema>;\nexport type CreateVisitorDTO = z.output<typeof createVisitorSchema>;\nexport type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAwBO;AAGP,IAAM,YAAQ;AAAA,MACZ;AAAA,QACE,oBAAO,EAAE,UAAM,kBAAK,OAAG,uBAAU,CAAC,OAAG,uBAAU,GAAG,CAAC;AAAA,QACnD,mBAAM,KAAC,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC,OAAG,oBAAO,OAAG,qBAAQ,OAAG,YAAAA,MAAM,CAAC,CAAC;AAAA,EACtE;AACF;AAEO,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,mBAAmB,CAAC,eAAe,YAAY;AAErD,IAAM,iBAAa,oBAAO;AAAA,EAC/B,QAAI,0BAAS,oBAAO,CAAC;AAAA,EACrB,aAAS,0BAAS,oBAAO,CAAC;AAAA,EAC1B,g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;AAED,IAAM,oBAAgB;AAAA,MACpB,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC;AAAA,MAC7B,uBAAU,CAAC,MAAO,IAAI,IAAI,MAAU;AACtC;AAMO,IAAM,uBAAmB,oBAAO;AAAA;AAAA,EAErC,SAAK,iBAAI,EAAE,UAAM,uBAAU,CAAC,OAAG,uBAAU,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9C,YAAQ,sBAAS,aAAa;AAAA;AAAA,EAG9B,gBAAY,oBAAO,EAAE,UAAM,uBAAU,CAAC,OAAG,uBAAU,GAAG,CAAC;AAAA;AAAA;AAAA,EAGvD,gBAAY,oBAAO,EAAE,UAAM,uBAAU,CAAC,OAAG,uBAAU,GAAG,CAAC;AAAA;AAAA;AAAA,EAGvD,kBAAc,oBAAO,EAAE,UAAM,uBAAU,CAAC,OAAG,uBAAU,GAAG,CAAC;AAAA;AAAA;AAAA,EAGzD,cAAU,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOhC,iBAAa,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnC,yBAAqB,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3C,yBAAqB,sBAAS,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3C,0BAAsB,sBAAS,aAAa;AAC9C,CAAC;","names":["_null","_enum"]}
@@ -1,20 +1,7 @@
1
1
  import { z, iso } from 'zod/mini';
2
2
 
3
- declare enum Platform {
4
- ios = "ios",
5
- android = "android",
6
- web = "web",
7
- macos = "macos",
8
- windows = "windows",
9
- linux = "linux",
10
- unknown = "unknown"
11
- }
12
- declare enum Environment {
13
- development = "development",
14
- production = "production"
15
- }
16
- declare const ALL_PLATFORMS: readonly [Platform.ios, Platform.android, Platform.web, Platform.macos, Platform.windows, Platform.linux, Platform.unknown];
17
- declare const ALL_ENVIRONMENTS: readonly [Environment.development, Environment.production];
3
+ declare const ALL_PLATFORMS: ["ios", "android", "web", "macos", "windows", "linux", "unknown"];
4
+ declare const ALL_ENVIRONMENTS: ["development", "production"];
18
5
  declare const tagsSchema: z.ZodMiniObject<{
19
6
  os: z.ZodMiniOptional<z.ZodMiniString<string>>;
20
7
  os_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -22,7 +9,15 @@ declare const tagsSchema: z.ZodMiniObject<{
22
9
  browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
23
10
  browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
24
11
  browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
25
- platform: z.ZodMiniEnum<typeof Platform>;
12
+ platform: z.ZodMiniEnum<{
13
+ ios: "ios";
14
+ android: "android";
15
+ web: "web";
16
+ macos: "macos";
17
+ windows: "windows";
18
+ linux: "linux";
19
+ unknown: "unknown";
20
+ }>;
26
21
  device: z.ZodMiniOptional<z.ZodMiniString<string>>;
27
22
  device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
28
23
  device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -34,7 +29,10 @@ declare const tagsSchema: z.ZodMiniObject<{
34
29
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
35
30
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
36
31
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
37
- environment: z.ZodMiniEnum<typeof Environment>;
32
+ environment: z.ZodMiniEnum<{
33
+ development: "development";
34
+ production: "production";
35
+ }>;
38
36
  source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
39
37
  source: z.ZodMiniOptional<z.ZodMiniEnum<{
40
38
  web: "web";
@@ -85,6 +83,19 @@ declare const createTrackEventSchemaV1: z.ZodMiniArray<z.ZodMiniObject<{
85
83
  name: z.ZodMiniString<string>;
86
84
  visitor_id: z.ZodMiniBigInt<unknown>;
87
85
  session_id: z.ZodMiniUUID;
86
+ platform: z.ZodMiniEnum<{
87
+ ios: "ios";
88
+ android: "android";
89
+ web: "web";
90
+ macos: "macos";
91
+ windows: "windows";
92
+ linux: "linux";
93
+ unknown: "unknown";
94
+ }>;
95
+ environment: z.ZodMiniEnum<{
96
+ development: "development";
97
+ production: "production";
98
+ }>;
88
99
  timestamp: iso.ZodMiniISODateTime;
89
100
  tags: z.ZodMiniObject<{
90
101
  os: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -93,7 +104,15 @@ declare const createTrackEventSchemaV1: z.ZodMiniArray<z.ZodMiniObject<{
93
104
  browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
94
105
  browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
95
106
  browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
96
- platform: z.ZodMiniEnum<typeof Platform>;
107
+ platform: z.ZodMiniEnum<{
108
+ ios: "ios";
109
+ android: "android";
110
+ web: "web";
111
+ macos: "macos";
112
+ windows: "windows";
113
+ linux: "linux";
114
+ unknown: "unknown";
115
+ }>;
97
116
  device: z.ZodMiniOptional<z.ZodMiniString<string>>;
98
117
  device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
99
118
  device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -105,7 +124,10 @@ declare const createTrackEventSchemaV1: z.ZodMiniArray<z.ZodMiniObject<{
105
124
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
106
125
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
107
126
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
108
- environment: z.ZodMiniEnum<typeof Environment>;
127
+ environment: z.ZodMiniEnum<{
128
+ development: "development";
129
+ production: "production";
130
+ }>;
109
131
  source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
110
132
  source: z.ZodMiniOptional<z.ZodMiniEnum<{
111
133
  web: "web";
@@ -156,6 +178,19 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
156
178
  name: z.ZodMiniString<string>;
157
179
  visitor_id: z.ZodMiniUUID;
158
180
  session_id: z.ZodMiniUUID;
181
+ platform: z.ZodMiniEnum<{
182
+ ios: "ios";
183
+ android: "android";
184
+ web: "web";
185
+ macos: "macos";
186
+ windows: "windows";
187
+ linux: "linux";
188
+ unknown: "unknown";
189
+ }>;
190
+ environment: z.ZodMiniEnum<{
191
+ development: "development";
192
+ production: "production";
193
+ }>;
159
194
  timestamp: iso.ZodMiniISODateTime;
160
195
  tags: z.ZodMiniObject<{
161
196
  os: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -164,7 +199,15 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
164
199
  browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
165
200
  browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
166
201
  browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
167
- platform: z.ZodMiniEnum<typeof Platform>;
202
+ platform: z.ZodMiniEnum<{
203
+ ios: "ios";
204
+ android: "android";
205
+ web: "web";
206
+ macos: "macos";
207
+ windows: "windows";
208
+ linux: "linux";
209
+ unknown: "unknown";
210
+ }>;
168
211
  device: z.ZodMiniOptional<z.ZodMiniString<string>>;
169
212
  device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
170
213
  device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -176,7 +219,10 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
176
219
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
177
220
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
178
221
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
179
- environment: z.ZodMiniEnum<typeof Environment>;
222
+ environment: z.ZodMiniEnum<{
223
+ development: "development";
224
+ production: "production";
225
+ }>;
180
226
  source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
181
227
  source: z.ZodMiniOptional<z.ZodMiniEnum<{
182
228
  web: "web";
@@ -225,6 +271,19 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
225
271
  }, z.core.$strip>>;
226
272
  declare const createVisitorSchema: z.ZodMiniObject<{
227
273
  device_id: z.ZodMiniString<string>;
274
+ platform: z.ZodMiniEnum<{
275
+ ios: "ios";
276
+ android: "android";
277
+ web: "web";
278
+ macos: "macos";
279
+ windows: "windows";
280
+ linux: "linux";
281
+ unknown: "unknown";
282
+ }>;
283
+ environment: z.ZodMiniEnum<{
284
+ development: "development";
285
+ production: "production";
286
+ }>;
228
287
  properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>>;
229
288
  }, z.core.$strip>;
230
289
  declare const updateVisitorSchema: z.ZodMiniObject<{
@@ -280,7 +339,10 @@ declare const createLinkSchema: z.ZodMiniObject<{
280
339
  * */
281
340
  utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
282
341
  }, z.core.$strip>;
342
+ type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;
283
343
  type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
284
344
  type CreateLinkDTO = z.output<typeof createLinkSchema>;
345
+ type CreateVisitorDTO = z.output<typeof createVisitorSchema>;
346
+ type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;
285
347
 
286
- export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type CreateFeedbackDTO, type CreateLinkDTO, Environment, Platform, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, propertiesSchema, tagsSchema, updateVisitorSchema };
348
+ export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type CreateFeedbackDTO, type CreateLinkDTO, type CreateTrackEventDTO, type CreateVisitorDTO, type UpdateVisitorDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, propertiesSchema, tagsSchema, updateVisitorSchema };
@@ -1,20 +1,7 @@
1
1
  import { z, iso } from 'zod/mini';
2
2
 
3
- declare enum Platform {
4
- ios = "ios",
5
- android = "android",
6
- web = "web",
7
- macos = "macos",
8
- windows = "windows",
9
- linux = "linux",
10
- unknown = "unknown"
11
- }
12
- declare enum Environment {
13
- development = "development",
14
- production = "production"
15
- }
16
- declare const ALL_PLATFORMS: readonly [Platform.ios, Platform.android, Platform.web, Platform.macos, Platform.windows, Platform.linux, Platform.unknown];
17
- declare const ALL_ENVIRONMENTS: readonly [Environment.development, Environment.production];
3
+ declare const ALL_PLATFORMS: ["ios", "android", "web", "macos", "windows", "linux", "unknown"];
4
+ declare const ALL_ENVIRONMENTS: ["development", "production"];
18
5
  declare const tagsSchema: z.ZodMiniObject<{
19
6
  os: z.ZodMiniOptional<z.ZodMiniString<string>>;
20
7
  os_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -22,7 +9,15 @@ declare const tagsSchema: z.ZodMiniObject<{
22
9
  browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
23
10
  browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
24
11
  browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
25
- platform: z.ZodMiniEnum<typeof Platform>;
12
+ platform: z.ZodMiniEnum<{
13
+ ios: "ios";
14
+ android: "android";
15
+ web: "web";
16
+ macos: "macos";
17
+ windows: "windows";
18
+ linux: "linux";
19
+ unknown: "unknown";
20
+ }>;
26
21
  device: z.ZodMiniOptional<z.ZodMiniString<string>>;
27
22
  device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
28
23
  device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -34,7 +29,10 @@ declare const tagsSchema: z.ZodMiniObject<{
34
29
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
35
30
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
36
31
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
37
- environment: z.ZodMiniEnum<typeof Environment>;
32
+ environment: z.ZodMiniEnum<{
33
+ development: "development";
34
+ production: "production";
35
+ }>;
38
36
  source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
39
37
  source: z.ZodMiniOptional<z.ZodMiniEnum<{
40
38
  web: "web";
@@ -85,6 +83,19 @@ declare const createTrackEventSchemaV1: z.ZodMiniArray<z.ZodMiniObject<{
85
83
  name: z.ZodMiniString<string>;
86
84
  visitor_id: z.ZodMiniBigInt<unknown>;
87
85
  session_id: z.ZodMiniUUID;
86
+ platform: z.ZodMiniEnum<{
87
+ ios: "ios";
88
+ android: "android";
89
+ web: "web";
90
+ macos: "macos";
91
+ windows: "windows";
92
+ linux: "linux";
93
+ unknown: "unknown";
94
+ }>;
95
+ environment: z.ZodMiniEnum<{
96
+ development: "development";
97
+ production: "production";
98
+ }>;
88
99
  timestamp: iso.ZodMiniISODateTime;
89
100
  tags: z.ZodMiniObject<{
90
101
  os: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -93,7 +104,15 @@ declare const createTrackEventSchemaV1: z.ZodMiniArray<z.ZodMiniObject<{
93
104
  browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
94
105
  browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
95
106
  browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
96
- platform: z.ZodMiniEnum<typeof Platform>;
107
+ platform: z.ZodMiniEnum<{
108
+ ios: "ios";
109
+ android: "android";
110
+ web: "web";
111
+ macos: "macos";
112
+ windows: "windows";
113
+ linux: "linux";
114
+ unknown: "unknown";
115
+ }>;
97
116
  device: z.ZodMiniOptional<z.ZodMiniString<string>>;
98
117
  device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
99
118
  device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -105,7 +124,10 @@ declare const createTrackEventSchemaV1: z.ZodMiniArray<z.ZodMiniObject<{
105
124
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
106
125
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
107
126
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
108
- environment: z.ZodMiniEnum<typeof Environment>;
127
+ environment: z.ZodMiniEnum<{
128
+ development: "development";
129
+ production: "production";
130
+ }>;
109
131
  source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
110
132
  source: z.ZodMiniOptional<z.ZodMiniEnum<{
111
133
  web: "web";
@@ -156,6 +178,19 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
156
178
  name: z.ZodMiniString<string>;
157
179
  visitor_id: z.ZodMiniUUID;
158
180
  session_id: z.ZodMiniUUID;
181
+ platform: z.ZodMiniEnum<{
182
+ ios: "ios";
183
+ android: "android";
184
+ web: "web";
185
+ macos: "macos";
186
+ windows: "windows";
187
+ linux: "linux";
188
+ unknown: "unknown";
189
+ }>;
190
+ environment: z.ZodMiniEnum<{
191
+ development: "development";
192
+ production: "production";
193
+ }>;
159
194
  timestamp: iso.ZodMiniISODateTime;
160
195
  tags: z.ZodMiniObject<{
161
196
  os: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -164,7 +199,15 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
164
199
  browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
165
200
  browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
166
201
  browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
167
- platform: z.ZodMiniEnum<typeof Platform>;
202
+ platform: z.ZodMiniEnum<{
203
+ ios: "ios";
204
+ android: "android";
205
+ web: "web";
206
+ macos: "macos";
207
+ windows: "windows";
208
+ linux: "linux";
209
+ unknown: "unknown";
210
+ }>;
168
211
  device: z.ZodMiniOptional<z.ZodMiniString<string>>;
169
212
  device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
170
213
  device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -176,7 +219,10 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
176
219
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
177
220
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
178
221
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
179
- environment: z.ZodMiniEnum<typeof Environment>;
222
+ environment: z.ZodMiniEnum<{
223
+ development: "development";
224
+ production: "production";
225
+ }>;
180
226
  source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
181
227
  source: z.ZodMiniOptional<z.ZodMiniEnum<{
182
228
  web: "web";
@@ -225,6 +271,19 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
225
271
  }, z.core.$strip>>;
226
272
  declare const createVisitorSchema: z.ZodMiniObject<{
227
273
  device_id: z.ZodMiniString<string>;
274
+ platform: z.ZodMiniEnum<{
275
+ ios: "ios";
276
+ android: "android";
277
+ web: "web";
278
+ macos: "macos";
279
+ windows: "windows";
280
+ linux: "linux";
281
+ unknown: "unknown";
282
+ }>;
283
+ environment: z.ZodMiniEnum<{
284
+ development: "development";
285
+ production: "production";
286
+ }>;
228
287
  properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>>;
229
288
  }, z.core.$strip>;
230
289
  declare const updateVisitorSchema: z.ZodMiniObject<{
@@ -280,7 +339,10 @@ declare const createLinkSchema: z.ZodMiniObject<{
280
339
  * */
281
340
  utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
282
341
  }, z.core.$strip>;
342
+ type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;
283
343
  type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
284
344
  type CreateLinkDTO = z.output<typeof createLinkSchema>;
345
+ type CreateVisitorDTO = z.output<typeof createVisitorSchema>;
346
+ type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;
285
347
 
286
- export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type CreateFeedbackDTO, type CreateLinkDTO, Environment, Platform, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, propertiesSchema, tagsSchema, updateVisitorSchema };
348
+ export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type CreateFeedbackDTO, type CreateLinkDTO, type CreateTrackEventDTO, type CreateVisitorDTO, type UpdateVisitorDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createTrackEventSchemaV1, createVisitorSchema, propertiesSchema, tagsSchema, updateVisitorSchema };