Skip to content

Commit f914d94

Browse files
authored
fix: [hubspot] upsert response schema should only contain id (#126)
* fix: [hubspot] upsert response schema should only contain id * removing passthrough
1 parent b8e7f1e commit f914d94

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vesselapi/integrations",
3-
"version": "0.0.91",
3+
"version": "0.0.92",
44
"description": "Vessel integrations",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

src/platforms/hubspot/client.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import {
6363
meetingProperties,
6464
noteProperties,
6565
taskProperties,
66+
upsertResponseSchema,
6667
} from './schemas';
6768

6869
const request = makeRequestFactory(async (auth, options) => {
@@ -196,8 +197,12 @@ const makeClient = () => {
196197
listResponseSchema(schema),
197198
properties,
198199
),
199-
create: createObject<TCreate, TOutput>(module, schema, properties),
200-
update: updateObject<TUpdate, TOutput>(module, schema),
200+
create: createObject<TCreate, TOutput>(
201+
module,
202+
upsertResponseSchema,
203+
properties,
204+
),
205+
update: updateObject<TUpdate, TOutput>(module, upsertResponseSchema),
201206
delete: deleteObject(module),
202207
batchRead: batchReadObject<ListOutput<TOutput>>(
203208
module,

src/platforms/hubspot/schemas.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ export const baseHubspotObjectSchema = <T extends z.ZodSchema>(properties: T) =>
9696
})
9797
.passthrough();
9898

99+
export const upsertResponseSchema = z.object({
100+
id: hubspotIdSchema,
101+
});
102+
99103
// -
100104
// Owners
101105
// -

0 commit comments

Comments
 (0)