@walkeros/web-destination-gtag 0.3.0 → 0.3.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.d.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import * as _walkeros_core from '@walkeros/core';
1
2
  import { Destination as Destination$1, Mapping as Mapping$2, z } from '@walkeros/core';
2
3
  import { DestinationWeb } from '@walkeros/web-core';
3
- import * as zod_to_json_schema from 'zod-to-json-schema';
4
4
 
5
5
  declare global {
6
6
  interface Window {
@@ -156,40 +156,40 @@ declare namespace index$1 {
156
156
  * Include configuration for GA4
157
157
  * Specifies which event properties to include
158
158
  */
159
- declare const IncludeSchema: z.ZodArray<z.ZodEnum<["all", "context", "data", "event", "globals", "source", "user", "version"]>, "many">;
159
+ declare const IncludeSchema: z.ZodArray<z.ZodEnum<{
160
+ data: "data";
161
+ event: "event";
162
+ all: "all";
163
+ context: "context";
164
+ globals: "globals";
165
+ source: "source";
166
+ user: "user";
167
+ version: "version";
168
+ }>>;
160
169
  /**
161
170
  * Consent Mode Configuration
162
171
  * Can be false (disabled), true (use defaults), or custom mapping
163
172
  */
164
- declare const ConsentModeSchema: z.ZodUnion<[z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>]>;
173
+ declare const ConsentModeSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>]>;
165
174
  declare const GA4SettingsSchema: z.ZodObject<{
166
175
  measurementId: z.ZodString;
167
176
  debug: z.ZodOptional<z.ZodBoolean>;
168
- include: z.ZodOptional<z.ZodArray<z.ZodEnum<["all", "context", "data", "event", "globals", "source", "user", "version"]>, "many">>;
177
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
178
+ data: "data";
179
+ event: "event";
180
+ all: "all";
181
+ context: "context";
182
+ globals: "globals";
183
+ source: "source";
184
+ user: "user";
185
+ version: "version";
186
+ }>>>;
169
187
  pageview: z.ZodOptional<z.ZodBoolean>;
170
188
  server_container_url: z.ZodOptional<z.ZodString>;
171
189
  snakeCase: z.ZodOptional<z.ZodBoolean>;
172
190
  transport_url: z.ZodOptional<z.ZodString>;
173
191
  data: z.ZodOptional<z.ZodAny>;
174
- }, "strip", z.ZodTypeAny, {
175
- measurementId: string;
176
- data?: any;
177
- debug?: boolean | undefined;
178
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
179
- pageview?: boolean | undefined;
180
- server_container_url?: string | undefined;
181
- snakeCase?: boolean | undefined;
182
- transport_url?: string | undefined;
183
- }, {
184
- measurementId: string;
185
- data?: any;
186
- debug?: boolean | undefined;
187
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
188
- pageview?: boolean | undefined;
189
- server_container_url?: string | undefined;
190
- snakeCase?: boolean | undefined;
191
- transport_url?: string | undefined;
192
- }>;
192
+ }, z.core.$strip>;
193
193
  /**
194
194
  * Google Ads Settings Schema
195
195
  * Configuration for Google Ads conversions
@@ -198,15 +198,7 @@ declare const AdsSettingsSchema: z.ZodObject<{
198
198
  conversionId: z.ZodString;
199
199
  currency: z.ZodOptional<z.ZodString>;
200
200
  data: z.ZodOptional<z.ZodAny>;
201
- }, "strip", z.ZodTypeAny, {
202
- conversionId: string;
203
- data?: any;
204
- currency?: string | undefined;
205
- }, {
206
- conversionId: string;
207
- data?: any;
208
- currency?: string | undefined;
209
- }>;
201
+ }, z.core.$strip>;
210
202
  /**
211
203
  * GTM Settings Schema
212
204
  * Configuration for Google Tag Manager
@@ -216,170 +208,41 @@ declare const GTMSettingsSchema: z.ZodObject<{
216
208
  dataLayer: z.ZodOptional<z.ZodString>;
217
209
  domain: z.ZodOptional<z.ZodString>;
218
210
  data: z.ZodOptional<z.ZodAny>;
219
- }, "strip", z.ZodTypeAny, {
220
- containerId: string;
221
- data?: any;
222
- dataLayer?: string | undefined;
223
- domain?: string | undefined;
224
- }, {
225
- containerId: string;
226
- data?: any;
227
- dataLayer?: string | undefined;
228
- domain?: string | undefined;
229
- }>;
211
+ }, z.core.$strip>;
230
212
 
231
- declare const SettingsSchema: z.ZodEffects<z.ZodObject<{
232
- como: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>]>>;
213
+ declare const SettingsSchema: z.ZodObject<{
214
+ como: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>]>>;
233
215
  ga4: z.ZodOptional<z.ZodObject<{
234
216
  measurementId: z.ZodString;
235
217
  debug: z.ZodOptional<z.ZodBoolean>;
236
- include: z.ZodOptional<z.ZodArray<z.ZodEnum<["all", "context", "data", "event", "globals", "source", "user", "version"]>, "many">>;
218
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
219
+ data: "data";
220
+ event: "event";
221
+ all: "all";
222
+ context: "context";
223
+ globals: "globals";
224
+ source: "source";
225
+ user: "user";
226
+ version: "version";
227
+ }>>>;
237
228
  pageview: z.ZodOptional<z.ZodBoolean>;
238
229
  server_container_url: z.ZodOptional<z.ZodString>;
239
230
  snakeCase: z.ZodOptional<z.ZodBoolean>;
240
231
  transport_url: z.ZodOptional<z.ZodString>;
241
232
  data: z.ZodOptional<z.ZodAny>;
242
- }, "strip", z.ZodTypeAny, {
243
- measurementId: string;
244
- data?: any;
245
- debug?: boolean | undefined;
246
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
247
- pageview?: boolean | undefined;
248
- server_container_url?: string | undefined;
249
- snakeCase?: boolean | undefined;
250
- transport_url?: string | undefined;
251
- }, {
252
- measurementId: string;
253
- data?: any;
254
- debug?: boolean | undefined;
255
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
256
- pageview?: boolean | undefined;
257
- server_container_url?: string | undefined;
258
- snakeCase?: boolean | undefined;
259
- transport_url?: string | undefined;
260
- }>>;
233
+ }, z.core.$strip>>;
261
234
  ads: z.ZodOptional<z.ZodObject<{
262
235
  conversionId: z.ZodString;
263
236
  currency: z.ZodOptional<z.ZodString>;
264
237
  data: z.ZodOptional<z.ZodAny>;
265
- }, "strip", z.ZodTypeAny, {
266
- conversionId: string;
267
- data?: any;
268
- currency?: string | undefined;
269
- }, {
270
- conversionId: string;
271
- data?: any;
272
- currency?: string | undefined;
273
- }>>;
238
+ }, z.core.$strip>>;
274
239
  gtm: z.ZodOptional<z.ZodObject<{
275
240
  containerId: z.ZodString;
276
241
  dataLayer: z.ZodOptional<z.ZodString>;
277
242
  domain: z.ZodOptional<z.ZodString>;
278
243
  data: z.ZodOptional<z.ZodAny>;
279
- }, "strip", z.ZodTypeAny, {
280
- containerId: string;
281
- data?: any;
282
- dataLayer?: string | undefined;
283
- domain?: string | undefined;
284
- }, {
285
- containerId: string;
286
- data?: any;
287
- dataLayer?: string | undefined;
288
- domain?: string | undefined;
289
- }>>;
290
- }, "strip", z.ZodTypeAny, {
291
- como?: boolean | Record<string, string | string[]> | undefined;
292
- ga4?: {
293
- measurementId: string;
294
- data?: any;
295
- debug?: boolean | undefined;
296
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
297
- pageview?: boolean | undefined;
298
- server_container_url?: string | undefined;
299
- snakeCase?: boolean | undefined;
300
- transport_url?: string | undefined;
301
- } | undefined;
302
- ads?: {
303
- conversionId: string;
304
- data?: any;
305
- currency?: string | undefined;
306
- } | undefined;
307
- gtm?: {
308
- containerId: string;
309
- data?: any;
310
- dataLayer?: string | undefined;
311
- domain?: string | undefined;
312
- } | undefined;
313
- }, {
314
- como?: boolean | Record<string, string | string[]> | undefined;
315
- ga4?: {
316
- measurementId: string;
317
- data?: any;
318
- debug?: boolean | undefined;
319
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
320
- pageview?: boolean | undefined;
321
- server_container_url?: string | undefined;
322
- snakeCase?: boolean | undefined;
323
- transport_url?: string | undefined;
324
- } | undefined;
325
- ads?: {
326
- conversionId: string;
327
- data?: any;
328
- currency?: string | undefined;
329
- } | undefined;
330
- gtm?: {
331
- containerId: string;
332
- data?: any;
333
- dataLayer?: string | undefined;
334
- domain?: string | undefined;
335
- } | undefined;
336
- }>, {
337
- como?: boolean | Record<string, string | string[]> | undefined;
338
- ga4?: {
339
- measurementId: string;
340
- data?: any;
341
- debug?: boolean | undefined;
342
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
343
- pageview?: boolean | undefined;
344
- server_container_url?: string | undefined;
345
- snakeCase?: boolean | undefined;
346
- transport_url?: string | undefined;
347
- } | undefined;
348
- ads?: {
349
- conversionId: string;
350
- data?: any;
351
- currency?: string | undefined;
352
- } | undefined;
353
- gtm?: {
354
- containerId: string;
355
- data?: any;
356
- dataLayer?: string | undefined;
357
- domain?: string | undefined;
358
- } | undefined;
359
- }, {
360
- como?: boolean | Record<string, string | string[]> | undefined;
361
- ga4?: {
362
- measurementId: string;
363
- data?: any;
364
- debug?: boolean | undefined;
365
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
366
- pageview?: boolean | undefined;
367
- server_container_url?: string | undefined;
368
- snakeCase?: boolean | undefined;
369
- transport_url?: string | undefined;
370
- } | undefined;
371
- ads?: {
372
- conversionId: string;
373
- data?: any;
374
- currency?: string | undefined;
375
- } | undefined;
376
- gtm?: {
377
- containerId: string;
378
- data?: any;
379
- dataLayer?: string | undefined;
380
- domain?: string | undefined;
381
- } | undefined;
382
- }>;
244
+ }, z.core.$strip>>;
245
+ }, z.core.$strip>;
383
246
  type Settings = z.infer<typeof SettingsSchema>;
384
247
 
385
248
  /**
@@ -388,72 +251,32 @@ type Settings = z.infer<typeof SettingsSchema>;
388
251
  */
