You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
updateMany for organizations appears to have an incorrect type definition and example in: /node-zendesk/dist/types/clients/core/organizations.d.ts
The current type definition for client.organizations.updateMany
With the example const updatedOrganizations = await client.organizations.updateMany([{ id: 1, name: 'Updated Org1' }, { id: 2, name: 'Updated Org2' }]);
Things work if I change the type definition param to object instead of object[] and use a parameter such as: const updatedOrganizations = await client.organizations.updateMany({organizations: [{ id: 1, name: 'Updated Org1' }, { id: 2, name: 'Updated Org2' }]});
Describe the Bug
updateMany for organizations appears to have an incorrect type definition and example in:
/node-zendesk/dist/types/clients/core/organizations.d.ts
The current type definition for client.organizations.updateMany
With the example
const updatedOrganizations = await client.organizations.updateMany([{ id: 1, name: 'Updated Org1' }, { id: 2, name: 'Updated Org2' }]);
Things work if I change the type definition param to
object
instead ofobject[]
and use a parameter such as:const updatedOrganizations = await client.organizations.updateMany({organizations: [{ id: 1, name: 'Updated Org1' }, { id: 2, name: 'Updated Org2' }]});
Example Code
Doesn't work
const updatedOrganizations = await client.organizations.updateMany([{ id: 1, name: 'Updated Org1' }, { id: 2, name: 'Updated Org2' }]);
Works:
const updatedOrganizations = await client.organizations.updateMany({organizations: [{ id: 1, name: 'Updated Org1' }, { id: 2, name: 'Updated Org2' }]});
Expected Behavior
Multiple organizations to be updated
Actual Behavior
with debug turned on:
"Fixed" type definition:
Debug info after editing the type definition:
And the organizations are updated in Zendesk.
Environment Information
node-zendesk
6.0.1:Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: