digital-tools 2.0.2 → 2.1.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +3 -4
  3. package/src/define.js +267 -0
  4. package/src/entities/advertising.js +999 -0
  5. package/src/entities/ai.js +756 -0
  6. package/src/entities/analytics.js +1588 -0
  7. package/src/entities/automation.js +601 -0
  8. package/src/entities/communication.js +1150 -0
  9. package/src/entities/crm.js +1386 -0
  10. package/src/entities/design.js +546 -0
  11. package/src/entities/development.js +2212 -0
  12. package/src/entities/document.js +874 -0
  13. package/src/entities/ecommerce.js +1429 -0
  14. package/src/entities/experiment.js +1039 -0
  15. package/src/entities/finance.js +3478 -0
  16. package/src/entities/forms.js +1892 -0
  17. package/src/entities/hr.js +661 -0
  18. package/src/entities/identity.js +997 -0
  19. package/src/entities/index.js +282 -0
  20. package/src/entities/infrastructure.js +1153 -0
  21. package/src/entities/knowledge.js +1438 -0
  22. package/src/entities/marketing.js +1610 -0
  23. package/src/entities/media.js +1634 -0
  24. package/src/entities/notification.js +1199 -0
  25. package/src/entities/presentation.js +1274 -0
  26. package/src/entities/productivity.js +1317 -0
  27. package/src/entities/project-management.js +1136 -0
  28. package/src/entities/recruiting.js +736 -0
  29. package/src/entities/shipping.js +509 -0
  30. package/src/entities/signature.js +1102 -0
  31. package/src/entities/site.js +222 -0
  32. package/src/entities/spreadsheet.js +1341 -0
  33. package/src/entities/storage.js +1198 -0
  34. package/src/entities/support.js +1166 -0
  35. package/src/entities/video-conferencing.js +1750 -0
  36. package/src/entities/video.js +950 -0
  37. package/src/entities.js +1663 -0
  38. package/src/index.js +74 -0
  39. package/src/providers/analytics/index.js +17 -0
  40. package/src/providers/analytics/mixpanel.js +255 -0
  41. package/src/providers/calendar/cal-com.js +303 -0
  42. package/src/providers/calendar/google-calendar.js +335 -0
  43. package/src/providers/calendar/index.js +20 -0
  44. package/src/providers/crm/hubspot.js +566 -0
  45. package/src/providers/crm/index.js +17 -0
  46. package/src/providers/development/github.js +472 -0
  47. package/src/providers/development/index.js +17 -0
  48. package/src/providers/ecommerce/index.js +17 -0
  49. package/src/providers/ecommerce/shopify.js +378 -0
  50. package/src/providers/email/index.js +20 -0
  51. package/src/providers/email/resend.js +258 -0
  52. package/src/providers/email/sendgrid.js +161 -0
  53. package/src/providers/finance/index.js +17 -0
  54. package/src/providers/finance/stripe.js +549 -0
  55. package/src/providers/forms/index.js +17 -0
  56. package/src/providers/forms/typeform.js +500 -0
  57. package/src/providers/index.js +123 -0
  58. package/src/providers/knowledge/index.js +17 -0
  59. package/src/providers/knowledge/notion.js +389 -0
  60. package/src/providers/marketing/index.js +17 -0
  61. package/src/providers/marketing/mailchimp.js +443 -0
  62. package/src/providers/media/cloudinary.js +318 -0
  63. package/src/providers/media/index.js +17 -0
  64. package/src/providers/messaging/index.js +20 -0
  65. package/src/providers/messaging/slack.js +393 -0
  66. package/src/providers/messaging/twilio-sms.js +249 -0
  67. package/src/providers/project-management/index.js +17 -0
  68. package/src/providers/project-management/linear.js +575 -0
  69. package/src/providers/registry.js +86 -0
  70. package/src/providers/spreadsheet/google-sheets.js +375 -0
  71. package/src/providers/spreadsheet/index.js +20 -0
  72. package/src/providers/spreadsheet/xlsx.js +423 -0
  73. package/src/providers/storage/index.js +24 -0
  74. package/src/providers/storage/s3.js +419 -0
  75. package/src/providers/support/index.js +17 -0
  76. package/src/providers/support/zendesk.js +373 -0
  77. package/src/providers/tasks/index.js +17 -0
  78. package/src/providers/tasks/todoist.js +286 -0
  79. package/src/providers/types.js +9 -0
  80. package/src/providers/video-conferencing/google-meet.js +286 -0
  81. package/src/providers/video-conferencing/index.js +31 -0
  82. package/src/providers/video-conferencing/jitsi.js +254 -0
  83. package/src/providers/video-conferencing/teams.js +270 -0
  84. package/src/providers/video-conferencing/zoom.js +332 -0
  85. package/src/registry.js +128 -0
  86. package/src/tools/communication.js +184 -0
  87. package/src/tools/data.js +205 -0
  88. package/src/tools/index.js +11 -0
  89. package/src/tools/web.js +137 -0
  90. package/src/types.js +10 -0
  91. package/test/define.test.js +306 -0
  92. package/test/registry.test.js +357 -0
  93. package/test/tools.test.js +363 -0