389
252
  declare const MappingSchema: z.ZodObject<{
390
253
  ga4: z.ZodOptional<z.ZodObject<{
391
- include: z.ZodOptional<z.ZodArray<z.ZodEnum<["all", "context", "data", "event", "globals", "source", "user", "version"]>, "many">>;
392
- }, "strip", z.ZodTypeAny, {
393
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
394
- }, {
395
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
396
- }>>;
254
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
255
+ data: "data";
256
+ event: "event";
257
+ all: "all";
258
+ context: "context";
259
+ globals: "globals";
260
+ source: "source";
261
+ user: "user";
262
+ version: "version";
263
+ }>>>;
264
+ }, z.core.$strip>>;
397
265
  ads: z.ZodOptional<z.ZodObject<{
398
266
  label: z.ZodOptional<z.ZodString>;
399
- }, "strip", z.ZodTypeAny, {
400
- label?: string | undefined;
401
- }, {
402
- label?: string | undefined;
403
- }>>;
404
- gtm: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
405
- }, "strip", z.ZodTypeAny, {
406
- ga4?: {
407
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
408
- } | undefined;
409
- ads?: {
410
- label?: string | undefined;
411
- } | undefined;
412
- gtm?: {} | undefined;
413
- }, {
414
- ga4?: {
415
- include?: ("data" | "event" | "all" | "context" | "globals" | "source" | "user" | "version")[] | undefined;
416
- } | undefined;
417
- ads?: {
418
- label?: string | undefined;
419
- } | undefined;
420
- gtm?: {} | undefined;
421
- }>;
267
+ }, z.core.$strip>>;
268
+ gtm: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
269
+ }, z.core.$strip>;
422
270
  /**
423
271
  * Type inference from MappingSchema
424
272
  */
