arky-sdk 0.3.132 → 0.3.134

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.cjs CHANGED
@@ -706,13 +706,16 @@ var getBlockObjectValues = (entry, blockKey, locale = "en") => {
706
706
  };
707
707
  var getBlockFromArray = (entry, blockKey, locale = "en") => {
708
708
  if (!entry) {
709
- return [];
709
+ return {};
710
710
  }
711
711
  const values = getBlockValues(entry, blockKey);
712
+ if (!values || !Array.isArray(values)) {
713
+ return {};
714
+ }
712
715
  return values.reduce((acc, current) => {
713
716
  acc[current.key] = unwrapBlock(current, locale);
714
717
  return acc;
715
- });
718
+ }, {});
716
719
  };
717
720
  var getImageUrl = (imageBlock, isBlock = true) => {
718
721
  if (!imageBlock) return null;
@@ -819,6 +822,9 @@ var createCmsApi = (apiConfig) => {
819
822
  },
820
823
  /**
821
824
  * Send a node to all subscribers (schedule or immediate)
825
+ * @param params.entryId - The node ID to send
826
+ * @param params.subject - Email subject for this send
827
+ * @param params.scheduledAt - Optional unix timestamp to schedule the send
822
828
  */
823
829
  async sendNode(params, options) {
824
830
  const { entryId, ...body } = params;