@budibase/server 2.7.7-alpha.1 → 2.7.7-alpha.3
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/builder/assets/{index.933787a7.js → index.7f26f181.js} +411 -411
- package/builder/index.html +1 -1
- package/dist/automation.js +66 -6
- package/dist/automation.js.map +2 -2
- package/dist/index.js +68 -6
- package/dist/index.js.map +2 -2
- package/dist/query.js +1 -0
- package/dist/query.js.map +2 -2
- package/package.json +8 -8
- package/src/automations/steps/sendSmtpEmail.ts +55 -4
- package/src/automations/tests/sendSmtpEmail.spec.ts +74 -0
- package/src/events/docUpdates/syncUsers.ts +4 -0
- package/src/utilities/workerRequests.ts +20 -9
- package/src/automations/tests/sendSmtpEmail.spec.js +0 -71
package/dist/index.js
CHANGED
|
@@ -838,6 +838,7 @@ var init_automation2 = __esm({
|
|
|
838
838
|
AutomationIOType2["NUMBER"] = "number";
|
|
839
839
|
AutomationIOType2["ARRAY"] = "array";
|
|
840
840
|
AutomationIOType2["JSON"] = "json";
|
|
841
|
+
AutomationIOType2["DATE"] = "date";
|
|
841
842
|
return AutomationIOType2;
|
|
842
843
|
})(AutomationIOType || {});
|
|
843
844
|
AutomationCustomIOType = /* @__PURE__ */ ((AutomationCustomIOType2) => {
|
|
@@ -24333,7 +24334,16 @@ async function checkResponse(response2, errorMsg, { ctx } = {}) {
|
|
|
24333
24334
|
}
|
|
24334
24335
|
return response2.json();
|
|
24335
24336
|
}
|
|
24336
|
-
async function sendSmtpEmail(
|
|
24337
|
+
async function sendSmtpEmail({
|
|
24338
|
+
to,
|
|
24339
|
+
from,
|
|
24340
|
+
subject,
|
|
24341
|
+
contents,
|
|
24342
|
+
cc,
|
|
24343
|
+
bcc,
|
|
24344
|
+
automation,
|
|
24345
|
+
invite
|
|
24346
|
+
}) {
|
|
24337
24347
|
const response2 = await (0, import_node_fetch8.default)(
|
|
24338
24348
|
checkSlashesInUrl2(environment_default2.WORKER_URL + `/api/global/email/send`),
|
|
24339
24349
|
request(void 0, {
|
|
@@ -24346,7 +24356,8 @@ async function sendSmtpEmail(to, from, subject, contents, cc, bcc, automation) {
|
|
|
24346
24356
|
cc,
|
|
24347
24357
|
bcc,
|
|
24348
24358
|
purpose: "custom",
|
|
24349
|
-
automation
|
|
24359
|
+
automation,
|
|
24360
|
+
invite
|
|
24350
24361
|
}
|
|
24351
24362
|
})
|
|
24352
24363
|
);
|
|
@@ -32055,21 +32066,41 @@ var init_automationUtils = __esm({
|
|
|
32055
32066
|
|
|
32056
32067
|
// src/automations/steps/sendSmtpEmail.ts
|
|
32057
32068
|
async function run3({ inputs }) {
|
|
32058
|
-
let {
|
|
32069
|
+
let {
|
|
32070
|
+
to,
|
|
32071
|
+
from,
|
|
32072
|
+
subject,
|
|
32073
|
+
contents,
|
|
32074
|
+
cc,
|
|
32075
|
+
bcc,
|
|
32076
|
+
addInvite,
|
|
32077
|
+
startTime,
|
|
32078
|
+
endTime,
|
|
32079
|
+
summary,
|
|
32080
|
+
location,
|
|
32081
|
+
url
|
|
32082
|
+
} = inputs;
|
|
32059
32083
|
if (!contents) {
|
|
32060
32084
|
contents = "<h1>No content</h1>";
|
|
32061
32085
|
}
|
|
32062
32086
|
to = to || void 0;
|
|
32063
32087
|
try {
|
|
32064
|
-
let response2 = await sendSmtpEmail(
|
|
32088
|
+
let response2 = await sendSmtpEmail({
|
|
32065
32089
|
to,
|
|
32066
32090
|
from,
|
|
32067
32091
|
subject,
|
|
32068
32092
|
contents,
|
|
32069
32093
|
cc,
|
|
32070
32094
|
bcc,
|
|
32071
|
-
true
|
|
32072
|
-
|
|
32095
|
+
automation: true,
|
|
32096
|
+
invite: addInvite ? {
|
|
32097
|
+
startTime,
|
|
32098
|
+
endTime,
|
|
32099
|
+
summary,
|
|
32100
|
+
location,
|
|
32101
|
+
url
|
|
32102
|
+
} : void 0
|
|
32103
|
+
});
|
|
32073
32104
|
return {
|
|
32074
32105
|
success: true,
|
|
32075
32106
|
response: response2
|
|
@@ -32125,6 +32156,35 @@ var init_sendSmtpEmail = __esm({
|
|
|
32125
32156
|
contents: {
|
|
32126
32157
|
type: "string" /* STRING */,
|
|
32127
32158
|
title: "HTML Contents"
|
|
32159
|
+
},
|
|
32160
|
+
addInvite: {
|
|
32161
|
+
type: "boolean" /* BOOLEAN */,
|
|
32162
|
+
title: "Add calendar invite"
|
|
32163
|
+
},
|
|
32164
|
+
startTime: {
|
|
32165
|
+
type: "date" /* DATE */,
|
|
32166
|
+
title: "Start Time",
|
|
32167
|
+
dependsOn: "addInvite"
|
|
32168
|
+
},
|
|
32169
|
+
endTime: {
|
|
32170
|
+
type: "date" /* DATE */,
|
|
32171
|
+
title: "End Time",
|
|
32172
|
+
dependsOn: "addInvite"
|
|
32173
|
+
},
|
|
32174
|
+
summary: {
|
|
32175
|
+
type: "string" /* STRING */,
|
|
32176
|
+
title: "Meeting Summary",
|
|
32177
|
+
dependsOn: "addInvite"
|
|
32178
|
+
},
|
|
32179
|
+
location: {
|
|
32180
|
+
type: "string" /* STRING */,
|
|
32181
|
+
title: "Location",
|
|
32182
|
+
dependsOn: "addInvite"
|
|
32183
|
+
},
|
|
32184
|
+
url: {
|
|
32185
|
+
type: "string" /* STRING */,
|
|
32186
|
+
title: "URL",
|
|
32187
|
+
dependsOn: "addInvite"
|
|
32128
32188
|
}
|
|
32129
32189
|
},
|
|
32130
32190
|
required: ["to", "from", "subject", "contents"]
|
|
@@ -37739,6 +37799,8 @@ function process2(updateCb) {
|
|
|
37739
37799
|
} catch (err) {
|
|
37740
37800
|
if ((err == null ? void 0 : err.status) === 404) {
|
|
37741
37801
|
return;
|
|
37802
|
+
} else if ((err == null ? void 0 : err.status) === 409) {
|
|
37803
|
+
return;
|
|
37742
37804
|
} else {
|
|
37743
37805
|
logging_exports.logAlert("Failed to perform user/group app sync", err);
|
|
37744
37806
|
}
|