@@ -0,0 +1,999 @@
1
+ /**
2
+ * Advertising Entity Types (Nouns)
3
+ *
4
+ * Entities for digital advertising platforms like Google Ads, Meta Ads, etc.
5
+ * Includes ads, campaigns, ad groups, keywords, and conversions.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ // =============================================================================
10
+ // Ad
11
+ // =============================================================================
12
+ /**
13
+ * Ad entity
14
+ *
15
+ * Represents a digital advertisement
16
+ */
17
+ export const Ad = {
18
+ singular: 'ad',
19
+ plural: 'ads',
20
+ description: 'A digital advertisement',
21
+ properties: {
22
+ // Identity
23
+ name: {
24
+ type: 'string',
25
+ description: 'Ad name',
26
+ },
27
+ type: {
28
+ type: 'string',
29
+ description: 'Ad type: search, display, video, shopping, social',
30
+ examples: ['search', 'display', 'video', 'shopping', 'social', 'native'],
31
+ },
32
+ format: {
33
+ type: 'string',
34
+ optional: true,
35
+ description: 'Ad format: text, image, carousel, video, collection',
36
+ examples: ['text', 'image', 'carousel', 'video', 'collection', 'stories'],
37
+ },
38
+ // Content - Text
39
+ headline: {
40
+ type: 'string',
41
+ optional: true,
42
+ description: 'Ad headline',
43
+ },
44
+ headlines: {
45
+ type: 'string',
46
+ array: true,
47
+ optional: true,
48
+ description: 'Multiple headlines (for responsive ads)',
49
+ },
50
+ description: {
51
+ type: 'string',
52
+ optional: true,
53
+ description: 'Ad description',
54
+ },
55
+ descriptions: {
56
+ type: 'string',
57
+ array: true,
58
+ optional: true,
59
+ description: 'Multiple descriptions',
60
+ },
61
+ callToAction: {
62
+ type: 'string',
63
+ optional: true,
64
+ description: 'Call to action text',
65
+ },
66
+ // Content - Media
67
+ imageUrl: {
68
+ type: 'url',
69
+ optional: true,
70
+ description: 'Ad image URL',
71
+ },
72
+ videoUrl: {
73
+ type: 'url',
74
+ optional: true,
75
+ description: 'Ad video URL',
76
+ },
77
+ thumbnailUrl: {
78
+ type: 'url',
79
+ optional: true,
80
+ description: 'Video thumbnail URL',
81
+ },
82
+ // Destination
83
+ finalUrl: {
84
+ type: 'url',
85
+ optional: true,
86
+ description: 'Final destination URL',
87
+ },
88
+ displayUrl: {
89
+ type: 'string',
90
+ optional: true,
91
+ description: 'Display URL',
92
+ },
93
+ trackingUrl: {
94
+ type: 'url',
95
+ optional: true,
96
+ description: 'Tracking URL template',
97
+ },
98
+ // Status
99
+ status: {
100
+ type: 'string',
101
+ description: 'Ad status: enabled, paused, removed, pending_review, disapproved',
102
+ examples: ['enabled', 'paused', 'removed', 'pending_review', 'disapproved'],
103
+ },
104
+ reviewStatus: {
105
+ type: 'string',
106
+ optional: true,
107
+ description: 'Review status: approved, disapproved, under_review',
108
+ examples: ['approved', 'disapproved', 'under_review'],
109
+ },
110
+ disapprovalReasons: {
111
+ type: 'string',
112
+ array: true,
113
+ optional: true,
114
+ description: 'Reasons for disapproval',
115
+ },
116
+ // Performance
117
+ impressions: {
118
+ type: 'number',
119
+ optional: true,
120
+ description: 'Total impressions',
121
+ },
122
+ clicks: {
123
+ type: 'number',
124
+ optional: true,
125
+ description: 'Total clicks',
126
+ },
127
+ ctr: {
128
+ type: 'number',
129
+ optional: true,
130
+ description: 'Click-through rate',
131
+ },
132
+ conversions: {
133
+ type: 'number',
134
+ optional: true,
135
+ description: 'Total conversions',
136
+ },
137
+ conversionRate: {
138
+ type: 'number',
139
+ optional: true,
140
+ description: 'Conversion rate',
141
+ },
142
+ cost: {
143
+ type: 'number',
144
+ optional: true,
145
+ description: 'Total cost',
146
+ },
147
+ cpc: {
148
+ type: 'number',
149
+ optional: true,
150
+ description: 'Cost per click',
151
+ },
152
+ cpm: {
153
+ type: 'number',
154
+ optional: true,
155
+ description: 'Cost per thousand impressions',
156
+ },
157
+ cpa: {
158
+ type: 'number',
159
+ optional: true,
160
+ description: 'Cost per acquisition',
161
+ },
162
+ roas: {
163
+ type: 'number',
164
+ optional: true,
165
+ description: 'Return on ad spend',
166
+ },
167
+ },
168
+ relationships: {
169
+ adGroup: {
170
+ type: 'AdGroup',
171
+ description: 'Parent ad group',
172
+ },
173
+ campaign: {
174
+ type: 'AdCampaign',
175
+ description: 'Parent campaign',
176
+ },
177
+ },
178
+ actions: [
179
+ 'create',
180
+ 'update',
181
+ 'delete',
182
+ 'enable',
183
+ 'pause',
184
+ 'duplicate',
185
+ 'preview',
186
+ 'submitForReview',
187
+ ],
188
+ events: [
189
+ 'created',
190
+ 'updated',
191
+ 'deleted',
192
+ 'enabled',
193
+ 'paused',
194
+ 'approved',
195
+ 'disapproved',
196
+ 'impressionServed',
197
+ 'clicked',
198
+ 'converted',
199
+ ],
200
+ };
201
+ // =============================================================================
202
+ // Ad Group
203
+ // =============================================================================
204
+ /**
205
+ * Ad group entity
206
+ *
207
+ * Represents a group of related ads
208
+ */
209
+ export const AdGroup = {
210
+ singular: 'ad group',
211
+ plural: 'ad groups',
212
+ description: 'A group of related ads with shared targeting',
213
+ properties: {
214
+ // Identity
215
+ name: {
216
+ type: 'string',
217
+ description: 'Ad group name',
218
+ },
219
+ // Status
220
+ status: {
221
+ type: 'string',
222
+ description: 'Ad group status: enabled, paused, removed',
223
+ examples: ['enabled', 'paused', 'removed'],
224
+ },
225
+ // Bidding
226
+ bidStrategy: {
227
+ type: 'string',
228
+ optional: true,
229
+ description: 'Bid strategy: manual_cpc, target_cpa, maximize_conversions',
230
+ examples: ['manual_cpc', 'target_cpa', 'maximize_conversions', 'target_roas'],
231
+ },
232
+ defaultBid: {
233
+ type: 'number',
234
+ optional: true,
235
+ description: 'Default bid amount',
236
+ },
237
+ targetCpa: {
238
+ type: 'number',
239
+ optional: true,
240
+ description: 'Target CPA',
241
+ },
242
+ targetRoas: {
243
+ type: 'number',
244
+ optional: true,
245
+ description: 'Target ROAS',
246
+ },
247
+ // Targeting
248
+ targetingSettings: {
249
+ type: 'json',
250
+ optional: true,
251
+ description: 'Targeting configuration',
252
+ },
253
+ audiences: {
254
+ type: 'string',
255
+ array: true,
256
+ optional: true,
257
+ description: 'Target audiences',
258
+ },
259
+ placements: {
260
+ type: 'string',
261
+ array: true,
262
+ optional: true,
263
+ description: 'Target placements',
264
+ },
265
+ topics: {
266
+ type: 'string',
267
+ array: true,
268
+ optional: true,
269
+ description: 'Target topics',
270
+ },
271
+ // Performance
272
+ impressions: {
273
+ type: 'number',
274
+ optional: true,
275
+ description: 'Total impressions',
276
+ },
277
+ clicks: {
278
+ type: 'number',
279
+ optional: true,
280
+ description: 'Total clicks',
281
+ },
282
+ conversions: {
283
+ type: 'number',
284
+ optional: true,
285
+ description: 'Total conversions',
286
+ },
287
+ cost: {
288
+ type: 'number',
289
+ optional: true,
290
+ description: 'Total cost',
291
+ },
292
+ },
293
+ relationships: {
294
+ campaign: {
295
+ type: 'AdCampaign',
296
+ backref: 'adGroups',
297
+ description: 'Parent campaign',
298
+ },
299
+ ads: {
300
+ type: 'Ad[]',
301
+ backref: 'adGroup',
302
+ description: 'Ads in this group',
303
+ },
304
+ keywords: {
305
+ type: 'Keyword[]',
306
+ backref: 'adGroup',
307
+ description: 'Keywords for search ads',
308
+ },
309
+ },
310
+ actions: [
311
+ 'create',
312
+ 'update',
313
+ 'delete',
314
+ 'enable',
315
+ 'pause',
316
+ 'setBid',
317
+ 'addAudience',
318
+ 'removeAudience',
319
+ ],
320
+ events: [
321
+ 'created',
322
+ 'updated',
323
+ 'deleted',
324
+ 'enabled',
325
+ 'paused',
326
+ 'bidChanged',
327
+ 'audienceAdded',
328
+ 'audienceRemoved',
329
+ ],
330
+ };
331
+ // =============================================================================
332
+ // Ad Campaign
333
+ // =============================================================================
334
+ /**
335
+ * Ad campaign entity
336
+ *
337
+ * Represents an advertising campaign
338
+ */
339
+ export const AdCampaign = {
340
+ singular: 'ad campaign',
341
+ plural: 'ad campaigns',
342
+ description: 'An advertising campaign',
343
+ properties: {
344
+ // Identity
345
+ name: {
346
+ type: 'string',
347
+ description: 'Campaign name',
348
+ },
349
+ objective: {
350
+ type: 'string',
351
+ description: 'Campaign objective: awareness, traffic, engagement, leads, sales',
352
+ examples: ['awareness', 'traffic', 'engagement', 'leads', 'sales', 'app_installs'],
353
+ },
354
+ type: {
355
+ type: 'string',
356
+ description: 'Campaign type: search, display, video, shopping, performance_max',
357
+ examples: ['search', 'display', 'video', 'shopping', 'performance_max', 'app'],
358
+ },
359
+ // Status
360
+ status: {
361
+ type: 'string',
362
+ description: 'Campaign status: enabled, paused, removed, ended',
363
+ examples: ['enabled', 'paused', 'removed', 'ended'],
364
+ },
365
+ // Schedule
366
+ startDate: {
367
+ type: 'datetime',
368
+ optional: true,
369
+ description: 'Campaign start date',
370
+ },
371
+ endDate: {
372
+ type: 'datetime',
373
+ optional: true,
374
+ description: 'Campaign end date',
375
+ },
376
+ // Budget
377
+ budget: {
378
+ type: 'number',
379
+ optional: true,
380
+ description: 'Campaign budget',
381
+ },
382
+ budgetType: {
383
+ type: 'string',
384
+ optional: true,
385
+ description: 'Budget type: daily, lifetime',
386
+ examples: ['daily', 'lifetime'],
387
+ },
388
+ spent: {
389
+ type: 'number',
390
+ optional: true,
391
+ description: 'Amount spent',
392
+ },
393
+ remainingBudget: {
394
+ type: 'number',
395
+ optional: true,
396
+ description: 'Remaining budget',
397
+ },
398
+ // Bidding
399
+ bidStrategy: {
400
+ type: 'string',
401
+ optional: true,
402
+ description: 'Bid strategy',
403
+ },
404
+ targetCpa: {
405
+ type: 'number',
406
+ optional: true,
407
+ description: 'Target CPA',
408
+ },
409
+ targetRoas: {
410
+ type: 'number',
411
+ optional: true,
412
+ description: 'Target ROAS',
413
+ },
414
+ // Targeting
415
+ geoTargets: {
416
+ type: 'string',
417
+ array: true,
418
+ optional: true,
419
+ description: 'Geographic targets',
420
+ },
421
+ languages: {
422
+ type: 'string',
423
+ array: true,
424
+ optional: true,
425
+ description: 'Target languages',
426
+ },
427
+ devices: {
428
+ type: 'string',
429
+ array: true,
430
+ optional: true,
431
+ description: 'Target devices',
432
+ },
433
+ schedule: {
434
+ type: 'json',
435
+ optional: true,
436
+ description: 'Ad schedule',
437
+ },
438
+ // Performance
439
+ impressions: {
440
+ type: 'number',
441
+ optional: true,
442
+ description: 'Total impressions',
443
+ },
444
+ clicks: {
445
+ type: 'number',
446
+ optional: true,
447
+ description: 'Total clicks',
448
+ },
449
+ ctr: {
450
+ type: 'number',
451
+ optional: true,
452
+ description: 'Click-through rate',
453
+ },
454
+ conversions: {
455
+ type: 'number',
456
+ optional: true,
457
+ description: 'Total conversions',
458
+ },
459
+ conversionValue: {
460
+ type: 'number',
461
+ optional: true,
462
+ description: 'Total conversion value',
463
+ },
464
+ cpc: {
465
+ type: 'number',
466
+ optional: true,
467
+ description: 'Average CPC',
468
+ },
469
+ cpa: {
470
+ type: 'number',
471
+ optional: true,
472
+ description: 'Average CPA',
473
+ },
474
+ roas: {
475
+ type: 'number',
476
+ optional: true,
477
+ description: 'Return on ad spend',
478
+ },
479
+ },
480
+ relationships: {
481
+ account: {
482
+ type: 'Account',
483
+ description: 'Advertising account',
484
+ },
485
+ adGroups: {
486
+ type: 'AdGroup[]',
487
+ backref: 'campaign',
488
+ description: 'Ad groups in this campaign',
489
+ },
490
+ conversions: {
491
+ type: 'Conversion[]',
492
+ description: 'Conversions attributed to this campaign',
493
+ },
494
+ },
495
+ actions: [
496
+ 'create',
497
+ 'update',
498
+ 'delete',
499
+ 'enable',
500
+ 'pause',
501
+ 'setBudget',
502
+ 'extendSchedule',
503
+ 'duplicate',
504
+ 'optimize',
505
+ ],
506
+ events: [
507
+ 'created',
508
+ 'updated',
509
+ 'deleted',
510
+ 'enabled',
511
+ 'paused',
512
+ 'budgetChanged',
513
+ 'scheduleExtended',
514
+ 'budgetExhausted',
515
+ 'ended',
516
+ ],
517
+ };
518
+ // =============================================================================
519
+ // Keyword
520
+ // =============================================================================
521
+ /**
522
+ * Keyword entity
523
+ *
524
+ * Represents a search keyword for advertising
525
+ */
526
+ export const Keyword = {
527
+ singular: 'keyword',
528
+ plural: 'keywords',
529
+ description: 'A search keyword for advertising',
530
+ properties: {
531
+ // Identity
532
+ text: {
533
+ type: 'string',
534
+ description: 'Keyword text',
535
+ },
536
+ matchType: {
537
+ type: 'string',
538
+ description: 'Match type: exact, phrase, broad',
539
+ examples: ['exact', 'phrase', 'broad'],
540
+ },
541
+ // Status
542
+ status: {
543
+ type: 'string',
544
+ description: 'Keyword status: enabled, paused, removed',
545
+ examples: ['enabled', 'paused', 'removed'],
546
+ },
547
+ qualityScore: {
548
+ type: 'number',
549
+ optional: true,
550
+ description: 'Quality score (1-10)',
551
+ },
552
+ // Bidding
553
+ bid: {
554
+ type: 'number',
555
+ optional: true,
556
+ description: 'Keyword bid',
557
+ },
558
+ estimatedFirstPageBid: {
559
+ type: 'number',
560
+ optional: true,
561
+ description: 'Estimated first page bid',
562
+ },
563
+ estimatedTopPageBid: {
564
+ type: 'number',
565
+ optional: true,
566
+ description: 'Estimated top of page bid',
567
+ },
568
+ // Performance
569
+ impressions: {
570
+ type: 'number',
571
+ optional: true,
572
+ description: 'Total impressions',
573
+ },
574
+ clicks: {
575
+ type: 'number',
576
+ optional: true,
577
+ description: 'Total clicks',
578
+ },
579
+ ctr: {
580
+ type: 'number',
581
+ optional: true,
582
+ description: 'Click-through rate',
583
+ },
584
+ conversions: {
585
+ type: 'number',
586
+ optional: true,
587
+ description: 'Total conversions',
588
+ },
589
+ cost: {
590
+ type: 'number',
591
+ optional: true,
592
+ description: 'Total cost',
593
+ },
594
+ avgCpc: {
595
+ type: 'number',
596
+ optional: true,
597
+ description: 'Average CPC',
598
+ },
599
+ avgPosition: {
600
+ type: 'number',
601
+ optional: true,
602
+ description: 'Average position',
603
+ },
604
+ // Search terms
605
+ searchVolume: {
606
+ type: 'number',
607
+ optional: true,
608
+ description: 'Monthly search volume',
609
+ },
610
+ competition: {
611
+ type: 'string',
612
+ optional: true,
613
+ description: 'Competition level: low, medium, high',
614
+ examples: ['low', 'medium', 'high'],
615
+ },
616
+ },
617
+ relationships: {
618
+ adGroup: {
619
+ type: 'AdGroup',
620
+ backref: 'keywords',
621
+ description: 'Parent ad group',
622
+ },
623
+ negativeKeyword: {
624
+ type: 'NegativeKeyword',
625
+ required: false,
626
+ description: 'If this is a negative keyword',
627
+ },
628
+ },
629
+ actions: [
630
+ 'create',
631
+ 'update',
632
+ 'delete',
633
+ 'enable',
634
+ 'pause',
635
+ 'setBid',
636
+ 'changeMatchType',
637
+ ],
638
+ events: [
639
+ 'created',
640
+ 'updated',
641
+ 'deleted',
642
+ 'enabled',
643
+ 'paused',
644
+ 'bidChanged',
645
+ 'matchTypeChanged',
646
+ ],
647
+ };
648
+ /**
649
+ * Negative keyword entity
650
+ */
651
+ export const NegativeKeyword = {
652
+ singular: 'negative keyword',
653
+ plural: 'negative keywords',
654
+ description: 'A negative keyword to exclude from targeting',
655
+ properties: {
656
+ text: {
657
+ type: 'string',
658
+ description: 'Keyword text',
659
+ },
660
+ matchType: {
661
+ type: 'string',
662
+ description: 'Match type: exact, phrase, broad',
663
+ examples: ['exact', 'phrase', 'broad'],
664
+ },
665
+ level: {
666
+ type: 'string',
667
+ description: 'Level: campaign, ad_group, account',
668
+ examples: ['campaign', 'ad_group', 'account'],
669
+ },
670
+ },
671
+ relationships: {
672
+ campaign: {
673
+ type: 'AdCampaign',
674
+ required: false,
675
+ description: 'Parent campaign',
676
+ },
677
+ adGroup: {
678
+ type: 'AdGroup',
679
+ required: false,
680
+ description: 'Parent ad group',
681
+ },
682
+ },
683
+ actions: ['create', 'delete'],
684
+ events: ['created', 'deleted'],
685
+ };
686
+ // =============================================================================
687
+ // Conversion
688
+ // =============================================================================
689
+ /**
690
+ * Conversion entity
691
+ *
692
+ * Represents a tracked conversion
693
+ */
694
+ export const Conversion = {
695
+ singular: 'conversion',
696
+ plural: 'conversions',
697
+ description: 'A tracked advertising conversion',
698
+ properties: {
699
+ // Identity
700
+ conversionName: {
701
+ type: 'string',
702
+ description: 'Conversion action name',
703
+ },
704
+ conversionType: {
705
+ type: 'string',
706
+ description: 'Conversion type: purchase, lead, signup, pageview, custom',
707
+ examples: ['purchase', 'lead', 'signup', 'pageview', 'download', 'custom'],
708
+ },
709
+ // Attribution
710
+ attributionModel: {
711
+ type: 'string',
712
+ optional: true,
713
+ description: 'Attribution model: last_click, first_click, linear, data_driven',
714
+ examples: ['last_click', 'first_click', 'linear', 'time_decay', 'data_driven'],
715
+ },
716
+ clickId: {
717
+ type: 'string',
718
+ optional: true,
719
+ description: 'Click ID that led to conversion',
720
+ },
721
+ // Value
722
+ value: {
723
+ type: 'number',
724
+ optional: true,
725
+ description: 'Conversion value',
726
+ },
727
+ currency: {
728
+ type: 'string',
729
+ optional: true,
730
+ description: 'Currency code',
731
+ },
732
+ quantity: {
733
+ type: 'number',
734
+ optional: true,
735
+ description: 'Number of conversions',
736
+ },
737
+ // Timing
738
+ timestamp: {
739
+ type: 'datetime',
740
+ description: 'Conversion timestamp',
741
+ },
742
+ clickTimestamp: {
743
+ type: 'datetime',
744
+ optional: true,
745
+ description: 'Original click timestamp',
746
+ },
747
+ conversionLag: {
748
+ type: 'number',
749
+ optional: true,
750
+ description: 'Days between click and conversion',
751
+ },
752
+ // Source
753
+ source: {
754
+ type: 'string',
755
+ optional: true,
756
+ description: 'Conversion source',
757
+ },
758
+ medium: {
759
+ type: 'string',
760
+ optional: true,
761
+ description: 'Traffic medium',
762
+ },
763
+ },
764
+ relationships: {
765
+ campaign: {
766
+ type: 'AdCampaign',
767
+ required: false,
768
+ description: 'Source campaign',
769
+ },
770
+ adGroup: {
771
+ type: 'AdGroup',
772
+ required: false,
773
+ description: 'Source ad group',
774
+ },
775
+ ad: {
776
+ type: 'Ad',
777
+ required: false,
778
+ description: 'Source ad',
779
+ },
780
+ keyword: {
781
+ type: 'Keyword',
782
+ required: false,
783
+ description: 'Source keyword',
784
+ },
785
+ },
786
+ actions: ['track', 'import', 'adjust', 'delete'],
787
+ events: ['tracked', 'imported', 'adjusted', 'deleted'],
788
+ };
789
+ // =============================================================================
790
+ // Budget
791
+ // =============================================================================
792
+ /**
793
+ * Budget entity
794
+ *
795
+ * Represents an advertising budget
796
+ */
797
+ export const Budget = {
798
+ singular: 'budget',
799
+ plural: 'budgets',
800
+ description: 'An advertising budget',
801
+ properties: {
802
+ // Identity
803
+ name: {
804
+ type: 'string',
805
+ description: 'Budget name',
806
+ },
807
+ // Amount
808
+ amount: {
809
+ type: 'number',
810
+ description: 'Budget amount',
811
+ },
812
+ currency: {
813
+ type: 'string',
814
+ description: 'Currency code',
815
+ },
816
+ period: {
817
+ type: 'string',
818
+ description: 'Budget period: daily, monthly, lifetime',
819
+ examples: ['daily', 'monthly', 'lifetime'],
820
+ },
821
+ // Delivery
822
+ deliveryMethod: {
823
+ type: 'string',
824
+ optional: true,
825
+ description: 'Delivery method: standard, accelerated',
826
+ examples: ['standard', 'accelerated'],
827
+ },
828
+ // Spending
829
+ spent: {
830
+ type: 'number',
831
+ optional: true,
832
+ description: 'Amount spent',
833
+ },
834
+ remaining: {
835
+ type: 'number',
836
+ optional: true,
837
+ description: 'Remaining amount',
838
+ },
839
+ percentUsed: {
840
+ type: 'number',
841
+ optional: true,
842
+ description: 'Percentage of budget used',
843
+ },
844
+ // Status
845
+ status: {
846
+ type: 'string',
847
+ description: 'Budget status: active, depleted, paused',
848
+ examples: ['active', 'depleted', 'paused'],
849
+ },
850
+ shared: {
851
+ type: 'boolean',
852
+ optional: true,
853
+ description: 'Whether budget is shared across campaigns',
854
+ },
855
+ },
856
+ relationships: {
857
+ campaigns: {
858
+ type: 'AdCampaign[]',
859
+ description: 'Campaigns using this budget',
860
+ },
861
+ },
862
+ actions: ['create', 'update', 'delete', 'increase', 'decrease'],
863
+ events: ['created', 'updated', 'deleted', 'increased', 'decreased', 'depleted'],
864
+ };
865
+ // =============================================================================
866
+ // Audience (for advertising)
867
+ // =============================================================================
868
+ /**
869
+ * Ad audience entity
870
+ *
871
+ * Represents a targetable audience for advertising
872
+ */
873
+ export const AdAudience = {
874
+ singular: 'ad audience',
875
+ plural: 'ad audiences',
876
+ description: 'A targetable audience for advertising',
877
+ properties: {
878
+ // Identity
879
+ name: {
880
+ type: 'string',
881
+ description: 'Audience name',
882
+ },
883
+ description: {
884
+ type: 'string',
885
+ optional: true,
886
+ description: 'Audience description',
887
+ },
888
+ type: {
889
+ type: 'string',
890
+ description: 'Audience type: custom, lookalike, remarketing, in_market, affinity',
891
+ examples: ['custom', 'lookalike', 'remarketing', 'in_market', 'affinity'],
892
+ },
893
+ // Source
894
+ source: {
895
+ type: 'string',
896
+ optional: true,
897
+ description: 'Audience source: website, app, crm, engagement',
898
+ examples: ['website', 'app', 'crm', 'engagement'],
899
+ },
900
+ sourceDetails: {
901
+ type: 'json',
902
+ optional: true,
903
+ description: 'Source configuration details',
904
+ },
905
+ // Size
906
+ size: {
907
+ type: 'number',
908
+ optional: true,
909
+ description: 'Estimated audience size',
910
+ },
911
+ sizeRange: {
912
+ type: 'string',
913
+ optional: true,
914
+ description: 'Size range description',
915
+ },
916
+ // Lookalike
917
+ seedAudience: {
918
+ type: 'string',
919
+ optional: true,
920
+ description: 'Seed audience for lookalike',
921
+ },
922
+ expansionLevel: {
923
+ type: 'number',
924
+ optional: true,
925
+ description: 'Lookalike expansion level (1-10)',
926
+ },
927
+ // Status
928
+ status: {
929
+ type: 'string',
930
+ description: 'Audience status: ready, populating, too_small, expired',
931
+ examples: ['ready', 'populating', 'too_small', 'expired'],
932
+ },
933
+ membershipDuration: {
934
+ type: 'number',
935
+ optional: true,
936
+ description: 'Membership duration in days',
937
+ },
938
+ },
939
+ relationships: {
940
+ campaigns: {
941
+ type: 'AdCampaign[]',
942
+ description: 'Campaigns targeting this audience',
943
+ },
944
+ adGroups: {
945
+ type: 'AdGroup[]',
946
+ description: 'Ad groups targeting this audience',
947
+ },
948
+ },
949
+ actions: [
950
+ 'create',
951
+ 'update',
952
+ 'delete',
953
+ 'refresh',
954
+ 'expand',
955
+ 'createLookalike',
956
+ 'share',
957
+ ],
958
+ events: [
959
+ 'created',
960
+ 'updated',
961
+ 'deleted',
962
+ 'refreshed',
963
+ 'expanded',
964
+ 'lookalikeCreated',
965
+ 'shared',
966
+ 'ready',
967
+ ],
968
+ };
969
+ // =============================================================================
970
+ // Export all entities as a schema
971
+ // =============================================================================
972
+ /**
973
+ * All advertising entity types
974
+ */
975
+ export const AdvertisingEntities = {
976
+ // Ads
977
+ Ad,
978
+ AdGroup,
979
+ AdCampaign,
980
+ // Keywords
981
+ Keyword,
982
+ NegativeKeyword,
983
+ // Conversions
984
+ Conversion,
985
+ // Budget
986
+ Budget,
987
+ // Audiences
988
+ AdAudience,
989
+ };
990
+ /**
991
+ * Entity categories for organization
992
+ */
993
+ export const AdvertisingCategories = {
994
+ ads: ['Ad', 'AdGroup', 'AdCampaign'],
995
+ keywords: ['Keyword', 'NegativeKeyword'],
996
+ conversions: ['Conversion'],
997
+ budget: ['Budget'],
998
+ audiences: ['AdAudience'],
999
+ };