@xemahq/biomes-platform-hubspot 0.2.4 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/biomes-platform-hubspot",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/xema-dev/xema-connectors.git",
@@ -14,7 +14,9 @@
14
14
  },
15
15
  "main": "dist/connector-adapters/index.js",
16
16
  "files": [
17
- "dist",
17
+ "dist/connector-adapters/index.js",
18
+ "dist/**/*.d.ts",
19
+ "dist/THIRD-PARTY-NOTICES.txt",
18
20
  "install-schema",
19
21
  "xema-biome.json",
20
22
  "contributions"
@@ -26,17 +28,23 @@
26
28
  },
27
29
  "./package.json": "./package.json"
28
30
  },
29
- "dependencies": {
30
- "@xemahq/biome-sdk": "^18.3.0",
31
- "@xemahq/contracts": "^0.51.0"
32
- },
33
31
  "devDependencies": {
34
32
  "@types/node": "25.2.3",
33
+ "@xemahq/biome-sdk": "^20.0.0",
34
+ "@xemahq/contracts": "^0.77.0",
35
35
  "typescript": "5.9.3"
36
36
  },
37
+ "xemaBundled": {
38
+ "@xemahq/biome-sdk": "20.0.0",
39
+ "@xemahq/contracts": "0.77.0",
40
+ "zod": "4.6.5"
41
+ },
37
42
  "scripts": {
38
- "build": "tsc -p tsconfig.json",
43
+ "build": "tsc -p tsconfig.json && node ../../tooling/bundle/bundle-adapter.mjs",
39
44
  "typecheck": "tsc --noEmit",
40
45
  "test": "node --test ./tests/**/*.test.mjs"
46
+ },
47
+ "xemaRelease": {
48
+ "sourceDigest": "sha256:29dc6c44b301d63097bdb9efc2312bce9b5b32f3c9171b773a467f1370b56da9"
41
49
  }
42
- }
50
+ }
package/xema-biome.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/biomes-platform-hubspot",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "xema": {
5
5
  "id": "connector-hubspot",
6
6
  "displayName": "HubSpot CRM Connector (read-only)",
@@ -17,7 +17,7 @@
17
17
  "bundleSource": {
18
18
  "kind": "npm",
19
19
  "name": "@xemahq/biomes-platform-hubspot",
20
- "version": "0.2.4"
20
+ "version": "0.3.0"
21
21
  },
22
22
  "trustTier": "first-party",
