@volter/twin-hubspot 0.1.36 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +9 -193
  2. package/dist/generated/pack-facts.json +42 -0
  3. package/dist/journeys/coverage.json +60 -0
  4. package/dist/journeys/customer-life.json +7 -0
  5. package/dist/journeys/customer-life.outline.md +6 -0
  6. package/dist/journeys/decisions.json +623 -0
  7. package/dist/journeys/demand.json +171 -0
  8. package/dist/journeys/score.json +82 -0
  9. package/dist/journeys/unreachable.json +12 -0
  10. package/dist/journeys/vendor-examples.json +7 -0
  11. package/dist/spec/SOURCE.md +40 -0
  12. package/dist/spec/openapi/associations.json.gz +0 -0
  13. package/dist/spec/openapi/companies.json.gz +0 -0
  14. package/dist/spec/openapi/contacts.json.gz +0 -0
  15. package/dist/spec/openapi/deals.json.gz +0 -0
  16. package/dist/spec/openapi/meetings.json.gz +0 -0
  17. package/dist/spec/openapi/oauth.json.gz +0 -0
  18. package/dist/spec/openapi/owners.json.gz +0 -0
  19. package/dist/spec/openapi/pipelines.json.gz +0 -0
  20. package/dist/spec/openapi/properties.json.gz +0 -0
  21. package/dist/spec/openapi/tickets.json.gz +0 -0
  22. package/dist/spec/patches.json +235 -0
  23. package/dist/spec/sources.json +32 -0
  24. package/dist/src/cli.js +10 -22
  25. package/dist/src/fetch.d.ts +2 -0
  26. package/dist/src/fetch.js +13 -0
  27. package/dist/src/generated/surface.gen.json +1 -1
  28. package/dist/src/index.d.ts +5 -11
  29. package/dist/src/index.js +10 -94
  30. package/dist/src/manifest.js +32 -66
  31. package/dist/src/semantics/index.d.ts +2 -0
  32. package/dist/src/semantics/index.js +1 -0
  33. package/dist/src/semantics/states.d.ts +1 -0
  34. package/dist/src/semantics/states.js +2 -0
  35. package/dist/src/server.d.ts +7 -0
  36. package/dist/src/server.js +7 -0
  37. package/generated/pack-facts.json +42 -0
  38. package/journeys/coverage.json +60 -0
  39. package/journeys/customer-life.json +7 -0
  40. package/journeys/customer-life.outline.md +6 -0
  41. package/journeys/decisions.json +623 -0
  42. package/journeys/demand.json +171 -0
  43. package/journeys/score.json +82 -0
  44. package/journeys/unreachable.json +12 -0
  45. package/journeys/vendor-examples.json +7 -0
  46. package/package.json +10 -23
  47. package/spec/SOURCE.md +40 -0
  48. package/spec/openapi/associations.json.gz +0 -0
  49. package/spec/openapi/companies.json.gz +0 -0
  50. package/spec/openapi/contacts.json.gz +0 -0
  51. package/spec/openapi/deals.json.gz +0 -0
  52. package/spec/openapi/meetings.json.gz +0 -0
  53. package/spec/openapi/oauth.json.gz +0 -0
  54. package/spec/openapi/owners.json.gz +0 -0
  55. package/spec/openapi/pipelines.json.gz +0 -0
  56. package/spec/openapi/properties.json.gz +0 -0
  57. package/spec/openapi/tickets.json.gz +0 -0
  58. package/spec/patches.json +235 -0
  59. package/spec/sources.json +32 -0
  60. package/src/cli.ts +10 -19
  61. package/src/fetch.ts +14 -0
  62. package/src/generated/surface.gen.json +1 -1
  63. package/src/index.ts +12 -152
  64. package/src/manifest.ts +33 -92
  65. package/src/semantics/index.ts +6 -0
  66. package/src/semantics/states.ts +2 -0
  67. package/src/server.ts +8 -0
  68. package/client/hubspot-mirror.css +0 -43
  69. package/client/hubspot-mirror.tsx +0 -132
  70. package/dist/client/hubspot-mirror.bundle.js +0 -516
  71. package/dist/client/hubspot-mirror.css +0 -43
  72. package/dist/client/hubspot-mirror.d.ts +0 -15
  73. package/dist/client/hubspot-mirror.js +0 -59
  74. package/dist/client/hubspot-mirror.tsx +0 -132
  75. package/dist/src/accounts.d.ts +0 -30
  76. package/dist/src/accounts.js +0 -122
  77. package/dist/src/hubspot-areas.d.ts +0 -10
  78. package/dist/src/hubspot-areas.js +0 -114
  79. package/dist/src/hubspot-budget.d.ts +0 -58
  80. package/dist/src/hubspot-budget.js +0 -176
  81. package/dist/src/hubspot-capabilities.d.ts +0 -3
  82. package/dist/src/hubspot-capabilities.js +0 -1588
  83. package/dist/src/hubspot-conformance.d.ts +0 -16
  84. package/dist/src/hubspot-conformance.js +0 -523
  85. package/dist/src/hubspot-connector.d.ts +0 -125
  86. package/dist/src/hubspot-connector.js +0 -390
  87. package/dist/src/hubspot-deferred-capabilities.d.ts +0 -6
  88. package/dist/src/hubspot-deferred-capabilities.js +0 -64
  89. package/dist/src/hubspot-mirror-ui.d.ts +0 -62
  90. package/dist/src/hubspot-mirror-ui.js +0 -152
  91. package/dist/src/hubspot-oauth.d.ts +0 -8
  92. package/dist/src/hubspot-oauth.js +0 -291
  93. package/dist/src/hubspot-server.d.ts +0 -24
  94. package/dist/src/hubspot-server.js +0 -116
  95. package/dist/src/hubspot-twin.d.ts +0 -65
  96. package/dist/src/hubspot-twin.js +0 -1558
  97. package/dist/src/portal.d.ts +0 -20
  98. package/dist/src/portal.js +0 -30
  99. package/dist/src/screens/account.d.ts +0 -1
  100. package/dist/src/screens/account.js +0 -139
  101. package/dist/src/screens/crm.d.ts +0 -2
  102. package/dist/src/screens/crm.js +0 -153
  103. package/dist/src/screens/developer.d.ts +0 -4
  104. package/dist/src/screens/developer.js +0 -191
  105. package/dist/src/screens/forms.d.ts +0 -5
  106. package/dist/src/screens/forms.js +0 -126
  107. package/dist/src/screens/page.d.ts +0 -21
  108. package/dist/src/screens/page.js +0 -49
  109. package/dist/src/screens/session.d.ts +0 -1
  110. package/dist/src/screens/session.js +0 -32
  111. package/dist/src/semantics/crm.d.ts +0 -8
  112. package/dist/src/semantics/crm.js +0 -101
  113. package/dist/src/webhooks.d.ts +0 -12
  114. package/dist/src/webhooks.js +0 -79
  115. package/src/accounts.ts +0 -127
  116. package/src/hubspot-areas.ts +0 -155
  117. package/src/hubspot-budget.ts +0 -202
  118. package/src/hubspot-capabilities.ts +0 -1523
  119. package/src/hubspot-conformance.ts +0 -537
  120. package/src/hubspot-connector.ts +0 -419
  121. package/src/hubspot-deferred-capabilities.ts +0 -99
  122. package/src/hubspot-journey.uitest.ts +0 -104
  123. package/src/hubspot-mirror-ui.ts +0 -166
  124. package/src/hubspot-oauth.tsx +0 -296
  125. package/src/hubspot-server.ts +0 -115
  126. package/src/hubspot-twin.ts +0 -1534
  127. package/src/portal.ts +0 -40
  128. package/src/screens/account.tsx +0 -129
  129. package/src/screens/crm.tsx +0 -154
  130. package/src/screens/developer.tsx +0 -181
  131. package/src/screens/forms.tsx +0 -117
  132. package/src/screens/page.tsx +0 -55
  133. package/src/screens/session.tsx +0 -36
  134. package/src/semantics/crm.ts +0 -116
  135. package/src/webhooks.ts +0 -82
