@aifabrix/builder 2.41.0 → 2.42.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 (142) hide show
  1. package/.cursor/rules/docs-rules.mdc +30 -0
  2. package/README.md +2 -2
  3. package/integration/hubspot/README.md +11 -5
  4. package/integration/hubspot/application.json +54 -0
  5. package/integration/hubspot/create-hubspot.js +9 -136
  6. package/integration/hubspot/env.template +3 -4
  7. package/integration/hubspot/hubspot-datasource-company.json +343 -5
  8. package/integration/hubspot/hubspot-datasource-contact.json +413 -5
  9. package/integration/hubspot/hubspot-datasource-deal.json +341 -4
  10. package/integration/hubspot/hubspot-datasource-users.json +116 -0
  11. package/integration/hubspot/hubspot-deploy.json +1250 -108
  12. package/integration/hubspot/hubspot-system.json +15 -32
  13. package/integration/hubspot/test-dataplane-down-tests.js +17 -16
  14. package/integration/hubspot/test-dataplane-down.js +2 -2
  15. package/jest.config.manual.js +2 -1
  16. package/lib/api/external-test.api.js +111 -0
  17. package/lib/api/index.js +42 -19
  18. package/lib/api/pipeline.api.js +66 -120
  19. package/lib/api/types/pipeline.types.js +37 -0
  20. package/lib/api/wizard-platform.api.js +61 -0
  21. package/lib/api/wizard.api.js +36 -2
  22. package/lib/app/config.js +23 -11
  23. package/lib/app/index.js +5 -3
  24. package/lib/app/prompts.js +46 -31
  25. package/lib/app/readme.js +11 -4
  26. package/lib/app/run-env-compose.js +64 -1
  27. package/lib/app/run-helpers.js +1 -1
  28. package/lib/app/show-display.js +1 -1
  29. package/lib/cli/setup-app.js +45 -14
  30. package/lib/cli/setup-credential-deployment.js +31 -6
  31. package/lib/cli/setup-dev.js +27 -0
  32. package/lib/cli/setup-environment.js +12 -4
  33. package/lib/cli/setup-external-system.js +19 -4
  34. package/lib/cli/setup-infra.js +54 -14
  35. package/lib/cli/setup-utility.js +117 -21
  36. package/lib/commands/auth-config.js +22 -12
  37. package/lib/commands/credential-env.js +162 -0
  38. package/lib/commands/credential-list.js +17 -22
  39. package/lib/commands/credential-push.js +96 -0
  40. package/lib/commands/datasource.js +77 -6
  41. package/lib/commands/dev-init.js +39 -1
  42. package/lib/commands/repair-auth-config.js +99 -0
  43. package/lib/commands/repair-datasource-keys.js +208 -0
  44. package/lib/commands/repair-datasource.js +235 -0
  45. package/lib/commands/repair-env-template.js +348 -0
  46. package/lib/commands/repair-internal.js +85 -0
  47. package/lib/commands/repair-rbac.js +158 -0
  48. package/lib/commands/repair.js +518 -0
  49. package/lib/commands/secrets-set.js +6 -0
  50. package/lib/commands/test-e2e-external.js +165 -0
  51. package/lib/commands/up-dataplane.js +90 -6
  52. package/lib/commands/upload.js +71 -40
  53. package/lib/commands/wizard-core-helpers.js +230 -5
  54. package/lib/commands/wizard-core.js +68 -29
  55. package/lib/commands/wizard-dataplane.js +1 -1
  56. package/lib/commands/wizard-entity-selection.js +43 -0
  57. package/lib/commands/wizard-headless.js +49 -5
  58. package/lib/commands/wizard-helpers.js +7 -3
  59. package/lib/commands/wizard.js +93 -64
  60. package/lib/core/config.js +7 -1
  61. package/lib/core/secrets.js +33 -12
  62. package/lib/datasource/deploy.js +12 -3
  63. package/lib/datasource/test-e2e.js +219 -0
  64. package/lib/datasource/test-integration.js +154 -0
  65. package/lib/deployment/deployer.js +7 -5
  66. package/lib/external-system/download-helpers.js +3 -1
  67. package/lib/external-system/download.js +182 -204
  68. package/lib/external-system/generator.js +204 -56
  69. package/lib/external-system/test-execution.js +2 -1
  70. package/lib/external-system/test-system-level.js +73 -0
  71. package/lib/external-system/test.js +51 -18
  72. package/lib/generator/external-controller-manifest.js +29 -2
  73. package/lib/generator/external-schema-utils.js +4 -2
  74. package/lib/generator/external.js +10 -3
  75. package/lib/generator/index.js +4 -1
  76. package/lib/generator/split-readme.js +1 -0
  77. package/lib/generator/split-variables.js +7 -1
  78. package/lib/generator/split.js +194 -54
  79. package/lib/generator/wizard-prompts-secondary.js +326 -0
  80. package/lib/generator/wizard-prompts.js +105 -106
  81. package/lib/generator/wizard-readme.js +91 -0
  82. package/lib/generator/wizard.js +180 -179
  83. package/lib/infrastructure/compose.js +11 -1
  84. package/lib/infrastructure/index.js +11 -3
  85. package/lib/infrastructure/services.js +22 -11
  86. package/lib/schema/application-schema.json +8 -5
  87. package/lib/schema/external-datasource.schema.json +49 -26
  88. package/lib/schema/external-system.schema.json +82 -6
  89. package/lib/schema/wizard-config.schema.json +23 -1
  90. package/lib/utils/api.js +38 -10
  91. package/lib/utils/auth-headers.js +8 -7
  92. package/lib/utils/compose-generator.js +1 -1
  93. package/lib/utils/compose-handlebars-helpers.js +11 -0
  94. package/lib/utils/config-format-preference.js +51 -0
  95. package/lib/utils/config-format.js +36 -0
  96. package/lib/utils/configuration-env-resolver.js +179 -0
  97. package/lib/utils/credential-display.js +83 -0
  98. package/lib/utils/credential-secrets-env.js +115 -25
  99. package/lib/utils/dataplane-pipeline-warning.js +28 -0
  100. package/lib/utils/deployment-validation-helpers.js +4 -4
  101. package/lib/utils/dev-ca-install.js +139 -0
  102. package/lib/utils/env-copy.js +23 -3
  103. package/lib/utils/error-formatters/http-status-errors.js +0 -1
  104. package/lib/utils/error-formatters/permission-errors.js +0 -1
  105. package/lib/utils/error-formatters/validation-errors.js +0 -1
  106. package/lib/utils/external-readme.js +89 -30
  107. package/lib/utils/external-system-display.js +59 -1
  108. package/lib/utils/external-system-test-helpers.js +21 -8
  109. package/lib/utils/external-system-validators.js +3 -0
  110. package/lib/utils/file-upload.js +20 -50
  111. package/lib/utils/help-builder.js +1 -0
  112. package/lib/utils/infra-status.js +50 -44
  113. package/lib/utils/local-secrets.js +5 -5
  114. package/lib/utils/paths.js +85 -4
  115. package/lib/utils/secrets-canonical.js +93 -0
  116. package/lib/utils/secrets-generator.js +20 -0
  117. package/lib/utils/secrets-helpers.js +75 -89
  118. package/lib/utils/test-log-writer.js +56 -0
  119. package/lib/utils/token-manager.js +24 -32
  120. package/lib/validation/env-template-auth.js +157 -0
  121. package/lib/validation/env-template-kv.js +41 -0
  122. package/lib/validation/external-manifest-validator.js +25 -0
  123. package/lib/validation/external-system-auth-rules.js +86 -0
  124. package/lib/validation/validate-batch.js +149 -0
  125. package/lib/validation/validate-datasource-keys-api.js +33 -0
  126. package/lib/validation/validate-display.js +94 -16
  127. package/lib/validation/validate.js +25 -12
  128. package/lib/validation/validator.js +7 -9
  129. package/lib/validation/wizard-datasource-validation.js +50 -0
  130. package/package.json +7 -2
  131. package/templates/applications/dataplane/application.yaml +1 -1
  132. package/templates/applications/dataplane/env.template +5 -5
  133. package/templates/applications/dataplane/rbac.yaml +2 -2
  134. package/templates/applications/miso-controller/env.template +1 -1
  135. package/templates/external-system/README.md.hbs +75 -22
  136. package/templates/external-system/deploy.js.hbs +4 -2
  137. package/templates/external-system/external-datasource.yaml.hbs +217 -0
  138. package/templates/external-system/external-system.json.hbs +1 -18
  139. package/templates/infra/compose.yaml.hbs +6 -0
  140. package/templates/python/docker-compose.hbs +4 -4
  141. package/templates/typescript/docker-compose.hbs +4 -4
  142. package/integration/hubspot/application.yaml +0 -37
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "key": "hubspot",
3
- "displayName": "HubSpot CRM Integration",
4
- "description": "HubSpot CRM external system integration with companies, contacts, and deals",
3
+ "displayName": "HubSpot CRM",
4
+ "description": "HubSpot CRM integration with OpenAPI support for companies, contacts, and deals",
5
5
  "type": "external",
