@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.
@@ -8,7 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" />
9
9
  <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
10
10
  rel="stylesheet" />
11
- <script type="module" crossorigin src="/builder/assets/index.933787a7.js"></script>
11
+ <script type="module" crossorigin src="/builder/assets/index.7f26f181.js"></script>
12
12
  <link rel="stylesheet" href="/builder/assets/index.b33e8ad5.css">
13
13
  </head>
14
14
 
@@ -946,6 +946,7 @@ var init_automation2 = __esm({
946
946
  AutomationIOType2["NUMBER"] = "number";
947
947
  AutomationIOType2["ARRAY"] = "array";
948
948
  AutomationIOType2["JSON"] = "json";
949
+ AutomationIOType2["DATE"] = "date";
949
950
  return AutomationIOType2;
950
951
  })(AutomationIOType || {});
951
952
  AutomationCustomIOType = /* @__PURE__ */ ((AutomationCustomIOType2) => {
@@ -27375,7 +27376,16 @@ async function checkResponse(response2, errorMsg, { ctx } = {}) {
27375
27376
  }
27376
27377
  return response2.json();
27377
27378
  }
27378
- async function sendSmtpEmail(to, from, subject, contents, cc, bcc, automation) {
27379
+ async function sendSmtpEmail({
27380
+ to,
27381
+ from,
27382
+ subject,
27383
+ contents,
27384
+ cc,
27385
+ bcc,
27386
+ automation,
27387
+ invite
27388
+ }) {
27379
27389
  const response2 = await (0, import_node_fetch10.default)(
27380
27390
  checkSlashesInUrl2(environment_default.WORKER_URL + `/api/global/email/send`),
27381
27391
  request(void 0, {
@@ -27388,7 +27398,8 @@ async function sendSmtpEmail(to, from, subject, contents, cc, bcc, automation) {
27388
27398
  cc,
27389
27399
  bcc,
27390
27400
  purpose: "custom",
27391
- automation
27401
+ automation,
27402
+ invite
27392
27403
  }
27393
27404
  })
27394
27405
  );
@@ -27436,6 +27447,35 @@ var definition7 = {
27436
27447
  contents: {
27437
27448
  type: "string" /* STRING */,
27438
27449
  title: "HTML Contents"
27450
+ },
27451
+ addInvite: {
27452
+ type: "boolean" /* BOOLEAN */,
27453
+ title: "Add calendar invite"
27454
+ },
27455
+ startTime: {
27456
+ type: "date" /* DATE */,
27457
+ title: "Start Time",
27458
+ dependsOn: "addInvite"
27459
+ },
27460
+ endTime: {
27461
+ type: "date" /* DATE */,
27462
+ title: "End Time",
27463
+ dependsOn: "addInvite"
27464
+ },
27465
+ summary: {
27466
+ type: "string" /* STRING */,
27467
+ title: "Meeting Summary",
27468
+ dependsOn: "addInvite"
27469
+ },
27470
+ location: {
27471
+ type: "string" /* STRING */,
27472
+ title: "Location",
27473
+ dependsOn: "addInvite"
27474
+ },
27475
+ url: {
27476
+ type: "string" /* STRING */,
27477
+ title: "URL",
27478
+ dependsOn: "addInvite"
27439
27479
  }
27440
27480
  },
27441
27481
  required: ["to", "from", "subject", "contents"]
@@ -27456,21 +27496,41 @@ var definition7 = {
27456
27496
  }
27457
27497
  };
27458
27498
  async function run3({ inputs }) {
27459
- let { to, from, subject, contents, cc, bcc } = inputs;
27499
+ let {
27500
+ to,
27501
+ from,
27502
+ subject,
27503
+ contents,
27504
+ cc,
27505
+ bcc,
27506
+ addInvite,
27507
+ startTime,
27508
+ endTime,
27509
+ summary,
27510
+ location,
27511
+ url
27512
+ } = inputs;
27460
27513
  if (!contents) {
27461
27514
  contents = "<h1>No content</h1>";
27462
27515
  }
27463
27516
  to = to || void 0;
27464
27517
  try {
27465
- let response2 = await sendSmtpEmail(
27518
+ let response2 = await sendSmtpEmail({
27466
27519
  to,
27467
27520
  from,
27468
27521
  subject,
27469
27522
  contents,
27470
27523
  cc,
27471
27524
  bcc,
27472
- true
27473
- );
27525
+ automation: true,
27526
+ invite: addInvite ? {
27527
+ startTime,
27528
+ endTime,
27529
+ summary,
27530
+ location,
27531
+ url
27532
+ } : void 0
27533
+ });
27474
27534
  return {
27475
27535
  success: true,
27476
27536
  response: response2