@dma-sdk/hubspot 1.0.14 → 1.0.15

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.
@@ -4,5 +4,5 @@ export interface AssociateObjectInput {
4
4
  objectTypeSecond: string;
5
5
  objectIdFirst: string;
6
6
  objectIdSecond: string;
7
- options: AssociationSpec[];
7
+ options?: AssociationSpec[];
8
8
  }
@@ -123,7 +123,7 @@ class HubspotService {
123
123
  async associateObjects(commandInput, accessToken) {
124
124
  this.client.setAccessToken(accessToken);
125
125
  const { objectTypeFirst, objectTypeSecond, objectIdFirst, objectIdSecond, options } = commandInput;
126
- const response = await this.client.crm.associations.v4.basicApi.create(objectTypeFirst, objectIdFirst, objectTypeSecond, objectIdSecond, options);
126
+ const response = await this.client.crm.associations.v4.basicApi.create(objectTypeFirst, objectIdFirst, objectTypeSecond, objectIdSecond, options || []);
127
127
  return response;
128
128
  }
129
129
  async createObjectProperties(objectType, properties, accessToken) {
@@ -5,5 +5,5 @@ export interface AssociateObjectInput {
5
5
  objectTypeSecond: string,
6
6
  objectIdFirst: string,
7
7
  objectIdSecond: string,
8
- options: AssociationSpec[]
8
+ options?: AssociationSpec[]
9
9
  }
@@ -238,7 +238,7 @@ export class HubspotService {
238
238
  objectIdFirst,
239
239
  objectTypeSecond,
240
240
  objectIdSecond,
241
- options
241
+ options || []
242
242
  )
243
243
 
244
244
  return response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dma-sdk/hubspot",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "DMA SDK – Hubspot service",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",