@verdocs/js-sdk 4.2.135 → 4.2.136

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.
package/dist/index.mjs CHANGED
@@ -2589,14 +2589,12 @@ const userCanDeleteTemplate = (profile, template) => userIsTemplateCreator(profi
2589
2589
  * Confirm whether the user can create an envelope using the specified template.
2590
2590
  */
2591
2591
  const userCanSendTemplate = (profile, template) => {
2592
- switch (template.sender) {
2593
- case 'creator':
2592
+ switch (template.visibility) {
2593
+ case 'private':
2594
2594
  return userIsTemplateCreator(profile, template);
2595
- case 'organization_member':
2596
- case 'organization_member_as_creator':
2595
+ case 'shared':
2597
2596
  return userIsTemplateCreator(profile, template) || template.organization_id === profile?.organization_id;
2598
- // 'everyone' | 'everyone_as_creator';
2599
- default:
2597
+ case 'public':
2600
2598
  return true;
2601
2599
  }
2602
2600
  };