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 +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -245,6 +245,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
245
245
|
getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
|
|
246
246
|
sendNode(params: {
|
|
247
247
|
entryId: string;
|
|
248
|
+
subject: string;
|
|
248
249
|
scheduledAt?: number;
|
|
249
250
|
}, options?: RequestOptions): Promise<any>;
|
|
250
251
|
cancelSend(params: {
|
package/dist/index.d.ts
CHANGED
|
@@ -245,6 +245,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
245
245
|
getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
|
|
246
246
|
sendNode(params: {
|
|
247
247
|
entryId: string;
|
|
248
|
+
subject: string;
|
|
248
249
|
scheduledAt?: number;
|
|
249
250
|
}, options?: RequestOptions): Promise<any>;
|
|
250
251
|
cancelSend(params: {
|
package/dist/index.js
CHANGED
|
@@ -704,13 +704,16 @@ var getBlockObjectValues = (entry, blockKey, locale = "en") => {
|
|
|
704
704
|
};
|
|
705
705
|
var getBlockFromArray = (entry, blockKey, locale = "en") => {
|
|
706
706
|
if (!entry) {
|
|
707
|
-
return
|
|
707
|
+
return {};
|
|
708
708
|
}
|
|
709
709
|
const values = getBlockValues(entry, blockKey);
|
|
710
|
+
if (!values || !Array.isArray(values)) {
|
|
711
|
+
return {};
|
|
712
|
+
}
|
|
710
713
|
return values.reduce((acc, current) => {
|
|
711
714
|
acc[current.key] = unwrapBlock(current, locale);
|
|
712
715
|
return acc;
|
|
713
|
-
});
|
|
716
|
+
}, {});
|
|
714
717
|
};
|
|
715
718
|
var getImageUrl = (imageBlock, isBlock = true) => {
|
|
716
719
|
if (!imageBlock) return null;
|
|
@@ -817,6 +820,9 @@ var createCmsApi = (apiConfig) => {
|
|
|
817
820
|
},
|
|
818
821
|
/**
|
|
819
822
|
* Send a node to all subscribers (schedule or immediate)
|
|
823
|
+
* @param params.entryId - The node ID to send
|
|
824
|
+
* @param params.subject - Email subject for this send
|
|
825
|
+
* @param params.scheduledAt - Optional unix timestamp to schedule the send
|
|
820
826
|
*/
|
|
821
827
|
async sendNode(params, options) {
|
|
822
828
|
const { entryId, ...body } = params;
|