@@ -0,0 +1,171 @@
1
+ {
2
+ "measured": "Application calls and optional settings are recorded below at the cited commits.",
3
+ "applications": [
4
+ {
5
+ "name": "volter-ai/runhuman",
6
+ "backend": [],
7
+ "frontend": [],
8
+ "webhooks": [],
9
+ "ci": []
10
+ },
11
+ {
12
+ "name": "volter-ai/twin",
13
+ "backend": [],
14
+ "frontend": [],
15
+ "webhooks": [],
16
+ "ci": []
17
+ },
18
+ {
19
+ "name": "supercode",
20
+ "backend": [],
21
+ "frontend": [],
22
+ "webhooks": [],
23
+ "ci": []
24
+ },
25
+ {
26
+ "name": "ponder",
27
+ "backend": [],
28
+ "frontend": [],
29
+ "webhooks": [],
30
+ "ci": []
31
+ },
32
+ {
33
+ "name": "company-layer",
34
+ "backend": [],
35
+ "frontend": [],
36
+ "webhooks": [],
37
+ "ci": []
38
+ },
39
+ {
40
+ "name": "rallly",
41
+ "backend": [],
42
+ "frontend": [],
43
+ "webhooks": [],
44
+ "ci": []
45
+ },
46
+ {
47
+ "name": "AFFiNE",
48
+ "backend": [],
49
+ "frontend": [],
50
+ "webhooks": [],
51
+ "ci": []
52
+ },
53
+ {
54
+ "name": "editor",
55
+ "backend": [],
56
+ "frontend": [],
57
+ "webhooks": [],
58
+ "ci": []
59
+ },
60
+ {
61
+ "name": "browser-substrate",
62
+ "backend": [],
63
+ "frontend": [],
64
+ "webhooks": [],
65
+ "ci": []
66
+ },
67
+ {
68
+ "name": "tabnode",
69
+ "backend": [],
70
+ "frontend": [],
71
+ "webhooks": [],
72
+ "ci": []
73
+ },
74
+ {
75
+ "name": "twin-catalog",
76
+ "backend": [],
77
+ "frontend": [],
78
+ "webhooks": [],
79
+ "ci": []
80
+ },
81
+ {
82
+ "name": "twenty",
83
+ "backend": [],
84
+ "frontend": [],
85
+ "webhooks": [],
86
+ "ci": []
87
+ },
88
+ {
89
+ "name": "inbox-zero",
90
+ "backend": [],
91
+ "frontend": [],
92
+ "webhooks": [],
93
+ "ci": []
94
+ },
95
+ {
96
+ "name": "LibreChat",
97
+ "backend": [],
98
+ "frontend": [],
99
+ "webhooks": [],
100
+ "ci": []
101
+ }
102
+ ],
103
+ "optional": [
104
+ {
105
+ "application": "dubinc/dub",
106
+ "what": "CRM OAuth integration and installed account operations",
107
+ "setting": "Install (2): the workspace HubSpot integration creates an installedIntegration; no installation exists by default (apps/web/app/(ee)/api/hubspot/callback/route.ts:94; apps/web/lib/integrations/hubspot/update-hubspot-settings.ts:39-46).",
108
+ "evidence": "apps/web/lib/integrations/hubspot/oauth.ts:102,103"
109
+ },
110
+ {
111
+ "client": "HubSpot OAuth installation and CRM booking synchronization",
112
+ "backend": [
113
+ {
114
+ "call": "CRM OAuth code and refresh token exchange",
115
+ "operation": "post-/oauth/v1/token_create",
116
+ "evidence": "packages/app-store/hubspot/api/callback.ts:36; packages/app-store/hubspot/lib/CrmService.ts:383"
117
+ },
118
+ {
119
+ "call": "Contact search by email",
120
+ "operation": "post-/crm/v3/objects/contacts/search_doSearch",
121
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:524-525"
122
+ },
123
+ {
124
+ "call": "Create CRM meeting",
125
+ "operation": "post-/crm/v3/objects/meetings_create",
126
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:314"
127
+ },
128
+ {
129
+ "call": "Update/cancel CRM meeting",
130
+ "operation": "patch-/crm/v3/objects/meetings/{meetingId}_update",
131
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:350,360"
132
+ },
133
+ {
134
+ "call": "Archive meeting on organizer change",
135
+ "operation": "delete-/crm/v3/objects/meetings/{meetingId}_archive",
136
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:364"
137
+ },
138
+ {
139
+ "call": "Create contacts",
140
+ "operation": "post-/crm/v3/objects/contacts_create",
141
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:579"
142
+ },
143
+ {
144
+ "call": "Read meeting properties",
145
+ "operation": "get-/crm/v3/properties/{objectType}_getAll",
146
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:95"
147
+ },
148
+ {
149
+ "call": "Associate meeting and contacts",
150
+ "operation": "post-/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create_create",
151
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:325"
152
+ },
153
+ {
154
+ "call": "Read owners",
155
+ "operation": "get-/crm/v3/owners_/crm/v3/owners; get-/crm/v3/owners/{ownerId}_getById",
156
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:611,665"
157
+ },
158
+ {
159
+ "call": "Read and update contact owner",
160
+ "operation": "get-/crm/v3/objects/contacts/{contactId}_getById; patch-/crm/v3/objects/contacts/{contactId}_update",
161
+ "evidence": "packages/app-store/hubspot/lib/CrmService.ts:630,639"
162
+ }
163
+ ],
164
+ "commit": "54343aa685ae",
165
+ "evidence": "packages/app-store/utils.ts:51; packages/app-store/_components/AppCard.tsx:94,116; packages/app-store/hubspot/api/callback.ts:50",
166
+ "application": "calcom/cal.diy",
167
+ "what": "HubSpot OAuth installation and CRM booking synchronization",
168
+ "setting": "Install (2): install the non-global HubSpot App Store app. HUBSPOT_CLIENT_ID makes its catalog metadata available, not user-installed (packages/app-store/hubspot/_metadata.ts:6). getApps omits non-global apps without a user credential (packages/app-store/utils.ts:47-56); AppCard offers installation (packages/app-store/_components/AppCard.tsx:94,116), and HubSpot's OAuth callback creates that credential (packages/app-store/hubspot/api/callback.ts:50). Calendar onboarding does not add CRM apps (apps/web/modules/onboarding/personal/calendar/personal-calendar-view.tsx:28-34)."
169
+ }
170
+ ]
171
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "vendor": "hubspot",
3
+ "life": {
4
+ "steps": 0,
5
+ "verdict": "unjudged",
6
+ "judge": null,
7
+ "authors": []
8
+ },
9
+ "failures": [],
10
+ "flags": [],
11
+ "coverage": {
12
+ "vendor": "hubspot",
13
+ "missing": 0,
14
+ "stale": [],
15
+ "code": {
16
+ "lines": 49,
17
+ "run": 47,
18
+ "recorded": 2,
19
+ "missing": 0
20
+ },
21
+ "state": {
22
+ "declared": 0,
23
+ "reached": 0,
24
+ "recorded": 0,
25
+ "missing": [],
26
+ "undeclared": []
27
+ },
28
+ "files": [
29
+ {
30
+ "file": "semantics/index.ts",
31
+ "lines": {
32
+ "found": 2,
33
+ "hit": 2
34
+ },
35
+ "missing": []
36
+ },
37
+ {
38
+ "file": "manifest.ts",
39
+ "lines": {
40
+ "found": 26,
41
+ "hit": 26
42
+ },
43
+ "missing": []
44
+ },
45
+ {
46
+ "file": "index.ts",
47
+ "lines": {
48
+ "found": 7,
49
+ "hit": 7
50
+ },
51
+ "missing": []
52
+ },
53
+ {
54
+ "file": "server.ts",
55
+ "lines": {
56
+ "found": 4,
57
+ "hit": 2
58
+ },
59
+ "missing": []
60
+ },
61
+ {
62
+ "file": "fetch.ts",
63
+ "lines": {
64
+ "found": 10,
65
+ "hit": 10
66
+ },
67
+ "missing": []
68
+ }
69
+ ]
70
+ },
71
+ "examples": {
72
+ "done": false,
73
+ "replayed": true,
74
+ "verdict": "unjudged",
75
+ "failures": [],
76
+ "line": "examples: 0 published, 0 of patch-removed operations, 0 of operations the twin does not serve, 0 replayed, 0 recorded; 0 failing done: no"
77
+ },
78
+ "breadth": {
79
+ "operations": 103,
80
+ "gap": 103
81
+ }
82
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "code": [
3
+ {
4
+ "file": "server.ts",
5
+ "declarations": [
6
+ "createHubspotTwinServer"
7
+ ],
8
+ "world": "host-process",
9
+ "why": "The journey walks call fetch in their in-memory Worlds; the host-process serve factory runs during final HTTP conformance."
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "vendor": "hubspot",
3
+ "host": "api.hubapi.com",
4
+ "author": "Codex",
5
+ "about": "No demanded application calls HubSpot; integrations are opt-in. Published examples remain unserved.",
6
+ "steps": []
7
+ }
@@ -0,0 +1,40 @@
1
+ # hubspot spec — provenance
2
+
3
+ HubSpot publishes its API as one OpenAPI document per API and version, listed in its public spec catalog,
4
+ https://api.hubspot.com/public/api/spec/v1/specs (each entry names its `openApi` URL). The vendored documents all
5
+ name the one server `https://api.hubapi.com` and one OAuth scheme, so they are one API published as several documents
6
+ (docs/contributing/architecture.md, "Other wires"): each is vendored as published and read as their union
7
+ (`scripts/spec-documents.ts`).
8
+
9
+ - **Files:** `openapi/<name>.json.gz`, gzip (`gzip -9 -n`) of each document's bytes as the catalog URL answered them.
10
+ - **Fetched:** 2026-09-27, from the catalog's `openApi` URL for each entry and version below. The catalog lists newer
11
+ dated versions of each (`2026-03`, `2026-09`, some `2025-09`); the pack vendors the numbered stable versions the
12
+ twin's paths speak (`/crm/v3/...`, `/crm/v4/...`, `/oauth/v1/...`) and Dub calls.
13
+
14
+ | File | Catalog entry | Version | `openApi` URL | Operations | SHA-256 of the document |
15
+ |---|---|---|---|---|---|
16
+ | `contacts` | CRM / Contacts | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/22150/version/3 | 13 | `a2150f2b1030da4b0df497f1888fe5027b70f1304da30dbb025d5a20761c7cb0` |
17
+ | `companies` | CRM / Companies | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/22149/version/3 | 12 | `9dec0c5251136207dce6a65edce57ad8bd0fd7a8fb1c4571bda0fa98b79e588f` |
18
+ | `deals` | CRM / Deals | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/25196/version/3 | 12 | `19e252b252ea9cdf9d2537829e615617e55bcc2a370500b7ff866de1b9b05bf4` |
19
+ | `tickets` | CRM / Tickets | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/22189/version/3 | 12 | `7f0992e9458fe9e16d00d6b72bdced967cb5fa14c2b02ec74eab12a0fc3f65cf` |
20
+ | `owners` | CRM / Crm Owners | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/22153/version/3 | 2 | `d7b511d6e964d6ae1fb8e83b1f6fa3184d4b4bfbac4ed7a57e275f36ada76e5d` |
21
+ | `properties` | CRM / Properties | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/25174/version/3 | 13 | `1bc8ced2fac77840c7bf6f0e1ee17b259ad03c10b0557a5cdb5e9099a2bd0d80` |
22
+ | `pipelines` | CRM / Pipelines | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/22177/version/3 | 14 | `80ba0da3a7e191167b861c57bed0a5c37e6e171d0a48a0004afc2da93609a700` |
23
+ | `associations` | CRM / Associations | 4 | https://api.hubspot.com/public/api/spec/v2/specs/release/25199/version/4 | 10 | `44230be570fa6b32ae1cee5194de39bd9dd54209961fdd4c2934447d2f2af373` |
24
+ | `meetings` | CRM / Meetings | 3 | https://api.hubspot.com/public/api/spec/v2/specs/release/22170/version/3 | 11 | `141d4da7ccc63bbce34a3b649f73c6d0a0f407eed6068ea33462796d070a2268` |
25
+ | `oauth` | Auth / Oauth | 1 | https://api.hubspot.com/public/api/spec/v2/specs/release/22117/version/1 | 4 | `6ee55dc7a63b14a4947e5a9154c7da6585d96d5a6e654bfa336b9b0092ea2b23` |
26
+
27
+ - **Version:** OpenAPI 3.0.1 each, 103 operations in their union.
28
+ - **Operation ids:** HubSpot's own, from the documents.
29
+ - **Deals' paths:** the document names `/crm/v3/objects/0-3`; the other object documents use names. No operation is served.
30
+ - **Contradictions ruled** (`patches.json`, RFC 6902, applied to the documents before their union): the one scheme
31
+ `oauth2` lists different scopes in each document: each lists only the scopes its own operations name (the CRM object
32
+ documents no `crm.schemas.*`; Properties and Pipelines no `crm.objects.partner-clients.*` or `products.read`; Crm
33
+ Owners four; Oauth none), with the same authorization and token URLs. None refuses a scope another grants, so they
34
+ are partial lists of one scheme; the patches write their union (130 scopes) into every document. Evidence: the
35
+ spec's own words.
36
+ - **Not in the documents:** `/oauth/authorize` is a consent page, not an API operation. No screen is served. OAuth v3 is not vendored.
37
+ - **Read by:** twin-world's `scripts/derive-pack.ts`, writing `src/generated/`.
38
+ - **Read by contributor:** Codex.
39
+
40
+ No operation has a demanded caller. The optional integrations' evidence is in `journeys/demand.json`.
Binary file
Binary file
Binary file
@@ -0,0 +1,235 @@
1
+ {
2
+ "patches": [
3
+ {
4
+ "op": "replace",
5
+ "path": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
6
+ "value": {
7
+ "automation": "",
8
+ "cpq.quotes.read": "",
9
+ "cpq.quotes.write": "",
10
+ "crm.objects.appointments.read": "",
11
+ "crm.objects.appointments.sensitive.read.v2": "",
12
+ "crm.objects.appointments.sensitive.write.v2": "",
13
+ "crm.objects.appointments.write": "",
14
+ "crm.objects.calls.read": "",
15
+ "crm.objects.carts.read": "",
16
+ "crm.objects.carts.write": "",
17
+ "crm.objects.commercepayments.read": "",
18
+ "crm.objects.commercepayments.write": "",
19
+ "crm.objects.companies.highly_sensitive.read.v2": "",
20
+ "crm.objects.companies.highly_sensitive.write.v2": "",
21
+ "crm.objects.companies.read": "",
22
+ "crm.objects.companies.sensitive.read.v2": "",
23
+ "crm.objects.companies.sensitive.write.v2": "",
24
+ "crm.objects.companies.write": "",
25
+ "crm.objects.contacts.highly_sensitive.read.v2": "",
26
+ "crm.objects.contacts.highly_sensitive.write.v2": "",
27
+ "crm.objects.contacts.read": "",
28
+ "crm.objects.contacts.sensitive.read.v2": "",
29
+ "crm.objects.contacts.sensitive.write.v2": "",
30
+ "crm.objects.contacts.write": "",
31
+ "crm.objects.courses.read": "",
32
+ "crm.objects.courses.write": "",
33
+ "crm.objects.custom.highly_sensitive.read.v2": "",
34
+ "crm.objects.custom.highly_sensitive.write.v2": "",
35
+ "crm.objects.custom.read": "",
36
+ "crm.objects.custom.sensitive.read.v2": "",
37
+ "crm.objects.custom.sensitive.write.v2": "",
38
+ "crm.objects.custom.write": "",
39
+ "crm.objects.deals.highly_sensitive.read.v2": "",
40
+ "crm.objects.deals.highly_sensitive.write.v2": "",
41
+ "crm.objects.deals.read": "",
42
+ "crm.objects.deals.sensitive.read.v2": "",
43
+ "crm.objects.deals.sensitive.write.v2": "",
44
+ "crm.objects.deals.write": "",
45
+ "crm.objects.emails.read": "",
46
+ "crm.objects.feedback_submissions.read": "",
47
+ "crm.objects.goals.read": "",
48
+ "crm.objects.goals.write": "",
49
+ "crm.objects.invoices.read": "",
50
+ "crm.objects.invoices.write": "",
51
+ "crm.objects.leads.read": "",
52
+ "crm.objects.leads.write": "",
53
+ "crm.objects.line_items.read": "",
54
+ "crm.objects.line_items.write": "",
55
+ "crm.objects.listings.read": "",
56
+ "crm.objects.listings.write": "",
57
+ "crm.objects.marketing_events.read": "",
58
+ "crm.objects.marketing_events.write": "",
59
+ "crm.objects.meetings.read": "",
60
+ "crm.objects.notes.read": "",
61
+ "crm.objects.orders.read": "",
62
+ "crm.objects.orders.write": "",
63
+ "crm.objects.owners.read": "",
64
+ "crm.objects.partner-clients.read": "",
65
+ "crm.objects.partner-clients.write": "",
66
+ "crm.objects.partner-services.read": "",
67
+ "crm.objects.partner-services.write": "",
68
+ "crm.objects.products.read": "",
69
+ "crm.objects.products.write": "",
70
+ "crm.objects.projects.highly_sensitive.read": "",
71
+ "crm.objects.projects.highly_sensitive.write": "",
72
+ "crm.objects.projects.read": "",
73
+ "crm.objects.projects.sensitive.read": "",
74
+ "crm.objects.projects.sensitive.write": "",
75
+ "crm.objects.projects.write": "",
76
+ "crm.objects.quotes.read": "",
77
+ "crm.objects.quotes.write": "",
78
+ "crm.objects.services.read": "",
79
+ "crm.objects.services.write": "",
80
+ "crm.objects.subscriptions.read": "",
81
+ "crm.objects.subscriptions.write": "",
82
+ "crm.objects.tasks.read": "",
83
+ "crm.objects.tickets.highly_sensitive.read": "",
84
+ "crm.objects.tickets.highly_sensitive.write": "",
85
+ "crm.objects.tickets.sensitive.read": "",
86
+ "crm.objects.tickets.sensitive.write": "",
87
+ "crm.objects.users.read": "",
88
+ "crm.objects.users.write": "",
89
+ "crm.pipelines.approval.read": "",
90
+ "crm.pipelines.governance.write": "",
91
+ "crm.pipelines.orders.read": "",
92
+ "crm.pipelines.orders.write": "",
93
+ "crm.schemas.appointments.read": "",
94
+ "crm.schemas.appointments.write": "",
95
+ "crm.schemas.calls.read": "",
96
+ "crm.schemas.calls.write": "",
97
+ "crm.schemas.carts.read": "",
98
+ "crm.schemas.carts.write": "",
99
+ "crm.schemas.commercepayments.read": "",
100
+ "crm.schemas.commercepayments.write": "",
101
+ "crm.schemas.companies.read": "",
102
+ "crm.schemas.companies.write": "",
103
+ "crm.schemas.contacts.read": "",
104
+ "crm.schemas.contacts.write": "",
105
+ "crm.schemas.courses.read": "",
106
+ "crm.schemas.courses.write": "",
107
+ "crm.schemas.custom.read": "",
108
+ "crm.schemas.custom.write": "",
109
+ "crm.schemas.deals.read": "",
110
+ "crm.schemas.deals.write": "",
111
+ "crm.schemas.emails.read": "",
112
+ "crm.schemas.emails.write": "",
113
+ "crm.schemas.invoices.read": "",
114
+ "crm.schemas.invoices.write": "",
115
+ "crm.schemas.line_items.read": "",
116
+ "crm.schemas.listings.read": "",
117
+ "crm.schemas.listings.write": "",
118
+ "crm.schemas.meetings.read": "",
119
+ "crm.schemas.meetings.write": "",
120
+ "crm.schemas.notes.read": "",
121
+ "crm.schemas.notes.write": "",
122
+ "crm.schemas.orders.read": "",
123
+ "crm.schemas.orders.write": "",
124
+ "crm.schemas.projects.read": "",
125
+ "crm.schemas.quotes.read": "",
126
+ "crm.schemas.quotes.write": "",
127
+ "crm.schemas.services.read": "",
128
+ "crm.schemas.services.write": "",
129
+ "crm.schemas.subscriptions.read": "",
130
+ "crm.schemas.subscriptions.write": "",
131
+ "crm.schemas.tasks.read": "",
132
+ "crm.schemas.tasks.write": "",
133
+ "e-commerce": "",
134
+ "media_bridge.read": "",
135
+ "tickets.highly_sensitive.v2": "",
136
+ "tickets.sensitive.v2": ""
137
+ },
138
+ "why": "The nine documents describe one OAuth scheme (each names the same authorizationUrl, app.hubspot.com/oauth/authorize, and tokenUrl, api.hubapi.com/oauth/v1/token), and each lists only the scopes its own operations' security names: the CRM object documents omit the crm.schemas.* scopes, Properties and Pipelines omit crm.objects.partner-clients.*, crm.objects.partner-services.*, crm.objects.products.read and crm.objects.commercepayments.read, Crm Owners lists four, and Oauth none. No list refuses a scope another grants, so the lists are partial catalogues of one scheme, not a contradiction: the scheme's scopes are their union (130 scopes), written here on the first document and copied to the other eight below. Evidence: the spec's own words, the Crm Owners document naming crm.pipelines.governance.write, which only it lists.",
139
+ "source": {
140
+ "spec": "/documents/owners/components/securitySchemes/oauth2",
141
+ "quote": "crm.pipelines.governance.write"
142
+ }
143
+ },
144
+ {
145
+ "op": "copy",
146
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
147
+ "path": "/documents/companies/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
148
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the companies document's partial list of scopes becomes the union, so the documents agree.",
149
+ "source": {
150
+ "spec": "/documents/companies/components/securitySchemes/oauth2/flows/authorizationCode",
151
+ "quote": "https://api.hubapi.com/oauth/v1/token"
152
+ }
153
+ },
154
+ {
155
+ "op": "copy",
156
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
157
+ "path": "/documents/contacts/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
158
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the contacts document's partial list of scopes becomes the union, so the documents agree.",
159
+ "source": {
160
+ "spec": "/documents/contacts/components/securitySchemes/oauth2/flows/authorizationCode",
161
+ "quote": "https://api.hubapi.com/oauth/v1/token"
162
+ }
163
+ },
164
+ {
165
+ "op": "copy",
166
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
167
+ "path": "/documents/deals/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
168
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the deals document's partial list of scopes becomes the union, so the documents agree.",
169
+ "source": {
170
+ "spec": "/documents/deals/components/securitySchemes/oauth2/flows/authorizationCode",
171
+ "quote": "https://api.hubapi.com/oauth/v1/token"
172
+ }
173
+ },
174
+ {
175
+ "op": "copy",
176
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
177
+ "path": "/documents/oauth/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
178
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the oauth document's partial list of scopes becomes the union, so the documents agree.",
179
+ "source": {
180
+ "spec": "/documents/oauth/components/securitySchemes/oauth2/flows/authorizationCode",
181
+ "quote": "https://api.hubapi.com/oauth/v1/token"
182
+ }
183
+ },
184
+ {
185
+ "op": "copy",
186
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
187
+ "path": "/documents/owners/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
188
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the owners document's partial list of scopes becomes the union, so the documents agree.",
189
+ "source": {
190
+ "spec": "/documents/owners/components/securitySchemes/oauth2/flows/authorizationCode",
191
+ "quote": "https://api.hubapi.com/oauth/v1/token"
192
+ }
193
+ },
194
+ {
195
+ "op": "copy",
196
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
197
+ "path": "/documents/pipelines/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
198
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the pipelines document's partial list of scopes becomes the union, so the documents agree.",
199
+ "source": {
200
+ "spec": "/documents/pipelines/components/securitySchemes/oauth2/flows/authorizationCode",
201
+ "quote": "https://api.hubapi.com/oauth/v1/token"
202
+ }
203
+ },
204
+ {
205
+ "op": "copy",
206
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
207
+ "path": "/documents/properties/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
208
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the properties document's partial list of scopes becomes the union, so the documents agree.",
209
+ "source": {
210
+ "spec": "/documents/properties/components/securitySchemes/oauth2/flows/authorizationCode",
211
+ "quote": "https://api.hubapi.com/oauth/v1/token"
212
+ }
213
+ },
214
+ {
215
+ "op": "copy",
216
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
217
+ "path": "/documents/tickets/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
218
+ "why": "One OAuth scheme across the nine documents (the first patch's reason): the tickets document's partial list of scopes becomes the union, so the documents agree.",
219
+ "source": {
220
+ "spec": "/documents/tickets/components/securitySchemes/oauth2/flows/authorizationCode",
221
+ "quote": "https://api.hubapi.com/oauth/v1/token"
222
+ }
223
+ },
224
+ {
225
+ "op": "copy",
226
+ "from": "/documents/associations/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
227
+ "path": "/documents/meetings/components/securitySchemes/oauth2/flows/authorizationCode/scopes",
228
+ "why": "One OAuth scheme across the documents (the first patch's reason): the Meetings document, vendored after the others for cal.com's meetings, lists only its own operations' scopes (79, each in the union), so its partial list becomes the union and the documents agree.",
229
+ "source": {
230
+ "spec": "/documents/meetings/components/securitySchemes/oauth2/flows/authorizationCode",
231
+ "quote": "https://api.hubapi.com/oauth/v1/token"
232
+ }
233
+ }
234
+ ]
235
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "https://developers.hubspot.com/docs/api-reference/error-handling": {
3
+ "status": 200,
4
+ "checked": "2026-10-03",
5
+ "quotes": {
6
+ "return a JSON formatted response with details about the error": true,
7
+ "Returned when the authentication provided is invalid.": true
8
+ }
9
+ },
10
+ "https://developers.hubspot.com/docs/api-reference/webhooks-webhooks-v3/guide": {
11
+ "status": 200,
12
+ "checked": "2026-10-03",
13
+ "quotes": {
14
+ "404 Not Found : requested resource not found": true,
15
+ "Authorization : Bearer YOUR_ACCESS_TOKEN": true
16
+ }
17
+ },
18
+ "https://developers.hubspot.com/docs/developer-tooling/platform/usage-guidelines": {
19
+ "status": 200,
20
+ "checked": "2026-10-03",
21
+ "quotes": {
22
+ "110 requests every 10 seconds": true
23
+ }
24
+ },
25
+ "https://raw.githubusercontent.com/dubinc/dub/7e0101363b2ab30afc537c1893f159d1dcba513a/apps/web/lib/integrations/hubspot/oauth.ts": {
26
+ "status": 200,
27
+ "checked": "2026-10-03",
28
+ "quotes": {
29
+ "process.env.HUBSPOT_CLIENT_ID": true
30
+ }
31
+ }
32
+ }
package/dist/src/cli.js CHANGED
@@ -1,31 +1,19 @@
1
1
  #!/usr/bin/env node
2
- import { keepProcessAlive } from '@volter/world-core/lifecycle';
3
- // world-hubspot CLI: serve the HubSpot CRM API twin, the CRM mirror UI, or run conformance.
2
+ // world-hubspot: serve the hubspot twin.
4
3
  import { hasFlag, optionValue } from '@volter/world-core/args';
5
- import { createHubspotTwinServer } from "./hubspot-server.js";
6
- import { createHubspotMirrorServer } from "./hubspot-mirror-ui.js";
4
+ import { keepProcessAlive } from '@volter/world-core/lifecycle';
5
+ import { createHubspotTwinServer } from "./server.js";
7
6
  const [cmd, ...rest] = process.argv.slice(2);
8
7
  const port = Number(optionValue(rest, '--port', '0')) || undefined;
9
8
  const root = optionValue(rest, '--root') || undefined;
10
- const readOnly = hasFlag(rest, '--read-only'); // a twin accepts writes unless started read-only
11
- if (cmd === 'serve') {
12
- const s = await createHubspotTwinServer({ readOnly, ...(root ? { root } : {}), ...(port ? { port } : {}) });
13
- process.stdout.write(`hubspot twin (CRM v3/v4)${readOnly ? ' [read-only]' : ''} at ${s.url}\n`);
9
+ const readOnly = hasFlag(rest, '--read-only');
10
+ // the World's managed Postgres, which the runtime binds a pack declaring managedDatabase to
11
+ const database = optionValue(rest, '--database') || undefined;
12
+ if (cmd === 'serve' || cmd === undefined) {
13
+ const s = await createHubspotTwinServer({ readOnly, ...(root ? { root } : {}), ...(port ? { port } : {}), ...(database ? { database } : {}) });
14
+ process.stdout.write(`hubspot twin${readOnly ? ' [read-only]' : ''} at http://127.0.0.1:${s.port}\n`);
14
15
  await keepProcessAlive();
15
16
  }
16
- else if (cmd === 'mirror') {
17
- const s = await createHubspotMirrorServer({ ...(root ? { root } : {}), ...(port ? { port } : {}) });
18
- process.stdout.write(`hubspot mirror UI (CRM) at ${s.url}\n`);
19
- await keepProcessAlive();
20
- }
21
- else if (cmd === 'conformance') {
22
- // dev-only; lazy so the bin runs without @volter/world-tooling in the runtime graph
23
- const { checkHubspotConformance } = await import("./hubspot-conformance.js");
24
- const report = await checkHubspotConformance({ ...(root ? { root } : {}) });
25
- process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
26
- if (!report.ok)
27
- process.exitCode = 1;
28
- }
29
17
  else {
30
- process.stdout.write('Usage: world-hubspot serve|mirror|conformance [--port N] [--root DIR] [--read-only]\n');
18
+ process.stdout.write('Usage: world-hubspot serve [--port N] [--root DIR] [--read-only] [--database URL]\n');
31
19
  }