@budibase/types 3.2.25 → 3.2.26

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,13 +2,26 @@ export interface LoginRequest {
2
2
  username: string;
3
3
  password: string;
4
4
  }
5
+ export interface LogoutResponse {
6
+ message: string;
7
+ }
8
+ export interface SetInitInfoRequest extends Record<string, any> {
9
+ }
10
+ export interface GetInitInfoResponse extends Record<string, any> {
11
+ }
5
12
  export interface PasswordResetRequest {
6
13
  email: string;
7
14
  }
15
+ export interface PasswordResetResponse {
16
+ message: string;
17
+ }
8
18
  export interface PasswordResetUpdateRequest {
9
19
  resetCode: string;
10
20
  password: string;
11
21
  }
22
+ export interface PasswordResetUpdateResponse {
23
+ message: string;
24
+ }
12
25
  export interface UpdateSelfRequest {
13
26
  firstName?: string;
14
27
  lastName?: string;
@@ -1,4 +1,4 @@
1
- import { SettingsConfig, SettingsInnerConfig } from "../../../documents";
1
+ import { Config, ConfigType, SettingsBrandingConfig, SettingsConfig, SettingsInnerConfig } from "../../../documents";
2
2
  /**
3
3
  * Settings that aren't stored in the database - enriched at runtime.
4
4
  */
@@ -18,3 +18,31 @@ export interface PublicOIDCConfig {
18
18
  uuid?: string;
19
19
  }
20
20
  export type GetPublicOIDCConfigResponse = PublicOIDCConfig[];
21
+ export interface SaveConfigRequest extends Config {
22
+ }
23
+ export interface SaveConfigResponse {
24
+ type: ConfigType;
25
+ _id: string;
26
+ _rev: string;
27
+ }
28
+ export interface DeleteConfigResponse {
29
+ message: string;
30
+ }
31
+ interface ChecklistItem {
32
+ checked: boolean;
33
+ label: string;
34
+ link: string;
35
+ }
36
+ export interface ConfigChecklistResponse {
37
+ apps: ChecklistItem;
38
+ smtp: ChecklistItem;
39
+ adminUser: ChecklistItem;
40
+ sso: ChecklistItem;
41
+ branding: SettingsBrandingConfig;
42
+ }
43
+ export type FindConfigResponse = Config | {};
44
+ export interface UploadConfigFileResponse {
45
+ message: string;
46
+ url: string;
47
+ }
48
+ export {};
@@ -0,0 +1,26 @@
1
+ import { EmailAttachment, EmailInvite } from "../../../documents";
2
+ export declare enum EmailTemplatePurpose {
3
+ CORE = "core",
4
+ BASE = "base",
5
+ PASSWORD_RECOVERY = "password_recovery",
6
+ INVITATION = "invitation",
7
+ WELCOME = "welcome",
8
+ CUSTOM = "custom"
9
+ }
10
+ export interface SendEmailRequest {
11
+ workspaceId?: string;
12
+ email: string;
13
+ userId: string;
14
+ purpose: EmailTemplatePurpose;
15
+ contents?: string;
16
+ from?: string;
17
+ subject: string;
18
+ cc?: boolean;
19
+ bcc?: boolean;
20
+ automation?: boolean;
21
+ invite?: EmailInvite;
22
+ attachments?: EmailAttachment[];
23
+ }
24
+ export interface SendEmailResponse extends Record<string, any> {
25
+ message: string;
26
+ }
@@ -5,3 +5,7 @@ export * from "./configs";
5
5
  export * from "./scim";
6
6
  export * from "./license";
7
7
  export * from "./oldMigration";
8
+ export * from "./email";
9
+ export * from "./role";
10
+ export * from "./self";
11
+ export * from "./template";
@@ -1,3 +1,4 @@
1
+ import { QuotaUsage } from "../../../documents";
1
2
  export interface ActivateLicenseKeyRequest {
2
3
  licenseKey: string;
3
4
  }
@@ -13,3 +14,5 @@ export interface GetOfflineLicenseTokenResponse {
13
14
  export interface GetOfflineIdentifierResponse {
14
15
  identifierBase64: string;
15
16
  }
17
+ export interface GetQuotaUsageResponse extends QuotaUsage {
18
+ }
@@ -0,0 +1,15 @@
1
+ import { Role } from "../../../documents";
2
+ interface GlobalRoleResponse {
3
+ roles: Role[];
4
+ name: string;
5
+ version: string;
6
+ url?: string;
7
+ }
8
+ export interface FetchGlobalRolesResponse extends Record<string, GlobalRoleResponse> {
9
+ }
10
+ export interface FindGlobalRoleResponse extends GlobalRoleResponse {
11
+ }
12
+ export interface RemoveAppRoleResponse {
13
+ message: string;
14
+ }
15
+ export {};
@@ -0,0 +1,11 @@
1
+ import { DevInfo, User } from "../../../documents";
2
+ export interface GenerateAPIKeyRequest {
3
+ userId: string;
4
+ }
5
+ export interface GenerateAPIKeyResponse extends DevInfo {
6
+ }
7
+ export interface FetchAPIKeyResponse extends DevInfo {
8
+ }
9
+ export interface GetGlobalSelfResponse extends User {
10
+ flags?: Record<string, string>;
11
+ }
@@ -0,0 +1,26 @@
1
+ import { Template } from "../../../documents";
2
+ export interface GlobalTemplateDefinition {
3
+ name: string;
4
+ description: string;
5
+ category: string;
6
+ }
7
+ export interface GlobalTemplateBinding {
8
+ name: string;
9
+ description: string;
10
+ }
11
+ export interface FetchGlobalTemplateDefinitionResponse {
12
+ info: Record<string, GlobalTemplateDefinition>;
13
+ bindings: Record<string, GlobalTemplateBinding[]>;
14
+ }
15
+ export interface SaveGlobalTemplateRequest extends Template {
16
+ }
17
+ export interface SaveGlobalTemplateResponse extends Template {
18
+ }
19
+ export type FetchGlobalTemplateResponse = Template[];
20
+ export type FetchGlobalTemplateByTypeResponse = Template[];
21
+ export type FetchGlobalTemplateByOwnerIDResponse = Template[];
22
+ export interface FindGlobalTemplateResponse extends Template {
23
+ }
24
+ export interface DeleteGlobalTemplateResponse {
25
+ message: string;
26
+ }
@@ -0,0 +1,5 @@
1
+ import { Account, AccountMetadata } from "../../../documents";
2
+ export interface SaveAccountRequest extends Account {
3
+ }
4
+ export interface SaveAccountResponse extends AccountMetadata {
5
+ }
@@ -1,8 +1,13 @@
1
1
  export interface GetEnvironmentResponse {
2
2
  multiTenancy: boolean;
3
+ offlineMode: boolean;
3
4
  cloud: boolean;
4
- accountPortalUrl: string;
5
- baseUrl: string;
5
+ accountPortalUrl?: string;
6
6
  disableAccountPortal: boolean;
7
+ baseUrl?: string;
7
8
  isDev: boolean;
9
+ maintenance: {
10
+ type: string;
11
+ }[];
12
+ passwordMinLength?: string;
8
13
  }
@@ -1,3 +1,8 @@
1
1
  export * from "./environment";
2
2
  export * from "./status";
3
3
  export * from "./ops";
4
+ export * from "./account";
5
+ export * from "./log";
6
+ export * from "./migration";
7
+ export * from "./restore";
8
+ export * from "./tenant";
@@ -0,0 +1 @@
1
+ export type GetLogResponse = Buffer;
@@ -0,0 +1,4 @@
1
+ import { MigrationDefinition, MigrationOptions } from "../../../sdk";
2
+ export interface RunGlobalMigrationRequest extends MigrationOptions {
3
+ }
4
+ export type FetchMigrationDefinitionsResponse = MigrationDefinition[];
@@ -0,0 +1,3 @@
1
+ export interface SystemRestoreResponse {
2
+ message: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetTenantInfoResponse {
2
+ exists: boolean;
3
+ }
@@ -1,5 +1,12 @@
1
- import { User } from "../../documents";
1
+ import { AccountMetadata, PlatformUser, User } from "../../documents";
2
2
  import { SearchFilters } from "../../sdk";
3
+ export interface Invite {
4
+ email: string;
5
+ info: any;
6
+ }
7
+ export interface InviteWithCode extends Invite {
8
+ code: string;
9
+ }
3
10
  export interface SaveUserResponse {
4
11
  _id: string;
5
12
  _rev: string;
@@ -47,11 +54,24 @@ export interface InviteUserRequest {
47
54
  email: string;
48
55
  userInfo: any;
49
56
  }
57
+ export interface InviteUserResponse {
58
+ message: string;
59
+ successful: {
60
+ email: string;
61
+ }[];
62
+ unsuccessful: {
63
+ email: string;
64
+ reason: string;
65
+ }[];
66
+ }
50
67
  export interface DeleteInviteUserRequest {
51
68
  code: string;
52
69
  }
53
70
  export type InviteUsersRequest = InviteUserRequest[];
54
71
  export type DeleteInviteUsersRequest = DeleteInviteUserRequest[];
72
+ export interface DeleteInviteUsersResponse {
73
+ message: string;
74
+ }
55
75
  export interface InviteUsersResponse {
56
76
  successful: {
57
77
  email: string;
@@ -69,6 +89,15 @@ export interface SearchUsersRequest {
69
89
  limit?: number;
70
90
  paginate?: boolean;
71
91
  }
92
+ export interface SearchUsersResponse {
93
+ data: User[];
94
+ hasNextPage?: boolean;
95
+ nextPage?: string;
96
+ }
97
+ export type FetchUsersResponse = User[];
98
+ export interface FindUserResponse extends User {
99
+ }
100
+ export type LookupTenantUserResponse = PlatformUser;
72
101
  export interface CreateAdminUserRequest {
73
102
  email: string;
74
103
  password?: string;
@@ -101,3 +130,23 @@ export interface AcceptUserInviteResponse {
101
130
  export interface SyncUserRequest {
102
131
  previousUser?: User;
103
132
  }
133
+ export interface DeleteUserResponse {
134
+ message: string;
135
+ }
136
+ export interface CountUserResponse {
137
+ userCount: number;
138
+ }
139
+ export interface CheckInviteResponse {
140
+ email: string;
141
+ }
142
+ export type GetUserInvitesResponse = InviteWithCode[];
143
+ export interface UpdateInviteRequest extends Omit<Invite, "email"> {
144
+ email?: string;
145
+ builder?: {
146
+ apps: string[];
147
+ };
148
+ apps: string[];
149
+ }
150
+ export interface UpdateInviteResponse extends Invite {
151
+ }
152
+ export type LookupAccountHolderResponse = AccountMetadata | null;
@@ -0,0 +1,5 @@
1
+ import { Document } from "../document";
2
+ export interface DevInfo extends Document {
3
+ userId: string;
4
+ apiKey?: string;
5
+ }
@@ -8,3 +8,4 @@ export * from "./templates";
8
8
  export * from "./environmentVariables";
9
9
  export * from "./auditLogs";
10
10
  export * from "./apikeys";
11
+ export * from "./devInfo";
package/dist/index.js CHANGED
@@ -65,6 +65,7 @@ __export(src_exports, {
65
65
  DeploymentStatus: () => DeploymentStatus,
66
66
  DocumentType: () => DocumentType,
67
67
  DocumentTypesToImport: () => DocumentTypesToImport,
68
+ EmailTemplatePurpose: () => EmailTemplatePurpose,
68
69
  EmptyFilterOption: () => EmptyFilterOption,
69
70
  Event: () => Event,
70
71
  EventPublishType: () => EventPublishType,
@@ -1549,6 +1550,17 @@ var EventPublishType = /* @__PURE__ */ ((EventPublishType2) => {
1549
1550
  return EventPublishType2;
1550
1551
  })(EventPublishType || {});
1551
1552
 
1553
+ // src/api/web/global/email.ts
1554
+ var EmailTemplatePurpose = /* @__PURE__ */ ((EmailTemplatePurpose2) => {
1555
+ EmailTemplatePurpose2["CORE"] = "core";
1556
+ EmailTemplatePurpose2["BASE"] = "base";
1557
+ EmailTemplatePurpose2["PASSWORD_RECOVERY"] = "password_recovery";
1558
+ EmailTemplatePurpose2["INVITATION"] = "invitation";
1559
+ EmailTemplatePurpose2["WELCOME"] = "welcome";
1560
+ EmailTemplatePurpose2["CUSTOM"] = "custom";
1561
+ return EmailTemplatePurpose2;
1562
+ })(EmailTemplatePurpose || {});
1563
+
1552
1564
  // src/api/web/template.ts
1553
1565
  var TemplateType = /* @__PURE__ */ ((TemplateType2) => {
1554
1566
  TemplateType2["APP"] = "app";
@@ -1623,6 +1635,7 @@ var EventType = /* @__PURE__ */ ((EventType2) => {
1623
1635
  DeploymentStatus,
1624
1636
  DocumentType,
1625
1637
  DocumentTypesToImport,
1638
+ EmailTemplatePurpose,
1626
1639
  EmptyFilterOption,
1627
1640
  Event,
1628
1641
  EventPublishType,