@shware/analytics 0.5.2 → 1.0.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.
- package/dist/feedback/index.cjs +34 -0
- package/dist/feedback/index.cjs.map +1 -0
- package/dist/feedback/index.d.cts +6 -0
- package/dist/feedback/index.d.ts +6 -0
- package/dist/feedback/index.mjs +9 -0
- package/dist/feedback/index.mjs.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +51 -52
- package/dist/schema/index.d.ts +51 -52
- package/dist/schema/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/feedback/index.ts
|
|
21
|
+
var feedback_exports = {};
|
|
22
|
+
__export(feedback_exports, {
|
|
23
|
+
sendFeedback: () => sendFeedback
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(feedback_exports);
|
|
26
|
+
var import_setup = require("../setup/index.cjs");
|
|
27
|
+
async function sendFeedback(dto) {
|
|
28
|
+
await import_setup.config.http.post("/feedback", dto);
|
|
29
|
+
}
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
sendFeedback
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/index.ts"],"sourcesContent":["import type { CreateFeedbackDTO } from '../schema/index';\nimport { config } from '../setup/index';\n\nexport async function sendFeedback(dto: CreateFeedbackDTO) {\n await config.http.post('/feedback', dto);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAuB;AAEvB,eAAsB,aAAa,KAAwB;AACzD,QAAM,oBAAO,KAAK,KAAK,aAAa,GAAG;AACzC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/index.ts"],"sourcesContent":["import type { CreateFeedbackDTO } from '../schema/index';\nimport { config } from '../setup/index';\n\nexport async function sendFeedback(dto: CreateFeedbackDTO) {\n await config.http.post('/feedback', dto);\n}\n"],"mappings":";AACA,SAAS,cAAc;AAEvB,eAAsB,aAAa,KAAwB;AACzD,QAAM,OAAO,KAAK,KAAK,aAAa,GAAG;AACzC;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
createTrackEventSchema: () => import_schema.createTrackEventSchema,
|
|
25
25
|
createVisitorSchema: () => import_schema.createVisitorSchema,
|
|
26
26
|
getVisitor: () => import_visitor.getVisitor,
|
|
27
|
+
sendFeedback: () => import_feedback.sendFeedback,
|
|
27
28
|
setVisitor: () => import_visitor.setVisitor,
|
|
28
29
|
setupAnalytics: () => import_setup.setupAnalytics,
|
|
29
30
|
stripeMinorUnits: () => import_stripe.stripeMinorUnits,
|
|
@@ -35,6 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
35
36
|
var import_setup = require("./setup/index.cjs");
|
|
36
37
|
var import_track = require("./track/index.cjs");
|
|
37
38
|
var import_visitor = require("./visitor/index.cjs");
|
|
39
|
+
var import_feedback = require("./feedback/index.cjs");
|
|
38
40
|
var import_schema = require("./schema/index.cjs");
|
|
39
41
|
var import_stripe = require("./utils/stripe.cjs");
|
|
40
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -43,6 +45,7 @@ var import_stripe = require("./utils/stripe.cjs");
|
|
|
43
45
|
createTrackEventSchema,
|
|
44
46
|
createVisitorSchema,
|
|
45
47
|
getVisitor,
|
|
48
|
+
sendFeedback,
|
|
46
49
|
setVisitor,
|
|
47
50
|
setupAnalytics,
|
|
48
51
|
stripeMinorUnits,
|
package/dist/index.cjs.map
CHANGED
|
@@ -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 {\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\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,mBAA+B;AAC/B,mBAAkC;AAClC,qBAAuC;AACvC,
|
|
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 {\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n type CreateFeedbackDTO,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\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,mBAA+B;AAC/B,mBAAkC;AAClC,qBAAuC;AACvC,sBAA6B;AAC7B,oBAMO;AACP,oBAAiC;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { setupAnalytics } from './setup/index.cjs';
|
|
2
2
|
export { track, trackAsync } from './track/index.cjs';
|
|
3
3
|
export { getVisitor, setVisitor } from './visitor/index.cjs';
|
|
4
|
-
export {
|
|
4
|
+
export { sendFeedback } from './feedback/index.cjs';
|
|
5
|
+
export { CreateFeedbackDTO, createFeedbackSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema } from './schema/index.cjs';
|
|
5
6
|
export { stripeMinorUnits } from './utils/stripe.cjs';
|
|
6
7
|
export { AllowedPropertyValues, TrackProperties, TrackTags, UserProvidedData } from './track/types.cjs';
|
|
7
8
|
export { VisitorProperties } from './visitor/types.cjs';
|
|
8
9
|
import 'axios';
|
|
9
|
-
import 'zod/v4/core';
|
|
10
10
|
import 'zod/v4-mini';
|
|
11
11
|
import './track/gtag.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { setupAnalytics } from './setup/index.js';
|
|
2
2
|
export { track, trackAsync } from './track/index.js';
|
|
3
3
|
export { getVisitor, setVisitor } from './visitor/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { sendFeedback } from './feedback/index.js';
|
|
5
|
+
export { CreateFeedbackDTO, createFeedbackSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema } from './schema/index.js';
|
|
5
6
|
export { stripeMinorUnits } from './utils/stripe.js';
|
|
6
7
|
export { AllowedPropertyValues, TrackProperties, TrackTags, UserProvidedData } from './track/types.js';
|
|
7
8
|
export { VisitorProperties } from './visitor/types.js';
|
|
8
9
|
import 'axios';
|
|
9
|
-
import 'zod/v4/core';
|
|
10
10
|
import 'zod/v4-mini';
|
|
11
11
|
import './track/gtag.js';
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { setupAnalytics } from "./setup/index.mjs";
|
|
3
3
|
import { track, trackAsync } from "./track/index.mjs";
|
|
4
4
|
import { getVisitor, setVisitor } from "./visitor/index.mjs";
|
|
5
|
+
import { sendFeedback } from "./feedback/index.mjs";
|
|
5
6
|
import {
|
|
6
7
|
createTrackEventSchema,
|
|
7
8
|
createVisitorSchema,
|
|
@@ -14,6 +15,7 @@ export {
|
|
|
14
15
|
createTrackEventSchema,
|
|
15
16
|
createVisitorSchema,
|
|
16
17
|
getVisitor,
|
|
18
|
+
sendFeedback,
|
|
17
19
|
setVisitor,
|
|
18
20
|
setupAnalytics,
|
|
19
21
|
stripeMinorUnits,
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 {\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,
|
|
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 {\n createTrackEventSchema,\n createVisitorSchema,\n updateVisitorSchema,\n createFeedbackSchema,\n type CreateFeedbackDTO,\n} from './schema/index';\nexport { stripeMinorUnits } from './utils/stripe';\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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,wBAAwB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n optional,\n object,\n string,\n regex,\n number,\n boolean,\n null as _null,\n coerce,\n enum as _enum,\n trim,\n union,\n record,\n array,\n iso,\n minLength,\n maxLength,\n refine,\n pipe,\n transform,\n email,\n} from 'zod/v4-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 const createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: coerce.bigint(),\n timestamp: iso.datetime(),\n tags: 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: optional(_enum(['ios', 'android', 'web', 'macos', 'windows', 'linux', 'unknown'])),\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(string()),\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: optional(_enum(['development', 'production'])),\n source_url: optional(string()),\n source: optional(_enum(['web', 'app', 'offline'])),\n fbc: optional(string()),\n fbp: optional(string()),\n gclid: optional(string()),\n advertising_id: optional(string()),\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 }),\n properties: 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).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 properties: 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\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n optional,\n object,\n string,\n regex,\n number,\n boolean,\n null as _null,\n coerce,\n enum as _enum,\n trim,\n union,\n record,\n array,\n iso,\n minLength,\n maxLength,\n refine,\n pipe,\n transform,\n email,\n type z,\n} from 'zod/v4-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 const createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: coerce.bigint(),\n timestamp: iso.datetime(),\n tags: 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: optional(_enum(['ios', 'android', 'web', 'macos', 'windows', 'linux', 'unknown'])),\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(string()),\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: optional(_enum(['development', 'production'])),\n source_url: optional(string()),\n source: optional(_enum(['web', 'app', 'offline'])),\n fbc: optional(string()),\n fbp: optional(string()),\n gclid: optional(string()),\n advertising_id: optional(string()),\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 }),\n properties: 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).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 properties: 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\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\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAsBO;AAEP,IAAM,YAAQ;AAAA,MACZ;AAAA,QACE,uBAAO,EAAE,UAAM,qBAAK,OAAG,0BAAU,CAAC,OAAG,0BAAU,GAAG,CAAC;AAAA,QACnD,sBAAM,KAAC,uBAAO,EAAE,UAAM,0BAAU,GAAG,CAAC,OAAG,uBAAO,OAAG,wBAAQ,OAAG,eAAAA,MAAM,CAAC,CAAC;AAAA,EACtE;AACF;AAEO,IAAM,6BAAyB;AAAA,MACpC,uBAAO;AAAA,IACL,UAAM,uBAAO,EAAE,UAAM,qBAAK,OAAG,0BAAU,CAAC,OAAG,0BAAU,EAAE,CAAC;AAAA,IACxD,YAAY,sBAAO,OAAO;AAAA,IAC1B,WAAW,mBAAI,SAAS;AAAA,IACxB,UAAM,uBAAO;AAAA,MACX,QAAI,6BAAS,uBAAO,CAAC;AAAA,MACrB,aAAS,6BAAS,uBAAO,CAAC;AAAA,MAC1B,gBAAY,6BAAS,uBAAO,CAAC;AAAA,MAC7B,aAAS,6BAAS,uBAAO,CAAC;AAAA,MAC1B,kBAAc,6BAAS,uBAAO,CAAC;AAAA,MAC/B,qBAAiB,6BAAS,uBAAO,CAAC;AAAA,MAClC,cAAU,6BAAS,eAAAC,MAAM,CAAC,OAAO,WAAW,OAAO,SAAS,WAAW,SAAS,SAAS,CAAC,CAAC;AAAA,MAC3F,YAAQ,6BAAS,uBAAO,CAAC;AAAA,MACzB,eAAW,6BAAS,uBAAO,EAAE,UAAM,qBAAK,OAAG,0BAAU,CAAC,OAAG,0BAAU,EAAE,CAAC,CAAC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ED
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as zod_v4_mini from 'zod/v4-mini';
|
|
3
|
-
import { iso } from 'zod/v4-mini';
|
|
1
|
+
import { z, iso } from 'zod/v4-mini';
|
|
4
2
|
|
|
5
|
-
declare const createTrackEventSchema:
|
|
6
|
-
name:
|
|
7
|
-
visitor_id:
|
|
3
|
+
declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
4
|
+
name: z.ZodMiniString<string>;
|
|
5
|
+
visitor_id: z.ZodMiniBigInt<unknown>;
|
|
8
6
|
timestamp: iso.ZodMiniISODateTime;
|
|
9
|
-
tags:
|
|
10
|
-
os:
|
|
11
|
-
os_name:
|
|
12
|
-
os_version:
|
|
13
|
-
browser:
|
|
14
|
-
browser_name:
|
|
15
|
-
browser_version:
|
|
16
|
-
platform:
|
|
17
|
-
unknown: "unknown";
|
|
7
|
+
tags: z.ZodMiniObject<{
|
|
8
|
+
os: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
9
|
+
os_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
10
|
+
os_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
11
|
+
browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
12
|
+
browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
13
|
+
browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
14
|
+
platform: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
18
15
|
ios: "ios";
|
|
19
16
|
android: "android";
|
|
20
17
|
web: "web";
|
|
21
18
|
macos: "macos";
|
|
22
19
|
windows: "windows";
|
|
23
20
|
linux: "linux";
|
|
21
|
+
unknown: "unknown";
|
|
24
22
|
}>>;
|
|
25
|
-
device:
|
|
26
|
-
device_id:
|
|
27
|
-
device_type:
|
|
28
|
-
device_vendor:
|
|
29
|
-
device_pixel_ratio:
|
|
30
|
-
screen_resolution:
|
|
31
|
-
release:
|
|
32
|
-
language:
|
|
33
|
-
time_zone:
|
|
34
|
-
environment:
|
|
23
|
+
device: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
24
|
+
device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
25
|
+
device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
26
|
+
device_vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
27
|
+
device_pixel_ratio: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
28
|
+
screen_resolution: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`${number}x${number}`, string>>>;
|
|
29
|
+
release: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
30
|
+
language: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
31
|
+
time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
32
|
+
environment: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
35
33
|
development: "development";
|
|
36
34
|
production: "production";
|
|
37
35
|
}>>;
|
|
38
|
-
source_url:
|
|
39
|
-
source:
|
|
36
|
+
source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
|
+
source: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
40
38
|
web: "web";
|
|
41
39
|
app: "app";
|
|
42
40
|
offline: "offline";
|
|
43
41
|
}>>;
|
|
44
|
-
fbc:
|
|
45
|
-
fbp:
|
|
46
|
-
gclid:
|
|
47
|
-
advertising_id:
|
|
48
|
-
utm_source:
|
|
49
|
-
utm_medium:
|
|
50
|
-
utm_campaign:
|
|
51
|
-
utm_term:
|
|
52
|
-
utm_content:
|
|
53
|
-
},
|
|
54
|
-
properties:
|
|
55
|
-
},
|
|
56
|
-
declare const createVisitorSchema:
|
|
57
|
-
device_id:
|
|
58
|
-
properties:
|
|
59
|
-
},
|
|
60
|
-
declare const updateVisitorSchema:
|
|
61
|
-
properties:
|
|
62
|
-
},
|
|
63
|
-
declare const createFeedbackSchema:
|
|
64
|
-
name:
|
|
65
|
-
email:
|
|
66
|
-
message:
|
|
67
|
-
},
|
|
42
|
+
fbc: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
fbp: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
gclid: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
|
+
advertising_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
46
|
+
utm_source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
47
|
+
utm_medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
48
|
+
utm_campaign: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
49
|
+
utm_term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
50
|
+
utm_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniArray<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>>]>>>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
declare const createVisitorSchema: z.ZodMiniObject<{
|
|
55
|
+
device_id: z.ZodMiniString<string>;
|
|
56
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
59
|
+
properties: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
62
|
+
name: z.ZodMiniString<string>;
|
|
63
|
+
email: z.ZodMiniEmail;
|
|
64
|
+
message: z.ZodMiniString<string>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
|
|
68
67
|
|
|
69
|
-
export { createFeedbackSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema };
|
|
68
|
+
export { type CreateFeedbackDTO, createFeedbackSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema };
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as zod_v4_mini from 'zod/v4-mini';
|
|
3
|
-
import { iso } from 'zod/v4-mini';
|
|
1
|
+
import { z, iso } from 'zod/v4-mini';
|
|
4
2
|
|
|
5
|
-
declare const createTrackEventSchema:
|
|
6
|
-
name:
|
|
7
|
-
visitor_id:
|
|
3
|
+
declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
4
|
+
name: z.ZodMiniString<string>;
|
|
5
|
+
visitor_id: z.ZodMiniBigInt<unknown>;
|
|
8
6
|
timestamp: iso.ZodMiniISODateTime;
|
|
9
|
-
tags:
|
|
10
|
-
os:
|
|
11
|
-
os_name:
|
|
12
|
-
os_version:
|
|
13
|
-
browser:
|
|
14
|
-
browser_name:
|
|
15
|
-
browser_version:
|
|
16
|
-
platform:
|
|
17
|
-
unknown: "unknown";
|
|
7
|
+
tags: z.ZodMiniObject<{
|
|
8
|
+
os: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
9
|
+
os_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
10
|
+
os_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
11
|
+
browser: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
12
|
+
browser_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
13
|
+
browser_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
14
|
+
platform: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
18
15
|
ios: "ios";
|
|
19
16
|
android: "android";
|
|
20
17
|
web: "web";
|
|
21
18
|
macos: "macos";
|
|
22
19
|
windows: "windows";
|
|
23
20
|
linux: "linux";
|
|
21
|
+
unknown: "unknown";
|
|
24
22
|
}>>;
|
|
25
|
-
device:
|
|
26
|
-
device_id:
|
|
27
|
-
device_type:
|
|
28
|
-
device_vendor:
|
|
29
|
-
device_pixel_ratio:
|
|
30
|
-
screen_resolution:
|
|
31
|
-
release:
|
|
32
|
-
language:
|
|
33
|
-
time_zone:
|
|
34
|
-
environment:
|
|
23
|
+
device: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
24
|
+
device_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
25
|
+
device_type: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
26
|
+
device_vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
27
|
+
device_pixel_ratio: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
28
|
+
screen_resolution: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`${number}x${number}`, string>>>;
|
|
29
|
+
release: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
30
|
+
language: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
31
|
+
time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
32
|
+
environment: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
35
33
|
development: "development";
|
|
36
34
|
production: "production";
|
|
37
35
|
}>>;
|
|
38
|
-
source_url:
|
|
39
|
-
source:
|
|
36
|
+
source_url: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
|
+
source: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
40
38
|
web: "web";
|
|
41
39
|
app: "app";
|
|
42
40
|
offline: "offline";
|
|
43
41
|
}>>;
|
|
44
|
-
fbc:
|
|
45
|
-
fbp:
|
|
46
|
-
gclid:
|
|
47
|
-
advertising_id:
|
|
48
|
-
utm_source:
|
|
49
|
-
utm_medium:
|
|
50
|
-
utm_campaign:
|
|
51
|
-
utm_term:
|
|
52
|
-
utm_content:
|
|
53
|
-
},
|
|
54
|
-
properties:
|
|
55
|
-
},
|
|
56
|
-
declare const createVisitorSchema:
|
|
57
|
-
device_id:
|
|
58
|
-
properties:
|
|
59
|
-
},
|
|
60
|
-
declare const updateVisitorSchema:
|
|
61
|
-
properties:
|
|
62
|
-
},
|
|
63
|
-
declare const createFeedbackSchema:
|
|
64
|
-
name:
|
|
65
|
-
email:
|
|
66
|
-
message:
|
|
67
|
-
},
|
|
42
|
+
fbc: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
fbp: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
gclid: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
|
+
advertising_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
46
|
+
utm_source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
47
|
+
utm_medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
48
|
+
utm_campaign: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
49
|
+
utm_term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
50
|
+
utm_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniArray<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>>]>>>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
declare const createVisitorSchema: z.ZodMiniObject<{
|
|
55
|
+
device_id: z.ZodMiniString<string>;
|
|
56
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
59
|
+
properties: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
62
|
+
name: z.ZodMiniString<string>;
|
|
63
|
+
email: z.ZodMiniEmail;
|
|
64
|
+
message: z.ZodMiniString<string>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
|
|
68
67
|
|
|
69
|
-
export { createFeedbackSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema };
|
|
68
|
+
export { type CreateFeedbackDTO, createFeedbackSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n optional,\n object,\n string,\n regex,\n number,\n boolean,\n null as _null,\n coerce,\n enum as _enum,\n trim,\n union,\n record,\n array,\n iso,\n minLength,\n maxLength,\n refine,\n pipe,\n transform,\n email,\n} from 'zod/v4-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 const createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: coerce.bigint(),\n timestamp: iso.datetime(),\n tags: 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: optional(_enum(['ios', 'android', 'web', 'macos', 'windows', 'linux', 'unknown'])),\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(string()),\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: optional(_enum(['development', 'production'])),\n source_url: optional(string()),\n source: optional(_enum(['web', 'app', 'offline'])),\n fbc: optional(string()),\n fbp: optional(string()),\n gclid: optional(string()),\n advertising_id: optional(string()),\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 }),\n properties: 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).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 properties: 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\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"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n optional,\n object,\n string,\n regex,\n number,\n boolean,\n null as _null,\n coerce,\n enum as _enum,\n trim,\n union,\n record,\n array,\n iso,\n minLength,\n maxLength,\n refine,\n pipe,\n transform,\n email,\n type z,\n} from 'zod/v4-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 const createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: coerce.bigint(),\n timestamp: iso.datetime(),\n tags: 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: optional(_enum(['ios', 'android', 'web', 'macos', 'windows', 'linux', 'unknown'])),\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(string()),\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: optional(_enum(['development', 'production'])),\n source_url: optional(string()),\n source: optional(_enum(['web', 'app', 'offline'])),\n fbc: optional(string()),\n fbp: optional(string()),\n gclid: optional(string()),\n advertising_id: optional(string()),\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 }),\n properties: 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).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 properties: 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\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\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,IAAM,QAAQ;AAAA,EACZ;AAAA,IACE,OAAO,EAAE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,UAAU,GAAG,CAAC;AAAA,IACnD,MAAM,CAAC,OAAO,EAAE,MAAM,UAAU,GAAG,CAAC,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC;AAAA,EACtE;AACF;AAEO,IAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,IACL,MAAM,OAAO,EAAE,MAAM,KAAK,GAAG,UAAU,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