@dma-sdk/hubspot 1.0.20 → 1.0.21
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.
|
@@ -94,9 +94,9 @@ export declare class HubspotService {
|
|
|
94
94
|
[key: string]: string;
|
|
95
95
|
}, accessToken: string, options?: Configuration): Promise<SimplePublicObject>;
|
|
96
96
|
associateObjects(commandInput: AssociateObjectInput, accessToken: string): Promise<LabelsBetweenObjectPair>;
|
|
97
|
-
associateObjectsBatch(commandInput: BatchAssociateObjectInput, accessToken: string): Promise<
|
|
98
|
-
errors: string;
|
|
99
|
-
}
|
|
97
|
+
associateObjectsBatch(commandInput: BatchAssociateObjectInput, accessToken: string): Promise<{
|
|
98
|
+
errors: string[];
|
|
99
|
+
}>;
|
|
100
100
|
createObjectProperties(objectType: string, properties: PropertyCreate[], accessToken: string): Promise<any>;
|
|
101
101
|
createPropertyGroup(objectType: string, group: PropertyGroupCreate, accessToken: string): Promise<PropertyGroup>;
|
|
102
102
|
convertPropertyValues(properties: {
|
|
@@ -152,12 +152,10 @@ class HubspotService {
|
|
|
152
152
|
await this.fetchApi(api_1.ApiMethods.associateObjectBatch(commandInput.objectTypeFirst, commandInput.objectTypeSecond), options);
|
|
153
153
|
}
|
|
154
154
|
catch (error) {
|
|
155
|
-
errors.push(
|
|
156
|
-
errors: error instanceof Error ? error.message : String(error)
|
|
157
|
-
});
|
|
155
|
+
errors.push(error instanceof Error ? error.message : String(error));
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
|
-
return errors;
|
|
158
|
+
return { errors };
|
|
161
159
|
}
|
|
162
160
|
async createObjectProperties(objectType, properties, accessToken) {
|
|
163
161
|
const options = {
|
|
@@ -254,8 +254,8 @@ export class HubspotService {
|
|
|
254
254
|
async associateObjectsBatch(
|
|
255
255
|
commandInput: BatchAssociateObjectInput,
|
|
256
256
|
accessToken: string
|
|
257
|
-
): Promise<
|
|
258
|
-
const errors
|
|
257
|
+
): Promise<{ errors: string[] }> {
|
|
258
|
+
const errors = []
|
|
259
259
|
const chunkSize = 20
|
|
260
260
|
|
|
261
261
|
for (let i = 0; i < commandInput.associations.length; i += chunkSize) {
|
|
@@ -278,13 +278,11 @@ export class HubspotService {
|
|
|
278
278
|
options
|
|
279
279
|
)
|
|
280
280
|
} catch (error) {
|
|
281
|
-
errors.push(
|
|
282
|
-
errors: error instanceof Error ? error.message : String(error)
|
|
283
|
-
})
|
|
281
|
+
errors.push(error instanceof Error ? error.message : String(error))
|
|
284
282
|
}
|
|
285
283
|
}
|
|
286
284
|
|
|
287
|
-
return errors
|
|
285
|
+
return { errors }
|
|
288
286
|
}
|
|
289
287
|
|
|
290
288
|
async createObjectProperties(
|