@budibase/types 3.2.18 → 3.2.20

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.
@@ -2,6 +2,9 @@ export declare enum PingSource {
2
2
  BUILDER = "builder",
3
3
  APP = "app"
4
4
  }
5
+ export interface AnalyticsEnabledResponse {
6
+ enabled: boolean;
7
+ }
5
8
  export interface AnalyticsPingRequest {
6
9
  source: PingSource;
7
10
  timezone: string;
@@ -0,0 +1,8 @@
1
+ export type ApiKeyFetchResponse = Record<string, string>;
2
+ export interface UpdateApiKeyRequest {
3
+ value: string;
4
+ }
5
+ export interface UpdateApiKeyResponse {
6
+ _id: string;
7
+ _rev: string;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { AutomationActionStepId, AutomationStepDefinition, AutomationTriggerDefinition, AutomationTriggerStepId } from "../../../documents";
2
+ export type GetAutomationTriggerDefinitionsResponse = Record<keyof typeof AutomationTriggerStepId, AutomationTriggerDefinition>;
3
+ export type GetAutomationActionDefinitionsResponse = Record<keyof typeof AutomationActionStepId, AutomationStepDefinition>;
4
+ export interface GetAutomationStepDefinitionsResponse {
5
+ trigger: GetAutomationTriggerDefinitionsResponse;
6
+ action: GetAutomationActionDefinitionsResponse;
7
+ }
@@ -0,0 +1 @@
1
+ export type FetchComponentDefinitionResponse = Record<string, Record<string, any>>;
@@ -33,3 +33,11 @@ export interface BuildSchemaFromSourceResponse {
33
33
  datasource: Datasource;
34
34
  errors: Record<string, string>;
35
35
  }
36
+ export type FetchDatasourcesResponse = Datasource[];
37
+ export type FindDatasourcesResponse = Datasource;
38
+ export interface DeleteDatasourceResponse {
39
+ message: string;
40
+ }
41
+ export interface FetchExternalSchemaResponse {
42
+ schema: string;
43
+ }
@@ -8,3 +8,5 @@ export * from "./permission";
8
8
  export * from "./attachment";
9
9
  export * from "./user";
10
10
  export * from "./rowAction";
11
+ export * from "./automation";
12
+ export * from "./component";
@@ -5,3 +5,4 @@ export interface SetFlagRequest {
5
5
  flag: string;
6
6
  value: any;
7
7
  }
8
+ export type AppSelfResponse = ContextUserMetadata | {};
@@ -1,5 +1,9 @@
1
1
  import type { PlanType } from "../../sdk";
2
2
  import type { Layout, App, Screen } from "../../documents";
3
+ import { ReadStream } from "fs";
4
+ export interface SyncAppResponse {
5
+ message: string;
6
+ }
3
7
  export interface CreateAppRequest {
4
8
  name: string;
5
9
  url?: string;
@@ -12,6 +16,8 @@ export interface CreateAppRequest {
12
16
  path: string;
13
17
  };
14
18
  }
19
+ export interface CreateAppResponse extends App {
20
+ }
15
21
  export interface DuplicateAppRequest {
16
22
  name: string;
17
23
  url?: string;
@@ -33,6 +39,7 @@ export interface FetchAppPackageResponse {
33
39
  clientLibPath: string;
34
40
  hasLock: boolean;
35
41
  }
42
+ export type FetchAppsResponse = App[];
36
43
  export interface PublishResponse {
37
44
  _id: string;
38
45
  status: string;
@@ -42,3 +49,24 @@ export interface UpdateAppRequest extends Partial<App> {
42
49
  }
43
50
  export interface UpdateAppResponse extends App {
44
51
  }
52
+ export interface UpdateAppClientResponse extends App {
53
+ }
54
+ export interface RevertAppClientResponse extends App {
55
+ }
56
+ export interface DeleteAppResponse {
57
+ ok: boolean;
58
+ }
59
+ export interface ImportToUpdateAppRequest {
60
+ encryptionPassword?: string;
61
+ }
62
+ export interface ImportToUpdateAppResponse {
63
+ message: string;
64
+ }
65
+ export interface SetRevertableAppVersionRequest {
66
+ revertableVersion: string;
67
+ }
68
+ export interface ExportAppDumpRequest {
69
+ excludeRows: boolean;
70
+ encryptPassword?: string;
71
+ }
72
+ export type ExportAppDumpResponse = ReadStream;
@@ -1,7 +1,49 @@
1
1
  import { DocumentDestroyResponse } from "@budibase/nano";
2
- import { Automation } from "../../documents";
2
+ import { Automation, AutomationLogPage, AutomationStatus, Row } from "../../documents";
3
3
  export interface DeleteAutomationResponse extends DocumentDestroyResponse {
4
4
  }
5
5
  export interface FetchAutomationResponse {
6
6
  automations: Automation[];
7
7
  }
8
+ export interface FindAutomationResponse extends Automation {
9
+ }
10
+ export interface UpdateAutomationRequest extends Automation {
11
+ }
12
+ export interface UpdateAutomationResponse {
13
+ message: string;
14
+ automation: Automation;
15
+ }
16
+ export interface CreateAutomationRequest extends Automation {
17
+ }
18
+ export interface CreateAutomationResponse {
19
+ message: string;
20
+ automation: Automation;
21
+ }
22
+ export interface SearchAutomationLogsRequest {
23
+ startDate?: string;
24
+ status?: AutomationStatus;
25
+ automationId?: string;
26
+ page?: string;
27
+ }
28
+ export interface SearchAutomationLogsResponse extends AutomationLogPage {
29
+ }
30
+ export interface ClearAutomationLogRequest {
31
+ automationId: string;
32
+ appId: string;
33
+ }
34
+ export interface ClearAutomationLogResponse {
35
+ message: string;
36
+ }
37
+ export interface TriggerAutomationRequest {
38
+ fields: Record<string, any>;
39
+ timeout: number;
40
+ }
41
+ export type TriggerAutomationResponse = Record<string, any> | undefined;
42
+ export interface TestAutomationRequest {
43
+ id?: string;
44
+ revision?: string;
45
+ fields: Record<string, any>;
46
+ row?: Row;
47
+ }
48
+ export interface TestAutomationResponse {
49
+ }
@@ -0,0 +1,10 @@
1
+ import { DeploymentDoc, DeploymentStatus } from "../../documents";
2
+ export interface PublishAppResponse extends DeploymentDoc {
3
+ }
4
+ export interface DeploymentProgressResponse {
5
+ _id: string;
6
+ appId: string;
7
+ status?: DeploymentStatus;
8
+ updatedAt: number;
9
+ }
10
+ export type FetchDeploymentResponse = DeploymentProgressResponse[];
@@ -0,0 +1,9 @@
1
+ export interface GetVersionResponse {
2
+ version: string;
3
+ }
4
+ export interface ClearDevLockResponse {
5
+ message: string;
6
+ }
7
+ export interface RevertAppResponse {
8
+ message: string;
9
+ }
@@ -16,3 +16,6 @@ export * from "./layout";
16
16
  export * from "./query";
17
17
  export * from "./role";
18
18
  export * from "./plugins";
19
+ export * from "./apikeys";
20
+ export * from "./deployment";
21
+ export * from "./dev";
@@ -113,7 +113,7 @@ export type OpenAIStepInputs = {
113
113
  prompt: string;
114
114
  model: Model;
115
115
  };
116
- declare enum Model {
116
+ export declare enum Model {
117
117
  GPT_35_TURBO = "gpt-3.5-turbo",
118
118
  GPT_4 = "gpt-4",
119
119
  GPT_4O = "gpt-4o",
@@ -99,7 +99,7 @@ export interface SendEmailOpts {
99
99
  invite?: EmailInvite;
100
100
  attachments?: EmailAttachment[];
101
101
  }
102
- export declare const AutomationStepIdArray: (AutomationActionStepId | AutomationTriggerStepId)[];
102
+ export declare const AutomationStepIdArray: (AutomationTriggerStepId | AutomationActionStepId)[];
103
103
  export interface Automation extends Document {
104
104
  definition: {
105
105
  steps: AutomationStep[];
@@ -74,9 +74,11 @@ export type AutomationStep = CollectStep | CreateRowStep | DelayStep | DeleteRow
74
74
  type EmptyInputs = {};
75
75
  export type AutomationStepDefinition = Omit<AutomationStep, "id" | "inputs"> & {
76
76
  inputs: EmptyInputs;
77
+ deprecated?: boolean;
77
78
  };
78
79
  export type AutomationTriggerDefinition = Omit<AutomationTrigger, "id" | "inputs"> & {
79
80
  inputs: EmptyInputs;
81
+ deprecated?: boolean;
80
82
  };
81
83
  export type AutomationTriggerInputs<T extends AutomationTriggerStepId> = T extends AutomationTriggerStepId.APP ? AppActionTriggerInputs : T extends AutomationTriggerStepId.CRON ? CronTriggerInputs : T extends AutomationTriggerStepId.ROW_ACTION ? Record<string, any> : T extends AutomationTriggerStepId.ROW_DELETED ? RowDeletedTriggerInputs : T extends AutomationTriggerStepId.ROW_SAVED ? RowCreatedTriggerInputs : T extends AutomationTriggerStepId.ROW_UPDATED ? RowUpdatedTriggerInputs : T extends AutomationTriggerStepId.WEBHOOK ? Record<string, any> : never;
82
84
  export interface AutomationTriggerSchema<TTrigger extends AutomationTriggerStepId> extends AutomationStepSchemaBase {
@@ -0,0 +1,18 @@
1
+ export declare enum DeploymentStatus {
2
+ SUCCESS = "SUCCESS",
3
+ PENDING = "PENDING",
4
+ FAILURE = "FAILURE"
5
+ }
6
+ export interface DeploymentDoc {
7
+ _id: string;
8
+ verification: any;
9
+ status?: DeploymentStatus;
10
+ history?: Record<string, {
11
+ _id: string;
12
+ appId: string;
13
+ status?: DeploymentStatus;
14
+ updatedAt: number;
15
+ }>;
16
+ err?: any;
17
+ appUrl?: string;
18
+ }
@@ -18,3 +18,4 @@ export * from "./sqlite";
18
18
  export * from "./snippet";
19
19
  export * from "./rowAction";
20
20
  export * from "./theme";
21
+ export * from "./deployment";
@@ -0,0 +1,4 @@
1
+ import { Document } from "../../";
2
+ export interface ApiKeyDoc extends Document {
3
+ apiKeys: Record<string, string>;
4
+ }
@@ -7,3 +7,4 @@ export * from "./schedule";
7
7
  export * from "./templates";
8
8
  export * from "./environmentVariables";
9
9
  export * from "./auditLogs";
10
+ export * from "./apikeys";
package/dist/index.js CHANGED
@@ -62,6 +62,7 @@ __export(src_exports, {
62
62
  DSPlusOperation: () => DSPlusOperation,
63
63
  DatasourceFeature: () => DatasourceFeature,
64
64
  DatasourceFieldType: () => DatasourceFieldType,
65
+ DeploymentStatus: () => DeploymentStatus,
65
66
  DocumentType: () => DocumentType,
66
67
  DocumentTypesToImport: () => DocumentTypesToImport,
67
68
  EmptyFilterOption: () => EmptyFilterOption,
@@ -93,6 +94,7 @@ __export(src_exports, {
93
94
  MaintenanceType: () => MaintenanceType,
94
95
  MigrationName: () => MigrationName,
95
96
  MigrationType: () => MigrationType,
97
+ Model: () => Model,
96
98
  MonthlyQuotaName: () => MonthlyQuotaName,
97
99
  NumericTypes: () => NumericTypes,
98
100
  Operation: () => Operation,
@@ -1060,6 +1062,15 @@ var LoopStepType = /* @__PURE__ */ ((LoopStepType2) => {
1060
1062
  return LoopStepType2;
1061
1063
  })(LoopStepType || {});
1062
1064
 
1065
+ // src/documents/app/automation/StepInputsOutputs.ts
1066
+ var Model = /* @__PURE__ */ ((Model2) => {
1067
+ Model2["GPT_35_TURBO"] = "gpt-3.5-turbo";
1068
+ Model2["GPT_4"] = "gpt-4";
1069
+ Model2["GPT_4O"] = "gpt-4o";
1070
+ Model2["GPT_4O_MINI"] = "gpt-4o-mini";
1071
+ return Model2;
1072
+ })(Model || {});
1073
+
1063
1074
  // src/documents/app/datasource.ts
1064
1075
  var RestAuthType = /* @__PURE__ */ ((RestAuthType2) => {
1065
1076
  RestAuthType2["BASIC"] = "basic";
@@ -1347,6 +1358,14 @@ var Theme = /* @__PURE__ */ ((Theme2) => {
1347
1358
  return Theme2;
1348
1359
  })(Theme || {});
1349
1360
 
1361
+ // src/documents/app/deployment.ts
1362
+ var DeploymentStatus = /* @__PURE__ */ ((DeploymentStatus2) => {
1363
+ DeploymentStatus2["SUCCESS"] = "SUCCESS";
1364
+ DeploymentStatus2["PENDING"] = "PENDING";
1365
+ DeploymentStatus2["FAILURE"] = "FAILURE";
1366
+ return DeploymentStatus2;
1367
+ })(DeploymentStatus || {});
1368
+
1350
1369
  // src/documents/global/config.ts
1351
1370
  var isSettingsConfig = (config) => config.type === "settings" /* SETTINGS */;
1352
1371
  var isSMTPConfig = (config) => config.type === "smtp" /* SMTP */;
@@ -1586,6 +1605,7 @@ var EventType = /* @__PURE__ */ ((EventType2) => {
1586
1605
  DSPlusOperation,
1587
1606
  DatasourceFeature,
1588
1607
  DatasourceFieldType,
1608
+ DeploymentStatus,
1589
1609
  DocumentType,
1590
1610
  DocumentTypesToImport,
1591
1611
  EmptyFilterOption,
@@ -1617,6 +1637,7 @@ var EventType = /* @__PURE__ */ ((EventType2) => {
1617
1637
  MaintenanceType,
1618
1638
  MigrationName,
1619
1639
  MigrationType,
1640
+ Model,
1620
1641
  MonthlyQuotaName,
1621
1642
  NumericTypes,
1622
1643
  Operation,