@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.
- package/README.md +9 -193
- package/dist/generated/pack-facts.json +42 -0
- package/dist/journeys/coverage.json +60 -0
- package/dist/journeys/customer-life.json +7 -0
- package/dist/journeys/customer-life.outline.md +6 -0
- package/dist/journeys/decisions.json +623 -0
- package/dist/journeys/demand.json +171 -0
- package/dist/journeys/score.json +82 -0
- package/dist/journeys/unreachable.json +12 -0
- package/dist/journeys/vendor-examples.json +7 -0
- package/dist/spec/SOURCE.md +40 -0
- package/dist/spec/openapi/associations.json.gz +0 -0
- package/dist/spec/openapi/companies.json.gz +0 -0
- package/dist/spec/openapi/contacts.json.gz +0 -0
- package/dist/spec/openapi/deals.json.gz +0 -0
- package/dist/spec/openapi/meetings.json.gz +0 -0
- package/dist/spec/openapi/oauth.json.gz +0 -0
- package/dist/spec/openapi/owners.json.gz +0 -0
- package/dist/spec/openapi/pipelines.json.gz +0 -0
- package/dist/spec/openapi/properties.json.gz +0 -0
- package/dist/spec/openapi/tickets.json.gz +0 -0
- package/dist/spec/patches.json +235 -0
- package/dist/spec/sources.json +32 -0
- package/dist/src/cli.js +10 -22
- package/dist/src/fetch.d.ts +2 -0
- package/dist/src/fetch.js +13 -0
- package/dist/src/generated/surface.gen.json +1 -1
- package/dist/src/index.d.ts +5 -11
- package/dist/src/index.js +10 -94
- package/dist/src/manifest.js +32 -66
- package/dist/src/semantics/index.d.ts +2 -0
- package/dist/src/semantics/index.js +1 -0
- package/dist/src/semantics/states.d.ts +1 -0
- package/dist/src/semantics/states.js +2 -0
- package/dist/src/server.d.ts +7 -0
- package/dist/src/server.js +7 -0
- package/generated/pack-facts.json +42 -0
- package/journeys/coverage.json +60 -0
- package/journeys/customer-life.json +7 -0
- package/journeys/customer-life.outline.md +6 -0
- package/journeys/decisions.json +623 -0
- package/journeys/demand.json +171 -0
- package/journeys/score.json +82 -0
- package/journeys/unreachable.json +12 -0
- package/journeys/vendor-examples.json +7 -0
- package/package.json +10 -23
- package/spec/SOURCE.md +40 -0
- package/spec/openapi/associations.json.gz +0 -0
- package/spec/openapi/companies.json.gz +0 -0
- package/spec/openapi/contacts.json.gz +0 -0
- package/spec/openapi/deals.json.gz +0 -0
- package/spec/openapi/meetings.json.gz +0 -0
- package/spec/openapi/oauth.json.gz +0 -0
- package/spec/openapi/owners.json.gz +0 -0
- package/spec/openapi/pipelines.json.gz +0 -0
- package/spec/openapi/properties.json.gz +0 -0
- package/spec/openapi/tickets.json.gz +0 -0
- package/spec/patches.json +235 -0
- package/spec/sources.json +32 -0
- package/src/cli.ts +10 -19
- package/src/fetch.ts +14 -0
- package/src/generated/surface.gen.json +1 -1
- package/src/index.ts +12 -152
- package/src/manifest.ts +33 -92
- package/src/semantics/index.ts +6 -0
- package/src/semantics/states.ts +2 -0
- package/src/server.ts +8 -0
- package/client/hubspot-mirror.css +0 -43
- package/client/hubspot-mirror.tsx +0 -132
- package/dist/client/hubspot-mirror.bundle.js +0 -516
- package/dist/client/hubspot-mirror.css +0 -43
- package/dist/client/hubspot-mirror.d.ts +0 -15
- package/dist/client/hubspot-mirror.js +0 -59
- package/dist/client/hubspot-mirror.tsx +0 -132
- package/dist/src/accounts.d.ts +0 -30
- package/dist/src/accounts.js +0 -122
- package/dist/src/hubspot-areas.d.ts +0 -10
- package/dist/src/hubspot-areas.js +0 -114
- package/dist/src/hubspot-budget.d.ts +0 -58
- package/dist/src/hubspot-budget.js +0 -176
- package/dist/src/hubspot-capabilities.d.ts +0 -3
- package/dist/src/hubspot-capabilities.js +0 -1588
- package/dist/src/hubspot-conformance.d.ts +0 -16
- package/dist/src/hubspot-conformance.js +0 -523
- package/dist/src/hubspot-connector.d.ts +0 -125
- package/dist/src/hubspot-connector.js +0 -390
- package/dist/src/hubspot-deferred-capabilities.d.ts +0 -6
- package/dist/src/hubspot-deferred-capabilities.js +0 -64
- package/dist/src/hubspot-mirror-ui.d.ts +0 -62
- package/dist/src/hubspot-mirror-ui.js +0 -152
- package/dist/src/hubspot-oauth.d.ts +0 -8
- package/dist/src/hubspot-oauth.js +0 -291
- package/dist/src/hubspot-server.d.ts +0 -24
- package/dist/src/hubspot-server.js +0 -116
- package/dist/src/hubspot-twin.d.ts +0 -65
- package/dist/src/hubspot-twin.js +0 -1558
- package/dist/src/portal.d.ts +0 -20
- package/dist/src/portal.js +0 -30
- package/dist/src/screens/account.d.ts +0 -1
- package/dist/src/screens/account.js +0 -139
- package/dist/src/screens/crm.d.ts +0 -2
- package/dist/src/screens/crm.js +0 -153
- package/dist/src/screens/developer.d.ts +0 -4
- package/dist/src/screens/developer.js +0 -191
- package/dist/src/screens/forms.d.ts +0 -5
- package/dist/src/screens/forms.js +0 -126
- package/dist/src/screens/page.d.ts +0 -21
- package/dist/src/screens/page.js +0 -49
- package/dist/src/screens/session.d.ts +0 -1
- package/dist/src/screens/session.js +0 -32
- package/dist/src/semantics/crm.d.ts +0 -8
- package/dist/src/semantics/crm.js +0 -101
- package/dist/src/webhooks.d.ts +0 -12
- package/dist/src/webhooks.js +0 -79
- package/src/accounts.ts +0 -127
- package/src/hubspot-areas.ts +0 -155
- package/src/hubspot-budget.ts +0 -202
- package/src/hubspot-capabilities.ts +0 -1523
- package/src/hubspot-conformance.ts +0 -537
- package/src/hubspot-connector.ts +0 -419
- package/src/hubspot-deferred-capabilities.ts +0 -99
- package/src/hubspot-journey.uitest.ts +0 -104
- package/src/hubspot-mirror-ui.ts +0 -166
- package/src/hubspot-oauth.tsx +0 -296
- package/src/hubspot-server.ts +0 -115
- package/src/hubspot-twin.ts +0 -1534
- package/src/portal.ts +0 -40
- package/src/screens/account.tsx +0 -129
- package/src/screens/crm.tsx +0 -154
- package/src/screens/developer.tsx +0 -181
- package/src/screens/forms.tsx +0 -117
- package/src/screens/page.tsx +0 -55
- package/src/screens/session.tsx +0 -36
- package/src/semantics/crm.ts +0 -116
- package/src/webhooks.ts +0 -82
|
@@ -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/src/cli.ts
CHANGED
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
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 {
|
|
6
|
-
import {
|
|
4
|
+
import { keepProcessAlive } from '@volter/world-core/lifecycle';
|
|
5
|
+
import { createHubspotTwinServer } from './server.ts';
|
|
7
6
|
|
|
8
7
|
const [cmd, ...rest] = process.argv.slice(2);
|
|
9
8
|
const port = Number(optionValue(rest, '--port', '0')) || undefined;
|
|
10
9
|
const root = optionValue(rest, '--root') || undefined;
|
|
11
|
-
const readOnly = hasFlag(rest, '--read-only');
|
|
10
|
+
const readOnly = hasFlag(rest, '--read-only');
|
|
11
|
+
// the World's managed Postgres, which the runtime binds a pack declaring managedDatabase to
|
|
12
|
+
const database = optionValue(rest, '--database') || undefined;
|
|
12
13
|
|
|
13
|
-
if (cmd === 'serve') {
|
|
14
|
-
const s = await createHubspotTwinServer({ readOnly, ...(root ? { root } : {}), ...(port ? { port } : {}) });
|
|
15
|
-
process.stdout.write(`hubspot twin
|
|
16
|
-
await keepProcessAlive();
|
|
17
|
-
} else if (cmd === 'mirror') {
|
|
18
|
-
const s = await createHubspotMirrorServer({ ...(root ? { root } : {}), ...(port ? { port } : {}) });
|
|
19
|
-
process.stdout.write(`hubspot mirror UI (CRM) at ${s.url}\n`);
|
|
14
|
+
if (cmd === 'serve' || cmd === undefined) {
|
|
15
|
+
const s = await createHubspotTwinServer({ readOnly, ...(root ? { root } : {}), ...(port ? { port } : {}), ...(database ? { database } : {}) });
|
|
16
|
+
process.stdout.write(`hubspot twin${readOnly ? ' [read-only]' : ''} at http://127.0.0.1:${s.port}\n`);
|
|
20
17
|
await keepProcessAlive();
|
|
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.ts');
|
|
24
|
-
const report = await checkHubspotConformance({ ...(root ? { root } : {}) });
|
|
25
|
-
process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
|
|
26
|
-
if (!report.ok) process.exitCode = 1;
|
|
27
18
|
} else {
|
|
28
|
-
process.stdout.write('Usage: world-hubspot serve
|
|
19
|
+
process.stdout.write('Usage: world-hubspot serve [--port N] [--root DIR] [--read-only] [--database URL]\n');
|
|
29
20
|
}
|
package/src/fetch.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED by scripts/create-pack.ts (--init, --index): a fixed file. The kernel serves the discovery door, the clock,
|
|
2
|
+
// the World's doors, the vendor's screens and the API from the pack's parts (architecture, "The pack contract").
|
|
3
|
+
import { createPackFetch, type DerivedFetch, type DerivedSurface, type PackFetchOptions } from '@volter/world-core';
|
|
4
|
+
import surface from './generated/surface.gen.json' with { type: 'json' };
|
|
5
|
+
import { manifest } from './manifest.ts';
|
|
6
|
+
import { hubspotSemantics } from './semantics/index.ts';
|
|
7
|
+
|
|
8
|
+
export function createHubspotFetch(options: PackFetchOptions = {}): DerivedFetch {
|
|
9
|
+
return createPackFetch({
|
|
10
|
+
manifest,
|
|
11
|
+
surface: surface as DerivedSurface,
|
|
12
|
+
handlers: hubspotSemantics,
|
|
13
|
+
}, options);
|
|
14
|
+
}
|