Skip to content

Commit ad954ab

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.556.2
1 parent 590a2a7 commit ad954ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+392
-393
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.DS_Store
2+
**/.speakeasy/temp/
3+
**/.speakeasy/logs/
4+
.DS_Store
15
/models
26
/models/errors
37
/types

.speakeasy/gen.lock

Lines changed: 36 additions & 38 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ generation:
77
maintainOpenAPIOrder: true
88
usageSnippets:
99
optionalPropertyRendering: withExample
10+
sdkInitStyle: constructor
1011
useClassNamesForArrayFields: true
1112
fixes:
1213
nameResolutionDec2023: true
1314
nameResolutionFeb2025: false
1415
parameterOrderingFeb2024: true
1516
requestResponseComponentNamesFeb2024: true
1617
securityFeb2025: true
18+
sharedErrorComponentsApr2025: false
1719
auth:
1820
oAuth2ClientCredentialsEnabled: true
1921
oAuth2PasswordEnabled: true
2022
typescript:
21-
version: 0.1.0
23+
version: 0.2.0
2224
additionalDependencies:
2325
dependencies: {}
2426
devDependencies: {}

.speakeasy/workflow.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.521.1
1+
speakeasyVersion: 1.556.2
22
sources:
33
CRM:
44
sourceNamespace: crm
@@ -9,20 +9,20 @@ sources:
99
- v3
1010
HubspotCRM:
1111
sourceNamespace: hubspot-crm
12-
sourceRevisionDigest: sha256:068f049648f508cd2c1f0b3f74fdec83a2920b10763541b84a05644ba5fac7f9
12+
sourceRevisionDigest: sha256:4b920509e176a73262dfd4a386791f13a0bdbd538caf6dee3f680981dbfb657b
1313
sourceBlobDigest: sha256:fd3bb26f0d19170b271fae7398ffb1b2dbe48799b6e7c4dee95ec5c58302f332
1414
tags:
1515
- latest
16-
- speakeasy-sdk-regen-1742493224
16+
- speakeasy-sdk-regen-1743711404
1717
- v3
1818
targets:
1919
hubspot:
2020
source: HubspotCRM
2121
sourceNamespace: hubspot-crm
22-
sourceRevisionDigest: sha256:068f049648f508cd2c1f0b3f74fdec83a2920b10763541b84a05644ba5fac7f9
22+
sourceRevisionDigest: sha256:4b920509e176a73262dfd4a386791f13a0bdbd538caf6dee3f680981dbfb657b
2323
sourceBlobDigest: sha256:fd3bb26f0d19170b271fae7398ffb1b2dbe48799b6e7c4dee95ec5c58302f332
2424
codeSamplesNamespace: hubspot-crm-typescript-code-samples
25-
codeSamplesRevisionDigest: sha256:d61859db7b587ca10a3a1abaff25b520db3c9e1e3f8cfde32e27cd069c6e5a2a
25+
codeSamplesRevisionDigest: sha256:9d63f8a7ebe06cb08da4c6542e29daea2a82959c4df9bb24a952e55d7fc476c3
2626
workflow:
2727
workflowVersion: 1.0.0
2828
speakeasyVersion: latest

FUNCTIONS.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ specific category of applications.
2121
```typescript
2222
import { HubspotCore } from "mcp-hubspot/core.js";
2323
import { basicGetProperties } from "mcp-hubspot/funcs/basicGetProperties.js";
24-
import { SDKValidationError } from "mcp-hubspot/models/errors/sdkvalidationerror.js";
2524

2625
// Use `HubspotCore` for best tree-shaking performance.
2726
// You can create one instance of it to use across an application.
@@ -31,30 +30,14 @@ const hubspot = new HubspotCore({
3130

3231
async function run() {
3332
const res = await basicGetProperties(hubspot, {
34-
objectType: "deals",
33+
objectType: "contacts",
3534
});
36-
37-
switch (true) {
38-
case res.ok:
39-
// The success case will be handled outside of the switch block
40-
break;
41-
case res.error instanceof SDKValidationError:
42-
// Pretty-print validation errors.
43-
return console.log(res.error.pretty());
44-
case res.error instanceof Error:
45-
return console.log(res.error);
46-
default:
47-
// TypeScript's type checking will fail on the following line if the above
48-
// cases were not exhaustive.
49-
res.error satisfies never;
50-
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
35+
if (res.ok) {
36+
const { value: result } = res;
37+
console.log(result);
38+
} else {
39+
console.log("basicGetProperties failed:", res.error);
5140
}
52-
53-
54-
const { value: result } = res;
55-
56-
// Handle the result
57-
console.log(result);
5841
}
5942

6043
run();

README.md

Lines changed: 34 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ const hubspot = new Hubspot({
181181

182182
async function run() {
183183
const result = await hubspot.basic.getProperties({
184-
objectType: "deals",
184+
objectType: "contacts",
185185
});
186186

187-
// Handle the result
188187
console.log(result);
189188
}
190189

@@ -214,10 +213,9 @@ const hubspot = new Hubspot({
214213

215214
async function run() {
216215
const result = await hubspot.basic.getProperties({
217-
objectType: "deals",
216+
objectType: "contacts",
218217
});
219218

220-
// Handle the result
221219
console.log(result);
222220
}
223221

@@ -300,7 +298,7 @@ const hubspot = new Hubspot({
300298

301299
async function run() {
302300
const result = await hubspot.basic.getProperties({
303-
objectType: "deals",
301+
objectType: "contacts",
304302
}, {
305303
retries: {
306304
strategy: "backoff",
@@ -314,7 +312,6 @@ async function run() {
314312
},
315313
});
316314

317-
// Handle the result
318315
console.log(result);
319316
}
320317

@@ -342,10 +339,9 @@ const hubspot = new Hubspot({
342339

343340
async function run() {
344341
const result = await hubspot.basic.getProperties({
345-
objectType: "deals",
342+
objectType: "contacts",
346343
});
347344

348-
// Handle the result
349345
console.log(result);
350346
}
351347

@@ -357,51 +353,40 @@ run();
357353
<!-- Start Error Handling [errors] -->
358354
## Error Handling
359355

360-
If the request fails due to, for example 4XX or 5XX status codes, it will throw a `APIError`.
356+
This table shows properties which are common on error classes. For full details see [error classes](#error-classes).
361357

362-
| Error Type | Status Code | Content Type |
363-
| --------------- | ----------- | ------------ |
364-
| errors.APIError | 4XX, 5XX | \*/\* |
358+
| Property | Type | Description |
359+
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
360+
| `error.name` | `string` | Error class name eg `APIError` |
361+
| `error.message` | `string` | Error message |
362+
| `error.statusCode` | `number` | HTTP status code eg `404` |
363+
| `error.contentType` | `string` | HTTP content type eg `application/json` |
364+
| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
365+
| `error.rawResponse` | `Response` | Raw HTTP response. Access to headers and more. |
366+
| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
365367

368+
### Example
366369
```typescript
367370
import { Hubspot } from "mcp-hubspot";
368-
import { SDKValidationError } from "mcp-hubspot/models/errors";
371+
import * as errors from "mcp-hubspot/models/errors";
369372

370373
const hubspot = new Hubspot({
371374
hubspotToken: process.env["HUBSPOT_HUBSPOT_TOKEN"] ?? "",
372375
});
373376