23
23
  "connectorRequirements": [
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector-adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAOL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAExB,MAAM,6BAA6B,CAAC;AA8DrC,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAqDnD,eAAO,MAAM,kBAAkB,EAAE,kBAgBhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,SAAS,mBAAmB,EAgB9D,CAAC;AASF,eAAO,MAAM,eAAe,EAAE,sBAQ5B,CAAC;AAEH,QAAA,MAAM,iBAAiB,EAAE,SAAS,sBAAsB,EAAsB,CAAC;AAC/E,eAAe,iBAAiB,CAAC;AAEjC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,8BAA8B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connector-adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,GAEvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EAC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WAAW,EACT,0EAA0E;YAC1E,mEAAmE;YACnE,mCAAmC;QACrC,QAAQ,EAAE,SAAS;QACnB,WAAW,EAAE,oBAAoB;QAEjC,MAAM,EAAE,sBAAsB;QAC9B,wBAAwB,EAAE,cAAc,CAAC,MAAM;QAC/C,WAAW,EAAE,gBAAgB;QAC7B,UAAU,EAAE,iBAAiB;KAC9B;CACF,CAAC;AASF,MAAM,CAAC,MAAM,eAAe,GAA2B,sBAAsB,CAAC;IAC5E,WAAW,EAAE,gBAAgB;IAC7B,QAAQ,EAAE,oBAAoB;IAC9B,WAAW,EAAE,SAAS;IACtB,cAAc,EAAE,cAAc,CAAC,MAAM;IACrC,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAsC,CAAC,eAAe,CAAC,CAAC;AAC/E,eAAe,iBAAiB,CAAC;AAEjC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAE5B,MAAM,8BAA8B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation-input-schemas.d.ts","sourceRoot":"","sources":["../../src/connector-adapters/operation-input-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAsClE,KAAK,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AASxD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,yCAAyC,CAAC;IAC5D,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,oBAAoB,EAAE,KAAK,CAAC;IAErC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;CACtE;AA8FD,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAChD,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAiDzC,CAAC;AAQH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAC1C,MAAM,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAQ5C,CAAC"}
@@ -1,118 +0,0 @@
1
- import { HUBSPOT_CAPABILITY_REFS, HubSpotVerb } from './operations.js';
2
- const DRAFT_07 = 'http://json-schema.org/draft-07/schema#';
3
- function searchSchema(input) {
4
- return {
5
- $schema: DRAFT_07,
6
- type: 'object',
7
- title: input.title,
8
- description: `Search HubSpot ${input.objectPlural}. Supply a free-text \`query\`, or ` +
9
- '`filterGroups` for a structured search (groups are OR-ed, filters within ' +
10
- 'a group are AND-ed). The response carries `paging.next.after`; pass it ' +
11
- 'back as `after` to page.',
12
- properties: {
13
- query: {
14
- type: 'string',
15
- minLength: 1,
16
- description: `Free-text search across the ${input.objectPlural}' searchable properties.`,
17
- },
18
- filterGroups: {
19
- type: 'array',
20
- maxItems: 5,
21
- description: 'Structured search. Each group is `{ "filters": [{ "propertyName", ' +
22
- '"operator", "value" | "values" | "highValue" }] }`. At most 5 groups, ' +
23
- 'each with at most 6 filters (HubSpot limit).',
24
- items: {
25
- type: 'object',
26
- properties: {
27
- filters: { type: 'array', maxItems: 6, items: { type: 'object' } },
28
- },
29
- required: ['filters'],
30
- },
31
- },
32
- sorts: {
33
- type: 'array',
34
- description: 'At most one sort, as `{ "propertyName", "direction": "ASCENDING" | ' +
35
- '"DESCENDING" }` (HubSpot accepts a single sort).',
36
- maxItems: 1,
37
- items: {
38
- type: 'object',
39
- properties: {
40
- propertyName: { type: 'string' },
41
- direction: { type: 'string', enum: ['ASCENDING', 'DESCENDING'] },
42
- },
43
- required: ['propertyName', 'direction'],
44
- },
45
- },
46
- properties: {
47
- type: 'array',
48
- items: { type: 'string' },
49
- description: 'Property names to return on each result. Omit for HubSpot\'s default ' +
50
- `projection. Examples: ${input.examplePropertyNames.join(', ')}.`,
51
- },
52
- limit: {
53
- type: 'integer',
54
- minimum: 1,
55
- maximum: 200,
56
- default: 10,
57
- description: 'Page size. HubSpot caps search at 200.',
58
- },
59
- after: {
60
- type: 'string',
61
- description: 'Paging cursor from a previous response (`paging.next.after`). Omit ' +
62
- 'for the first page.',
63
- },
64
- },
65
- required: [],
66
- additionalProperties: false,
67
- anyOf: [{ required: ['query'] }, { required: ['filterGroups'] }],
68
- };
69
- }
70
- export const operationInputSchemasByVerb = Object.freeze({
71
- [HubSpotVerb.SearchContacts]: searchSchema({
72
- title: 'Search HubSpot contacts',
73
- objectPlural: 'contacts',
74
- examplePropertyNames: ['email', 'firstname', 'lastname', 'company', 'lifecyclestage'],
75
- }),
76
- [HubSpotVerb.GetContact]: {
77
- $schema: DRAFT_07,
78
- type: 'object',
79
- title: 'Get one HubSpot contact',
80
- description: 'Read a single contact by its HubSpot record id, returning the named ' +
81
- 'properties.',
82
- properties: {
83
- contactId: {
84
- type: 'string',
85
- minLength: 1,
86
- pattern: '^[0-9]+$',
87
- description: 'HubSpot contact record id (the numeric `id` on a search hit).',
88
- },
89
- properties: {
90
- type: 'string',
91
- minLength: 1,
92
- pattern: '^[a-zA-Z0-9_]+(,[a-zA-Z0-9_]+)*$',
93
- description: 'COMMA-SEPARATED property names, e.g. `email,firstname,lastname`. A ' +
94
- 'string and not an array: this value fills a query-string placeholder, ' +
95
- 'and the executor substitutes scalars only — it has no array-to-CSV ' +
96
- 'serialisation. Required, because a declared placeholder with no input ' +
97
- 'value is a fail-fast error, so there is no way to express "omit it".',
98
- },
99
- },
100
- required: ['contactId', 'properties'],
101
- additionalProperties: false,
102
- },
103
- [HubSpotVerb.SearchCompanies]: searchSchema({
104
- title: 'Search HubSpot companies',
105
- objectPlural: 'companies',
106
- examplePropertyNames: ['name', 'domain', 'industry', 'country', 'numberofemployees'],
107
- }),
108
- [HubSpotVerb.SearchDeals]: searchSchema({
109
- title: 'Search HubSpot deals',
110
- objectPlural: 'deals',
111
- examplePropertyNames: ['dealname', 'amount', 'dealstage', 'pipeline', 'closedate'],
112
- }),
113
- });
114
- export const operationInputSchemas = Object.freeze(Object.fromEntries(Object.values(HubSpotVerb).map((verb) => [
115
- HUBSPOT_CAPABILITY_REFS[verb],
116
- operationInputSchemasByVerb[verb],
117
- ])));
118
- //# sourceMappingURL=operation-input-schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation-input-schemas.js","sourceRoot":"","sources":["../../src/connector-adapters/operation-input-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA6DvE,MAAM,QAAQ,GAAG,yCAAkD,CAAC;AAOpE,SAAS,YAAY,CAAC,KAIrB;IACC,OAAO;QACL,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,WAAW,EACT,kBAAkB,KAAK,CAAC,YAAY,qCAAqC;YACzE,2EAA2E;YAC3E,yEAAyE;YACzE,0BAA0B;QAC5B,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,+BAA+B,KAAK,CAAC,YAAY,0BAA0B;aACzF;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,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AK,EAAE,sBAAsB;QAC7B,YAAY,EAAE,OAAO;QACrB,oBAAoB,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,CAAC;KACnF,CAAC;CACH,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,qBAAqB,GAE9B,MAAM,CAAC,MAAM,CACf,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;IACvC,uBAAuB,CAAC,IAAI,CAAC;IAC7B,2BAA2B,CAAC,IAAI,CAAC;CAClC,CAAC,CACH,CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/connector-adapters/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,4BAA4B,EAElC,MAAM,6BAA6B,CAAC;AA8ErC,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAQ9C,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAGtC,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAO7D,oBAAY,YAAY;IACtB,YAAY,8BAA8B;IAC1C,aAAa,+BAA+B;IAC5C,SAAS,2BAA2B;CACrC;AAOD,oBAAY,WAAW;IACrB,cAAc,oBAAoB;IAClC,UAAU,gBAAgB;IAC1B,eAAe,qBAAqB;IACpC,WAAW,iBAAiB;CAC7B;AAGD,eAAO,MAAM,uBAAuB;;;;;EAiBlC,CAAC;AAuDH,eAAO,MAAM,iBAAiB,EAAE,SAAS,4BAA4B,EAuCjE,CAAC;AAQL,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAElD,CAAC"}
@@ -1,77 +0,0 @@
1
- import { ConnectorAdapterKind, ConnectorAuthInjectionKind, ConnectorHttpBodyMode, HttpMethod, } from '@xemahq/contracts/connector';
2
- import { buildConnectorCapabilityRef } from '@xemahq/contracts/capability';
3
- export const HUBSPOT_PROVIDER_KEY = 'hubspot';
4
- export const CRM_ADAPTER_KIND = 'crm';
5
- export const HUBSPOT_API_BASE_URL = 'https://api.hubapi.com';
6
- export var HubSpotScope;
7
- (function (HubSpotScope) {
8
- HubSpotScope["ContactsRead"] = "crm.objects.contacts.read";
9
- HubSpotScope["CompaniesRead"] = "crm.objects.companies.read";
10
- HubSpotScope["DealsRead"] = "crm.objects.deals.read";
11
- })(HubSpotScope || (HubSpotScope = {}));
12
- export var HubSpotVerb;
13
- (function (HubSpotVerb) {
14
- HubSpotVerb["SearchContacts"] = "search-contacts";
15
- HubSpotVerb["GetContact"] = "get-contact";
16
- HubSpotVerb["SearchCompanies"] = "search-companies";
17
- HubSpotVerb["SearchDeals"] = "search-deals";
18
- })(HubSpotVerb || (HubSpotVerb = {}));
19
- export const HUBSPOT_CAPABILITY_REFS = Object.freeze({
20
- [HubSpotVerb.SearchContacts]: buildConnectorCapabilityRef(HUBSPOT_PROVIDER_KEY, HubSpotVerb.SearchContacts),
21
- [HubSpotVerb.GetContact]: buildConnectorCapabilityRef(HUBSPOT_PROVIDER_KEY, HubSpotVerb.GetContact),
22
- [HubSpotVerb.SearchCompanies]: buildConnectorCapabilityRef(HUBSPOT_PROVIDER_KEY, HubSpotVerb.SearchCompanies),
23
- [HubSpotVerb.SearchDeals]: buildConnectorCapabilityRef(HUBSPOT_PROVIDER_KEY, HubSpotVerb.SearchDeals),
24
- });
25
- const BEARER_AUTH = Object.freeze({
26
- kind: ConnectorAuthInjectionKind.BearerHeader,
27
- });
28
- function declarativeOperation(input) {
29
- return {
30
- capabilityRef: HUBSPOT_CAPABILITY_REFS[input.verb],
31
- adapterKind: ConnectorAdapterKind.DeclarativeHttp,
32
- scopes: input.scopes,
33
- requiresConnection: true,
34
- httpRequest: {
35
- method: input.method,
36
- pathTemplate: input.pathTemplate,
37
- ...(input.query === undefined ? {} : { query: input.query }),
38
- bodyMode: input.bodyMode,
39
- auth: BEARER_AUTH,
40
- },
41
- };
42
- }
43
- export const hubspotOperations = Object.freeze([
44
- declarativeOperation({
45
- verb: HubSpotVerb.SearchContacts,
46
- scopes: [HubSpotScope.ContactsRead],
47
- method: HttpMethod.Post,
48
- pathTemplate: '/crm/v3/objects/contacts/search',
49
- bodyMode: ConnectorHttpBodyMode.JsonInput,
50
- }),
51
- declarativeOperation({
52
- verb: HubSpotVerb.GetContact,
53
- scopes: [HubSpotScope.ContactsRead],
54
- method: HttpMethod.Get,
55
- pathTemplate: '/crm/v3/objects/contacts/{contactId}',
56
- query: { properties: '{properties}' },
57
- bodyMode: ConnectorHttpBodyMode.None,
58
- }),
59
- declarativeOperation({
60
- verb: HubSpotVerb.SearchCompanies,
61
- scopes: [HubSpotScope.CompaniesRead],
62
- method: HttpMethod.Post,
63
- pathTemplate: '/crm/v3/objects/companies/search',
64
- bodyMode: ConnectorHttpBodyMode.JsonInput,
65
- }),
66
- declarativeOperation({
67
- verb: HubSpotVerb.SearchDeals,
68
- scopes: [HubSpotScope.DealsRead],
69
- method: HttpMethod.Post,
70
- pathTemplate: '/crm/v3/objects/deals/search',
71
- bodyMode: ConnectorHttpBodyMode.JsonInput,
72
- }),
73
- ]);
74
- export const hubspotConnectorScopes = Object.freeze([
75
- ...new Set(hubspotOperations.flatMap((operation) => operation.scopes)),
76
- ]);
77
- //# sourceMappingURL=operations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/connector-adapters/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EAIrB,UAAU,GACX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AA6E3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAQ9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAGtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAO7D,MAAM,CAA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