@databutton/firebase-types 1.0.5 → 1.0.7
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,14 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Timestamp } from "firebase/firestore";
|
|
2
2
|
/**
|
|
3
3
|
* Types here should reflect data format stored in firestore and
|
|
4
4
|
* either be backwards-compatible or migrated when needed
|
|
5
5
|
*/
|
|
6
|
+
interface PerformerBase {
|
|
7
|
+
timestamp: Timestamp;
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PerformedByUser extends PerformerBase {
|
|
11
|
+
type: "user";
|
|
12
|
+
name: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface PerformedBySystem extends PerformerBase {
|
|
15
|
+
type: "system";
|
|
16
|
+
}
|
|
17
|
+
export declare type PerformedBy = PerformedByUser | PerformedBySystem;
|
|
6
18
|
export interface Profile {
|
|
7
19
|
displayName: string;
|
|
8
20
|
email: string;
|
|
9
21
|
userId?: string;
|
|
10
22
|
earlyAccess?: boolean;
|
|
11
|
-
earlyAccessChangedAt?:
|
|
23
|
+
earlyAccessChangedAt?: Timestamp;
|
|
12
24
|
enabledFeatures?: string[];
|
|
13
25
|
admin?: boolean;
|
|
14
26
|
}
|
|
@@ -16,9 +28,10 @@ export interface App {
|
|
|
16
28
|
name: string;
|
|
17
29
|
slug: string;
|
|
18
30
|
createdBy: string;
|
|
19
|
-
createdAt:
|
|
31
|
+
createdAt: Timestamp;
|
|
20
32
|
variant: "streamlit";
|
|
21
|
-
markedForDeletionAt:
|
|
33
|
+
markedForDeletionAt: Timestamp | null;
|
|
34
|
+
markedForDeletionBy?: PerformedBy | null;
|
|
22
35
|
shortUrl: string;
|
|
23
36
|
category: string | null;
|
|
24
37
|
}
|
|
@@ -26,23 +39,25 @@ export interface Job {
|
|
|
26
39
|
name: string;
|
|
27
40
|
slug: string;
|
|
28
41
|
createdBy: string;
|
|
29
|
-
createdAt:
|
|
30
|
-
markedForDeletionAt:
|
|
42
|
+
createdAt: Timestamp;
|
|
43
|
+
markedForDeletionAt: Timestamp | null;
|
|
44
|
+
markedForDeletionBy?: PerformedBy | null;
|
|
31
45
|
category: string | null;
|
|
32
46
|
}
|
|
33
47
|
export interface CodeBlock {
|
|
34
48
|
type: "app" | "job";
|
|
35
|
-
createdAtUtc:
|
|
49
|
+
createdAtUtc: Timestamp;
|
|
36
50
|
componentId: string;
|
|
37
51
|
}
|
|
38
52
|
export interface CodeBlockVersion {
|
|
39
53
|
code: string;
|
|
40
|
-
|
|
54
|
+
createdBy?: PerformedBy;
|
|
55
|
+
createdAtUtc: Timestamp;
|
|
41
56
|
version: string;
|
|
42
57
|
description: string;
|
|
43
58
|
}
|
|
44
59
|
export interface Deployment {
|
|
45
|
-
createdAt:
|
|
60
|
+
createdAt: Timestamp;
|
|
46
61
|
createdById: string;
|
|
47
62
|
createdByName: string;
|
|
48
63
|
codeBlockId: string;
|
|
@@ -50,8 +65,8 @@ export interface Deployment {
|
|
|
50
65
|
codeRef: string;
|
|
51
66
|
}
|
|
52
67
|
export interface Schedule {
|
|
53
|
-
createdAt:
|
|
54
|
-
updatedAt:
|
|
68
|
+
createdAt: Timestamp;
|
|
69
|
+
updatedAt: Timestamp;
|
|
55
70
|
cronExpressionUtc: string;
|
|
56
71
|
cronExpression: string;
|
|
57
72
|
cronTimezone: string;
|
|
@@ -69,18 +84,19 @@ export interface Dataframe {
|
|
|
69
84
|
numberOfRows: number;
|
|
70
85
|
size: string;
|
|
71
86
|
sizeInMb: string;
|
|
72
|
-
markedForDeletionAt?:
|
|
87
|
+
markedForDeletionAt?: Timestamp | null;
|
|
88
|
+
markedForDeletionBy?: PerformedBy | null;
|
|
73
89
|
}
|
|
74
90
|
export interface Viewer {
|
|
75
91
|
userId: string | null;
|
|
76
92
|
recipient: string;
|
|
77
93
|
revoked: boolean;
|
|
78
94
|
createdByUserId: string;
|
|
79
|
-
createdAtUtc:
|
|
95
|
+
createdAtUtc: Timestamp;
|
|
80
96
|
}
|
|
81
97
|
export interface ShortUrlRef {
|
|
82
98
|
type: "ref";
|
|
83
|
-
createdAtUtc:
|
|
99
|
+
createdAtUtc: Timestamp;
|
|
84
100
|
createdByUserId: string;
|
|
85
101
|
active: boolean;
|
|
86
102
|
projectId: string;
|
|
@@ -88,7 +104,7 @@ export interface ShortUrlRef {
|
|
|
88
104
|
}
|
|
89
105
|
export interface ShortUrlRedirect {
|
|
90
106
|
type: "redirect";
|
|
91
|
-
createdAtUtc:
|
|
107
|
+
createdAtUtc: Timestamp;
|
|
92
108
|
createdByUserId: string;
|
|
93
109
|
active: boolean;
|
|
94
110
|
to: string;
|
|
@@ -96,17 +112,17 @@ export interface ShortUrlRedirect {
|
|
|
96
112
|
export declare type ShortUrl = ShortUrlRef | ShortUrlRedirect;
|
|
97
113
|
export interface JobRun {
|
|
98
114
|
duration: number;
|
|
99
|
-
endTime?:
|
|
115
|
+
endTime?: Timestamp;
|
|
100
116
|
jobId: string;
|
|
101
|
-
nextRunTime?:
|
|
102
|
-
startTime:
|
|
103
|
-
deadline?:
|
|
117
|
+
nextRunTime?: Timestamp;
|
|
118
|
+
startTime: Timestamp;
|
|
119
|
+
deadline?: Timestamp;
|
|
104
120
|
success: boolean;
|
|
105
121
|
exitcode: number;
|
|
106
122
|
}
|
|
107
123
|
export interface RunLog {
|
|
108
124
|
msg: string;
|
|
109
|
-
time:
|
|
125
|
+
time: Timestamp;
|
|
110
126
|
}
|
|
111
127
|
export interface ProjectInvitation {
|
|
112
128
|
project: {
|
|
@@ -114,8 +130,8 @@ export interface ProjectInvitation {
|
|
|
114
130
|
name: string;
|
|
115
131
|
};
|
|
116
132
|
state: "pending" | "withdrawn" | "accepted" | "cancelled";
|
|
117
|
-
createdAt:
|
|
118
|
-
acceptedAt:
|
|
133
|
+
createdAt: Timestamp;
|
|
134
|
+
acceptedAt: Timestamp | null;
|
|
119
135
|
role: "member";
|
|
120
136
|
from: {
|
|
121
137
|
userId: string;
|
|
@@ -126,9 +142,10 @@ export interface ProjectInvitation {
|
|
|
126
142
|
};
|
|
127
143
|
}
|
|
128
144
|
export interface Project {
|
|
129
|
-
createdAt:
|
|
145
|
+
createdAt: Timestamp;
|
|
130
146
|
isPublic: boolean;
|
|
131
|
-
markedForDeletionAt:
|
|
147
|
+
markedForDeletionAt: Timestamp | null;
|
|
148
|
+
markedForDeletionBy?: PerformedBy | null;
|
|
132
149
|
members: string[];
|
|
133
150
|
name: string;
|
|
134
151
|
owner: string;
|
|
@@ -139,12 +156,13 @@ export interface Project {
|
|
|
139
156
|
about?: string;
|
|
140
157
|
githubUrl?: string;
|
|
141
158
|
isShowcase?: boolean;
|
|
142
|
-
last_deployed?:
|
|
159
|
+
last_deployed?: Timestamp;
|
|
143
160
|
schema?: "2022-08-22" | null;
|
|
144
161
|
devxUrl?: string;
|
|
145
162
|
prodxUrl?: string;
|
|
146
163
|
deployIsInProgress?: boolean;
|
|
147
|
-
deployFinishedAt?:
|
|
164
|
+
deployFinishedAt?: Timestamp;
|
|
148
165
|
deployCurrentDeployedId?: string;
|
|
149
166
|
deployLastDeploymentSuccess?: boolean;
|
|
150
167
|
}
|
|
168
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databutton/firebase-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/types/published/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"lint": "eslint --ext .js,.ts .",
|
|
20
|
+
"lint": "eslint --ext .js,.ts . && tsc --noEmit",
|
|
21
21
|
"prepublishOnly": "tsc && rm lib/index.js",
|
|
22
22
|
"build": "tsc",
|
|
23
23
|
"execute": "ts-node functions/run.ts",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"analytics-node": "6.2.0",
|
|
47
47
|
"axios": "0.27.2",
|
|
48
48
|
"cors": "2.8.5",
|
|
49
|
+
"firebase": "9.10.0",
|
|
49
50
|
"firebase-admin": "11.0.1",
|
|
50
51
|
"firebase-functions": "3.24.0",
|
|
51
52
|
"intercom-client": "3.1.5",
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
"eslint-config-prettier": "8.5.0",
|
|
70
71
|
"eslint-plugin-import": "2.26.0",
|
|
71
72
|
"eslint-plugin-jest": "27.0.4",
|
|
72
|
-
"firebase": "9.10.0",
|
|
73
73
|
"firebase-functions-test": "2.4.0",
|
|
74
74
|
"firebase-tools": "11.10.0",
|
|
75
75
|
"jest": "28.1.3",
|