374377
async function run() {
375-
let result;
376378
try {
377-
result = await hubspot.basic.getProperties({
378-
objectType: "deals",
379+
const result = await hubspot.basic.getProperties({
380+
objectType: "contacts",
379381
});
380382

381-
// Handle the result
382383
console.log(result);
383-
} catch (err) {
384-
switch (true) {
385-
// The server response does not match the expected SDK schema
386-
case (err instanceof SDKValidationError):
387-
{
388-
// Pretty-print will provide a human-readable multi-line error message
389-
console.error(err.pretty());
390-
// Raw value may also be inspected
391-
console.error(err.rawValue);
392-
return;
393-
}
394-
apierror.js;
395-
// Server returned an error status code or an unknown content type
396-
case (err instanceof APIError): {
397-
console.error(err.statusCode);
398-
console.error(err.rawResponse.body);
399-
return;
400-
}
401-
default: {
402-
// Other errors such as network errors, see HTTPClientErrors for more details
403-
throw err;
404-
}
384+
} catch (error) {
385+
if (error instanceof errors.APIError) {
386+
console.log(error.message);
387+
console.log(error.statusCode);
388+
console.log(error.body);
389+
console.log(error.rawResponse.headers);
405390
}
406391
}
407392
}
@@ -410,17 +395,15 @@ run();
410395

411396
```
412397

413-
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
414-
415-
In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:
416-
417-
| HTTP Client Error | Description |
418-
| ---------------------------------------------------- | ---------------------------------------------------- |
419-
| RequestAbortedError | HTTP request was aborted by the client |
420-
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
421-
| ConnectionError | HTTP client was unable to make a request to a server |
422-
| InvalidRequestError | Any input used to create a request is invalid |
423-
| UnexpectedClientError | Unrecognised or unexpected error |
398+
### Error Classes
399+
* `APIError`: The fallback error class, if no other more specific error class is matched.
400+
* `SDKValidationError`: Type mismatch between the data returned from the server and the structure expected by the SDK. This can also be thrown for invalid method arguments. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
401+
* Network errors:
402+
* `ConnectionError`: HTTP client was unable to make a request to a server.
403+
* `RequestTimeoutError`: HTTP request timed out due to an AbortSignal signal.
404+
* `RequestAbortedError`: HTTP request was aborted by the client.
405+
* `InvalidRequestError`: Any input used to create a request is invalid.
406+
* `UnexpectedClientError`: Unrecognised or unexpected error.
424407
<!-- End Error Handling [errors] -->
425408

426409
<!-- Start Server Selection [server] -->
@@ -439,10 +422,9 @@ const hubspot = new Hubspot({
439422

440423
async function run() {
441424
const result = await hubspot.basic.getProperties({
442-
objectType: "deals",
425+
objectType: "contacts",
443426
});
444427

445-
// Handle the result
446428
console.log(result);
447429
}
448430

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,14 @@ Based on:
88
### Generated
99
- [typescript v0.1.0] .
1010
### Releases
11-
- [NPM v0.1.0] https://www.npmjs.com/package/mcp-hubspot/v/0.1.0 - .
11+
- [NPM v0.1.0] https://www.npmjs.com/package/mcp-hubspot/v/0.1.0 - .
12+
13+
## 2025-06-06 00:17:42
14+
### Changes
15+
Based on:
16+
- OpenAPI Doc
17+
- Speakeasy CLI 1.556.2 (2.621.3) https://github.com/speakeasy-api/speakeasy
18+
### Generated
19+
- [typescript v0.2.0] .
20+
### Releases
21+
- [NPM v0.2.0] https://www.npmjs.com/package/mcp-hubspot/v/0.2.0 - .

USAGE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ const hubspot = new Hubspot({
88

99
async function run() {
1010
const result = await hubspot.basic.getProperties({
11-
objectType: "deals",
11+
objectType: "contacts",
1212
});
1313

14-
// Handle the result
1514
console.log(result);
1615
}
1716

docs/models/components/associationcategory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```typescript
66
import { AssociationCategory } from "mcp-hubspot/models/components";
77

8-
let value: AssociationCategory = "USER_DEFINED";
8+
let value: AssociationCategory = "HUBSPOT_DEFINED";
99
```
1010

1111
## Values

docs/models/components/associationspec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { AssociationSpec } from "mcp-hubspot/models/components";
77

88
let value: AssociationSpec = {
99
associationCategory: "USER_DEFINED",
10-
associationTypeId: 652103,
10+
associationTypeId: 754129,
1111
};
1212
```
1313

docs/models/components/collectionresponseassociatedid.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ let value: CollectionResponseAssociatedId = {
1212
after: "NTI1Cg%3D%3D",
1313
},
1414
},
15-
results: [
16-
{
17-
id: "<id>",
18-
type: "<value>",
19-
},
20-
],
15+
results: [],
2116
};
2217
```
2318

docs/models/components/collectionresponsewithtotalsimplepublicobjectforwardpaging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from "mcp-hubspot/models/components";
77

88
let value: CollectionResponseWithTotalSimplePublicObjectForwardPaging = {
9-
total: 431418,
9+
total: 371377,
1010
paging: {
1111
next: {
1212
link: "?after=NTI1Cg%3D%3D",

docs/models/components/filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Filter } from "mcp-hubspot/models/components";
77

88
let value: Filter = {
99
propertyName: "<value>",
10-
operator: "GTE",
10+
operator: "IN",
1111
};
1212
```
1313

docs/models/components/filtergroup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let value: FilterGroup = {
99
filters: [
1010
{
1111
propertyName: "<value>",
12-
operator: "CONTAINS_TOKEN",
12+
operator: "LT",
1313
},
1414
],
1515
};

docs/models/components/operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ null
77
```typescript
88
import { Operator } from "mcp-hubspot/models/components";
99

10-
let value: Operator = "GT";
10+
let value: Operator = "BETWEEN";
1111
```
1212

1313
## Values

docs/models/components/publicassociationsforobject.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { PublicAssociationsForObject } from "mcp-hubspot/models/components";
88
let value: PublicAssociationsForObject = {
99
types: [
1010
{
11-
associationCategory: "USER_DEFINED",
12-
associationTypeId: 590873,
11+
associationCategory: "HUBSPOT_DEFINED",
12+
associationTypeId: 551132,
1313
},
1414
],
1515
to: {

docs/models/components/simplepublicobjectwithassociations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { SimplePublicObjectWithAssociations } from "mcp-hubspot/models/components";
77

88
let value: SimplePublicObjectWithAssociations = {
9-
createdAt: new Date("2024-04-14T22:19:54.875Z"),
9+
createdAt: new Date("2025-06-21T16:54:22.539Z"),
1010
id: "<id>",
1111
properties: {
1212
"amount": "1500.00",
@@ -18,7 +18,7 @@ let value: SimplePublicObjectWithAssociations = {
1818
"hubspot_owner_id": "910901",
1919
"pipeline": "default",
2020
},
21-
updatedAt: new Date("2023-05-29T11:30:35.227Z"),
21+
updatedAt: new Date("2024-10-01T05:33:36.814Z"),
2222
};
2323
```
2424

0 commit comments

Comments
 (0)