@teardown/types 0.1.36 → 0.1.38

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.36",
3
+ "version": "0.1.38",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -11,7 +11,10 @@
11
11
  "types": "./src/index.ts",
12
12
  "files": [
13
13
  "src/**/*",
14
- "generated/**/*"
14
+ "generated/**/*",
15
+ "tsconfig.json",
16
+ "tsconfig.lib.json",
17
+ "tsconfig.scripts.json"
15
18
  ],
16
19
  "exports": {
17
20
  ".": {
@@ -39,7 +42,7 @@
39
42
  },
40
43
  "devDependencies": {
41
44
  "@biomejs/biome": "2.3.7",
42
- "@teardown/tsconfig": "0.1.36",
45
+ "@teardown/tsconfig": "0.1.38",
43
46
  "@types/bun": "1.3.3"
44
47
  },
45
48
  "peerDependencies": {
@@ -61,6 +61,23 @@ export enum ProjectVersionStatusEnum {
61
61
  UPDATE_REQUIRED = "UPDATE_REQUIRED",
62
62
  }
63
63
 
64
+ export enum SubscriptionStatusEnum {
65
+ ACTIVE = "ACTIVE",
66
+ PAST_DUE = "PAST_DUE",
67
+ CANCELED = "CANCELED",
68
+ TRIALING = "TRIALING",
69
+ INCOMPLETE = "INCOMPLETE",
70
+ INCOMPLETE_EXPIRED = "INCOMPLETE_EXPIRED",
71
+ UNPAID = "UNPAID",
72
+ }
73
+
74
+ export enum SubscriptionTierEnum {
75
+ FREE = "FREE",
76
+ STARTER = "STARTER",
77
+ GROWTH = "GROWTH",
78
+ SCALE = "SCALE",
79
+ }
80
+
64
81
  export enum VersionBuildStatusEnum {
65
82
  SUPPORTED = "SUPPORTED",
66
83
  UPDATE_AVAILABLE = "UPDATE_AVAILABLE",
@@ -32,6 +32,7 @@ export type Database = {
32
32
  ota_updates_enabled: boolean | null
33
33
  started_at: string
34
34
  token: string
35
+ token_expires_at: string
35
36
  updated_at: string
36
37
  version: string | null
37
38
  version_build_id: string
@@ -54,6 +55,7 @@ export type Database = {
54
55
  ota_updates_enabled?: boolean | null
55
56
  started_at?: string
56
57
  token: string
58
+ token_expires_at: string
57
59
  updated_at?: string
58
60
  version?: string | null
59
61
  version_build_id: string
@@ -76,6 +78,7 @@ export type Database = {
76
78
  ota_updates_enabled?: boolean | null
77
79
  started_at?: string
78
80
  token?: string
81
+ token_expires_at?: string
79
82
  updated_at?: string
80
83
  version?: string | null
81
84
  version_build_id?: string
@@ -567,26 +570,62 @@ export type Database = {
567
570
  }
568
571
  orgs: {
569
572
  Row: {
573
+ billing_email: string | null
570
574
  created_at: string
571
575
  id: string
576
+ mau_limit: number
572
577
  name: string
578
+ project_limit: number
579
+ seat_limit: number
573
580
  slug: string
581
+ stripe_customer_id: string | null
582
+ stripe_subscription_id: string | null
583
+ subscription_period_end: string | null
584
+ subscription_period_start: string | null
585
+ subscription_status:
586
+ | Database["public"]["Enums"]["subscription_status"]
587
+ | null
588
+ subscription_tier: Database["public"]["Enums"]["subscription_tier"]
574
589
  type: Database["public"]["Enums"]["org_type"]
575
590
  updated_at: string
576
591
  }
577
592
  Insert: {
593
+ billing_email?: string | null
578
594
  created_at?: string
579
595
  id?: string
596
+ mau_limit?: number
580
597
  name: string
598
+ project_limit?: number
599
+ seat_limit?: number
581
600
  slug: string
601
+ stripe_customer_id?: string | null
602
+ stripe_subscription_id?: string | null
603
+ subscription_period_end?: string | null
604
+ subscription_period_start?: string | null
605
+ subscription_status?:
606
+ | Database["public"]["Enums"]["subscription_status"]
607
+ | null
608
+ subscription_tier?: Database["public"]["Enums"]["subscription_tier"]
582
609
  type?: Database["public"]["Enums"]["org_type"]
583
610
  updated_at?: string
584
611
  }
585
612
  Update: {
613
+ billing_email?: string | null
586
614
  created_at?: string
587
615
  id?: string
616
+ mau_limit?: number
588
617
  name?: string
618
+ project_limit?: number
619
+ seat_limit?: number
589
620
  slug?: string
621
+ stripe_customer_id?: string | null
622
+ stripe_subscription_id?: string | null
623
+ subscription_period_end?: string | null
624
+ subscription_period_start?: string | null
625
+ subscription_status?:
626
+ | Database["public"]["Enums"]["subscription_status"]
627
+ | null
628
+ subscription_tier?: Database["public"]["Enums"]["subscription_tier"]
590
629
  type?: Database["public"]["Enums"]["org_type"]
591
630
  updated_at?: string
592
631
  }
@@ -797,6 +836,50 @@ export type Database = {
797
836
  },
798
837
  ]
799
838
  }
839
+ subscription_usage: {
840
+ Row: {
841
+ created_at: string
842
+ id: string
843
+ mau_count: number
844
+ org_id: string
845
+ period_end: string
846
+ period_start: string
847
+ project_count: number
848
+ seat_count: number
849
+ updated_at: string
850
+ }
851
+ Insert: {
852
+ created_at?: string
853
+ id?: string
854
+ mau_count?: number
855
+ org_id: string
856
+ period_end: string
857
+ period_start: string
858
+ project_count?: number
859
+ seat_count?: number
860
+ updated_at?: string
861
+ }
862
+ Update: {
863
+ created_at?: string
864
+ id?: string
865
+ mau_count?: number
866
+ org_id?: string
867
+ period_end?: string
868
+ period_start?: string
869
+ project_count?: number
870
+ seat_count?: number
871
+ updated_at?: string
872
+ }
873
+ Relationships: [
874
+ {
875
+ foreignKeyName: "subscription_usage_org_id_fkey"
876
+ columns: ["org_id"]
877
+ isOneToOne: false
878
+ referencedRelation: "orgs"
879
+ referencedColumns: ["id"]
880
+ },
881
+ ]
882
+ }
800
883
  user_api_keys: {
801
884
  Row: {
802
885
  created_at: string
@@ -964,6 +1047,10 @@ export type Database = {
964
1047
  Args: { p_project_id: string }
965
1048
  Returns: undefined
966
1049
  }
1050
+ resolve_project_id_from_session: {
1051
+ Args: { _env_id: string; _version_id: string }
1052
+ Returns: string
1053
+ }
967
1054
  search_active_sessions: {
968
1055
  Args: {
969
1056
  p_end_date: string
@@ -1034,6 +1121,15 @@ export type Database = {
1034
1121
  | "UPDATE_AVAILABLE"
1035
1122
  | "UPDATE_RECOMMENDED"
1036
1123
  | "UPDATE_REQUIRED"
1124
+ subscription_status:
1125
+ | "ACTIVE"
1126
+ | "PAST_DUE"
1127
+ | "CANCELED"
1128
+ | "TRIALING"
1129
+ | "INCOMPLETE"
1130
+ | "INCOMPLETE_EXPIRED"
1131
+ | "UNPAID"
1132
+ subscription_tier: "FREE" | "STARTER" | "GROWTH" | "SCALE"
1037
1133
  version_build_status:
1038
1134
  | "SUPPORTED"
1039
1135
  | "UPDATE_AVAILABLE"
@@ -1196,6 +1292,16 @@ export const Constants = {
1196
1292
  "UPDATE_RECOMMENDED",
1197
1293
  "UPDATE_REQUIRED",
1198
1294
  ],
1295
+ subscription_status: [
1296
+ "ACTIVE",
1297
+ "PAST_DUE",
1298
+ "CANCELED",
1299
+ "TRIALING",
1300
+ "INCOMPLETE",
1301
+ "INCOMPLETE_EXPIRED",
1302
+ "UNPAID",
1303
+ ],
1304
+ subscription_tier: ["FREE", "STARTER", "GROWTH", "SCALE"],
1199
1305
  version_build_status: [
1200
1306
  "SUPPORTED",
1201
1307
  "UPDATE_AVAILABLE",
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "references": [
3
+ {
4
+ "path": "./tsconfig.lib.json"
5
+ },
6
+ {
7
+ "path": "./tsconfig.scripts.json"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "@teardown/tsconfig/tsconfig.lib.json",
3
+ "include": ["src/**/*"],
4
+ "compilerOptions": {
5
+ "noEmit": true,
6
+ "baseUrl": ".",
7
+ "rootDir": "src",
8
+ "paths": {
9
+ "@/*": ["./src/*"]
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "extends": "@teardown/tsconfig/tsconfig.base.json",
3
+ "include": [
4
+ "src/**/*.script.ts"
5
+ ],
6
+ "compilerOptions": {
7
+ "module": "esnext",
8
+ "baseUrl": ".",
9
+ "rootDir": "src",
10
+ "outDir": "dist",
11
+ "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
12
+ "forceConsistentCasingInFileNames": true
13
+ },
14
+ "references": [],
15
+ }