6
6
  "version": "1.0.0",
7
7
  "externalIntegration": {
@@ -12,7 +12,8 @@
12
12
  "dataSources": [
13
13
  "hubspot-datasource-company.json",
14
14
  "hubspot-datasource-contact.json",
15
- "hubspot-datasource-deal.json"
15
+ "hubspot-datasource-deal.json",
16
+ "hubspot-datasource-users.json"
16
17
  ],
17
18
  "autopublish": true,
18
19
  "version": "1.0.0"
@@ -24,41 +25,18 @@
24
25
  "type": "openapi",
25
26
  "enabled": true,
26
27
  "authentication": {
27
- "type": "oauth2",
28
- "mode": "oauth2",
29
- "oauth2": {
30
- "tokenUrl": "{{TOKENURL}}",
31
- "clientId": "{{CLIENTID}}",
32
- "clientSecret": "{{CLIENTSECRET}}",
33
- "scopes": [
34
- "crm.objects.companies.read",
35
- "crm.objects.companies.write",
36
- "crm.objects.contacts.read",
37
- "crm.objects.contacts.write",
38
- "crm.objects.deals.read",
39
- "crm.objects.deals.write"
40
- ]
28
+ "method": "oauth2",
29
+ "variables": {
30
+ "baseUrl": "https://api.hubapi.com",
31
+ "tokenUrl": "https://api.hubapi.com/oauth/v1/token",
32
+ "scope": "crm.objects.companies.read crm.objects.companies.write crm.objects.contacts.read crm.objects.contacts.write crm.objects.deals.read crm.objects.deals.write"
33
+ },
34
+ "security": {
35
+ "clientId": "kv://hubspot/clientid",
36
+ "clientSecret": "kv://hubspot/clientsecret"
41
37
  }
42
38
  },
43
39
  "configuration": [
44
- {
45
- "name": "CLIENTID",
46
- "value": "hubspot-clientidKeyVault",
47
- "location": "keyvault",
48
- "required": true
49
- },
50
- {
51
- "name": "CLIENTSECRET",
52
- "value": "hubspot-clientsecretKeyVault",
53
- "location": "keyvault",
54
- "required": true
55
- },
56
- {
57
- "name": "TOKENURL",
58
- "value": "https://api.hubapi.com/oauth/v1/token",
59
- "location": "variable",
60
- "required": true
61
- },
62
40
  {
63
41
  "name": "HUBSPOT_API_VERSION",
64
42
  "value": "v3",
@@ -105,6 +83,12 @@
105
83
  "sales",
106
84
  "marketing",
107
85
  "hubspot"
86
+ ],
87
+ "dataSources": [
88
+ "hubspot-company",
89
+ "hubspot-contact",
90
+ "hubspot-deal",
91
+ "hubspot-users-datasource"
108
92
  ]
109
93
  },
110
94
  "dataSources": [
@@ -272,6 +256,332 @@
272
256
  "description": "Last modification timestamp",
273
257
  "indexed": false
274
258
  }
259
+ },
260
+ "compiledAttributes": {
261
+ "id": {
262
+ "raw_path": [
263
+ "id"
264
+ ],
265
+ "functions": [],
266
+ "type": "string",
267
+ "required": false,
268
+ "description": "Unique company identifier",
269
+ "indexed": true
270
+ },
271
+ "name": {
272
+ "raw_path": [
273
+ "properties",
274
+ "name",
275
+ "value"
276
+ ],
277
+ "functions": [
278
+ {
279
+ "name": "trim",
280
+ "args": []
281
+ }
282
+ ],
283
+ "type": "string",
284
+ "required": false,
285
+ "description": "Company name",
286
+ "indexed": false
287
+ },
288
+ "domain": {
289
+ "raw_path": [
290
+ "properties",
291
+ "domain",
292
+ "value"
293
+ ],
294
+ "functions": [
295
+ {
296
+ "name": "toLower",
297
+ "args": []
298
+ },
299
+ {
300
+ "name": "trim",
301
+ "args": []
302
+ }
303
+ ],
304
+ "type": "string",
305
+ "required": false,
306
+ "description": "Company domain for ABAC filtering",
307
+ "indexed": false
308
+ },
309
+ "country": {
310
+ "raw_path": [
311
+ "properties",
312
+ "country",
313
+ "value"
314
+ ],
315
+ "functions": [
316
+ {
317
+ "name": "toUpper",
318
+ "args": []
319
+ },
320
+ {
321
+ "name": "trim",
322
+ "args": []
323
+ }
324
+ ],
325
+ "type": "string",
326
+ "required": false,
327
+ "description": "Country code for ABAC filtering",
328
+ "indexed": false
329
+ },
330
+ "city": {
331
+ "raw_path": [
332
+ "properties",
333
+ "city",
334
+ "value"
335
+ ],
336
+ "functions": [
337
+ {
338
+ "name": "trim",
339
+ "args": []
340
+ }
341
+ ],
342
+ "type": "string",
343
+ "required": false,
344
+ "description": "City name",
345
+ "indexed": false
346
+ },
347
+ "industry": {
348
+ "raw_path": [
349
+ "properties",
350
+ "industry",
351
+ "value"
352
+ ],
353
+ "functions": [
354
+ {
355
+ "name": "trim",
356
+ "args": []
357
+ }
358
+ ],
359
+ "type": "string",
360
+ "required": false,
361
+ "description": "Industry classification",
362
+ "indexed": false
363
+ },
364
+ "website": {
365
+ "raw_path": [
366
+ "properties",
367
+ "website",
368
+ "value"
369
+ ],
370
+ "functions": [
371
+ {
372
+ "name": "trim",
373
+ "args": []
374
+ }
375
+ ],
376
+ "type": "string",
377
+ "required": false,
378
+ "description": "Company website URL",
379
+ "indexed": false
380
+ },
381
+ "phone": {
382
+ "raw_path": [
383
+ "properties",
384
+ "phone",
385
+ "value"
386
+ ],
387
+ "functions": [
388
+ {
389
+ "name": "trim",
390
+ "args": []
391
+ }
392
+ ],
393
+ "type": "string",
394
+ "required": false,
395
+ "description": "Phone number",
396
+ "indexed": false
397
+ },
398
+ "createdAt": {
399
+ "raw_path": [
400
+ "properties",
401
+ "createdate",
402
+ "value"
403
+ ],
404
+ "functions": [],
405
+ "type": "string",
406
+ "required": false,
407
+ "description": "Creation timestamp",
408
+ "indexed": false
409
+ },
410
+ "updatedAt": {
411
+ "raw_path": [
412
+ "properties",
413
+ "hs_lastmodifieddate",
414
+ "value"
415
+ ],
416
+ "functions": [],
417
+ "type": "string",
418
+ "required": false,
419
+ "description": "Last modification timestamp",
420
+ "indexed": false
421
+ }
422
+ },
423
+ "compiledFields": {
424
+ "id": {
425
+ "raw_path": [
426
+ "id"
427
+ ],
428
+ "functions": [],
429
+ "type": "string",
430
+ "required": false,
431
+ "description": "Unique company identifier",
432
+ "indexed": true
433
+ },
434
+ "name": {
435
+ "raw_path": [
436
+ "properties",
437
+ "name",
438
+ "value"
439
+ ],
440
+ "functions": [
441
+ {
442
+ "name": "trim",
443
+ "args": []
444
+ }
445
+ ],
446
+ "type": "string",
447
+ "required": false,
448
+ "description": "Company name",
449
+ "indexed": false
450
+ },
451
+ "domain": {
452
+ "raw_path": [
453
+ "properties",
454
+ "domain",
455
+ "value"
456
+ ],
457
+ "functions": [
458
+ {
459
+ "name": "toLower",
460
+ "args": []
461
+ },
462
+ {
463
+ "name": "trim",
464
+ "args": []
465
+ }
466
+ ],
467
+ "type": "string",
468
+ "required": false,
469
+ "description": "Company domain for ABAC filtering",
470
+ "indexed": false
471
+ },
472
+ "country": {
473
+ "raw_path": [
474
+ "properties",
475
+ "country",
476
+ "value"
477
+ ],
478
+ "functions": [
479
+ {
480
+ "name": "toUpper",
481
+ "args": []
482
+ },
483
+ {
484
+ "name": "trim",
485
+ "args": []
486
+ }
487
+ ],
488
+ "type": "string",
489
+ "required": false,
490
+ "description": "Country code for ABAC filtering",
491
+ "indexed": false
492
+ },
493
+ "city": {
494
+ "raw_path": [
495
+ "properties",
496
+ "city",
497
+ "value"
498
+ ],
499
+ "functions": [
500
+ {
501
+ "name": "trim",
502
+ "args": []
503
+ }
504
+ ],
505
+ "type": "string",
506
+ "required": false,
507
+ "description": "City name",
508
+ "indexed": false
509
+ },
510
+ "industry": {
511
+ "raw_path": [
512
+ "properties",
513
+ "industry",
514
+ "value"
515
+ ],
516
+ "functions": [
517
+ {
518
+ "name": "trim",
519
+ "args": []
520
+ }
521
+ ],
522
+ "type": "string",
523
+ "required": false,
524
+ "description": "Industry classification",
525
+ "indexed": false
526
+ },
527
+ "website": {
528
+ "raw_path": [
529
+ "properties",
530
+ "website",
531
+ "value"
532
+ ],
533
+ "functions": [
534
+ {
535
+ "name": "trim",
536
+ "args": []
537
+ }
538
+ ],
539
+ "type": "string",
540
+ "required": false,
541
+ "description": "Company website URL",
542
+ "indexed": false
543
+ },
544
+ "phone": {
545
+ "raw_path": [
546
+ "properties",
547
+ "phone",
548
+ "value"
549
+ ],
550
+ "functions": [
551
+ {
552
+ "name": "trim",
553
+ "args": []
554
+ }
555
+ ],
556
+ "type": "string",
557
+ "required": false,
558
+ "description": "Phone number",
559
+ "indexed": false
560
+ },
561
+ "createdAt": {
562
+ "raw_path": [
563
+ "properties",
564
+ "createdate",
565
+ "value"
566
+ ],
567
+ "functions": [],
568
+ "type": "string",
569
+ "required": false,
570
+ "description": "Creation timestamp",
571
+ "indexed": false
572
+ },
573
+ "updatedAt": {
574
+ "raw_path": [
575
+ "properties",
576
+ "hs_lastmodifieddate",
577
+ "value"
578
+ ],
579
+ "functions": [],
580
+ "type": "string",
581
+ "required": false,
582
+ "description": "Last modification timestamp",
583
+ "indexed": false
584
+ }
275
585
  }
276
586
  },
