@koloseum/types 0.1.10 → 0.1.11

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.
@@ -28,6 +28,21 @@ export type Database = {
28
28
  };
29
29
  Relationships: [];
30
30
  };
31
+ app_role_permissions: {
32
+ Row: {
33
+ permission: string;
34
+ role: string;
35
+ };
36
+ Insert: {
37
+ permission: string;
38
+ role: string;
39
+ };
40
+ Update: {
41
+ permission?: string;
42
+ role?: string;
43
+ };
44
+ Relationships: [];
45
+ };
31
46
  app_roles: {
32
47
  Row: {
33
48
  created_at: string;
@@ -952,21 +967,6 @@ export type Database = {
952
967
  };
953
968
  Relationships: [];
954
969
  };
955
- role_permissions: {
956
- Row: {
957
- permission: string;
958
- role: string;
959
- };
960
- Insert: {
961
- permission: string;
962
- role: string;
963
- };
964
- Update: {
965
- permission?: string;
966
- role?: string;
967
- };
968
- Relationships: [];
969
- };
970
970
  temporary_player_xp_transactions: {
971
971
  Row: {
972
972
  amount: number;
@@ -1038,14 +1038,17 @@ export type Database = {
1038
1038
  };
1039
1039
  user_roles: {
1040
1040
  Row: {
1041
+ created_at: string;
1041
1042
  role: string;
1042
1043
  user_id: string;
1043
1044
  };
1044
1045
  Insert: {
1046
+ created_at?: string;
1045
1047
  role: string;
1046
1048
  user_id?: string;
1047
1049
  };
1048
1050
  Update: {
1051
+ created_at?: string;
1049
1052
  role?: string;
1050
1053
  user_id?: string;
1051
1054
  };
@@ -1064,7 +1067,7 @@ export type Database = {
1064
1067
  [_ in never]: never;
1065
1068
  };
1066
1069
  Functions: {
1067
- authorize: {
1070
+ authorise: {
1068
1071
  Args: {
1069
1072
  requested_permission: string;
1070
1073
  };
@@ -1607,6 +1610,7 @@ export type Database = {
1607
1610
  created_at: string | null;
1608
1611
  id: string;
1609
1612
  last_accessed_at: string | null;
1613
+ level: number | null;
1610
1614
  metadata: Json | null;
1611
1615
  name: string | null;
1612
1616
  owner: string | null;
@@ -1621,6 +1625,7 @@ export type Database = {
1621
1625
  created_at?: string | null;
1622
1626
  id?: string;
1623
1627
  last_accessed_at?: string | null;
1628
+ level?: number | null;
1624
1629
  metadata?: Json | null;
1625
1630
  name?: string | null;
1626
1631
  owner?: string | null;
@@ -1635,6 +1640,7 @@ export type Database = {
1635
1640
  created_at?: string | null;
1636
1641
  id?: string;
1637
1642
  last_accessed_at?: string | null;
1643
+ level?: number | null;
1638
1644
  metadata?: Json | null;
1639
1645
  name?: string | null;
1640
1646
  owner?: string | null;
@@ -1654,6 +1660,38 @@ export type Database = {
1654
1660
  }
1655
1661
  ];
1656
1662
  };
1663
+ prefixes: {
1664
+ Row: {
1665
+ bucket_id: string;
1666
+ created_at: string | null;
1667
+ level: number;
1668
+ name: string;
1669
+ updated_at: string | null;
1670
+ };
1671
+ Insert: {
1672
+ bucket_id: string;
1673
+ created_at?: string | null;
1674
+ level?: number;
1675
+ name: string;
1676
+ updated_at?: string | null;
1677
+ };
1678
+ Update: {
1679
+ bucket_id?: string;
1680
+ created_at?: string | null;
1681
+ level?: number;
1682
+ name?: string;
1683
+ updated_at?: string | null;
1684
+ };
1685
+ Relationships: [
1686
+ {
1687
+ foreignKeyName: "prefixes_bucketId_fkey";
1688
+ columns: ["bucket_id"];
1689
+ isOneToOne: false;
1690
+ referencedRelation: "buckets";
1691
+ referencedColumns: ["id"];
1692
+ }
1693
+ ];
1694
+ };
1657
1695
  s3_multipart_uploads: {
1658
1696
  Row: {
1659
1697
  bucket_id: string;
@@ -1757,6 +1795,13 @@ export type Database = {
1757
1795
  [_ in never]: never;
1758
1796
  };
1759
1797
  Functions: {
1798
+ add_prefixes: {
1799
+ Args: {
1800
+ _bucket_id: string;
1801
+ _name: string;
1802
+ };
1803
+ Returns: undefined;
1804
+ };
1760
1805
  can_insert_object: {
1761
1806
  Args: {
1762
1807
  bucketid: string;
@@ -1766,6 +1811,13 @@ export type Database = {
1766
1811
  };
1767
1812
  Returns: undefined;
1768
1813
  };
1814
+ delete_prefix: {
1815
+ Args: {
1816
+ _bucket_id: string;
1817
+ _name: string;
1818
+ };
1819
+ Returns: boolean;
1820
+ };
1769
1821
  extension: {
1770
1822
  Args: {
1771
1823
  name: string;
@@ -1784,6 +1836,24 @@ export type Database = {
1784
1836
  };
1785
1837
  Returns: string[];
1786
1838
  };
1839
+ get_level: {
1840
+ Args: {
1841
+ name: string;
1842
+ };
1843
+ Returns: number;
1844
+ };
1845
+ get_prefix: {
1846
+ Args: {
1847
+ name: string;
1848
+ };
1849
+ Returns: string;
1850
+ };
1851
+ get_prefixes: {
1852
+ Args: {
1853
+ name: string;
1854
+ };
1855
+ Returns: string[];
1856
+ };
1787
1857
  get_size_by_bucket: {
1788
1858
  Args: Record<PropertyKey, never>;
1789
1859
  Returns: {
@@ -1846,6 +1916,63 @@ export type Database = {
1846
1916
  metadata: Json;
1847
1917
  }[];
1848
1918
  };
1919
+ search_legacy_v1: {
1920
+ Args: {
1921
+ prefix: string;
1922
+ bucketname: string;
1923
+ limits?: number;
1924
+ levels?: number;
1925
+ offsets?: number;
1926
+ search?: string;
1927
+ sortcolumn?: string;
1928
+ sortorder?: string;
1929
+ };
1930
+ Returns: {
1931
+ name: string;
1932
+ id: string;
1933
+ updated_at: string;
1934
+ created_at: string;
1935
+ last_accessed_at: string;
1936
+ metadata: Json;
1937
+ }[];
1938
+ };
1939
+ search_v1_optimised: {
1940
+ Args: {
1941
+ prefix: string;
1942
+ bucketname: string;
1943
+ limits?: number;
1944
+ levels?: number;
1945
+ offsets?: number;
1946
+ search?: string;
1947
+ sortcolumn?: string;
1948
+ sortorder?: string;
1949
+ };
1950
+ Returns: {
1951
+ name: string;
1952
+ id: string;
1953
+ updated_at: string;
1954
+ created_at: string;
1955
+ last_accessed_at: string;
1956
+ metadata: Json;
1957
+ }[];
1958
+ };
1959
+ search_v2: {
1960
+ Args: {
1961
+ prefix: string;
1962
+ bucket_name: string;
1963
+ limits?: number;
1964
+ levels?: number;
1965
+ start_after?: string;
1966
+ };
1967
+ Returns: {
1968
+ key: string;
1969
+ name: string;
1970
+ id: string;
1971
+ updated_at: string;
1972
+ created_at: string;
1973
+ metadata: Json;
1974
+ }[];
1975
+ };
1849
1976
  };
1850
1977
  Enums: {
1851
1978
  [_ in never]: never;
package/dist/general.d.ts CHANGED
@@ -46,6 +46,34 @@ export interface IGDBPlatformsResponse {
46
46
  name: string;
47
47
  platform_family: number;
48
48
  }
49
+ export type Microservice = "compliance" | "competitions" | "commerce" | "staff" | "account";
50
+ export interface MicroserviceFeature {
51
+ name: string;
52
+ description: string;
53
+ slug: string;
54
+ }
55
+ export type MicroserviceRole = {
56
+ name: string;
57
+ slug: string;
58
+ } & ({
59
+ superuser: true;
60
+ } | {
61
+ root: true;
62
+ } | {
63
+ root?: false;
64
+ featureSlugs: string[];
65
+ });
66
+ export type MicroserviceObject = {
67
+ name: string;
68
+ description: string;
69
+ features: MicroserviceFeature[];
70
+ } & ({
71
+ slug: "account";
72
+ roles: null;
73
+ } | {
74
+ slug: Exclude<Microservice, "account">;
75
+ roles: MicroserviceRole[];
76
+ });
49
77
  export type UserWithAppMetadata = User & {
50
78
  app_metadata: AppMetadata;
51
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koloseum/types",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "author": "Koloseum Technologies Limited",
5
5
  "type": "module",
6
6
  "description": "Type definitions for use across web apps (TypeScript)",