@budibase/server 2.7.7-alpha.0 → 2.7.7-alpha.2

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.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) => {
@@ -10089,8 +10090,8 @@ async function postAuth(passport2, ctx, next) {
10089
10090
  { successRedirect: "/", failureRedirect: "/error" },
10090
10091
  async (err, tokens) => {
10091
10092
  const baseUrl = `/builder/app/${authStateCookie.appId}/data`;
10092
- const id = utils_exports2.newid();
10093
- await cache_exports.store(
10093
+ const id = newid();
10094
+ await store(
10094
10095
  `datasource:creation:${authStateCookie.appId}:google:${id}`,
10095
10096
  {
10096
10097
  tokens
@@ -10105,10 +10106,10 @@ var init_google2 = __esm({
10105
10106
  "../backend-core/src/middleware/passport/datasource/google.ts"() {
10106
10107
  init_google();
10107
10108
  init_constants2();
10108
- init_utils5();
10109
10109
  init_configs3();
10110
+ init_cache();
10111
+ init_utils5();
10110
10112
  init_sso2();
10111
- init_src2();
10112
10113
  GoogleStrategy2 = require("passport-google-oauth").OAuth2Strategy;
10113
10114
  }
10114
10115
  });
@@ -24333,7 +24334,16 @@ async function checkResponse(response2, errorMsg, { ctx } = {}) {
24333
24334
  }
24334
24335
  return response2.json();
24335
24336
  }
24336
- async function sendSmtpEmail(to, from, subject, contents, cc, bcc, automation) {
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 { to, from, subject, contents, cc, bcc } = inputs;
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"]