@budibase/types 3.4.20 → 3.4.22

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.
@@ -1,4 +1,5 @@
1
1
  import { EmailAttachment, EmailInvite } from "../../../documents";
2
+ import SMTPTransport from "nodemailer/lib/smtp-transport";
2
3
  export declare enum EmailTemplatePurpose {
3
4
  CORE = "core",
4
5
  BASE = "base",
@@ -8,19 +9,18 @@ export declare enum EmailTemplatePurpose {
8
9
  CUSTOM = "custom"
9
10
  }
10
11
  export interface SendEmailRequest {
11
- workspaceId?: string;
12
12
  email: string;
13
- userId: string;
13
+ userId?: string;
14
14
  purpose: EmailTemplatePurpose;
15
15
  contents?: string;
16
16
  from?: string;
17
17
  subject: string;
18
- cc?: boolean;
19
- bcc?: boolean;
18
+ cc?: string;
19
+ bcc?: string;
20
20
  automation?: boolean;
21
21
  invite?: EmailInvite;
22
22
  attachments?: EmailAttachment[];
23
23
  }
24
- export interface SendEmailResponse extends Record<string, any> {
24
+ export interface SendEmailResponse extends SMTPTransport.SentMessageInfo {
25
25
  message: string;
26
26
  }
@@ -1,10 +1,10 @@
1
1
  import { Document } from "../../document";
2
2
  import { User } from "../../global";
3
- import { ReadStream } from "fs";
4
3
  import { Row } from "../row";
5
4
  import { Table } from "../table";
6
5
  import { AutomationStep, AutomationTrigger } from "./schema";
7
6
  import { ContextEmitter } from "../../../sdk";
7
+ import { Readable } from "stream";
8
8
  export declare enum AutomationIOType {
9
9
  OBJECT = "object",
10
10
  STRING = "string",
@@ -88,13 +88,13 @@ export interface EmailAttachment {
88
88
  export interface SendEmailOpts {
89
89
  to?: string;
90
90
  workspaceId?: string;
91
- user: User;
91
+ user?: User;
92
92
  from?: string;
93
93
  contents?: string;
94
94
  subject: string;
95
95
  info?: any;
96
- cc?: boolean;
97
- bcc?: boolean;
96
+ cc?: string;
97
+ bcc?: string;
98
98
  automation?: boolean;
99
99
  invite?: EmailInvite;
100
100
  attachments?: EmailAttachment[];
@@ -226,7 +226,7 @@ export type AutomationAttachment = {
226
226
  };
227
227
  export type AutomationAttachmentContent = {
228
228
  filename: string;
229
- content: ReadStream | NodeJS.ReadableStream;
229
+ content: Readable;
230
230
  };
231
231
  export type BucketedContent = AutomationAttachmentContent & {
232
232
  bucket: string;
@@ -23,12 +23,27 @@ export interface Plugin extends Document {
23
23
  [key: string]: any;
24
24
  };
25
25
  hash: string;
26
- schema: {
27
- type: PluginType;
28
- [key: string]: any;
29
- };
26
+ schema: PluginSchema;
30
27
  iconFileName?: string;
31
28
  jsUrl?: string;
32
29
  iconUrl?: string;
33
30
  }
34
31
  export declare const PLUGIN_TYPE_ARR: PluginType[];
32
+ export interface PluginSchema {
33
+ type: PluginType;
34
+ [key: string]: any;
35
+ }
36
+ interface Package {
37
+ name: string;
38
+ version: string;
39
+ description: string;
40
+ }
41
+ export interface PluginMetadata {
42
+ schema: PluginSchema;
43
+ package: Package;
44
+ }
45
+ export interface PluginUpload {
46
+ metadata: PluginMetadata;
47
+ directory: string;
48
+ }
49
+ export {};