@vm0/cli 9.262.2 → 9.263.0
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/{agent-LFBSQI2H.js → agent-U5H7QQ6W.js} +6 -6
- package/{banking-RMWBWZNW.js → banking-DSBRODJE.js} +4 -4
- package/{browser-2ONJR3UX.js → browser-FZKCVWPF.js} +4 -4
- package/{chat-KV5FRHWX.js → chat-D5DXQQQN.js} +5 -5
- package/{chunk-3MHIDLCS.js → chunk-763OWT5S.js} +2 -2
- package/{chunk-RKANRWIC.js → chunk-7BY6QXB2.js} +4 -4
- package/{chunk-327R4TER.js → chunk-DEZ5WUIV.js} +2 -2
- package/{chunk-HT3ZUKUO.js → chunk-JHCSTKSK.js} +41 -3
- package/chunk-JHCSTKSK.js.map +1 -0
- package/{chunk-BWWEFX63.js → chunk-JRLEVFU4.js} +2 -2
- package/{chunk-G5C2TTOV.js → chunk-KZ3CS2NK.js} +4 -4
- package/chunk-KZ3CS2NK.js.map +1 -0
- package/{chunk-SI2P32V7.js → chunk-SOV44EFN.js} +1 -1
- package/{chunk-SI2P32V7.js.map → chunk-SOV44EFN.js.map} +1 -1
- package/{chunk-K7JPMB5K.js → chunk-SQ4KQQUA.js} +2 -2
- package/{chunk-AGRZWWSS.js → chunk-TE6HUJO7.js} +2 -2
- package/{chunk-KIO6WOUQ.js → chunk-WFGOVUAO.js} +14 -13
- package/chunk-WFGOVUAO.js.map +1 -0
- package/{chunk-EJFJYCB2.js → chunk-WNEYNRKP.js} +2 -2
- package/{computer-use-DQR76CYE.js → computer-use-VYFUCFOW.js} +4 -4
- package/{connector-EIM74P4E.js → connector-ME5QOGO3.js} +7 -7
- package/{credit-4JLPKM6G.js → credit-LO5CLWQE.js} +5 -5
- package/{developer-support-U5E7NGVP.js → developer-support-LGZS7NOO.js} +4 -4
- package/{doctor-HQOVA7MK.js → doctor-TQI2B6Q2.js} +5 -5
- package/{feishu-WMURRVJW.js → feishu-VGTLKS3I.js} +4 -4
- package/{finance-BSAIWNZH.js → finance-XQETM32L.js} +4 -4
- package/{generate-BUF2EZAZ.js → generate-FTSU6IJH.js} +6 -6
- package/{github-NJGISND7.js → github-OLVQQBOM.js} +4 -4
- package/{goal-R4XXM4MK.js → goal-2NYMFUM5.js} +4 -4
- package/{host-R55MZDLZ.js → host-OIIYDML7.js} +4 -4
- package/{logs-FOOMQFNV.js → logs-H77ZUX3U.js} +7 -7
- package/{mail-VZ5RCNEJ.js → mail-H2MZKXWF.js} +6 -6
- package/{maps-QQ42JR6L.js → maps-PI2DOJ2D.js} +4 -4
- package/{model-B3UIHFSN.js → model-XE3HBT3S.js} +5 -5
- package/{model-provider-ECG6MFP3.js → model-provider-ZNN7YGD4.js} +5 -5
- package/{org-AXKV6L3C.js → org-WNOFQ537.js} +4 -4
- package/package.json +1 -1
- package/{people-search-TVJIBQBW.js → people-search-WDMWSRP5.js} +4 -4
- package/{phone-3WK7EYVJ.js → phone-23QBOZVB.js} +4 -4
- package/{preference-AAI3PKO7.js → preference-Z45BVY3F.js} +4 -4
- package/{resource-UR7NP5CZ.js → resource-H6S3K7G6.js} +5 -5
- package/{scrape-V2VZBCSN.js → scrape-KWNPFDEX.js} +4 -4
- package/{search-DM44Y3VI.js → search-IFRLUNB6.js} +7 -7
- package/{secret-ZIXFK2PA.js → secret-GW4HHMFN.js} +4 -4
- package/{slack-VSFYUZU4.js → slack-45SQVSDV.js} +4 -4
- package/{teams-4DAHAHHE.js → teams-6IG4GDCD.js} +4 -4
- package/{telegram-FTQ2OEBU.js → telegram-7D3KEZ2J.js} +4 -4
- package/{upgrade-4AAB6OKH.js → upgrade-ED45IEMQ.js} +3 -3
- package/{variable-B6HH7K7L.js → variable-B4CLRKJI.js} +4 -4
- package/{video-VIOXPZPB.js → video-QOGXSHFS.js} +3 -3
- package/{weather-FYWP36RV.js → weather-BA6KAOQ2.js} +4 -4
- package/{web-AJWG6CNJ.js → web-JV2V4L6O.js} +4 -4
- package/{web-search-T55X6X5Z.js → web-search-GIOVKSVD.js} +4 -4
- package/{whoami-75UGWEOD.js → whoami-OBDYSSH4.js} +6 -6
- package/{workflow-G47CLA4I.js → workflow-OXEZWAI7.js} +88 -16
- package/workflow-OXEZWAI7.js.map +1 -0
- package/zero.js +43 -43
- package/chunk-G5C2TTOV.js.map +0 -1
- package/chunk-HT3ZUKUO.js.map +0 -1
- package/chunk-KIO6WOUQ.js.map +0 -1
- package/workflow-G47CLA4I.js.map +0 -1
- /package/{agent-LFBSQI2H.js.map → agent-U5H7QQ6W.js.map} +0 -0
- /package/{banking-RMWBWZNW.js.map → banking-DSBRODJE.js.map} +0 -0
- /package/{browser-2ONJR3UX.js.map → browser-FZKCVWPF.js.map} +0 -0
- /package/{chat-KV5FRHWX.js.map → chat-D5DXQQQN.js.map} +0 -0
- /package/{chunk-3MHIDLCS.js.map → chunk-763OWT5S.js.map} +0 -0
- /package/{chunk-RKANRWIC.js.map → chunk-7BY6QXB2.js.map} +0 -0
- /package/{chunk-327R4TER.js.map → chunk-DEZ5WUIV.js.map} +0 -0
- /package/{chunk-BWWEFX63.js.map → chunk-JRLEVFU4.js.map} +0 -0
- /package/{chunk-K7JPMB5K.js.map → chunk-SQ4KQQUA.js.map} +0 -0
- /package/{chunk-AGRZWWSS.js.map → chunk-TE6HUJO7.js.map} +0 -0
- /package/{chunk-EJFJYCB2.js.map → chunk-WNEYNRKP.js.map} +0 -0
- /package/{computer-use-DQR76CYE.js.map → computer-use-VYFUCFOW.js.map} +0 -0
- /package/{connector-EIM74P4E.js.map → connector-ME5QOGO3.js.map} +0 -0
- /package/{credit-4JLPKM6G.js.map → credit-LO5CLWQE.js.map} +0 -0
- /package/{developer-support-U5E7NGVP.js.map → developer-support-LGZS7NOO.js.map} +0 -0
- /package/{doctor-HQOVA7MK.js.map → doctor-TQI2B6Q2.js.map} +0 -0
- /package/{feishu-WMURRVJW.js.map → feishu-VGTLKS3I.js.map} +0 -0
- /package/{finance-BSAIWNZH.js.map → finance-XQETM32L.js.map} +0 -0
- /package/{generate-BUF2EZAZ.js.map → generate-FTSU6IJH.js.map} +0 -0
- /package/{github-NJGISND7.js.map → github-OLVQQBOM.js.map} +0 -0
- /package/{goal-R4XXM4MK.js.map → goal-2NYMFUM5.js.map} +0 -0
- /package/{host-R55MZDLZ.js.map → host-OIIYDML7.js.map} +0 -0
- /package/{logs-FOOMQFNV.js.map → logs-H77ZUX3U.js.map} +0 -0
- /package/{mail-VZ5RCNEJ.js.map → mail-H2MZKXWF.js.map} +0 -0
- /package/{maps-QQ42JR6L.js.map → maps-PI2DOJ2D.js.map} +0 -0
- /package/{model-B3UIHFSN.js.map → model-XE3HBT3S.js.map} +0 -0
- /package/{model-provider-ECG6MFP3.js.map → model-provider-ZNN7YGD4.js.map} +0 -0
- /package/{org-AXKV6L3C.js.map → org-WNOFQ537.js.map} +0 -0
- /package/{people-search-TVJIBQBW.js.map → people-search-WDMWSRP5.js.map} +0 -0
- /package/{phone-3WK7EYVJ.js.map → phone-23QBOZVB.js.map} +0 -0
- /package/{preference-AAI3PKO7.js.map → preference-Z45BVY3F.js.map} +0 -0
- /package/{resource-UR7NP5CZ.js.map → resource-H6S3K7G6.js.map} +0 -0
- /package/{scrape-V2VZBCSN.js.map → scrape-KWNPFDEX.js.map} +0 -0
- /package/{search-DM44Y3VI.js.map → search-IFRLUNB6.js.map} +0 -0
- /package/{secret-ZIXFK2PA.js.map → secret-GW4HHMFN.js.map} +0 -0
- /package/{slack-VSFYUZU4.js.map → slack-45SQVSDV.js.map} +0 -0
- /package/{teams-4DAHAHHE.js.map → teams-6IG4GDCD.js.map} +0 -0
- /package/{telegram-FTQ2OEBU.js.map → telegram-7D3KEZ2J.js.map} +0 -0
- /package/{upgrade-4AAB6OKH.js.map → upgrade-ED45IEMQ.js.map} +0 -0
- /package/{variable-B6HH7K7L.js.map → variable-B4CLRKJI.js.map} +0 -0
- /package/{video-VIOXPZPB.js.map → video-QOGXSHFS.js.map} +0 -0
- /package/{weather-FYWP36RV.js.map → weather-BA6KAOQ2.js.map} +0 -0
- /package/{web-AJWG6CNJ.js.map → web-JV2V4L6O.js.map} +0 -0
- /package/{web-search-T55X6X5Z.js.map → web-search-GIOVKSVD.js.map} +0 -0
- /package/{whoami-75UGWEOD.js.map → whoami-OBDYSSH4.js.map} +0 -0
|
@@ -19,16 +19,16 @@ import {
|
|
|
19
19
|
listWorkflows,
|
|
20
20
|
updateWorkflow,
|
|
21
21
|
updateWorkflowAutomation
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-JHCSTKSK.js";
|
|
23
|
+
import "./chunk-DEZ5WUIV.js";
|
|
24
24
|
import "./chunk-MA22KQYU.js";
|
|
25
25
|
import {
|
|
26
26
|
source_default,
|
|
27
27
|
withErrorHandler
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JRLEVFU4.js";
|
|
29
29
|
import {
|
|
30
30
|
isFeatureEnabled
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WFGOVUAO.js";
|
|
32
32
|
import {
|
|
33
33
|
decodeZeroTokenPayload
|
|
34
34
|
} from "./chunk-MD3YWUKO.js";
|
|
@@ -509,6 +509,11 @@ function isNotionDatabaseItemAutomation(automation) {
|
|
|
509
509
|
function isNotionPageContentUpdatedAutomation(automation) {
|
|
510
510
|
return automation.kind === "event" && automation.eventType === "notion-page-content-updated";
|
|
511
511
|
}
|
|
512
|
+
function formatStrapiAutomation(automation) {
|
|
513
|
+
const contentType = automation.eventConfig.contentTypeUid ?? "any content type";
|
|
514
|
+
const locale = automation.eventConfig.locale ?? "any locale";
|
|
515
|
+
return `Strapi entry published: ${contentType}, ${locale}`;
|
|
516
|
+
}
|
|
512
517
|
function isGoogleCalendarAutomation(automation) {
|
|
513
518
|
return automation.kind === "event" && (automation.eventType === "google-calendar-event-created" || automation.eventType === "google-calendar-event-updated" || automation.eventType === "google-calendar-event-cancelled");
|
|
514
519
|
}
|
|
@@ -648,6 +653,8 @@ function workflowAutomationKindLabel(automation) {
|
|
|
648
653
|
return `New Notion database item: ${formatNotionDatabase(automation)}`;
|
|
649
654
|
case "notion-page-content-updated":
|
|
650
655
|
return `Notion page content updated: ${formatNotionContentUpdatedScope(automation)}`;
|
|
656
|
+
case "strapi-entry-published":
|
|
657
|
+
return formatStrapiAutomation(automation);
|
|
651
658
|
case "webhook-received":
|
|
652
659
|
return "Webhook";
|
|
653
660
|
}
|
|
@@ -1137,6 +1144,7 @@ var GITHUB_WEBHOOK_EVENT_KINDS = [
|
|
|
1137
1144
|
"github-deployment-status-created",
|
|
1138
1145
|
"github-issue-comment-created"
|
|
1139
1146
|
];
|
|
1147
|
+
var STRAPI_EVENT_KINDS = ["strapi-entry-published"];
|
|
1140
1148
|
function githubWebhookAutomationsEnabled() {
|
|
1141
1149
|
const payload = decodeZeroTokenPayload();
|
|
1142
1150
|
return isFeatureEnabled("githubWebhookAutomations" /* GithubWebhookAutomations */, {
|
|
@@ -1144,11 +1152,19 @@ function githubWebhookAutomationsEnabled() {
|
|
|
1144
1152
|
orgId: payload?.orgId
|
|
1145
1153
|
});
|
|
1146
1154
|
}
|
|
1155
|
+
function strapiIntegrationEnabled() {
|
|
1156
|
+
const payload = decodeZeroTokenPayload();
|
|
1157
|
+
return isFeatureEnabled("strapiIntegration" /* StrapiIntegration */, {
|
|
1158
|
+
userId: payload?.userId,
|
|
1159
|
+
orgId: payload?.orgId
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1147
1162
|
function automationKinds() {
|
|
1148
1163
|
return [
|
|
1149
1164
|
...SCHEDULE_KINDS,
|
|
1150
1165
|
...EVENT_KINDS,
|
|
1151
|
-
...githubWebhookAutomationsEnabled() ? GITHUB_WEBHOOK_EVENT_KINDS : []
|
|
1166
|
+
...githubWebhookAutomationsEnabled() ? GITHUB_WEBHOOK_EVENT_KINDS : [],
|
|
1167
|
+
...strapiIntegrationEnabled() ? STRAPI_EVENT_KINDS : []
|
|
1152
1168
|
];
|
|
1153
1169
|
}
|
|
1154
1170
|
function githubWebhookEventKind(kind) {
|
|
@@ -1437,8 +1453,11 @@ function hasCalendarAutomationOptions(options) {
|
|
|
1437
1453
|
function hasNotionAutomationOptions(options) {
|
|
1438
1454
|
return options.pageUrl !== void 0 || options.parentPageUrl !== void 0 || options.databaseUrl !== void 0;
|
|
1439
1455
|
}
|
|
1456
|
+
function hasStrapiAutomationOptions(options) {
|
|
1457
|
+
return options.integrationId !== void 0 || options.contentTypeUid !== void 0 || options.locale !== void 0;
|
|
1458
|
+
}
|
|
1440
1459
|
function hasEventAddOptions(options) {
|
|
1441
|
-
return hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasNotionAutomationOptions(options);
|
|
1460
|
+
return hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasNotionAutomationOptions(options) || hasStrapiAutomationOptions(options);
|
|
1442
1461
|
}
|
|
1443
1462
|
function assertNoScheduleAddOptions(options) {
|
|
1444
1463
|
if (hasScheduleAddOptions(options)) {
|
|
@@ -1466,6 +1485,13 @@ function assertNoNotionAutomationOptions(options) {
|
|
|
1466
1485
|
);
|
|
1467
1486
|
}
|
|
1468
1487
|
}
|
|
1488
|
+
function assertNoStrapiAutomationOptions(options) {
|
|
1489
|
+
if (hasStrapiAutomationOptions(options)) {
|
|
1490
|
+
throw new Error(
|
|
1491
|
+
"Strapi automation flags only apply to Strapi event automations"
|
|
1492
|
+
);
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1469
1495
|
function scheduleUpdateFlagCount(options) {
|
|
1470
1496
|
return [options.expr, options.at, options.every].filter((value) => {
|
|
1471
1497
|
return value !== void 0;
|
|
@@ -1776,6 +1802,7 @@ function buildGmailNewMessageCreateRequest(options) {
|
|
|
1776
1802
|
assertNoGithubAutomationOptions(options);
|
|
1777
1803
|
assertNoCalendarAutomationOptions(options);
|
|
1778
1804
|
assertNoNotionAutomationOptions(options);
|
|
1805
|
+
assertNoStrapiAutomationOptions(options);
|
|
1779
1806
|
return {
|
|
1780
1807
|
kind: "event",
|
|
1781
1808
|
eventType: "gmail-new-message",
|
|
@@ -1792,6 +1819,7 @@ function buildGmailLabelAppliedCreateRequest(options) {
|
|
|
1792
1819
|
assertNoGithubAutomationOptions(options);
|
|
1793
1820
|
assertNoCalendarAutomationOptions(options);
|
|
1794
1821
|
assertNoNotionAutomationOptions(options);
|
|
1822
|
+
assertNoStrapiAutomationOptions(options);
|
|
1795
1823
|
return {
|
|
1796
1824
|
kind: "event",
|
|
1797
1825
|
eventType: "gmail-label-applied",
|
|
@@ -1807,6 +1835,7 @@ function buildGithubLabelAppliedCreateRequest(options) {
|
|
|
1807
1835
|
}
|
|
1808
1836
|
assertNoCalendarAutomationOptions(options);
|
|
1809
1837
|
assertNoNotionAutomationOptions(options);
|
|
1838
|
+
assertNoStrapiAutomationOptions(options);
|
|
1810
1839
|
if (hasGithubWorkflowRunSpecificOptions(options)) {
|
|
1811
1840
|
throw new Error(
|
|
1812
1841
|
"Workflow run filter flags only apply to github-workflow-run-completed automations"
|
|
@@ -1841,6 +1870,7 @@ function buildGithubWorkflowRunCompletedCreateRequest(options) {
|
|
|
1841
1870
|
]);
|
|
1842
1871
|
assertNoCalendarAutomationOptions(options);
|
|
1843
1872
|
assertNoNotionAutomationOptions(options);
|
|
1873
|
+
assertNoStrapiAutomationOptions(options);
|
|
1844
1874
|
return {
|
|
1845
1875
|
kind: "event",
|
|
1846
1876
|
eventType: "github-workflow-run-completed",
|
|
@@ -1856,6 +1886,7 @@ function assertGithubWebhookCreateOptions(options, allowed) {
|
|
|
1856
1886
|
}
|
|
1857
1887
|
assertNoCalendarAutomationOptions(options);
|
|
1858
1888
|
assertNoNotionAutomationOptions(options);
|
|
1889
|
+
assertNoStrapiAutomationOptions(options);
|
|
1859
1890
|
assertOnlyGithubAutomationOptions(options, allowed);
|
|
1860
1891
|
}
|
|
1861
1892
|
function buildGithubWorkflowJobCompletedCreateRequest(options) {
|
|
@@ -1919,9 +1950,9 @@ function buildGithubIssueCommentCreatedCreateRequest(options) {
|
|
|
1919
1950
|
}
|
|
1920
1951
|
function buildGoogleCalendarEventCreateRequest(eventType, options) {
|
|
1921
1952
|
assertNoScheduleAddOptions(options);
|
|
1922
|
-
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasNotionAutomationOptions(options)) {
|
|
1953
|
+
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasNotionAutomationOptions(options) || hasStrapiAutomationOptions(options)) {
|
|
1923
1954
|
throw new Error(
|
|
1924
|
-
"Gmail, GitHub, and
|
|
1955
|
+
"Gmail, GitHub, Notion, and Strapi automation flags only apply to their event automations"
|
|
1925
1956
|
);
|
|
1926
1957
|
}
|
|
1927
1958
|
const calendarId = options.calendarId?.trim() || "primary";
|
|
@@ -1959,9 +1990,9 @@ function buildGoogleCalendarEventCreateRequest(eventType, options) {
|
|
|
1959
1990
|
}
|
|
1960
1991
|
function buildNotionChildPageCreatedCreateRequest(options) {
|
|
1961
1992
|
assertNoScheduleAddOptions(options);
|
|
1962
|
-
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options)) {
|
|
1993
|
+
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasStrapiAutomationOptions(options)) {
|
|
1963
1994
|
throw new Error(
|
|
1964
|
-
"Gmail, GitHub,
|
|
1995
|
+
"Gmail, GitHub, Google Calendar, and Strapi automation flags only apply to their event automations"
|
|
1965
1996
|
);
|
|
1966
1997
|
}
|
|
1967
1998
|
const parentPageUrl = options.parentPageUrl?.trim();
|
|
@@ -1987,9 +2018,9 @@ function buildNotionChildPageCreatedCreateRequest(options) {
|
|
|
1987
2018
|
}
|
|
1988
2019
|
function buildNotionDatabaseItemCreatedCreateRequest(options) {
|
|
1989
2020
|
assertNoScheduleAddOptions(options);
|
|
1990
|
-
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options)) {
|
|
2021
|
+
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasStrapiAutomationOptions(options)) {
|
|
1991
2022
|
throw new Error(
|
|
1992
|
-
"Gmail, GitHub,
|
|
2023
|
+
"Gmail, GitHub, Google Calendar, and Strapi automation flags only apply to their event automations"
|
|
1993
2024
|
);
|
|
1994
2025
|
}
|
|
1995
2026
|
if (options.pageUrl !== void 0 || options.parentPageUrl !== void 0) {
|
|
@@ -2015,9 +2046,9 @@ function buildNotionDatabaseItemCreatedCreateRequest(options) {
|
|
|
2015
2046
|
}
|
|
2016
2047
|
function buildNotionPageContentUpdatedCreateRequest(options) {
|
|
2017
2048
|
assertNoScheduleAddOptions(options);
|
|
2018
|
-
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options)) {
|
|
2049
|
+
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasStrapiAutomationOptions(options)) {
|
|
2019
2050
|
throw new Error(
|
|
2020
|
-
"Gmail, GitHub,
|
|
2051
|
+
"Gmail, GitHub, Google Calendar, and Strapi automation flags only apply to their event automations"
|
|
2021
2052
|
);
|
|
2022
2053
|
}
|
|
2023
2054
|
if (options.parentPageUrl !== void 0) {
|
|
@@ -2061,6 +2092,33 @@ function buildWebhookCreateRequest(options) {
|
|
|
2061
2092
|
}
|
|
2062
2093
|
};
|
|
2063
2094
|
}
|
|
2095
|
+
function buildStrapiEntryPublishedCreateRequest(options) {
|
|
2096
|
+
assertNoScheduleAddOptions(options);
|
|
2097
|
+
if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasNotionAutomationOptions(options)) {
|
|
2098
|
+
throw new Error(
|
|
2099
|
+
"Only Strapi automation flags apply to strapi-entry-published automations"
|
|
2100
|
+
);
|
|
2101
|
+
}
|
|
2102
|
+
const integrationId = options.integrationId?.trim();
|
|
2103
|
+
if (!integrationId) {
|
|
2104
|
+
throw new Error(
|
|
2105
|
+
"strapi-entry-published automations require --integration-id <uuid>"
|
|
2106
|
+
);
|
|
2107
|
+
}
|
|
2108
|
+
const contentTypeUid = options.contentTypeUid?.trim();
|
|
2109
|
+
const locale = options.locale?.trim();
|
|
2110
|
+
return {
|
|
2111
|
+
kind: "event",
|
|
2112
|
+
eventType: "strapi-entry-published",
|
|
2113
|
+
eventConfig: {
|
|
2114
|
+
provider: "strapi",
|
|
2115
|
+
event: "entry_published",
|
|
2116
|
+
integrationId,
|
|
2117
|
+
...contentTypeUid ? { contentTypeUid } : {},
|
|
2118
|
+
...locale ? { locale } : {}
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
}
|
|
2064
2122
|
function buildScheduleCreateRequest(kind, options) {
|
|
2065
2123
|
if (hasEventAddOptions(options)) {
|
|
2066
2124
|
throw new Error("Event automation flags only apply to event automations");
|
|
@@ -2097,6 +2155,8 @@ function buildCreateRequest(kind, options) {
|
|
|
2097
2155
|
return buildNotionDatabaseItemCreatedCreateRequest(options);
|
|
2098
2156
|
case "notion-page-content-updated":
|
|
2099
2157
|
return buildNotionPageContentUpdatedCreateRequest(options);
|
|
2158
|
+
case "strapi-entry-published":
|
|
2159
|
+
return buildStrapiEntryPublishedCreateRequest(options);
|
|
2100
2160
|
case "webhook":
|
|
2101
2161
|
return buildWebhookCreateRequest(options);
|
|
2102
2162
|
default:
|
|
@@ -2346,7 +2406,13 @@ var addCommand = addGithubAutomationOptions(
|
|
|
2346
2406
|
).option(
|
|
2347
2407
|
"--database-url <url>",
|
|
2348
2408
|
"Notion database URL for notion-database-item-created or notion-page-content-updated automations"
|
|
2349
|
-
).option(
|
|
2409
|
+
).option(
|
|
2410
|
+
"--integration-id <uuid>",
|
|
2411
|
+
"Strapi integration ID for Strapi event automations"
|
|
2412
|
+
).option(
|
|
2413
|
+
"--content-type-uid <uid>",
|
|
2414
|
+
"Optional Strapi content type UID, for example api::article.article"
|
|
2415
|
+
).option("--locale <locale>", "Optional Strapi locale filter").option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
|
|
2350
2416
|
"after",
|
|
2351
2417
|
`
|
|
2352
2418
|
Examples:
|
|
@@ -2365,6 +2431,7 @@ Examples:
|
|
|
2365
2431
|
zero workflow automation add research-notes --agent <agent-id> notion-database-item-created --database-url "https://www.notion.so/1234567890abcdef1234567890abcdef?v=abcdef1234567890abcdef1234567890"
|
|
2366
2432
|
zero workflow automation add research-notes --agent <agent-id> notion-page-content-updated --page-url "https://www.notion.so/workspace/Page-title-1234567890abcdef1234567890abcdef"
|
|
2367
2433
|
zero workflow automation add research-notes --agent <agent-id> notion-page-content-updated --database-url "https://www.notion.so/1234567890abcdef1234567890abcdef?v=abcdef1234567890abcdef1234567890"
|
|
2434
|
+
zero workflow automation add deploy-blog --agent <agent-id> strapi-entry-published --integration-id <uuid> --content-type-uid api::article.article
|
|
2368
2435
|
zero workflow automation add triage --agent <agent-id> webhook
|
|
2369
2436
|
|
|
2370
2437
|
Notes:
|
|
@@ -2382,6 +2449,11 @@ Notes:
|
|
|
2382
2449
|
"GitHub webhook automations are not enabled for this workspace"
|
|
2383
2450
|
);
|
|
2384
2451
|
}
|
|
2452
|
+
if (kind === "strapi-entry-published" && !strapiIntegrationEnabled()) {
|
|
2453
|
+
throw new Error(
|
|
2454
|
+
"Strapi workflow automations are not enabled for this workspace"
|
|
2455
|
+
);
|
|
2456
|
+
}
|
|
2385
2457
|
if (options.timezone && kind !== "cron" && kind !== "once" && kind !== "gmail-new-message") {
|
|
2386
2458
|
throw new Error(
|
|
2387
2459
|
"--timezone only applies to cron and once automations"
|
|
@@ -2504,4 +2576,4 @@ Examples:
|
|
|
2504
2576
|
export {
|
|
2505
2577
|
zeroWorkflowCommand
|
|
2506
2578
|
};
|
|
2507
|
-
//# sourceMappingURL=workflow-
|
|
2579
|
+
//# sourceMappingURL=workflow-OXEZWAI7.js.map
|