@shware/analytics 2.2.1 → 2.2.2

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.
@@ -184,6 +184,10 @@ var createFeedbackSchema = (0, import_mini.object)({
184
184
  email: (0, import_mini.email)().check((0, import_mini.maxLength)(320)),
185
185
  message: (0, import_mini.string)().check((0, import_mini.minLength)(1), (0, import_mini.maxLength)(65536))
186
186
  });
187
+ var noEmptyString = (0, import_mini.pipe)(
188
+ (0, import_mini.string)().check((0, import_mini.maxLength)(256)),
189
+ (0, import_mini.transform)((v) => v ? v : void 0)
190
+ );
187
191
  var createLinkSchema = (0, import_mini.object)({
188
192
  /** The URL that the user is redirected to. */
189
193
  url: (0, import_mini.url)().check((0, import_mini.minLength)(1), (0, import_mini.maxLength)(1024)),
@@ -192,7 +196,7 @@ var createLinkSchema = (0, import_mini.object)({
192
196
  * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4
193
197
  * data import. Use the same IDs that you use when uploading campaign cost data.
194
198
  */
195
- utm_id: (0, import_mini.optional)((0, import_mini.string)().check((0, import_mini.maxLength)(256))),
199
+ utm_id: (0, import_mini.optional)(noEmptyString),
196
200
  /** Referrer, for example: google, newsletter4, billboard */
197
201
  utm_source: (0, import_mini.string)().check((0, import_mini.minLength)(1), (0, import_mini.maxLength)(256)),
198
202
  // required
@@ -203,29 +207,29 @@ var createLinkSchema = (0, import_mini.object)({
203
207
  utm_campaign: (0, import_mini.string)().check((0, import_mini.minLength)(1), (0, import_mini.maxLength)(256)),
204
208
  // required
205
209
  /** Paid keyword */
206
- utm_term: (0, import_mini.optional)((0, import_mini.string)().check((0, import_mini.maxLength)(256))),
210
+ utm_term: (0, import_mini.optional)(noEmptyString),
207
211
  /**
208
212
  * Use to differentiate creatives. For example, if you have two call-to-action links within the
209
213
  * same email message, you can use utm_content and set different values for each so you can tell
210
214
  * which version is more effective.
211
215
  */
212
- utm_content: (0, import_mini.optional)((0, import_mini.string)().check((0, import_mini.maxLength)(256))),
216
+ utm_content: (0, import_mini.optional)(noEmptyString),
213
217
  /**
214
218
  * The platform responsible for directing traffic to a given Analytics property (such as a buying
215
219
  * platform that sets budgets and targeting criteria or a platform that manages organic traffic
216
220
  * data). For example: Search Ads 360 or Display & Video 360.
217
221
  */
218
- utm_source_platform: (0, import_mini.optional)((0, import_mini.string)().check((0, import_mini.maxLength)(256))),
222
+ utm_source_platform: (0, import_mini.optional)(noEmptyString),
219
223
  /**
220
224
  * Type of creative, for example: display, native, video, search, utm_creative_format is not
221
225
  * currently reported in Google Analytics 4 properties.
222
226
  */
223
- utm_creative_format: (0, import_mini.optional)((0, import_mini.string)().check((0, import_mini.maxLength)(256))),
227
+ utm_creative_format: (0, import_mini.optional)(noEmptyString),
224
228
  /**
225
229
  * Targeting criteria applied to a campaign, for example: remarketing, prospecting,
226
230
  * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.
227
231
  * */
228
- utm_marketing_tactic: (0, import_mini.optional)((0, import_mini.string)().check((0, import_mini.maxLength)(256)))
232
+ utm_marketing_tactic: (0, import_mini.optional)(noEmptyString)
229
233
  });
230
234
  // Annotate the CommonJS export names for ESM import in node:
231
235
  0 && (module.exports = {
@@ -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 type z,\n uuid,\n url,\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\n/** @deprecated */\nexport const createTrackEventSchemaV1 = 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 // 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 advertising_id: 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 }),\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 createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\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 // 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 advertising_id: 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 }),\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 user_id: optional(uuid()),\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\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\n});\n\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\nexport type CreateLinkDTO = z.output<typeof createLinkSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAwBO;AAEP,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,q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WAAO,mBAAM,EAAE,UAAM,uBAAU,GAAG,CAAC;AAAA,EACnC,aAAS,oBAAO,EAAE,UAAM,uBAAU,CAAC,OAAG,uBAAU,KAAK,CAAC;AACxD,CAAC;AAMM,IAAM,uBAAmB,oBAAO;AAAA;AAAA,EAErC,SAAK,iBAAI,EAAE,UAAM,uBAAU,CAAC,OAAG,uBAAU,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9C,YAAQ,0BAAS,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC,CAAC;AAAA;AAAA,EAG/C,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,0BAAS,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOjD,iBAAa,0BAAS,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpD,yBAAqB,0BAAS,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5D,yBAAqB,0BAAS,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5D,0BAAsB,0BAAS,oBAAO,EAAE,UAAM,uBAAU,GAAG,CAAC,CAAC;AAC/D,CAAC;","names":["_null","_enum"]}
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 uuid,\n url,\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\n/** @deprecated */\nexport const createTrackEventSchemaV1 = 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 // 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 advertising_id: 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 }),\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 createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\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 // 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 advertising_id: 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 }),\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 user_id: optional(uuid()),\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});\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nC,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"]}
@@ -151,7 +151,7 @@ declare const createLinkSchema: z.ZodMiniObject<{
151
151
  * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4
152
152
  * data import. Use the same IDs that you use when uploading campaign cost data.
153
153
  */
154
- utm_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
154
+ utm_id: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
155
155
  /** Referrer, for example: google, newsletter4, billboard */
156
156
  utm_source: z.ZodMiniString<string>;
157
157
  /** Marketing medium, for example: cpc, banner, email */
@@ -159,29 +159,29 @@ declare const createLinkSchema: z.ZodMiniObject<{
159
159
  /** Product, slogan, promo code, for example: spring_sale */
160
160
  utm_campaign: z.ZodMiniString<string>;
161
161
  /** Paid keyword */
162
- utm_term: z.ZodMiniOptional<z.ZodMiniString<string>>;
162
+ utm_term: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
163
163
  /**
164
164
  * Use to differentiate creatives. For example, if you have two call-to-action links within the
165
165
  * same email message, you can use utm_content and set different values for each so you can tell
166
166
  * which version is more effective.
167
167
  */
168
- utm_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
168
+ utm_content: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
169
169
  /**
170
170
  * The platform responsible for directing traffic to a given Analytics property (such as a buying
171
171
  * platform that sets budgets and targeting criteria or a platform that manages organic traffic
172
172
  * data). For example: Search Ads 360 or Display & Video 360.
173
173
  */
174
- utm_source_platform: z.ZodMiniOptional<z.ZodMiniString<string>>;
174
+ utm_source_platform: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
175
175
  /**
176
176
  * Type of creative, for example: display, native, video, search, utm_creative_format is not
177
177
  * currently reported in Google Analytics 4 properties.
178
178
  */
179
- utm_creative_format: z.ZodMiniOptional<z.ZodMiniString<string>>;
179
+ utm_creative_format: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
180
180
  /**
181
181
  * Targeting criteria applied to a campaign, for example: remarketing, prospecting,
182
182
  * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.
183
183
  * */
184
- utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniString<string>>;
184
+ utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
185
185
  }, z.core.$strip>;
186
186
  type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
187
187
  type CreateLinkDTO = z.output<typeof createLinkSchema>;
@@ -151,7 +151,7 @@ declare const createLinkSchema: z.ZodMiniObject<{
151
151
  * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4
152
152
  * data import. Use the same IDs that you use when uploading campaign cost data.
153
153
  */
154
- utm_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
154
+ utm_id: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
155
155
  /** Referrer, for example: google, newsletter4, billboard */
156
156
  utm_source: z.ZodMiniString<string>;
157
157
  /** Marketing medium, for example: cpc, banner, email */
@@ -159,29 +159,29 @@ declare const createLinkSchema: z.ZodMiniObject<{
159
159
  /** Product, slogan, promo code, for example: spring_sale */
160
160
  utm_campaign: z.ZodMiniString<string>;
161
161
  /** Paid keyword */
162
- utm_term: z.ZodMiniOptional<z.ZodMiniString<string>>;
162
+ utm_term: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
163
163
  /**
164
164
  * Use to differentiate creatives. For example, if you have two call-to-action links within the
165
165
  * same email message, you can use utm_content and set different values for each so you can tell
166
166
  * which version is more effective.
167
167
  */
168
- utm_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
168
+ utm_content: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
169
169
  /**
170
170
  * The platform responsible for directing traffic to a given Analytics property (such as a buying
171
171
  * platform that sets budgets and targeting criteria or a platform that manages organic traffic
172
172
  * data). For example: Search Ads 360 or Display & Video 360.
173
173
  */
174
- utm_source_platform: z.ZodMiniOptional<z.ZodMiniString<string>>;
174
+ utm_source_platform: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
175
175
  /**
176
176
  * Type of creative, for example: display, native, video, search, utm_creative_format is not
177
177
  * currently reported in Google Analytics 4 properties.
178
178
  */
179
- utm_creative_format: z.ZodMiniOptional<z.ZodMiniString<string>>;
179
+ utm_creative_format: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
180
180
  /**
181
181
  * Targeting criteria applied to a campaign, for example: remarketing, prospecting,
182
182
  * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.
183
183
  * */
184
- utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniString<string>>;
184
+ utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
185
185
  }, z.core.$strip>;
186
186
  type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
187
187
  type CreateLinkDTO = z.output<typeof createLinkSchema>;
@@ -178,6 +178,10 @@ var createFeedbackSchema = object({
178
178
  email: email().check(maxLength(320)),
179
179
  message: string().check(minLength(1), maxLength(65536))
180
180
  });
181
+ var noEmptyString = pipe(
182
+ string().check(maxLength(256)),
183
+ transform((v) => v ? v : void 0)
184
+ );
181
185
  var createLinkSchema = object({
182
186
  /** The URL that the user is redirected to. */
183
187
  url: url().check(minLength(1), maxLength(1024)),
@@ -186,7 +190,7 @@ var createLinkSchema = object({
186
190
  * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4
187
191
  * data import. Use the same IDs that you use when uploading campaign cost data.
188
192
  */
189
- utm_id: optional(string().check(maxLength(256))),
193
+ utm_id: optional(noEmptyString),
190
194
  /** Referrer, for example: google, newsletter4, billboard */
191
195
  utm_source: string().check(minLength(1), maxLength(256)),
192
196
  // required
@@ -197,29 +201,29 @@ var createLinkSchema = object({
197
201
  utm_campaign: string().check(minLength(1), maxLength(256)),
198
202
  // required
199
203
  /** Paid keyword */
200
- utm_term: optional(string().check(maxLength(256))),
204
+ utm_term: optional(noEmptyString),
201
205
  /**
202
206
  * Use to differentiate creatives. For example, if you have two call-to-action links within the
203
207
  * same email message, you can use utm_content and set different values for each so you can tell
204
208
  * which version is more effective.
205
209
  */
206
- utm_content: optional(string().check(maxLength(256))),
210
+ utm_content: optional(noEmptyString),
207
211
  /**
208
212
  * The platform responsible for directing traffic to a given Analytics property (such as a buying
209
213
  * platform that sets budgets and targeting criteria or a platform that manages organic traffic
210
214
  * data). For example: Search Ads 360 or Display & Video 360.
211
215
  */
212
- utm_source_platform: optional(string().check(maxLength(256))),
216
+ utm_source_platform: optional(noEmptyString),
213
217
  /**
214
218
  * Type of creative, for example: display, native, video, search, utm_creative_format is not
215
219
  * currently reported in Google Analytics 4 properties.
216
220
  */
217
- utm_creative_format: optional(string().check(maxLength(256))),
221
+ utm_creative_format: optional(noEmptyString),
218
222
  /**
219
223
  * Targeting criteria applied to a campaign, for example: remarketing, prospecting,
220
224
  * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.
221
225
  * */
222
- utm_marketing_tactic: optional(string().check(maxLength(256)))
226
+ utm_marketing_tactic: optional(noEmptyString)
223
227
  });
224
228
  export {
225
229
  createFeedbackSchema,
@@ -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 type z,\n uuid,\n url,\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\n/** @deprecated */\nexport const createTrackEventSchemaV1 = 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 // 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 advertising_id: 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 }),\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 createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\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 // 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 advertising_id: 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 }),\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 user_id: optional(uuid()),\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\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\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(string().check(maxLength(256))),\n});\n\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\nexport type CreateLinkDTO = z.output<typeof createLinkSchema>;\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,EAEA;AAAA,EACA;AAAA,OACK;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;AAGO,IAAM,2BAA2B;AAAA,EACtC,OAAO;AAAA,IACL,MAAM,OAAO,EAAE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,UAAU,EAAE,CAAC;AAAA,IACxD,YAAY,OAAO,OAAO;AAAA,IAC1B,WAAW,IAAI,SAAS;AAAA,IACxB,MAAM,OAAO;AAAA,MACX,IAAI,SAAS,OAAO,CAAC;AAAA,MACrB,SAAS,SAAS,OAAO,CAAC;AAAA,MAC1B,YAAY,SAAS,OAAO,CAAC;AAAA,MAC7B,SAAS,SAAS,OAAO,CAAC;AAAA,MAC1B,cAAc,SAAS,OAAO,CAAC;AAAA,MAC/B,iBAAiB,SAAS,OAAO,CAAC;AAAA,MAClC,UAAU,SAAS,MAAM,CAAC,OAAO,WAAW,OAAO,SAAS,WAAW,SAAS,SAAS,CAAC,CAAC;AAAA,MAC3F,QA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5D,sBAAsB,SAAS,OAAO,EAAE,MAAM,UAAU,GAAG,CAAC,CAAC;AAC/D,CAAC;","names":[]}
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 uuid,\n url,\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\n/** @deprecated */\nexport const createTrackEventSchemaV1 = 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 // 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 advertising_id: 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 }),\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 createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\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 // 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 advertising_id: 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 }),\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 user_id: optional(uuid()),\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":";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,EAEA;AAAA,EACA;AAAA,OACK;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;AAGO,IAAM,2BAA2B;AAAA,EACtC,OAAO;AAAA,IACL,MAAM,OAAO,EAAE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,UAAU,EAAE,CAAC;AAAA,IACxD,YAAY,OAAO,OAAO;AAAA,IAC1B,WAAW,IAAI,SAAS;AAAA,IACxB,MAAM,OAAO;AAAA,MACX,IAAI,SAAS,OAAO,CAAC;AAAA,MACrB,SAAS,SAAS,OAAO,CAAC;AAAA,MAC1B,YAAY,SAAS,OAAO,CAAC;AAAA,MAC7B,SAAS,SAAS,OAAO,CAAC;AAAA,MAC1B,cAAc,SAAS,OAAO,CAAC;AAAA,MAC/B,iBAAiB,SAAS,OAAO,CAAC;AAAA,MAClC,U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