277
587
  "exposed": {
@@ -515,84 +825,478 @@
515
825
  "description": "Last modification timestamp",
516
826
  "indexed": false
517
827
  }
518
- }
519
- },
520
- "exposed": {
521
- "attributes": [
522
- "id",
523
- "firstName",
524
- "lastName",
525
- "email",
526
- "phone",
527
- "company",
528
- "jobTitle",
529
- "address",
530
- "city",
531
- "country",
532
- "createdAt",
533
- "updatedAt"
534
- ],
535
- "description": "Exposed fields for HubSpot contacts"
536
- },
537
- "openapi": {
538
- "enabled": true,
539
- "documentKey": "hubspot-v3",
540
- "baseUrl": "https://api.hubapi.com",
541
- "operations": {
542
- "list": {
543
- "operationId": "getContacts",
544
- "method": "GET",
545
- "path": "/crm/v3/objects/contacts"
828
+ },
829
+ "compiledAttributes": {
830
+ "id": {
831
+ "raw_path": [
832
+ "id"
833
+ ],
834
+ "functions": [],
835
+ "type": "string",
836
+ "required": false,
837
+ "description": "Unique contact identifier",
838
+ "indexed": true
546
839
  },
547
- "get": {
548
- "operationId": "getContact",
549
- "method": "GET",
550
- "path": "/crm/v3/objects/contacts/{contactId}"
840
+ "firstName": {
841
+ "raw_path": [
842
+ "properties",
843
+ "firstname",
844
+ "value"
845
+ ],
846
+ "functions": [
847
+ {
848
+ "name": "trim",
849
+ "args": []
850
+ }
851
+ ],
852
+ "type": "string",
853
+ "required": false,
854
+ "description": "First name",
855
+ "indexed": false
551
856
  },
552
- "create": {
553
- "operationId": "createContact",
554
- "method": "POST",
555
- "path": "/crm/v3/objects/contacts"
857
+ "lastName": {
858
+ "raw_path": [
859
+ "properties",
860
+ "lastname",
861
+ "value"
862
+ ],
863
+ "functions": [
864
+ {
865
+ "name": "trim",
866
+ "args": []
867
+ }
868
+ ],
869
+ "type": "string",
870
+ "required": false,
871
+ "description": "Last name",
872
+ "indexed": false
556
873
  },
557
- "update": {
558
- "operationId": "updateContact",
559
- "method": "PATCH",
560
- "path": "/crm/v3/objects/contacts/{contactId}"
874
+ "email": {
875
+ "raw_path": [
876
+ "properties",
877
+ "email",
878
+ "value"
879
+ ],
880
+ "functions": [
881
+ {
882
+ "name": "toLower",
883
+ "args": []
884
+ },
885
+ {
886
+ "name": "trim",
887
+ "args": []
888
+ }
889
+ ],
890
+ "type": "string",
891
+ "required": false,
892
+ "description": "Email address for ABAC filtering",
893
+ "indexed": false
561
894
  },
562
- "delete": {
563
- "operationId": "deleteContact",
564
- "method": "DELETE",
565
- "path": "/crm/v3/objects/contacts/{contactId}"
566
- }
567
- },
568
- "autoRbac": true
569
- }
570
- },
571
- {
572
- "key": "hubspot-deal",
573
- "displayName": "HubSpot Deal",
574
- "description": "HubSpot deals datasource with field mappings for CRM deal data",
575
- "systemKey": "hubspot",
576
- "entityType": "record-storage",
577
- "resourceType": "deal",
578
- "enabled": true,
579
- "version": "1.0.0",
580
- "metadataSchema": {
581
- "type": "object",
582
- "properties": {
583
- "id": {
584
- "type": "string"
895
+ "phone": {
896
+ "raw_path": [
897
+ "properties",
898
+ "phone",
899
+ "value"
900
+ ],
901
+ "functions": [
902
+ {
903
+ "name": "trim",
904
+ "args": []
905
+ }
906
+ ],
907
+ "type": "string",
908
+ "required": false,
909
+ "description": "Phone number",
910
+ "indexed": false
585
911
  },
586
- "properties": {
587
- "type": "object",
588
- "properties": {
589
- "dealname": {
590
- "type": "object",
591
- "properties": {
592
- "value": {
593
- "type": "string"
594
- }
595
- }
912
+ "company": {
913
+ "raw_path": [
914
+ "properties",
915
+ "company",
916
+ "value"
917
+ ],
918
+ "functions": [
919
+ {
920
+ "name": "trim",
921
+ "args": []
922
+ }
923
+ ],
924
+ "type": "string",
925
+ "required": false,
926
+ "description": "Associated company name",
927
+ "indexed": false
928
+ },
929
+ "jobTitle": {
930
+ "raw_path": [
931
+ "properties",
932
+ "jobtitle",
933
+ "value"
934
+ ],
935
+ "functions": [
936
+ {
937
+ "name": "trim",
938
+ "args": []
939
+ }
940
+ ],
941
+ "type": "string",
942
+ "required": false,
943
+ "description": "Job title",
944
+ "indexed": false
945
+ },
946
+ "address": {
947
+ "raw_path": [
948
+ "properties",
949
+ "address",
950
+ "value"
951
+ ],
952
+ "functions": [
953
+ {
954
+ "name": "trim",
955
+ "args": []
956
+ }
957
+ ],
958
+ "type": "string",
959
+ "required": false,
960
+ "description": "Street address",
961
+ "indexed": false
962
+ },
963
+ "city": {
964
+ "raw_path": [
965
+ "properties",
966
+ "city",
967
+ "value"
968
+ ],
969
+ "functions": [
970
+ {
971
+ "name": "trim",
972
+ "args": []
973
+ }
974
+ ],
975
+ "type": "string",
976
+ "required": false,
977
+ "description": "City name",
978
+ "indexed": false
979
+ },
980
+ "country": {
981
+ "raw_path": [
982
+ "properties",
983
+ "country",
984
+ "value"
985
+ ],
986
+ "functions": [
987
+ {
988
+ "name": "toUpper",
989
+ "args": []
990
+ },
991
+ {
992
+ "name": "trim",
993
+ "args": []
994
+ }
995
+ ],
996
+ "type": "string",
997
+ "required": false,
998
+ "description": "Country code for ABAC filtering",
999
+ "indexed": false
1000
+ },
1001
+ "createdAt": {
1002
+ "raw_path": [
1003
+ "properties",
1004
+ "createdate",
1005
+ "value"
1006
+ ],
1007
+ "functions": [],
1008
+ "type": "string",
1009
+ "required": false,
1010
+ "description": "Creation timestamp",
1011
+ "indexed": false
1012
+ },
1013
+ "updatedAt": {
1014
+ "raw_path": [
1015
+ "properties",
1016
+ "hs_lastmodifieddate",
1017
+ "value"
1018
+ ],
1019
+ "functions": [],
1020
+ "type": "string",
1021
+ "required": false,
1022
+ "description": "Last modification timestamp",
1023
+ "indexed": false
1024
+ }
1025
+ },
1026
+ "compiledFields": {
1027
+ "id": {
1028
+ "raw_path": [
1029
+ "id"
1030
+ ],
1031
+ "functions": [],
1032
+ "type": "string",
1033
+ "required": false,
1034
+ "description": "Unique contact identifier",
1035
+ "indexed": true
1036
+ },
1037
+ "firstName": {
1038
+ "raw_path": [
1039
+ "properties",
1040
+ "firstname",
1041
+ "value"
1042
+ ],
1043
+ "functions": [
1044
+ {
1045
+ "name": "trim",
1046
+ "args": []
1047
+ }
1048
+ ],
1049
+ "type": "string",
1050
+ "required": false,
1051
+ "description": "First name",
1052
+ "indexed": false
1053
+ },
1054
+ "lastName": {
1055
+ "raw_path": [
1056
+ "properties",
1057
+ "lastname",
1058
+ "value"
1059
+ ],
1060
+ "functions": [
1061
+ {
1062
+ "name": "trim",
1063
+ "args": []
1064
+ }
1065
+ ],
1066
+ "type": "string",
1067
+ "required": false,
1068
+ "description": "Last name",
1069
+ "indexed": false
1070
+ },
1071
+ "email": {
1072
+ "raw_path": [
1073
+ "properties",
1074
+ "email",
1075
+ "value"
1076
+ ],
1077
+ "functions": [
1078
+ {
1079
+ "name": "toLower",
1080
+ "args": []
1081
+ },
1082
+ {
1083
+ "name": "trim",
1084
+ "args": []
1085
+ }
1086
+ ],
1087
+ "type": "string",
1088
+ "required": false,
1089
+ "description": "Email address for ABAC filtering",
1090
+ "indexed": false
1091
+ },
1092
+ "phone": {
1093
+ "raw_path": [
1094
+ "properties",
1095
+ "phone",
1096
+ "value"
1097
+ ],
1098
+ "functions": [
1099
+ {
1100
+ "name": "trim",
1101
+ "args": []
1102
+ }
1103
+ ],
1104
+ "type": "string",
1105
+ "required": false,
1106
+ "description": "Phone number",
1107
+ "indexed": false
1108
+ },
1109
+ "company": {
1110
+ "raw_path": [
1111
+ "properties",
1112
+ "company",
1113
+ "value"
1114
+ ],
1115
+ "functions": [
1116
+ {
1117
+ "name": "trim",
1118
+ "args": []
1119
+ }
1120
+ ],
1121
+ "type": "string",
1122
+ "required": false,
1123
+ "description": "Associated company name",
1124
+ "indexed": false
1125
+ },
1126
+ "jobTitle": {
1127
+ "raw_path": [
1128
+ "properties",
1129
+ "jobtitle",
1130
+ "value"
1131
+ ],
1132
+ "functions": [
1133
+ {
1134
+ "name": "trim",
1135
+ "args": []
1136
+ }
1137
+ ],
1138
+ "type": "string",
1139
+ "required": false,
1140
+ "description": "Job title",
1141
+ "indexed": false
1142
+ },
1143
+ "address": {
1144
+ "raw_path": [
1145
+ "properties",
1146
+ "address",
1147
+ "value"
1148
+ ],
1149
+ "functions": [
1150
+ {
1151
+ "name": "trim",
1152
+ "args": []
1153
+ }
1154
+ ],
1155
+ "type": "string",
1156
+ "required": false,
1157
+ "description": "Street address",
1158
+ "indexed": false
1159
+ },
1160
+ "city": {
1161
+ "raw_path": [
1162
+ "properties",
1163
+ "city",
1164
+ "value"
1165
+ ],
1166
+ "functions": [
1167
+ {
1168
+ "name": "trim",
1169
+ "args": []
1170
+ }
1171
+ ],
1172
+ "type": "string",
1173
+ "required": false,
1174
+ "description": "City name",
1175
+ "indexed": false
1176
+ },
1177
+ "country": {
1178
+ "raw_path": [
1179
+ "properties",
1180
+ "country",
1181
+ "value"
1182
+ ],
1183
+ "functions": [
1184
+ {
1185
+ "name": "toUpper",
1186
+ "args": []
1187
+ },
1188
+ {
1189
+ "name": "trim",
1190
+ "args": []
1191
+ }
1192
+ ],
1193
+ "type": "string",
1194
+ "required": false,
1195
+ "description": "Country code for ABAC filtering",
1196
+ "indexed": false
1197
+ },
1198
+ "createdAt": {
1199
+ "raw_path": [
1200
+ "properties",
1201
+ "createdate",
1202
+ "value"
1203
+ ],
1204
+ "functions": [],
1205
+ "type": "string",
1206
+ "required": false,
1207
+ "description": "Creation timestamp",
1208
+ "indexed": false
1209
+ },
1210
+ "updatedAt": {
1211
+ "raw_path": [
1212
+ "properties",
1213
+ "hs_lastmodifieddate",
1214
+ "value"
1215
+ ],
1216
+ "functions": [],
1217
+ "type": "string",
1218
+ "required": false,
1219
+ "description": "Last modification timestamp",
1220
+ "indexed": false
1221
+ }
1222
+ }
1223
+ },
1224
+ "exposed": {
1225
+ "attributes": [
1226
+ "id",
1227
+ "firstName",
1228
+ "lastName",
1229
+ "email",
1230
+ "phone",
1231
+ "company",
1232
+ "jobTitle",
1233
+ "address",
1234
+ "city",
1235
+ "country",
1236
+ "createdAt",
1237
+ "updatedAt"
1238
+ ],
1239
+ "description": "Exposed fields for HubSpot contacts"
1240
+ },
1241
+ "openapi": {
1242
+ "enabled": true,
1243
+ "documentKey": "hubspot-v3",
1244
+ "baseUrl": "https://api.hubapi.com",
1245
+ "operations": {
1246
+ "list": {
1247
+ "operationId": "getContacts",
1248
+ "method": "GET",
1249
+ "path": "/crm/v3/objects/contacts"
1250
+ },
1251
+ "get": {
1252
+ "operationId": "getContact",
1253
+ "method": "GET",
1254
+ "path": "/crm/v3/objects/contacts/{contactId}"
1255
+ },
1256
+ "create": {
1257
+ "operationId": "createContact",
1258
+ "method": "POST",
1259
+ "path": "/crm/v3/objects/contacts"
1260
+ },
1261
+ "update": {
1262
+ "operationId": "updateContact",
1263
+ "method": "PATCH",
1264
+ "path": "/crm/v3/objects/contacts/{contactId}"
1265
+ },
1266
+ "delete": {
1267
+ "operationId": "deleteContact",
1268
+ "method": "DELETE",
1269
+ "path": "/crm/v3/objects/contacts/{contactId}"
1270
+ }
1271
+ },
1272
+ "autoRbac": true
1273
+ }
1274
+ },
1275
+ {
1276
+ "key": "hubspot-deal",
1277
+ "displayName": "HubSpot Deal",
1278
+ "description": "HubSpot deals datasource with field mappings for CRM deal data",
1279
+ "systemKey": "hubspot",
1280
+ "entityType": "record-storage",
1281
+ "resourceType": "deal",
1282
+ "enabled": true,
1283
+ "version": "1.0.0",
1284
+ "metadataSchema": {
1285
+ "type": "object",
1286
+ "properties": {
1287
+ "id": {
1288
+ "type": "string"
1289
+ },
1290
+ "properties": {
1291
+ "type": "object",
1292
+ "properties": {
1293
+ "dealname": {
1294
+ "type": "object",
1295
+ "properties": {
1296
+ "value": {
1297
+ "type": "string"
1298
+ }
1299
+ }
596
1300
  },
597
1301
  "amount": {
598
1302
  "type": "object",
@@ -781,6 +1485,328 @@
781
1485
  "description": "Last modification timestamp",
782
1486
  "indexed": false
783
1487
  }
1488
+ },
1489
+ "compiledAttributes": {
1490
+ "id": {
1491
+ "raw_path": [
1492
+ "id"
1493
+ ],
1494
+ "functions": [],
1495
+ "type": "string",
1496
+ "required": false,
1497
+ "description": "Unique deal identifier",
1498
+ "indexed": true
1499
+ },
1500
+ "dealName": {
1501
+ "raw_path": [
1502
+ "properties",
1503
+ "dealname",
1504
+ "value"
1505
+ ],
1506
+ "functions": [
1507
+ {
1508
+ "name": "trim",
1509
+ "args": []
1510
+ }
1511
+ ],
1512
+ "type": "string",
1513
+ "required": false,
1514
+ "description": "Deal name",
1515
+ "indexed": false
1516
+ },
1517
+ "amount": {
1518
+ "raw_path": [
1519
+ "properties",
1520
+ "amount",
1521
+ "value"
1522
+ ],
1523
+ "functions": [],
1524
+ "type": "string",
1525
+ "required": false,
1526
+ "description": "Deal amount",
1527
+ "indexed": false
1528
+ },
1529
+ "currency": {
1530
+ "raw_path": [
1531
+ "properties",
1532
+ "deal_currency_code",
1533
+ "value"
1534
+ ],
1535
+ "functions": [
1536
+ {
1537
+ "name": "toUpper",
1538
+ "args": []
1539
+ },
1540
+ {
1541
+ "name": "trim",
1542
+ "args": []
1543
+ }
1544
+ ],
1545
+ "type": "string",
1546
+ "required": false,
1547
+ "description": "Currency code",
1548
+ "indexed": false
1549
+ },
1550
+ "stage": {
1551
+ "raw_path": [
1552
+ "properties",
1553
+ "dealstage",
1554
+ "value"
1555
+ ],
1556
+ "functions": [
1557
+ {
1558
+ "name": "trim",
1559
+ "args": []
1560
+ }
1561
+ ],
1562
+ "type": "string",
1563
+ "required": false,
1564
+ "description": "Deal stage for ABAC filtering",
1565
+ "indexed": false
1566
+ },
1567
+ "pipeline": {
1568
+ "raw_path": [
1569
+ "properties",
1570
+ "pipeline",
1571
+ "value"
1572
+ ],
1573
+ "functions": [
1574
+ {
1575
+ "name": "trim",
1576
+ "args": []
1577
+ }
1578
+ ],
1579
+ "type": "string",
1580
+ "required": false,
1581
+ "description": "Pipeline name for ABAC filtering",
1582
+ "indexed": false
1583
+ },
1584
+ "closeDate": {
1585
+ "raw_path": [
1586
+ "properties",
1587
+ "closedate",
1588
+ "value"
1589
+ ],
1590
+ "functions": [],
1591
+ "type": "string",
1592
+ "required": false,
1593
+ "description": "Expected close date",
1594
+ "indexed": false
1595
+ },
1596
+ "dealType": {
1597
+ "raw_path": [
1598
+ "properties",
1599
+ "dealtype",
1600
+ "value"
1601
+ ],
1602
+ "functions": [
1603
+ {
1604
+ "name": "trim",
1605
+ "args": []
1606
+ }
1607
+ ],
1608
+ "type": "string",
1609
+ "required": false,
1610
+ "description": "Deal type",
1611
+ "indexed": false
1612
+ },
1613
+ "associatedContacts": {
1614
+ "raw_path": [
1615
+ "associations",
1616
+ "contacts",
1617
+ "results"
1618
+ ],
1619
+ "functions": [],
1620
+ "type": "array",
1621
+ "required": false,
1622
+ "description": "Array of associated contact IDs",
1623
+ "indexed": false
1624
+ },
1625
+ "createdAt": {
1626
+ "raw_path": [
1627
+ "properties",
1628
+ "createdate",
1629
+ "value"
1630
+ ],
1631
+ "functions": [],
1632
+ "type": "string",
1633
+ "required": false,
1634
+ "description": "Creation timestamp",
1635
+ "indexed": false
1636
+ },
1637
+ "updatedAt": {
1638
+ "raw_path": [
1639
+ "properties",
1640
+ "hs_lastmodifieddate",
1641
+ "value"
1642
+ ],
1643
+ "functions": [],
1644
+ "type": "string",
1645
+ "required": false,
1646
+ "description": "Last modification timestamp",
1647
+ "indexed": false
1648
+ }
1649
+ },
1650
+ "compiledFields": {
1651
+ "id": {
1652
+ "raw_path": [
1653
+ "id"
1654
+ ],
1655
+ "functions": [],
1656
+ "type": "string",
1657
+ "required": false,
1658
+ "description": "Unique deal identifier",
1659
+ "indexed": true
1660
+ },
1661
+ "dealName": {
1662
+ "raw_path": [
1663
+ "properties",
1664
+ "dealname",
1665
+ "value"
1666
+ ],
1667
+ "functions": [
1668
+ {
1669
+ "name": "trim",
1670
+ "args": []
1671
+ }
1672
+ ],
1673
+ "type": "string",
1674
+ "required": false,
1675
+ "description": "Deal name",
1676
+ "indexed": false
1677
+ },
1678
+ "amount": {
1679
+ "raw_path": [
1680
+ "properties",
1681
+ "amount",
1682
+ "value"
1683
+ ],
1684
+ "functions": [],
1685
+ "type": "string",
1686
+ "required": false,
1687
+ "description": "Deal amount",
1688
+ "indexed": false
1689
+ },
1690
+ "currency": {
1691
+ "raw_path": [
1692
+ "properties",
1693
+ "deal_currency_code",
1694
+ "value"
1695
+ ],
1696
+ "functions": [
1697
+ {
1698
+ "name": "toUpper",
1699
+ "args": []
1700
+ },
1701
+ {
1702
+ "name": "trim",
1703
+ "args": []
1704
+ }
1705
+ ],
1706
+ "type": "string",
1707
+ "required": false,
1708
+ "description": "Currency code",
1709
+ "indexed": false
1710
+ },
1711
+ "stage": {
1712
+ "raw_path": [
1713
+ "properties",
1714
+ "dealstage",
1715
+ "value"
1716
+ ],
1717
+ "functions": [
1718
+ {
1719
+ "name": "trim",
1720
+ "args": []
1721
+ }
1722
+ ],
1723
+ "type": "string",
1724
+ "required": false,
1725
+ "description": "Deal stage for ABAC filtering",
1726
+ "indexed": false
1727
+ },
1728
+ "pipeline": {
1729
+ "raw_path": [
1730
+ "properties",
1731
+ "pipeline",
1732
+ "value"
1733
+ ],
1734
+ "functions": [
1735
+ {
1736
+ "name": "trim",
1737
+ "args": []
1738
+ }
1739
+ ],
1740
+ "type": "string",
1741
+ "required": false,
1742
+ "description": "Pipeline name for ABAC filtering",
1743
+ "indexed": false
1744
+ },
1745
+ "closeDate": {
1746
+ "raw_path": [
1747
+ "properties",
1748
+ "closedate",
1749
+ "value"
1750
+ ],
1751
+ "functions": [],
1752
+ "type": "string",
1753
+ "required": false,
1754
+ "description": "Expected close date",
1755
+ "indexed": false
1756
+ },
1757
+ "dealType": {
1758
+ "raw_path": [
1759
+ "properties",
1760
+ "dealtype",
1761
+ "value"
1762
+ ],
1763
+ "functions": [
1764
+ {
1765
+ "name": "trim",
1766
+ "args": []
1767
+ }
1768
+ ],
1769
+ "type": "string",
1770
+ "required": false,
1771
+ "description": "Deal type",
1772
+ "indexed": false
1773
+ },
1774
+ "associatedContacts": {
1775
+ "raw_path": [
1776
+ "associations",
1777
+ "contacts",
1778
+ "results"
1779
+ ],
1780
+ "functions": [],
1781
+ "type": "array",
1782
+ "required": false,
1783
+ "description": "Array of associated contact IDs",
1784
+ "indexed": false
1785
+ },
1786
+ "createdAt": {
1787
+ "raw_path": [
1788
+ "properties",
1789
+ "createdate",
1790
+ "value"
1791
+ ],
1792
+ "functions": [],
1793
+ "type": "string",
1794
+ "required": false,
1795
+ "description": "Creation timestamp",
1796
+ "indexed": false
1797
+ },
1798
+ "updatedAt": {
1799
+ "raw_path": [
1800
+ "properties",
1801
+ "hs_lastmodifieddate",
1802
+ "value"
1803
+ ],
1804
+ "functions": [],
1805
+ "type": "string",
1806
+ "required": false,
1807
+ "description": "Last modification timestamp",
1808
+ "indexed": false
1809
+ }
784
1810
  }
785
1811
  },
786
1812
  "exposed": {
@@ -833,6 +1859,122 @@
833
1859
  },
834
1860
  "autoRbac": true
835
1861
  }
1862
+ },
1863
+ {
1864
+ "key": "hubspot-users-datasource",
1865
+ "displayName": "HubSpot Users",
1866
+ "resourceType": "person",
1867
+ "systemKey": "hubspot",
1868
+ "enabled": true,
1869
+ "entityType": "recordStorage",
1870
+ "description": "Comprehensive HubSpot users datasource with full CRUD operations, comprehensive metadata schema, ABAC dimensions, and OpenAPI support",
1871
+ "metadataSchema": {
1872
+ "type": "object",
1873
+ "properties": {
1874
+ "id": {
1875
+ "type": "string",
1876
+ "description": "HubSpot user ID"
1877
+ },
1878
+ "properties": {
1879
+ "type": "object",
1880
+ "description": "User properties object containing all CRM fields",
1881
+ "additionalProperties": true,
1882
+ "properties": {
1883
+ "email": {
1884
+ "type": "string",
1885
+ "format": "email",
1886
+ "description": "User email address"
1887
+ },
1888
+ "firstName": {
1889
+ "type": "string",
1890
+ "description": "User first name"
1891
+ },
1892
+ "lastName": {
1893
+ "type": "string",
1894
+ "description": "User last name"
1895
+ },
1896
+ "role": {
1897
+ "type": "string",
1898
+ "description": "User role"
1899
+ },
1900
+ "timezone": {
1901
+ "type": "string",
1902
+ "description": "User timezone"
1903
+ }
1904
+ }
1905
+ },
1906
+ "createdAt": {
1907
+ "type": "string",
1908
+ "format": "date-time",
1909
+ "description": "User creation timestamp"
1910
+ },
1911
+ "updatedAt": {
1912
+ "type": "string",
1913
+ "format": "date-time",
1914
+ "description": "User last update timestamp"
1915
+ },
1916
+ "archived": {
1917
+ "type": "boolean",
1918
+ "description": "Whether the user is archived"
1919
+ },
1920
+ "archivedAt": {
1921
+ "type": "string",
1922
+ "format": "date-time",
1923
+ "description": "User archive timestamp"
1924
+ },
1925
+ "associations": {
1926
+ "type": "object",
1927
+ "description": "Associated records",
1928
+ "additionalProperties": true
1929
+ },
1930
+ "url": {
1931
+ "type": "string",
1932
+ "format": "uri",
1933
+ "description": "HubSpot object URL"
1934
+ },
1935
+ "objectWriteTraceId": {
1936
+ "type": "string",
1937
+ "description": "Trace ID for tracking writes"
1938
+ },
1939
+ "propertiesWithHistory": {
1940
+ "type": "object",
1941
+ "description": "Properties with change history",
1942
+ "additionalProperties": true
1943
+ }
1944
+ },
1945
+ "required": [
1946
+ "id"
1947
+ ]
1948
+ },
1949
+ "fieldMappings": {
1950
+ "attributes": {
1951
+ "id": {
1952
+ "expression": "{{id}}",
1953
+ "type": "string",
1954
+ "indexed": true
1955
+ },
1956
+ "department": {
1957
+ "expression": "{{id}}",
1958
+ "type": "string",
1959
+ "indexed": true,
1960
+ "description": "Default dimension for catalog compatibility"
1961
+ }
1962
+ },
1963
+ "dimensions": {
1964
+ "department": "metadata.department"
1965
+ }
1966
+ },
1967
+ "sync": {
1968
+ "mode": "pull",
1969
+ "schedule": "0 */6 * * *",
1970
+ "batchSize": 100,
1971
+ "maxParallelRequests": 5,
1972
+ "pagination": {
1973
+ "strategy": "cursor",
1974
+ "cursorField": "$.paging.next.after",
1975
+ "cursorParam": "after"
1976
+ }
1977
+ }
836
1978
  }
837
1979
  ],
838
1980
  "requiresDatabase": false,