@budibase/types 2.10.12-alpha.1 → 2.10.12-alpha.10
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 +1 -1
- package/dist/api/web/app/row.d.ts +1 -1
- package/dist/api/web/app/rows.d.ts +1 -1
- package/dist/api/web/app/table.d.ts +3 -3
- package/dist/api/web/global/auditLogs.d.ts +1 -1
- package/dist/api/web/global/configs.d.ts +1 -1
- package/dist/api/web/global/scim/users.d.ts +2 -2
- package/dist/api/web/searchFilter.d.ts +3 -3
- package/dist/api/web/user.d.ts +1 -1
- package/dist/documents/account/account.d.ts +1 -1
- package/dist/documents/app/app.d.ts +1 -1
- package/dist/documents/app/automation.d.ts +1 -1
- package/dist/documents/app/backup.d.ts +1 -1
- package/dist/documents/app/view.d.ts +1 -1
- package/dist/documents/global/auditLogs.d.ts +1 -1
- package/dist/documents/global/config.d.ts +2 -2
- package/dist/documents/global/environmentVariables.d.ts +2 -2
- package/dist/documents/global/quotas.d.ts +3 -3
- package/dist/documents/global/schedule.d.ts +1 -1
- package/dist/documents/global/user.d.ts +1 -1
- package/dist/documents/platform/users.d.ts +1 -1
- package/dist/documents/pouch.d.ts +1 -1
- package/dist/sdk/auditLogs.d.ts +3 -3
- package/dist/sdk/automations/index.d.ts +1 -1
- package/dist/sdk/context.d.ts +1 -1
- package/dist/sdk/datasources.d.ts +2 -2
- package/dist/sdk/db.d.ts +7 -7
- package/dist/sdk/events/auth.d.ts +2 -2
- package/dist/sdk/events/event.d.ts +2 -2
- package/dist/sdk/licensing/feature.d.ts +1 -1
- package/dist/sdk/licensing/quota.d.ts +7 -7
- package/dist/sdk/sso.d.ts +1 -1
- package/dist/shared/typeUtils.d.ts +3 -3
- package/package.json +3 -3
|
@@ -7,7 +7,7 @@ export interface DeleteRows {
|
|
|
7
7
|
export interface DeleteRow {
|
|
8
8
|
_id: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type DeleteRowRequest = DeleteRows | DeleteRow;
|
|
11
11
|
export interface ValidateResponse {
|
|
12
12
|
valid: boolean;
|
|
13
13
|
errors: Record<string, any>;
|
|
@@ -2,14 +2,14 @@ import { Table, TableRequest, TableSchema, View, ViewV2 } from "../../../documen
|
|
|
2
2
|
interface ViewV2Response extends ViewV2 {
|
|
3
3
|
schema: TableSchema;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
5
|
+
export type TableViewsResponse = {
|
|
6
6
|
[key: string]: View | ViewV2Response;
|
|
7
7
|
};
|
|
8
8
|
export interface TableResponse extends Table {
|
|
9
9
|
views?: TableViewsResponse;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type FetchTablesResponse = TableResponse[];
|
|
12
12
|
export interface SaveTableRequest extends TableRequest {
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type SaveTableResponse = Table;
|
|
15
15
|
export {};
|
|
@@ -17,7 +17,7 @@ export interface SearchAuditLogsRequest extends BasicPaginationRequest, AuditLog
|
|
|
17
17
|
export declare enum AuditLogResourceStatus {
|
|
18
18
|
DELETED = "deleted"
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type DeletedResourceInfo = {
|
|
21
21
|
_id: string;
|
|
22
22
|
status: AuditLogResourceStatus;
|
|
23
23
|
email?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ScimResource, ScimMeta } from "scim-patch";
|
|
2
2
|
import { ScimListResponse } from "./shared";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type BooleanString = boolean | "True" | "true" | "False" | "false";
|
|
4
|
+
type Emails = {
|
|
5
5
|
value: string;
|
|
6
6
|
type: "work";
|
|
7
7
|
primary: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldType } from "../../documents";
|
|
2
2
|
import { EmptyFilterOption } from "../../sdk";
|
|
3
|
-
export
|
|
3
|
+
export type SearchFilter = {
|
|
4
4
|
operator: keyof SearchQuery;
|
|
5
5
|
onEmptyFilter?: EmptyFilterOption;
|
|
6
6
|
field: string;
|
|
@@ -8,7 +8,7 @@ export declare type SearchFilter = {
|
|
|
8
8
|
value: any;
|
|
9
9
|
externalType?: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type SearchQuery = {
|
|
12
12
|
allOr?: boolean;
|
|
13
13
|
onEmptyFilter?: EmptyFilterOption;
|
|
14
14
|
string?: {
|
|
@@ -48,4 +48,4 @@ export declare type SearchQuery = {
|
|
|
48
48
|
[key: string]: any[];
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
export
|
|
51
|
+
export type SearchQueryFields = Omit<SearchQuery, "allOr" | "onEmptyFilter">;
|
package/dist/api/web/user.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface InviteUserRequest {
|
|
|
42
42
|
email: string;
|
|
43
43
|
userInfo: any;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type InviteUsersRequest = InviteUserRequest[];
|
|
46
46
|
export interface InviteUsersResponse {
|
|
47
47
|
successful: {
|
|
48
48
|
email: string;
|
|
@@ -67,7 +67,7 @@ export interface AccountSSO {
|
|
|
67
67
|
pictureUrl?: string;
|
|
68
68
|
thirdPartyProfile: any;
|
|
69
69
|
}
|
|
70
|
-
export
|
|
70
|
+
export type SSOAccount = (Account | CloudAccount) & AccountSSO;
|
|
71
71
|
export declare enum AuthType {
|
|
72
72
|
SSO = "sso",
|
|
73
73
|
PASSWORD = "password"
|
|
@@ -180,7 +180,7 @@ export interface AutomationLogPage {
|
|
|
180
180
|
hasNextPage: boolean;
|
|
181
181
|
nextPage?: string;
|
|
182
182
|
}
|
|
183
|
-
export
|
|
183
|
+
export type AutomationStepInput = {
|
|
184
184
|
inputs: Record<string, any>;
|
|
185
185
|
context: Record<string, any>;
|
|
186
186
|
emitter: EventEmitter;
|
|
@@ -37,7 +37,7 @@ export interface AppBackup extends Document, AppBackupMetadata {
|
|
|
37
37
|
_id: string;
|
|
38
38
|
filename?: string;
|
|
39
39
|
}
|
|
40
|
-
export
|
|
40
|
+
export type AppBackupFetchOpts = {
|
|
41
41
|
trigger?: AppBackupTrigger;
|
|
42
42
|
type?: AppBackupType;
|
|
43
43
|
limit?: number;
|
|
@@ -25,7 +25,7 @@ export interface ViewV2 {
|
|
|
25
25
|
};
|
|
26
26
|
schema?: Record<string, UIFieldMetadata>;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema;
|
|
29
29
|
export interface ViewCountOrSumSchema {
|
|
30
30
|
field: string;
|
|
31
31
|
value: string;
|
|
@@ -43,8 +43,8 @@ export interface SettingsInnerConfig {
|
|
|
43
43
|
}
|
|
44
44
|
export interface SettingsConfig extends Config<SettingsInnerConfig> {
|
|
45
45
|
}
|
|
46
|
-
export
|
|
47
|
-
export
|
|
46
|
+
export type SSOConfigType = ConfigType.GOOGLE | ConfigType.OIDC;
|
|
47
|
+
export type SSOConfig = GoogleInnerConfig | OIDCInnerConfig;
|
|
48
48
|
export interface GoogleInnerConfig {
|
|
49
49
|
clientID: string;
|
|
50
50
|
clientSecret: string;
|
|
@@ -2,11 +2,11 @@ import { Document } from "../document";
|
|
|
2
2
|
export interface EnvironmentVariablesDoc extends Document {
|
|
3
3
|
variables: string;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
5
|
+
export type EnvironmentVariableValue = {
|
|
6
6
|
production: string;
|
|
7
7
|
development: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type EnvironmentVariablesDecrypted = Record<string, EnvironmentVariableValue>;
|
|
10
10
|
export interface EnvironmentVariablesDocDecrypted extends Document {
|
|
11
11
|
variables: EnvironmentVariablesDecrypted;
|
|
12
12
|
}
|
|
@@ -12,7 +12,7 @@ export interface UsageBreakdown {
|
|
|
12
12
|
[key: string]: number;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type QuotaTriggers = {
|
|
16
16
|
[key: string]: string | undefined;
|
|
17
17
|
};
|
|
18
18
|
export interface StaticUsage {
|
|
@@ -50,13 +50,13 @@ export interface QuotaUsage extends BaseQuotaUsage {
|
|
|
50
50
|
[key: string]: BaseQuotaUsage;
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
export
|
|
53
|
+
export type SetUsageValues = {
|
|
54
54
|
total: number;
|
|
55
55
|
app?: number;
|
|
56
56
|
breakdown?: number;
|
|
57
57
|
triggers?: QuotaTriggers;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type UsageValues = {
|
|
60
60
|
total: number;
|
|
61
61
|
app?: number;
|
|
62
62
|
breakdown?: number;
|
|
@@ -14,7 +14,7 @@ export interface Schedule extends Document {
|
|
|
14
14
|
repeat: ScheduleRepeatPeriod;
|
|
15
15
|
metadata: ScheduleMetadata;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type ScheduleMetadata = AppBackupScheduleMetadata;
|
|
18
18
|
export declare const isAppBackupMetadata: (type: ScheduleType, metadata: ScheduleMetadata) => metadata is AppBackupScheduleMetadata;
|
|
19
19
|
export interface AppBackupScheduleMetadata {
|
|
20
20
|
apps: string[];
|
|
@@ -17,7 +17,7 @@ export interface UserSSO {
|
|
|
17
17
|
oauth2?: OAuth2;
|
|
18
18
|
thirdPartyProfile?: SSOProfileJson;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type SSOUser = User & UserSSO;
|
|
21
21
|
export declare function isSSOUser(user: User): user is SSOUser;
|
|
22
22
|
export interface User extends Document {
|
|
23
23
|
tenantId: string;
|
|
@@ -12,4 +12,4 @@ export interface PlatformUserByEmail extends Document {
|
|
|
12
12
|
export interface PlatformUserById extends Document {
|
|
13
13
|
tenantId: string;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type PlatformUser = PlatformUserByEmail | PlatformUserById;
|
|
@@ -14,7 +14,7 @@ export interface AllDocsResponse<T> {
|
|
|
14
14
|
total_rows: number;
|
|
15
15
|
rows: RowResponse<T>[];
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type BulkDocsResponse = BulkDocResponse[];
|
|
18
18
|
interface BulkDocResponse {
|
|
19
19
|
ok: boolean;
|
|
20
20
|
id: string;
|
package/dist/sdk/auditLogs.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Event, HostInfo } from "./events";
|
|
2
2
|
import { AuditLogDoc } from "../documents";
|
|
3
|
-
export
|
|
3
|
+
export type AuditWriteOpts = {
|
|
4
4
|
appId?: string;
|
|
5
5
|
timestamp?: string | number;
|
|
6
6
|
userId?: string;
|
|
7
7
|
hostInfo?: HostInfo;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type AuditLogFn = (event: Event, metadata: any, opts: AuditWriteOpts) => Promise<AuditLogDoc | undefined>;
|
|
10
|
+
export type AuditLogQueueEvent = {
|
|
11
11
|
event: Event;
|
|
12
12
|
properties: any;
|
|
13
13
|
opts: AuditWriteOpts;
|
package/dist/sdk/context.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export interface UserContext extends BaseContext, User {
|
|
|
15
15
|
account?: Account;
|
|
16
16
|
hostInfo: HostInfo;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type IdentityContext = BaseContext | AccountUserContext | UserContext;
|
|
@@ -112,7 +112,7 @@ interface DatasourceFieldGroupConfig extends DatasourceBasicFieldConfig {
|
|
|
112
112
|
nestedFields?: boolean;
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
type DatasourceFieldConfig = DatasourceSelectFieldConfig | DatasourceFieldGroupConfig | DatasourceBasicFieldConfig;
|
|
116
116
|
export interface DatasourceConfig {
|
|
117
117
|
[key: string]: DatasourceFieldConfig & {
|
|
118
118
|
fields?: DatasourceConfig;
|
|
@@ -136,7 +136,7 @@ export interface Integration {
|
|
|
136
136
|
};
|
|
137
137
|
extra?: ExtraQueryConfig;
|
|
138
138
|
}
|
|
139
|
-
export
|
|
139
|
+
export type ConnectionInfo = {
|
|
140
140
|
connected: boolean;
|
|
141
141
|
error?: string;
|
|
142
142
|
};
|
package/dist/sdk/db.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare enum SearchIndex {
|
|
|
8
8
|
AUDIT = "audit",
|
|
9
9
|
USER = "user"
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type PouchOptions = {
|
|
12
12
|
inMemory?: boolean;
|
|
13
13
|
replication?: boolean;
|
|
14
14
|
onDisk?: boolean;
|
|
@@ -18,7 +18,7 @@ export declare enum SortOption {
|
|
|
18
18
|
ASCENDING = "asc",
|
|
19
19
|
DESCENDING = "desc"
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type CouchFindOptions = {
|
|
22
22
|
selector: PouchDB.Find.Selector;
|
|
23
23
|
fields?: string[];
|
|
24
24
|
sort?: {
|
|
@@ -28,13 +28,13 @@ export declare type CouchFindOptions = {
|
|
|
28
28
|
skip?: number;
|
|
29
29
|
bookmark?: string;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type DatabaseOpts = {
|
|
32
32
|
skip_setup?: boolean;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type DatabasePutOpts = {
|
|
35
35
|
force?: boolean;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type DatabaseCreateIndexOpts = {
|
|
38
38
|
index: {
|
|
39
39
|
fields: string[];
|
|
40
40
|
name?: string | undefined;
|
|
@@ -42,12 +42,12 @@ export declare type DatabaseCreateIndexOpts = {
|
|
|
42
42
|
type?: string | undefined;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type DatabaseDeleteIndexOpts = {
|
|
46
46
|
name: string;
|
|
47
47
|
ddoc: string;
|
|
48
48
|
type?: string | undefined;
|
|
49
49
|
};
|
|
50
|
-
export
|
|
50
|
+
export type DatabaseQueryOpts = {
|
|
51
51
|
include_docs?: boolean;
|
|
52
52
|
startkey?: string;
|
|
53
53
|
endkey?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseEvent } from "./event";
|
|
2
2
|
import { ConfigType } from "../../documents";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type LoginSource = "local" | "google" | "oidc" | "google-internal";
|
|
4
|
+
export type SSOType = ConfigType.OIDC | ConfigType.GOOGLE;
|
|
5
5
|
export interface LoginEvent extends BaseEvent {
|
|
6
6
|
userId: string;
|
|
7
7
|
source: LoginSource;
|
|
@@ -141,8 +141,8 @@ export interface BaseEvent {
|
|
|
141
141
|
[key: string]: any;
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
export
|
|
145
|
-
export
|
|
144
|
+
export type TableExportFormat = "json" | "csv";
|
|
145
|
+
export type DocUpdateEvent = {
|
|
146
146
|
id: string;
|
|
147
147
|
tenantId: string;
|
|
148
148
|
appId?: string;
|
|
@@ -23,31 +23,31 @@ export declare enum ConstantQuotaName {
|
|
|
23
23
|
AUTOMATION_LOG_RETENTION_DAYS = "automationLogRetentionDays",
|
|
24
24
|
APP_BACKUPS_RETENTION_DAYS = "appBackupRetentionDays"
|
|
25
25
|
}
|
|
26
|
-
export
|
|
27
|
-
export
|
|
26
|
+
export type MeteredQuotaName = StaticQuotaName | MonthlyQuotaName;
|
|
27
|
+
export type QuotaName = StaticQuotaName | MonthlyQuotaName | ConstantQuotaName;
|
|
28
28
|
export declare const isStaticQuota: (quotaType: QuotaType, usageType: QuotaUsageType, name: QuotaName) => name is StaticQuotaName;
|
|
29
29
|
export declare const isMonthlyQuota: (quotaType: QuotaType, usageType: QuotaUsageType, name: QuotaName) => name is MonthlyQuotaName;
|
|
30
30
|
export declare const isConstantQuota: (quotaType: QuotaType, name: QuotaName) => name is ConstantQuotaName;
|
|
31
|
-
export
|
|
31
|
+
export type PlanQuotas = {
|
|
32
32
|
[key in PlanType]: Quotas | undefined;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type MonthlyQuotas = {
|
|
35
35
|
[MonthlyQuotaName.QUERIES]: Quota;
|
|
36
36
|
[MonthlyQuotaName.AUTOMATIONS]: Quota;
|
|
37
37
|
[MonthlyQuotaName.DAY_PASSES]: Quota;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type StaticQuotas = {
|
|
40
40
|
[StaticQuotaName.ROWS]: Quota;
|
|
41
41
|
[StaticQuotaName.APPS]: Quota;
|
|
42
42
|
[StaticQuotaName.USERS]: Quota;
|
|
43
43
|
[StaticQuotaName.USER_GROUPS]: Quota;
|
|
44
44
|
[StaticQuotaName.PLUGINS]: Quota;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type ConstantQuotas = {
|
|
47
47
|
[ConstantQuotaName.AUTOMATION_LOG_RETENTION_DAYS]: Quota;
|
|
48
48
|
[ConstantQuotaName.APP_BACKUPS_RETENTION_DAYS]: Quota;
|
|
49
49
|
};
|
|
50
|
-
export
|
|
50
|
+
export type Quotas = {
|
|
51
51
|
[QuotaType.USAGE]: {
|
|
52
52
|
[QuotaUsageType.MONTHLY]: MonthlyQuotas;
|
|
53
53
|
[QuotaUsageType.STATIC]: StaticQuotas;
|
package/dist/sdk/sso.d.ts
CHANGED
|
@@ -21,4 +21,4 @@ export interface SSOProfile {
|
|
|
21
21
|
_json: SSOProfileJson;
|
|
22
22
|
provider?: string;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export type SaveSSOUserFunction = (user: SSOUser, opts: SaveUserOpts) => Promise<User>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type DeepPartial<T> = {
|
|
2
2
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
3
3
|
};
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type ISO8601 = string;
|
|
5
|
+
export type RequiredKeys<T> = {
|
|
6
6
|
[K in keyof Required<T>]: T[K];
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/types",
|
|
3
|
-
"version": "2.10.12-alpha.
|
|
3
|
+
"version": "2.10.12-alpha.10",
|
|
4
4
|
"description": "Budibase types",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"concurrently": "^7.6.0",
|
|
25
25
|
"koa-body": "4.2.0",
|
|
26
26
|
"rimraf": "3.0.2",
|
|
27
|
-
"typescript": "
|
|
27
|
+
"typescript": "5.2.2"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"scim-patch": "^0.7.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "a0dcea8f787e67daa8e49ae1d7f546dfa1e29010"
|
|
33
33
|
}
|