425
273
  type Mapping = z.infer<typeof MappingSchema>;
426
274
 
427
- declare const settings: zod_to_json_schema.JsonSchema7Type & {
428
- $schema?: string | undefined;
429
- definitions?: {
430
- [key: string]: zod_to_json_schema.JsonSchema7Type;
431
- } | undefined;
432
- };
433
- declare const mapping: zod_to_json_schema.JsonSchema7Type & {
434
- $schema?: string | undefined;
435
- definitions?: {
436
- [key: string]: zod_to_json_schema.JsonSchema7Type;
437
- } | undefined;
438
- };
439
- declare const ga4: zod_to_json_schema.JsonSchema7Type & {
440
- $schema?: string | undefined;
441
- definitions?: {
442
- [key: string]: zod_to_json_schema.JsonSchema7Type;
443
- } | undefined;
444
- };
445
- declare const ads: zod_to_json_schema.JsonSchema7Type & {
446
- $schema?: string | undefined;
447
- definitions?: {
448
- [key: string]: zod_to_json_schema.JsonSchema7Type;
449
- } | undefined;
450
- };
451
- declare const gtm: zod_to_json_schema.JsonSchema7Type & {
452
- $schema?: string | undefined;
453
- definitions?: {
454
- [key: string]: zod_to_json_schema.JsonSchema7Type;
455
- } | undefined;
456
- };
275
+ declare const settings: _walkeros_core.JSONSchema;
276
+ declare const mapping: _walkeros_core.JSONSchema;
277
+ declare const ga4: _walkeros_core.JSONSchema;
278
+ declare const ads: _walkeros_core.JSONSchema;
279
+ declare const gtm: _walkeros_core.JSONSchema;
457
280
 
458
281
  declare const index_AdsSettingsSchema: typeof AdsSettingsSchema;
459
282
  declare const index_ConsentModeSchema: typeof ConsentModeSchema;