@teardown/types 0.1.40 → 0.1.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teardown/types",
3
- "version": "0.1.40",
3
+ "version": "0.1.43",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -41,11 +41,11 @@
41
41
  "check": "bun x biome check ./src"
42
42
  },
43
43
  "devDependencies": {
44
- "@biomejs/biome": "2.3.7",
45
- "@teardown/tsconfig": "0.1.40",
46
- "@types/bun": "1.3.3"
44
+ "@biomejs/biome": "2.3.8",
45
+ "@teardown/tsconfig": "0.1.43",
46
+ "@types/bun": "1.3.4"
47
47
  },
48
48
  "peerDependencies": {
49
- "typescript": "^5.9.3"
49
+ "typescript": "5.9.3"
50
50
  }
51
51
  }
@@ -23,6 +23,13 @@ export enum EnvironmentTypeEnum {
23
23
  PRODUCTION = "PRODUCTION",
24
24
  }
25
25
 
26
+ export enum OrgInvitationStatusEnum {
27
+ PENDING = "PENDING",
28
+ ACCEPTED = "ACCEPTED",
29
+ CANCELLED = "CANCELLED",
30
+ EXPIRED = "EXPIRED",
31
+ }
32
+
26
33
  export enum OrgRoleTypeEnum {
27
34
  OWNER = "OWNER",
28
35
  ADMIN = "ADMIN",
@@ -92,6 +92,13 @@ export type Database = {
92
92
  referencedRelation: "devices"
93
93
  referencedColumns: ["id"]
94
94
  },
95
+ {
96
+ foreignKeyName: "device_sessions_device_id_fkey"
97
+ columns: ["device_id"]
98
+ isOneToOne: false
99
+ referencedRelation: "view_device_session_user"
100
+ referencedColumns: ["device_id"]
101
+ },
95
102
  {
96
103
  foreignKeyName: "device_sessions_environment_id_fkey"
97
104
  columns: ["environment_id"]
@@ -133,9 +140,9 @@ export type Database = {
133
140
  metadata: Json | null
134
141
  os_name: string | null
135
142
  os_type: string | null
136
- persona_id: string
137
143
  platform: Database["public"]["Enums"]["device_platform"] | null
138
144
  updated_at: string
145
+ user_id: string
139
146
  }
140
147
  Insert: {
141
148
  created_at?: string
@@ -147,9 +154,9 @@ export type Database = {
147
154
  metadata?: Json | null
148
155
  os_name?: string | null
149
156
  os_type?: string | null
150
- persona_id: string
151
157
  platform?: Database["public"]["Enums"]["device_platform"] | null
152
158
  updated_at?: string
159
+ user_id: string
153
160
  }
154
161
  Update: {
155
162
  created_at?: string
@@ -161,9 +168,9 @@ export type Database = {
161
168
  metadata?: Json | null
162
169
  os_name?: string | null
163
170
  os_type?: string | null
164
- persona_id?: string
165
171
  platform?: Database["public"]["Enums"]["device_platform"] | null
166
172
  updated_at?: string
173
+ user_id?: string
167
174
  }
168
175
  Relationships: [
169
176
  {
@@ -174,18 +181,18 @@ export type Database = {
174
181
  referencedColumns: ["id"]
175
182
  },
176
183
  {
177
- foreignKeyName: "devices_persona_id_fkey"
178
- columns: ["persona_id"]
184
+ foreignKeyName: "devices_user_id_fkey"
185
+ columns: ["user_id"]
179
186
  isOneToOne: false
180
- referencedRelation: "personas"
187
+ referencedRelation: "project_users"
181
188
  referencedColumns: ["id"]
182
189
  },
183
190
  {
184
- foreignKeyName: "devices_persona_id_fkey"
185
- columns: ["persona_id"]
191
+ foreignKeyName: "devices_user_id_fkey"
192
+ columns: ["user_id"]
186
193
  isOneToOne: false
187
- referencedRelation: "view_device_session_persona"
188
- referencedColumns: ["persona_id"]
194
+ referencedRelation: "view_device_session_user"
195
+ referencedColumns: ["user_id"]
189
196
  },
190
197
  ]
191
198
  }
@@ -269,6 +276,13 @@ export type Database = {
269
276
  referencedRelation: "devices"
270
277
  referencedColumns: ["id"]
271
278
  },
279
+ {
280
+ foreignKeyName: "events_device_id_fkey"
281
+ columns: ["device_id"]
282
+ isOneToOne: false
283
+ referencedRelation: "view_device_session_user"
284
+ referencedColumns: ["device_id"]
285
+ },
272
286
  {
273
287
  foreignKeyName: "events_environment_id_fkey"
274
288
  columns: ["environment_id"]
@@ -287,7 +301,7 @@ export type Database = {
287
301
  foreignKeyName: "events_session_id_fkey"
288
302
  columns: ["session_id"]
289
303
  isOneToOne: false
290
- referencedRelation: "view_device_session_persona"
304
+ referencedRelation: "view_device_session_user"
291
305
  referencedColumns: ["session_id"]
292
306
  },
293
307
  ]
@@ -533,6 +547,50 @@ export type Database = {
533
547
  },
534
548
  ]
535
549
  }
550
+ org_invitations: {
551
+ Row: {
552
+ created_at: string
553
+ email: string
554
+ expires_at: string
555
+ id: string
556
+ invited_by: string
557
+ org_id: string
558
+ role: Database["public"]["Enums"]["org_role_type"]
559
+ status: Database["public"]["Enums"]["org_invitation_status"]
560
+ updated_at: string
561
+ }
562
+ Insert: {
563
+ created_at?: string
564
+ email: string
565
+ expires_at?: string
566
+ id?: string
567
+ invited_by: string
568
+ org_id: string
569
+ role?: Database["public"]["Enums"]["org_role_type"]
570
+ status?: Database["public"]["Enums"]["org_invitation_status"]
571
+ updated_at?: string
572
+ }
573
+ Update: {
574
+ created_at?: string
575
+ email?: string
576
+ expires_at?: string
577
+ id?: string
578
+ invited_by?: string
579
+ org_id?: string
580
+ role?: Database["public"]["Enums"]["org_role_type"]
581
+ status?: Database["public"]["Enums"]["org_invitation_status"]
582
+ updated_at?: string
583
+ }
584
+ Relationships: [
585
+ {
586
+ foreignKeyName: "org_invitations_org_id_fkey"
587
+ columns: ["org_id"]
588
+ isOneToOne: false
589
+ referencedRelation: "orgs"
590
+ referencedColumns: ["id"]
591
+ },
592
+ ]
593
+ }
536
594
  org_roles: {
537
595
  Row: {
538
596
  created_at: string
@@ -672,78 +730,78 @@ export type Database = {
672
730
  },
673
731
  ]
674
732
  }
675
- personas: {
733
+ project_api_keys: {
676
734
  Row: {
677
735
  created_at: string
678
- email: string | null
679
- environment_id: string
680
736
  id: string
681
- name: string | null
737
+ key: string
738
+ kind: Database["public"]["Enums"]["project_api_key_kind"]
739
+ name: string
740
+ project_id: string
682
741
  updated_at: string
683
- user_id: string | null
684
742
  }
685
743
  Insert: {
686
744
  created_at?: string
687
- email?: string | null
688
- environment_id: string
689
745
  id?: string
690
- name?: string | null
746
+ key?: string
747
+ kind?: Database["public"]["Enums"]["project_api_key_kind"]
748
+ name?: string
749
+ project_id: string
691
750
  updated_at?: string
692
- user_id?: string | null
693
751
  }
694
752
  Update: {
695
753
  created_at?: string
696
- email?: string | null
697
- environment_id?: string
698
754
  id?: string
699
- name?: string | null
755
+ key?: string
756
+ kind?: Database["public"]["Enums"]["project_api_key_kind"]
757
+ name?: string
758
+ project_id?: string
700
759
  updated_at?: string
701
- user_id?: string | null
702
760
  }
703
761
  Relationships: [
704
762
  {
705
- foreignKeyName: "personas_environment_id_fkey"
706
- columns: ["environment_id"]
763
+ foreignKeyName: "project_api_keys_project_id_fkey"
764
+ columns: ["project_id"]
707
765
  isOneToOne: false
708
- referencedRelation: "environments"
766
+ referencedRelation: "projects"
709
767
  referencedColumns: ["id"]
710
768
  },
711
769
  ]
712
770
  }
713
- project_api_keys: {
771
+ project_users: {
714
772
  Row: {
715
773
  created_at: string
774
+ email: string | null
775
+ environment_id: string
716
776
  id: string
717
- key: string
718
- kind: Database["public"]["Enums"]["project_api_key_kind"]
719
- name: string
720
- project_id: string
777
+ name: string | null
721
778
  updated_at: string
779
+ user_id: string | null
722
780
  }
723
781
  Insert: {
724
782
  created_at?: string
783
+ email?: string | null
784
+ environment_id: string
725
785
  id?: string
726
- key?: string
727
- kind?: Database["public"]["Enums"]["project_api_key_kind"]
728
- name?: string
729
- project_id: string
786
+ name?: string | null
730
787
  updated_at?: string
788
+ user_id?: string | null
731
789
  }
732
790
  Update: {
733
791
  created_at?: string
792
+ email?: string | null
793
+ environment_id?: string
734
794
  id?: string
735
- key?: string
736
- kind?: Database["public"]["Enums"]["project_api_key_kind"]
737
- name?: string
738
- project_id?: string
795
+ name?: string | null
739
796
  updated_at?: string
797
+ user_id?: string | null
740
798
  }
741
799
  Relationships: [
742
800
  {
743
- foreignKeyName: "project_api_keys_project_id_fkey"
744
- columns: ["project_id"]
801
+ foreignKeyName: "project_users_environment_id_fkey"
802
+ columns: ["environment_id"]
745
803
  isOneToOne: false
746
- referencedRelation: "projects"
804
+ referencedRelation: "environments"
747
805
  referencedColumns: ["id"]
748
806
  },
749
807
  ]
@@ -755,6 +813,7 @@ export type Database = {
755
813
  major: number
756
814
  minor: number
757
815
  name: string
816
+ notes: string | null
758
817
  patch: number
759
818
  project_id: string
760
819
  release_at: string
@@ -767,6 +826,7 @@ export type Database = {
767
826
  major?: number
768
827
  minor?: number
769
828
  name: string
829
+ notes?: string | null
770
830
  patch?: number
771
831
  project_id: string
772
832
  release_at?: string
@@ -779,6 +839,7 @@ export type Database = {
779
839
  major?: number
780
840
  minor?: number
781
841
  name?: string
842
+ notes?: string | null
782
843
  patch?: number
783
844
  project_id?: string
784
845
  release_at?: string
@@ -915,9 +976,9 @@ export type Database = {
915
976
  fingerprint: string | null
916
977
  id: string
917
978
  name: string | null
979
+ notes: string | null
918
980
  platform: Database["public"]["Enums"]["device_platform"]
919
981
  status: Database["public"]["Enums"]["version_build_status"]
920
- summary: string | null
921
982
  updated_at: string
922
983
  version_id: string
923
984
  }
@@ -928,9 +989,9 @@ export type Database = {
928
989
  fingerprint?: string | null
929
990
  id?: string
930
991
  name?: string | null
992
+ notes?: string | null
931
993
  platform: Database["public"]["Enums"]["device_platform"]
932
994
  status?: Database["public"]["Enums"]["version_build_status"]
933
- summary?: string | null
934
995
  updated_at?: string
935
996
  version_id: string
936
997
  }
@@ -941,9 +1002,9 @@ export type Database = {
941
1002
  fingerprint?: string | null
942
1003
  id?: string
943
1004
  name?: string | null
1005
+ notes?: string | null
944
1006
  platform?: Database["public"]["Enums"]["device_platform"]
945
1007
  status?: Database["public"]["Enums"]["version_build_status"]
946
- summary?: string | null
947
1008
  updated_at?: string
948
1009
  version_id?: string
949
1010
  }
@@ -959,7 +1020,7 @@ export type Database = {
959
1020
  }
960
1021
  }
961
1022
  Views: {
962
- view_device_session_persona: {
1023
+ view_device_session_user: {
963
1024
  Row: {
964
1025
  device_brand: string | null
965
1026
  device_id: string | null
@@ -967,23 +1028,16 @@ export type Database = {
967
1028
  device_platform: Database["public"]["Enums"]["device_platform"] | null
968
1029
  environment_id: string | null
969
1030
  os_version: string | null
970
- persona_email: string | null
971
- persona_id: string | null
972
- persona_name: string | null
973
- persona_user_id: string | null
974
1031
  session_id: string | null
975
1032
  started_at: string | null
1033
+ user_email: string | null
1034
+ user_external_id: string | null
1035
+ user_id: string | null
1036
+ user_name: string | null
976
1037
  version_build_id: string | null
977
1038
  version_id: string | null
978
1039
  }
979
1040
  Relationships: [
980
- {
981
- foreignKeyName: "device_sessions_device_id_fkey"
982
- columns: ["device_id"]
983
- isOneToOne: false
984
- referencedRelation: "devices"
985
- referencedColumns: ["id"]
986
- },
987
1041
  {
988
1042
  foreignKeyName: "device_sessions_environment_id_fkey"
989
1043
  columns: ["environment_id"]
@@ -1083,12 +1137,12 @@ export type Database = {
1083
1137
  device_id: string
1084
1138
  device_name: string
1085
1139
  os_version: string
1086
- persona_email: string
1087
- persona_id: string
1088
- persona_name: string
1089
- persona_user_id: string
1090
1140
  session_id: string
1091
1141
  started_at: string
1142
+ user_email: string
1143
+ user_external_id: string
1144
+ user_id: string
1145
+ user_name: string
1092
1146
  }[]
1093
1147
  }
1094
1148
  }
@@ -1111,6 +1165,7 @@ export type Database = {
1111
1165
  | "UNKNOWN"
1112
1166
  | "OTHER"
1113
1167
  environment_type: "DEVELOPMENT" | "STAGING" | "PRODUCTION"
1168
+ org_invitation_status: "PENDING" | "ACCEPTED" | "CANCELLED" | "EXPIRED"
1114
1169
  org_role_type: "OWNER" | "ADMIN" | "ENGINEER"
1115
1170
  org_type: "PERSONAL" | "START_UP" | "SCALE_UP" | "AGENCY" | "ENTERPRISE"
1116
1171
  project_api_key_kind: "publishable" | "secret"
@@ -1281,6 +1336,7 @@ export const Constants = {
1281
1336
  "OTHER",
1282
1337
  ],
1283
1338
  environment_type: ["DEVELOPMENT", "STAGING", "PRODUCTION"],
1339
+ org_invitation_status: ["PENDING", "ACCEPTED", "CANCELLED", "EXPIRED"],
1284
1340
  org_role_type: ["OWNER", "ADMIN", "ENGINEER"],
1285
1341
  org_type: ["PERSONAL", "START_UP", "SCALE_UP", "AGENCY", "ENTERPRISE"],
1286
1342
  project_api_key_kind: ["publishable", "secret"],