@budibase/types 2.9.19 → 2.9.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.
- package/dist/api/account/accounts.d.ts +17 -0
- package/dist/api/account/index.d.ts +4 -0
- package/dist/api/account/license.d.ts +31 -0
- package/dist/api/account/status.d.ts +7 -0
- package/{src/api/account/user.ts → dist/api/account/user.d.ts} +3 -4
- package/dist/api/index.d.ts +2 -0
- package/dist/api/web/analytics.d.ts +9 -0
- package/{src/api/web/app/backup.ts → dist/api/web/app/backup.d.ts} +10 -14
- package/{src/api/web/app/datasource.ts → dist/api/web/app/datasource.d.ts} +13 -21
- package/dist/api/web/app/index.d.ts +6 -0
- package/dist/api/web/app/row.d.ts +8 -0
- package/dist/api/web/app/rows.d.ts +11 -0
- package/dist/api/web/app/table.d.ts +12 -0
- package/dist/api/web/app/view.d.ts +10 -0
- package/dist/api/web/auth.d.ts +22 -0
- package/dist/api/web/debug.d.ts +11 -0
- package/dist/api/web/errors.d.ts +6 -0
- package/dist/api/web/global/auditLogs.d.ts +39 -0
- package/{src/api/web/global/configs.ts → dist/api/web/global/configs.d.ts} +11 -15
- package/{src/api/web/global/environmentVariables.ts → dist/api/web/global/environmentVariables.d.ts} +7 -10
- package/dist/api/web/global/events.d.ts +6 -0
- package/dist/api/web/global/index.d.ts +6 -0
- package/{src/api/web/global/license.ts → dist/api/web/global/license.d.ts} +5 -15
- package/dist/api/web/global/scim/groups.d.ts +27 -0
- package/dist/api/web/global/scim/index.d.ts +3 -0
- package/dist/api/web/global/scim/shared.d.ts +12 -0
- package/dist/api/web/global/scim/users.d.ts +48 -0
- package/dist/api/web/index.d.ts +10 -0
- package/dist/api/web/pagination.d.ts +23 -0
- package/dist/api/web/schedule.d.ts +10 -0
- package/dist/api/web/system/environment.d.ts +8 -0
- package/dist/api/web/system/index.d.ts +1 -0
- package/dist/api/web/user.d.ts +84 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/installation.d.ts +4 -0
- package/dist/documents/account/account.d.ts +78 -0
- package/dist/documents/account/index.d.ts +2 -0
- package/{src/documents/account/user.ts → dist/documents/account/user.d.ts} +5 -6
- package/dist/documents/app/app.d.ts +61 -0
- package/dist/documents/app/automation.d.ts +192 -0
- package/dist/documents/app/backup.d.ts +63 -0
- package/dist/documents/app/component.d.ts +10 -0
- package/dist/documents/app/datasource.d.ts +49 -0
- package/dist/documents/app/index.d.ts +16 -0
- package/dist/documents/app/layout.d.ts +4 -0
- package/dist/documents/app/links.d.ts +19 -0
- package/dist/documents/app/query.d.ts +49 -0
- package/dist/documents/app/role.d.ts +9 -0
- package/dist/documents/app/row.d.ts +31 -0
- package/dist/documents/app/screen.d.ts +22 -0
- package/dist/documents/app/table/constants.d.ts +8 -0
- package/dist/documents/app/table/index.d.ts +3 -0
- package/dist/documents/app/table/schema.d.ts +71 -0
- package/dist/documents/app/table/table.d.ts +33 -0
- package/dist/documents/app/user.d.ts +5 -0
- package/dist/documents/app/view.d.ts +59 -0
- package/dist/documents/app/webhook.d.ts +13 -0
- package/dist/documents/document.d.ts +47 -0
- package/dist/documents/global/auditLogs.d.ts +16 -0
- package/dist/documents/global/config.d.ts +112 -0
- package/dist/documents/global/environmentVariables.d.ts +12 -0
- package/dist/documents/global/index.d.ts +9 -0
- package/dist/documents/global/plugin.d.ts +34 -0
- package/dist/documents/global/quotas.d.ts +63 -0
- package/dist/documents/global/schedule.d.ts +21 -0
- package/dist/documents/global/templates.d.ts +8 -0
- package/dist/documents/global/user.d.ts +74 -0
- package/dist/documents/global/userGroup.d.ts +32 -0
- package/dist/documents/index.d.ts +6 -0
- package/dist/documents/platform/accounts.d.ts +4 -0
- package/dist/documents/platform/index.d.ts +4 -0
- package/dist/documents/platform/info.d.ts +8 -0
- package/dist/documents/platform/tenants.d.ts +4 -0
- package/dist/documents/platform/users.d.ts +15 -0
- package/dist/documents/pouch.d.ts +28 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1159 -0
- package/dist/index.js.map +7 -0
- package/dist/index.js.meta.json +1 -0
- package/dist/sdk/auditLogs.d.ts +15 -0
- package/dist/sdk/auth.d.ts +30 -0
- package/dist/sdk/automations/index.d.ts +13 -0
- package/dist/sdk/cli/constants.d.ts +18 -0
- package/dist/sdk/cli/index.d.ts +1 -0
- package/dist/sdk/context.d.ts +18 -0
- package/dist/sdk/datasources.d.ts +159 -0
- package/dist/sdk/db.d.ts +91 -0
- package/dist/sdk/environmentVariables.d.ts +4 -0
- package/{src/sdk/events/account.ts → dist/sdk/events/account.d.ts} +6 -9
- package/dist/sdk/events/app.d.ts +74 -0
- package/dist/sdk/events/auditLog.d.ts +8 -0
- package/dist/sdk/events/auth.d.ts +29 -0
- package/dist/sdk/events/automation.d.ts +56 -0
- package/{src/sdk/events/backfill.ts → dist/sdk/events/backfill.d.ts} +26 -34
- package/dist/sdk/events/backup.d.ts +15 -0
- package/dist/sdk/events/datasource.d.ts +16 -0
- package/dist/sdk/events/email.d.ts +5 -0
- package/{src/sdk/events/environmentVariable.ts → dist/sdk/events/environmentVariable.d.ts} +5 -8
- package/dist/sdk/events/event.d.ts +155 -0
- package/dist/sdk/events/identification.d.ts +45 -0
- package/dist/sdk/events/index.d.ts +25 -0
- package/{src/sdk/events/layout.ts → dist/sdk/events/layout.d.ts} +3 -5
- package/dist/sdk/events/license.d.ts +28 -0
- package/dist/sdk/events/plugin.d.ts +23 -0
- package/dist/sdk/events/query.d.ts +34 -0
- package/dist/sdk/events/role.d.ts +24 -0
- package/{src/sdk/events/rows.ts → dist/sdk/events/rows.d.ts} +4 -6
- package/dist/sdk/events/screen.d.ts +17 -0
- package/{src/sdk/events/serve.ts → dist/sdk/events/serve.d.ts} +7 -10
- package/dist/sdk/events/table.d.ts +32 -0
- package/dist/sdk/events/user.d.ts +79 -0
- package/dist/sdk/events/userGroup.d.ts +49 -0
- package/{src/sdk/events/version.ts → dist/sdk/events/version.d.ts} +4 -6
- package/{src/sdk/events/view.ts → dist/sdk/events/view.d.ts} +16 -26
- package/dist/sdk/featureFlag.d.ts +6 -0
- package/dist/sdk/hosting.d.ts +4 -0
- package/dist/sdk/index.d.ts +21 -0
- package/dist/sdk/koa.d.ts +44 -0
- package/dist/sdk/licensing/billing.d.ts +21 -0
- package/dist/sdk/licensing/feature.d.ts +16 -0
- package/dist/sdk/licensing/index.d.ts +5 -0
- package/dist/sdk/licensing/license.d.ts +17 -0
- package/dist/sdk/licensing/plan.d.ts +41 -0
- package/dist/sdk/licensing/quota.d.ts +69 -0
- package/dist/sdk/locks.d.ts +47 -0
- package/dist/sdk/middleware/index.d.ts +2 -0
- package/dist/sdk/middleware/matchers.d.ts +21 -0
- package/dist/sdk/middleware/tenancy.d.ts +12 -0
- package/dist/sdk/migrations.d.ts +46 -0
- package/dist/sdk/permissions.d.ts +17 -0
- package/dist/sdk/search.d.ts +94 -0
- package/dist/sdk/sso.d.ts +24 -0
- package/dist/sdk/user.d.ts +5 -0
- package/dist/sdk/websocket.d.ts +9 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/typeUtils.d.ts +7 -0
- package/package.json +4 -10
- package/src/api/account/accounts.ts +0 -22
- package/src/api/account/index.ts +0 -4
- package/src/api/account/license.ts +0 -39
- package/src/api/account/status.ts +0 -7
- package/src/api/index.ts +0 -2
- package/src/api/public/.keep +0 -0
- package/src/api/web/analytics.ts +0 -10
- package/src/api/web/app/index.ts +0 -6
- package/src/api/web/app/row.ts +0 -11
- package/src/api/web/app/rows.ts +0 -13
- package/src/api/web/app/table.ts +0 -13
- package/src/api/web/app/view.ts +0 -15
- package/src/api/web/auth.ts +0 -26
- package/src/api/web/debug.ts +0 -11
- package/src/api/web/errors.ts +0 -6
- package/src/api/web/global/auditLogs.ts +0 -51
- package/src/api/web/global/events.ts +0 -7
- package/src/api/web/global/index.ts +0 -6
- package/src/api/web/global/scim/groups.ts +0 -30
- package/src/api/web/global/scim/index.ts +0 -3
- package/src/api/web/global/scim/shared.ts +0 -14
- package/src/api/web/global/scim/users.ts +0 -53
- package/src/api/web/index.ts +0 -10
- package/src/api/web/pagination.ts +0 -27
- package/src/api/web/schedule.ts +0 -15
- package/src/api/web/system/environment.ts +0 -8
- package/src/api/web/system/index.ts +0 -1
- package/src/api/web/user.ts +0 -87
- package/src/core/index.ts +0 -1
- package/src/core/installation.ts +0 -4
- package/src/documents/account/account.ts +0 -108
- package/src/documents/account/index.ts +0 -2
- package/src/documents/app/app.ts +0 -69
- package/src/documents/app/automation.ts +0 -222
- package/src/documents/app/backup.ts +0 -71
- package/src/documents/app/component.ts +0 -9
- package/src/documents/app/datasource.ts +0 -56
- package/src/documents/app/index.ts +0 -16
- package/src/documents/app/layout.ts +0 -5
- package/src/documents/app/links.ts +0 -21
- package/src/documents/app/query.ts +0 -51
- package/src/documents/app/role.ts +0 -8
- package/src/documents/app/row.ts +0 -35
- package/src/documents/app/screen.ts +0 -25
- package/src/documents/app/table/constants.ts +0 -9
- package/src/documents/app/table/index.ts +0 -3
- package/src/documents/app/table/schema.ts +0 -98
- package/src/documents/app/table/table.ts +0 -30
- package/src/documents/app/user.ts +0 -6
- package/src/documents/app/view.ts +0 -66
- package/src/documents/app/webhook.ts +0 -15
- package/src/documents/document.ts +0 -51
- package/src/documents/global/auditLogs.ts +0 -19
- package/src/documents/global/config.ts +0 -137
- package/src/documents/global/environmentVariables.ts +0 -20
- package/src/documents/global/index.ts +0 -9
- package/src/documents/global/plugin.ts +0 -38
- package/src/documents/global/quotas.ts +0 -81
- package/src/documents/global/schedule.ts +0 -32
- package/src/documents/global/templates.ts +0 -9
- package/src/documents/global/user.ts +0 -95
- package/src/documents/global/userGroup.ts +0 -36
- package/src/documents/index.ts +0 -6
- package/src/documents/platform/accounts.ts +0 -5
- package/src/documents/platform/index.ts +0 -4
- package/src/documents/platform/info.ts +0 -9
- package/src/documents/platform/tenants.ts +0 -5
- package/src/documents/platform/users.ts +0 -18
- package/src/documents/pouch.ts +0 -32
- package/src/index.ts +0 -5
- package/src/sdk/auditLogs.ts +0 -22
- package/src/sdk/auth.ts +0 -37
- package/src/sdk/automations/index.ts +0 -16
- package/src/sdk/cli/constants.ts +0 -21
- package/src/sdk/cli/index.ts +0 -1
- package/src/sdk/context.ts +0 -22
- package/src/sdk/datasources.ts +0 -181
- package/src/sdk/db.ts +0 -116
- package/src/sdk/environmentVariables.ts +0 -4
- package/src/sdk/events/app.ts +0 -85
- package/src/sdk/events/auditLog.ts +0 -10
- package/src/sdk/events/auth.ts +0 -36
- package/src/sdk/events/automation.ts +0 -63
- package/src/sdk/events/backup.ts +0 -17
- package/src/sdk/events/datasource.ts +0 -19
- package/src/sdk/events/email.ts +0 -5
- package/src/sdk/events/event.ts +0 -424
- package/src/sdk/events/identification.ts +0 -60
- package/src/sdk/events/index.ts +0 -25
- package/src/sdk/events/license.ts +0 -36
- package/src/sdk/events/plugin.ts +0 -26
- package/src/sdk/events/query.ts +0 -40
- package/src/sdk/events/role.ts +0 -29
- package/src/sdk/events/screen.ts +0 -19
- package/src/sdk/events/table.ts +0 -37
- package/src/sdk/events/user.ts +0 -92
- package/src/sdk/events/userGroup.ts +0 -56
- package/src/sdk/featureFlag.ts +0 -7
- package/src/sdk/hosting.ts +0 -4
- package/src/sdk/index.ts +0 -21
- package/src/sdk/koa.ts +0 -50
- package/src/sdk/licensing/billing.ts +0 -24
- package/src/sdk/licensing/feature.ts +0 -16
- package/src/sdk/licensing/index.ts +0 -5
- package/src/sdk/licensing/license.ts +0 -20
- package/src/sdk/licensing/plan.ts +0 -47
- package/src/sdk/licensing/quota.ts +0 -99
- package/src/sdk/locks.ts +0 -50
- package/src/sdk/middleware/index.ts +0 -2
- package/src/sdk/middleware/matchers.ts +0 -22
- package/src/sdk/middleware/tenancy.ts +0 -13
- package/src/sdk/migrations.ts +0 -55
- package/src/sdk/permissions.ts +0 -19
- package/src/sdk/search.ts +0 -101
- package/src/sdk/sso.ts +0 -37
- package/src/sdk/user.ts +0 -5
- package/src/sdk/websocket.ts +0 -9
- package/src/shared/index.ts +0 -1
- package/src/shared/typeUtils.ts +0 -9
- package/tsconfig.build.json +0 -18
- package/tsconfig.json +0 -10
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ScimResource, ScimMeta } from "scim-patch"
|
|
2
|
-
import { ScimListResponse } from "./shared"
|
|
3
|
-
|
|
4
|
-
type BooleanString = boolean | "True" | "true" | "False" | "false"
|
|
5
|
-
|
|
6
|
-
type Emails =
|
|
7
|
-
| {
|
|
8
|
-
value: string
|
|
9
|
-
type: "work"
|
|
10
|
-
primary: boolean
|
|
11
|
-
}[]
|
|
12
|
-
|
|
13
|
-
export interface ScimUserResponse extends ScimResource {
|
|
14
|
-
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"]
|
|
15
|
-
id: string
|
|
16
|
-
externalId: string
|
|
17
|
-
meta: ScimMeta & {
|
|
18
|
-
resourceType: "User"
|
|
19
|
-
}
|
|
20
|
-
userName: string
|
|
21
|
-
displayName?: string
|
|
22
|
-
name?: {
|
|
23
|
-
formatted?: string
|
|
24
|
-
familyName?: string
|
|
25
|
-
givenName?: string
|
|
26
|
-
}
|
|
27
|
-
active: BooleanString
|
|
28
|
-
emails?: Emails
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface ScimCreateUserRequest {
|
|
32
|
-
schemas: [
|
|
33
|
-
"urn:ietf:params:scim:schemas:core:2.0:User",
|
|
34
|
-
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
|
|
35
|
-
]
|
|
36
|
-
externalId: string
|
|
37
|
-
userName: string
|
|
38
|
-
active: BooleanString
|
|
39
|
-
emails?: Emails
|
|
40
|
-
meta: {
|
|
41
|
-
resourceType: "User"
|
|
42
|
-
}
|
|
43
|
-
displayName?: string
|
|
44
|
-
name?: {
|
|
45
|
-
formatted: string
|
|
46
|
-
familyName: string
|
|
47
|
-
givenName: string
|
|
48
|
-
}
|
|
49
|
-
roles: []
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface ScimUserListResponse
|
|
53
|
-
extends ScimListResponse<ScimUserResponse> {}
|
package/src/api/web/index.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./analytics"
|
|
2
|
-
export * from "./auth"
|
|
3
|
-
export * from "./user"
|
|
4
|
-
export * from "./errors"
|
|
5
|
-
export * from "./debug"
|
|
6
|
-
export * from "./schedule"
|
|
7
|
-
export * from "./system"
|
|
8
|
-
export * from "./app"
|
|
9
|
-
export * from "./global"
|
|
10
|
-
export * from "./pagination"
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export enum SortOrder {
|
|
2
|
-
ASCENDING = "ascending",
|
|
3
|
-
DESCENDING = "descending",
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export enum SortType {
|
|
7
|
-
STRING = "string",
|
|
8
|
-
number = "number",
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface BasicPaginationRequest {
|
|
12
|
-
bookmark?: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface PaginationRequest extends BasicPaginationRequest {
|
|
16
|
-
limit?: number
|
|
17
|
-
sort?: {
|
|
18
|
-
order: SortOrder
|
|
19
|
-
column: string
|
|
20
|
-
type: SortType
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface PaginationResponse {
|
|
25
|
-
bookmark: string | undefined
|
|
26
|
-
hasNextPage: boolean
|
|
27
|
-
}
|
package/src/api/web/schedule.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ScheduleMetadata,
|
|
3
|
-
ScheduleRepeatPeriod,
|
|
4
|
-
ScheduleType,
|
|
5
|
-
} from "../../documents"
|
|
6
|
-
|
|
7
|
-
export interface CreateScheduleRequest {
|
|
8
|
-
type: ScheduleType
|
|
9
|
-
name: string
|
|
10
|
-
startDate: string
|
|
11
|
-
repeat: ScheduleRepeatPeriod
|
|
12
|
-
metadata: ScheduleMetadata
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface UpdateScheduleRequest extends CreateScheduleRequest {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./environment"
|
package/src/api/web/user.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { User } from "../../documents"
|
|
2
|
-
|
|
3
|
-
export interface SaveUserResponse {
|
|
4
|
-
_id: string
|
|
5
|
-
_rev: string
|
|
6
|
-
email: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface UserDetails {
|
|
10
|
-
_id: string
|
|
11
|
-
email: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface BulkUserRequest {
|
|
15
|
-
delete?: {
|
|
16
|
-
userIds: string[]
|
|
17
|
-
}
|
|
18
|
-
create?: {
|
|
19
|
-
roles?: any[]
|
|
20
|
-
users: User[]
|
|
21
|
-
groups: any[]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface BulkUserCreated {
|
|
26
|
-
successful: UserDetails[]
|
|
27
|
-
unsuccessful: { email: string; reason: string }[]
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface BulkUserDeleted {
|
|
31
|
-
successful: UserDetails[]
|
|
32
|
-
unsuccessful: { _id: string; email: string; reason: string }[]
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface BulkUserResponse {
|
|
36
|
-
created?: BulkUserCreated
|
|
37
|
-
deleted?: BulkUserDeleted
|
|
38
|
-
message?: string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface InviteUserRequest {
|
|
42
|
-
email: string
|
|
43
|
-
userInfo: any
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type InviteUsersRequest = InviteUserRequest[]
|
|
47
|
-
|
|
48
|
-
export interface InviteUsersResponse {
|
|
49
|
-
successful: { email: string }[]
|
|
50
|
-
unsuccessful: { email: string; reason: string }[]
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface SearchUsersRequest {
|
|
54
|
-
page?: string
|
|
55
|
-
email?: string
|
|
56
|
-
appId?: string
|
|
57
|
-
paginated?: boolean
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface CreateAdminUserRequest {
|
|
61
|
-
email: string
|
|
62
|
-
password: string
|
|
63
|
-
tenantId: string
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface CreateAdminUserResponse {
|
|
67
|
-
_id: string
|
|
68
|
-
_rev: string
|
|
69
|
-
email: string
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface AcceptUserInviteRequest {
|
|
73
|
-
inviteCode: string
|
|
74
|
-
password: string
|
|
75
|
-
firstName: string
|
|
76
|
-
lastName: string
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface AcceptUserInviteResponse {
|
|
80
|
-
_id: string
|
|
81
|
-
_rev: string
|
|
82
|
-
email: string
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface SyncUserRequest {
|
|
86
|
-
previousUser?: User
|
|
87
|
-
}
|
package/src/core/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./installation"
|
package/src/core/installation.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Feature, Hosting, License, PlanType, Quotas } from "../../sdk"
|
|
2
|
-
import { DeepPartial } from "../../shared"
|
|
3
|
-
import { QuotaUsage } from "../global"
|
|
4
|
-
|
|
5
|
-
export interface CreateAccount {
|
|
6
|
-
email: string
|
|
7
|
-
tenantId: string
|
|
8
|
-
hosting: Hosting
|
|
9
|
-
authType: AuthType
|
|
10
|
-
// optional fields - for sso based sign ups
|
|
11
|
-
registrationStep?: string
|
|
12
|
-
// profile
|
|
13
|
-
tenantName?: string
|
|
14
|
-
name?: string
|
|
15
|
-
size?: string
|
|
16
|
-
profession?: string
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface CreatePassswordAccount extends CreateAccount {
|
|
20
|
-
password: string
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const isCreatePasswordAccount = (
|
|
24
|
-
account: CreateAccount
|
|
25
|
-
): account is CreatePassswordAccount => account.authType === AuthType.PASSWORD
|
|
26
|
-
|
|
27
|
-
export interface LicenseOverrides {
|
|
28
|
-
features?: Feature[]
|
|
29
|
-
quotas?: DeepPartial<Quotas>
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface Account extends CreateAccount {
|
|
33
|
-
// generated
|
|
34
|
-
accountId: string
|
|
35
|
-
createdAt: number
|
|
36
|
-
// registration
|
|
37
|
-
verified: boolean
|
|
38
|
-
verificationSent: boolean
|
|
39
|
-
// licensing
|
|
40
|
-
tier: string // deprecated
|
|
41
|
-
planType?: PlanType
|
|
42
|
-
/** @deprecated */
|
|
43
|
-
planTier?: number
|
|
44
|
-
license?: License
|
|
45
|
-
installId?: string
|
|
46
|
-
installTenantId?: string
|
|
47
|
-
installVersion?: string
|
|
48
|
-
stripeCustomerId?: string
|
|
49
|
-
licenseKey?: string
|
|
50
|
-
licenseKeyActivatedAt?: number
|
|
51
|
-
licenseRequestedAt?: number
|
|
52
|
-
licenseOverrides?: LicenseOverrides
|
|
53
|
-
quotaUsage?: QuotaUsage
|
|
54
|
-
offlineLicenseToken?: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface PasswordAccount extends Account {
|
|
58
|
-
password: string
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export const isPasswordAccount = (
|
|
62
|
-
account: Account
|
|
63
|
-
): account is PasswordAccount =>
|
|
64
|
-
account.authType === AuthType.PASSWORD && account.hosting === Hosting.SELF
|
|
65
|
-
|
|
66
|
-
export interface CloudAccount extends Account {
|
|
67
|
-
password?: string
|
|
68
|
-
budibaseUserId: string
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export const isCloudAccount = (account: Account): account is CloudAccount =>
|
|
72
|
-
account.hosting === Hosting.CLOUD
|
|
73
|
-
|
|
74
|
-
export const isSelfHostAccount = (account: Account) =>
|
|
75
|
-
account.hosting === Hosting.SELF
|
|
76
|
-
|
|
77
|
-
export const isSSOAccount = (account: Account): account is SSOAccount =>
|
|
78
|
-
account.authType === AuthType.SSO
|
|
79
|
-
|
|
80
|
-
export enum AccountSSOProviderType {
|
|
81
|
-
GOOGLE = "google",
|
|
82
|
-
MICROSOFT = "microsoft",
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export enum AccountSSOProvider {
|
|
86
|
-
GOOGLE = "google",
|
|
87
|
-
MICROSOFT = "microsoft",
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface AccountSSO {
|
|
91
|
-
provider: AccountSSOProvider
|
|
92
|
-
providerType: AccountSSOProviderType
|
|
93
|
-
oauth2?: OAuthTokens
|
|
94
|
-
pictureUrl?: string
|
|
95
|
-
thirdPartyProfile: any // TODO: define what the google profile looks like
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export type SSOAccount = (Account | CloudAccount) & AccountSSO
|
|
99
|
-
|
|
100
|
-
export enum AuthType {
|
|
101
|
-
SSO = "sso",
|
|
102
|
-
PASSWORD = "password",
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface OAuthTokens {
|
|
106
|
-
accessToken: string
|
|
107
|
-
refreshToken: string
|
|
108
|
-
}
|
package/src/documents/app/app.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { User, Document } from "../"
|
|
2
|
-
import { SocketSession } from "../../sdk"
|
|
3
|
-
|
|
4
|
-
export type AppMetadataErrors = { [key: string]: string[] }
|
|
5
|
-
|
|
6
|
-
export interface App extends Document {
|
|
7
|
-
appId: string
|
|
8
|
-
type: string
|
|
9
|
-
version: string
|
|
10
|
-
componentLibraries: string[]
|
|
11
|
-
name: string
|
|
12
|
-
url: string | undefined
|
|
13
|
-
template: string | undefined
|
|
14
|
-
instance: AppInstance
|
|
15
|
-
tenantId: string
|
|
16
|
-
status: string
|
|
17
|
-
theme?: string
|
|
18
|
-
customTheme?: AppCustomTheme
|
|
19
|
-
revertableVersion?: string
|
|
20
|
-
lockedBy?: User
|
|
21
|
-
sessions?: SocketSession[]
|
|
22
|
-
navigation?: AppNavigation
|
|
23
|
-
automationErrors?: AppMetadataErrors
|
|
24
|
-
icon?: AppIcon
|
|
25
|
-
features?: AppFeatures
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface AppInstance {
|
|
29
|
-
_id: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface AppNavigation {
|
|
33
|
-
navigation: string
|
|
34
|
-
title: string
|
|
35
|
-
navWidth: string
|
|
36
|
-
sticky?: boolean
|
|
37
|
-
hideLogo?: boolean
|
|
38
|
-
logoUrl?: string
|
|
39
|
-
hideTitle?: boolean
|
|
40
|
-
navBackground?: string
|
|
41
|
-
navTextColor?: string
|
|
42
|
-
links?: AppNavigationLink[]
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface AppNavigationLink {
|
|
46
|
-
text: string
|
|
47
|
-
url: string
|
|
48
|
-
id?: string
|
|
49
|
-
roleId?: string
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface AppCustomTheme {
|
|
53
|
-
buttonBorderRadius?: string
|
|
54
|
-
primaryColor?: string
|
|
55
|
-
primaryColorHover?: string
|
|
56
|
-
|
|
57
|
-
// Used to exist before new design UI
|
|
58
|
-
navTextColor?: string
|
|
59
|
-
navBackground?: string
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface AppIcon {
|
|
63
|
-
name: string
|
|
64
|
-
color: string
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface AppFeatures {
|
|
68
|
-
componentValidation?: boolean
|
|
69
|
-
}
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { Document } from "../document"
|
|
2
|
-
import { EventEmitter } from "events"
|
|
3
|
-
import { User } from "../global"
|
|
4
|
-
|
|
5
|
-
export enum AutomationIOType {
|
|
6
|
-
OBJECT = "object",
|
|
7
|
-
STRING = "string",
|
|
8
|
-
BOOLEAN = "boolean",
|
|
9
|
-
NUMBER = "number",
|
|
10
|
-
ARRAY = "array",
|
|
11
|
-
JSON = "json",
|
|
12
|
-
DATE = "date",
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export enum AutomationCustomIOType {
|
|
16
|
-
TABLE = "table",
|
|
17
|
-
ROW = "row",
|
|
18
|
-
ROWS = "rows",
|
|
19
|
-
WIDE = "wide",
|
|
20
|
-
QUERY = "query",
|
|
21
|
-
QUERY_PARAMS = "queryParams",
|
|
22
|
-
QUERY_LIMIT = "queryLimit",
|
|
23
|
-
LOOP_OPTION = "loopOption",
|
|
24
|
-
ITEM = "item",
|
|
25
|
-
CODE = "code",
|
|
26
|
-
FILTERS = "filters",
|
|
27
|
-
COLUMN = "column",
|
|
28
|
-
TRIGGER_SCHEMA = "triggerSchema",
|
|
29
|
-
CRON = "cron",
|
|
30
|
-
WEBHOOK_URL = "webhookUrl",
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export enum AutomationTriggerStepId {
|
|
34
|
-
ROW_SAVED = "ROW_SAVED",
|
|
35
|
-
ROW_UPDATED = "ROW_UPDATED",
|
|
36
|
-
ROW_DELETED = "ROW_DELETED",
|
|
37
|
-
WEBHOOK = "WEBHOOK",
|
|
38
|
-
APP = "APP",
|
|
39
|
-
CRON = "CRON",
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export enum AutomationStepType {
|
|
43
|
-
LOGIC = "LOGIC",
|
|
44
|
-
ACTION = "ACTION",
|
|
45
|
-
TRIGGER = "TRIGGER",
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export enum AutomationActionStepId {
|
|
49
|
-
SEND_EMAIL_SMTP = "SEND_EMAIL_SMTP",
|
|
50
|
-
CREATE_ROW = "CREATE_ROW",
|
|
51
|
-
UPDATE_ROW = "UPDATE_ROW",
|
|
52
|
-
DELETE_ROW = "DELETE_ROW",
|
|
53
|
-
EXECUTE_BASH = "EXECUTE_BASH",
|
|
54
|
-
OUTGOING_WEBHOOK = "OUTGOING_WEBHOOK",
|
|
55
|
-
EXECUTE_SCRIPT = "EXECUTE_SCRIPT",
|
|
56
|
-
EXECUTE_QUERY = "EXECUTE_QUERY",
|
|
57
|
-
SERVER_LOG = "SERVER_LOG",
|
|
58
|
-
DELAY = "DELAY",
|
|
59
|
-
FILTER = "FILTER",
|
|
60
|
-
QUERY_ROWS = "QUERY_ROWS",
|
|
61
|
-
LOOP = "LOOP",
|
|
62
|
-
COLLECT = "COLLECT",
|
|
63
|
-
OPENAI = "OPENAI",
|
|
64
|
-
// these used to be lowercase step IDs, maintain for backwards compat
|
|
65
|
-
discord = "discord",
|
|
66
|
-
slack = "slack",
|
|
67
|
-
zapier = "zapier",
|
|
68
|
-
integromat = "integromat",
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface EmailInvite {
|
|
72
|
-
startTime: Date
|
|
73
|
-
endTime: Date
|
|
74
|
-
summary: string
|
|
75
|
-
location?: string
|
|
76
|
-
url?: string
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface SendEmailOpts {
|
|
80
|
-
// workspaceId If finer grain controls being used then this will lookup config for workspace.
|
|
81
|
-
workspaceId?: string
|
|
82
|
-
// user If sending to an existing user the object can be provided, this is used in the context.
|
|
83
|
-
user: User
|
|
84
|
-
// from If sending from an address that is not what is configured in the SMTP config.
|
|
85
|
-
from?: string
|
|
86
|
-
// contents If sending a custom email then can supply contents which will be added to it.
|
|
87
|
-
contents?: string
|
|
88
|
-
// subject A custom subject can be specified if the config one is not desired.
|
|
89
|
-
subject?: string
|
|
90
|
-
// info Pass in a structure of information to be stored alongside the invitation.
|
|
91
|
-
info?: any
|
|
92
|
-
cc?: boolean
|
|
93
|
-
bcc?: boolean
|
|
94
|
-
automation?: boolean
|
|
95
|
-
invite?: EmailInvite
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export const AutomationStepIdArray = [
|
|
99
|
-
...Object.values(AutomationActionStepId),
|
|
100
|
-
...Object.values(AutomationTriggerStepId),
|
|
101
|
-
]
|
|
102
|
-
|
|
103
|
-
export interface Automation extends Document {
|
|
104
|
-
definition: {
|
|
105
|
-
steps: AutomationStep[]
|
|
106
|
-
trigger: AutomationTrigger
|
|
107
|
-
}
|
|
108
|
-
screenId?: string
|
|
109
|
-
uiTree?: any
|
|
110
|
-
appId: string
|
|
111
|
-
live?: boolean
|
|
112
|
-
name: string
|
|
113
|
-
internal?: boolean
|
|
114
|
-
type?: string
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
interface BaseIOStructure {
|
|
118
|
-
type?: AutomationIOType
|
|
119
|
-
customType?: AutomationCustomIOType
|
|
120
|
-
title?: string
|
|
121
|
-
description?: string
|
|
122
|
-
dependsOn?: string
|
|
123
|
-
enum?: string[]
|
|
124
|
-
pretty?: string[]
|
|
125
|
-
properties?: {
|
|
126
|
-
[key: string]: BaseIOStructure
|
|
127
|
-
}
|
|
128
|
-
required?: string[]
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
interface InputOutputBlock {
|
|
132
|
-
properties: {
|
|
133
|
-
[key: string]: BaseIOStructure
|
|
134
|
-
}
|
|
135
|
-
required?: string[]
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface AutomationStepSchema {
|
|
139
|
-
name: string
|
|
140
|
-
stepTitle?: string
|
|
141
|
-
tagline: string
|
|
142
|
-
icon: string
|
|
143
|
-
description: string
|
|
144
|
-
type: AutomationStepType
|
|
145
|
-
internal?: boolean
|
|
146
|
-
deprecated?: boolean
|
|
147
|
-
stepId: AutomationTriggerStepId | AutomationActionStepId
|
|
148
|
-
blockToLoop?: string
|
|
149
|
-
inputs: {
|
|
150
|
-
[key: string]: any
|
|
151
|
-
}
|
|
152
|
-
schema: {
|
|
153
|
-
inputs: InputOutputBlock
|
|
154
|
-
outputs: InputOutputBlock
|
|
155
|
-
}
|
|
156
|
-
custom?: boolean
|
|
157
|
-
features?: Partial<Record<AutomationFeature, boolean>>
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export enum AutomationFeature {
|
|
161
|
-
LOOPING = "LOOPING",
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export interface AutomationStep extends AutomationStepSchema {
|
|
165
|
-
id: string
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface AutomationTriggerSchema extends AutomationStepSchema {
|
|
169
|
-
event?: string
|
|
170
|
-
cronJobId?: string
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface AutomationTrigger extends AutomationTriggerSchema {
|
|
174
|
-
id: string
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export enum AutomationStatus {
|
|
178
|
-
SUCCESS = "success",
|
|
179
|
-
ERROR = "error",
|
|
180
|
-
STOPPED = "stopped",
|
|
181
|
-
STOPPED_ERROR = "stopped_error",
|
|
182
|
-
NO_ITERATIONS = "no_iterations",
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export interface AutomationResults {
|
|
186
|
-
automationId?: string
|
|
187
|
-
status?: AutomationStatus
|
|
188
|
-
trigger?: any
|
|
189
|
-
steps: {
|
|
190
|
-
stepId: AutomationTriggerStepId | AutomationActionStepId
|
|
191
|
-
inputs: {
|
|
192
|
-
[key: string]: any
|
|
193
|
-
}
|
|
194
|
-
outputs: {
|
|
195
|
-
[key: string]: any
|
|
196
|
-
}
|
|
197
|
-
}[]
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export interface AutomationLog extends AutomationResults, Document {
|
|
201
|
-
automationName: string
|
|
202
|
-
_rev?: string
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface AutomationLogPage {
|
|
206
|
-
data: AutomationLog[]
|
|
207
|
-
hasNextPage: boolean
|
|
208
|
-
nextPage?: string
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export type AutomationStepInput = {
|
|
212
|
-
inputs: Record<string, any>
|
|
213
|
-
context: Record<string, any>
|
|
214
|
-
emitter: EventEmitter
|
|
215
|
-
appId: string
|
|
216
|
-
apiKey?: string
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export interface AutomationMetadata extends Document {
|
|
220
|
-
errorCount?: number
|
|
221
|
-
automationChainCount?: number
|
|
222
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Document } from "../document"
|
|
2
|
-
import { User } from "../../"
|
|
3
|
-
|
|
4
|
-
export enum AppBackupType {
|
|
5
|
-
BACKUP = "backup",
|
|
6
|
-
RESTORE = "restore",
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export enum AppBackupStatus {
|
|
10
|
-
STARTED = "started",
|
|
11
|
-
PENDING = "pending",
|
|
12
|
-
COMPLETE = "complete",
|
|
13
|
-
FAILED = "failed",
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export enum AppBackupTrigger {
|
|
17
|
-
PUBLISH = "publish",
|
|
18
|
-
MANUAL = "manual",
|
|
19
|
-
SCHEDULED = "scheduled",
|
|
20
|
-
RESTORING = "restoring",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface AppBackupContents {
|
|
24
|
-
datasources: string[]
|
|
25
|
-
screens: string[]
|
|
26
|
-
automations: string[]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface AppBackupMetadata {
|
|
30
|
-
appId: string
|
|
31
|
-
trigger?: AppBackupTrigger
|
|
32
|
-
type: AppBackupType
|
|
33
|
-
status: AppBackupStatus
|
|
34
|
-
name?: string
|
|
35
|
-
createdBy?: string | User
|
|
36
|
-
timestamp: string
|
|
37
|
-
finishedAt?: string
|
|
38
|
-
startedAt?: string
|
|
39
|
-
contents?: AppBackupContents
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface AppBackup extends Document, AppBackupMetadata {
|
|
43
|
-
_id: string
|
|
44
|
-
filename?: string
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export type AppBackupFetchOpts = {
|
|
48
|
-
trigger?: AppBackupTrigger
|
|
49
|
-
type?: AppBackupType
|
|
50
|
-
limit?: number
|
|
51
|
-
page?: string
|
|
52
|
-
paginate?: boolean
|
|
53
|
-
startDate?: string
|
|
54
|
-
endDate?: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface AppBackupQueueData {
|
|
58
|
-
appId: string
|
|
59
|
-
docId: string
|
|
60
|
-
docRev: string
|
|
61
|
-
export?: {
|
|
62
|
-
trigger: AppBackupTrigger
|
|
63
|
-
name?: string
|
|
64
|
-
createdBy?: string
|
|
65
|
-
}
|
|
66
|
-
import?: {
|
|
67
|
-
backupId: string
|
|
68
|
-
nameForBackup: string
|
|
69
|
-
createdBy?: string
|
|
70
|
-
}
|
|
71
|
-
}
|