@databutton/firebase-types 1.0.4 → 1.0.6

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,4 +1,4 @@
1
- import * as admin from "firebase-admin";
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
@@ -8,7 +8,7 @@ export interface Profile {
8
8
  email: string;
9
9
  userId?: string;
10
10
  earlyAccess?: boolean;
11
- earlyAccessChangedAt?: admin.firestore.Timestamp;
11
+ earlyAccessChangedAt?: Timestamp;
12
12
  enabledFeatures?: string[];
13
13
  admin?: boolean;
14
14
  }
@@ -16,9 +16,9 @@ export interface App {
16
16
  name: string;
17
17
  slug: string;
18
18
  createdBy: string;
19
- createdAt: admin.firestore.Timestamp;
19
+ createdAt: Timestamp;
20
20
  variant: "streamlit";
21
- markedForDeletionAt: admin.firestore.Timestamp | null;
21
+ markedForDeletionAt: Timestamp | null;
22
22
  shortUrl: string;
23
23
  category: string | null;
24
24
  }
@@ -26,23 +26,23 @@ export interface Job {
26
26
  name: string;
27
27
  slug: string;
28
28
  createdBy: string;
29
- createdAt: admin.firestore.Timestamp;
30
- markedForDeletionAt: admin.firestore.Timestamp | null;
29
+ createdAt: Timestamp;
30
+ markedForDeletionAt: Timestamp | null;
31
31
  category: string | null;
32
32
  }
33
33
  export interface CodeBlock {
34
34
  type: "app" | "job";
35
- createdAtUtc: admin.firestore.Timestamp;
35
+ createdAtUtc: Timestamp;
36
36
  componentId: string;
37
37
  }
38
38
  export interface CodeBlockVersion {
39
39
  code: string;
40
- createdAtUtc: admin.firestore.Timestamp;
40
+ createdAtUtc: Timestamp;
41
41
  version: string;
42
42
  description: string;
43
43
  }
44
44
  export interface Deployment {
45
- createdAt: admin.firestore.Timestamp;
45
+ createdAt: Timestamp;
46
46
  createdById: string;
47
47
  createdByName: string;
48
48
  codeBlockId: string;
@@ -50,8 +50,8 @@ export interface Deployment {
50
50
  codeRef: string;
51
51
  }
52
52
  export interface Schedule {
53
- createdAt: admin.firestore.Timestamp;
54
- updatedAt: admin.firestore.Timestamp;
53
+ createdAt: Timestamp;
54
+ updatedAt: Timestamp;
55
55
  cronExpressionUtc: string;
56
56
  cronExpression: string;
57
57
  cronTimezone: string;
@@ -69,18 +69,18 @@ export interface Dataframe {
69
69
  numberOfRows: number;
70
70
  size: string;
71
71
  sizeInMb: string;
72
- markedForDeletionAt?: admin.firestore.Timestamp | null;
72
+ markedForDeletionAt?: Timestamp | null;
73
73
  }
74
74
  export interface Viewer {
75
75
  userId: string | null;
76
76
  recipient: string;
77
77
  revoked: boolean;
78
78
  createdByUserId: string;
79
- createdAtUtc: admin.firestore.Timestamp;
79
+ createdAtUtc: Timestamp;
80
80
  }
81
81
  export interface ShortUrlRef {
82
82
  type: "ref";
83
- createdAtUtc: admin.firestore.Timestamp;
83
+ createdAtUtc: Timestamp;
84
84
  createdByUserId: string;
85
85
  active: boolean;
86
86
  projectId: string;
@@ -88,7 +88,7 @@ export interface ShortUrlRef {
88
88
  }
89
89
  export interface ShortUrlRedirect {
90
90
  type: "redirect";
91
- createdAtUtc: admin.firestore.Timestamp;
91
+ createdAtUtc: Timestamp;
92
92
  createdByUserId: string;
93
93
  active: boolean;
94
94
  to: string;
@@ -96,17 +96,17 @@ export interface ShortUrlRedirect {
96
96
  export declare type ShortUrl = ShortUrlRef | ShortUrlRedirect;
97
97
  export interface JobRun {
98
98
  duration: number;
99
- endTime?: admin.firestore.Timestamp;
99
+ endTime?: Timestamp;
100
100
  jobId: string;
101
- nextRunTime?: admin.firestore.Timestamp;
102
- startTime: admin.firestore.Timestamp;
103
- deadline?: admin.firestore.Timestamp;
101
+ nextRunTime?: Timestamp;
102
+ startTime: Timestamp;
103
+ deadline?: Timestamp;
104
104
  success: boolean;
105
105
  exitcode: number;
106
106
  }
107
107
  export interface RunLog {
108
108
  msg: string;
109
- time: admin.firestore.Timestamp;
109
+ time: Timestamp;
110
110
  }
111
111
  export interface ProjectInvitation {
112
112
  project: {
@@ -114,8 +114,8 @@ export interface ProjectInvitation {
114
114
  name: string;
115
115
  };
116
116
  state: "pending" | "withdrawn" | "accepted" | "cancelled";
117
- createdAt: admin.firestore.Timestamp;
118
- acceptedAt: admin.firestore.Timestamp | null;
117
+ createdAt: Timestamp;
118
+ acceptedAt: Timestamp | null;
119
119
  role: "member";
120
120
  from: {
121
121
  userId: string;
@@ -126,9 +126,9 @@ export interface ProjectInvitation {
126
126
  };
127
127
  }
128
128
  export interface Project {
129
- createdAt: admin.firestore.Timestamp;
129
+ createdAt: Timestamp;
130
130
  isPublic: boolean;
131
- markedForDeletionAt: admin.firestore.Timestamp | null;
131
+ markedForDeletionAt: Timestamp | null;
132
132
  members: string[];
133
133
  name: string;
134
134
  owner: string;
@@ -139,12 +139,12 @@ export interface Project {
139
139
  about?: string;
140
140
  githubUrl?: string;
141
141
  isShowcase?: boolean;
142
- last_deployed?: admin.firestore.Timestamp;
142
+ last_deployed?: Timestamp;
143
143
  schema?: "2022-08-22" | null;
144
144
  devxUrl?: string;
145
145
  prodxUrl?: string;
146
146
  deployIsInProgress?: boolean;
147
- deployFinishedAt?: admin.firestore.Timestamp;
147
+ deployFinishedAt?: Timestamp;
148
148
  deployCurrentDeployedId?: string;
149
149
  deployLastDeploymentSuccess?: boolean;
150
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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",