@adventurelabs/scout-core 1.5.0 → 1.5.1
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/dist/helpers/documents.d.ts +1 -0
- package/dist/helpers/documents.js +11 -2
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/operating_contexts.d.ts +43 -0
- package/dist/helpers/operating_contexts.js +222 -0
- package/dist/helpers/realtime_topic_access.d.ts +5 -0
- package/dist/helpers/realtime_topic_access.js +55 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/useAuthorizedRealtimeTopics.d.ts +1 -0
- package/dist/hooks/useAuthorizedRealtimeTopics.js +14 -0
- package/dist/hooks/useScoutRealtimeAnalysisJobs.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeAnalysisJobs.js +3 -5
- package/dist/hooks/useScoutRealtimeAnalysisTasks.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeAnalysisTasks.js +3 -5
- package/dist/hooks/useScoutRealtimeBroadcast.d.ts +9 -5
- package/dist/hooks/useScoutRealtimeBroadcast.js +118 -25
- package/dist/hooks/useScoutRealtimeConnectivity.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeConnectivity.js +18 -76
- package/dist/hooks/useScoutRealtimeContacts.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeContacts.js +3 -3
- package/dist/hooks/useScoutRealtimeDevices.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeDevices.js +3 -64
- package/dist/hooks/useScoutRealtimeDocuments.d.ts +3 -3
- package/dist/hooks/useScoutRealtimeDocuments.js +7 -5
- package/dist/hooks/useScoutRealtimeEvents.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeEvents.js +3 -69
- package/dist/hooks/useScoutRealtimeMaintenanceRequests.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeMaintenanceRequests.js +3 -3
- package/dist/hooks/useScoutRealtimeOperatingContexts.d.ts +12 -0
- package/dist/hooks/useScoutRealtimeOperatingContexts.js +26 -0
- package/dist/hooks/useScoutRealtimeParts.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeParts.js +3 -3
- package/dist/hooks/useScoutRealtimePins.d.ts +2 -1
- package/dist/hooks/useScoutRealtimePins.js +3 -69
- package/dist/hooks/useScoutRealtimePlans.d.ts +2 -1
- package/dist/hooks/useScoutRealtimePlans.js +3 -3
- package/dist/hooks/useScoutRealtimeSessionIncidents.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeSessionIncidents.js +3 -3
- package/dist/hooks/useScoutRealtimeSessions.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeSessions.js +3 -69
- package/dist/hooks/useScoutRealtimeTags.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeTags.js +3 -69
- package/dist/hooks/useScoutRealtimeVersionsSoftware.d.ts +2 -1
- package/dist/hooks/useScoutRealtimeVersionsSoftware.js +3 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/providers/ScoutRefreshProvider.d.ts +1 -0
- package/dist/providers/ScoutRefreshProvider.js +3 -0
- package/dist/types/db.d.ts +82 -0
- package/dist/types/realtime.d.ts +1 -0
- package/dist/types/supabase.d.ts +919 -100
- package/dist/types/supabase.js +26 -1
- package/package.json +1 -1
package/dist/types/supabase.d.ts
CHANGED
|
@@ -720,6 +720,57 @@ export type Database = {
|
|
|
720
720
|
}
|
|
721
721
|
];
|
|
722
722
|
};
|
|
723
|
+
document_conditions: {
|
|
724
|
+
Row: {
|
|
725
|
+
condition_text: string;
|
|
726
|
+
id: number;
|
|
727
|
+
inserted_at: string;
|
|
728
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
729
|
+
lifecycle_changed_at: string;
|
|
730
|
+
lifecycle_changed_by: string | null;
|
|
731
|
+
lifecycle_reason: string | null;
|
|
732
|
+
localization_id: number;
|
|
733
|
+
requirement_text: string;
|
|
734
|
+
};
|
|
735
|
+
Insert: {
|
|
736
|
+
condition_text: string;
|
|
737
|
+
id?: number;
|
|
738
|
+
inserted_at?: string;
|
|
739
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
740
|
+
lifecycle_changed_at?: string;
|
|
741
|
+
lifecycle_changed_by?: string | null;
|
|
742
|
+
lifecycle_reason?: string | null;
|
|
743
|
+
localization_id: number;
|
|
744
|
+
requirement_text: string;
|
|
745
|
+
};
|
|
746
|
+
Update: {
|
|
747
|
+
condition_text?: string;
|
|
748
|
+
id?: number;
|
|
749
|
+
inserted_at?: string;
|
|
750
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
751
|
+
lifecycle_changed_at?: string;
|
|
752
|
+
lifecycle_changed_by?: string | null;
|
|
753
|
+
lifecycle_reason?: string | null;
|
|
754
|
+
localization_id?: number;
|
|
755
|
+
requirement_text?: string;
|
|
756
|
+
};
|
|
757
|
+
Relationships: [
|
|
758
|
+
{
|
|
759
|
+
foreignKeyName: "document_conditions_lifecycle_changed_by_fkey";
|
|
760
|
+
columns: ["lifecycle_changed_by"];
|
|
761
|
+
isOneToOne: false;
|
|
762
|
+
referencedRelation: "users";
|
|
763
|
+
referencedColumns: ["id"];
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
foreignKeyName: "document_conditions_localization_id_fkey";
|
|
767
|
+
columns: ["localization_id"];
|
|
768
|
+
isOneToOne: false;
|
|
769
|
+
referencedRelation: "localizations";
|
|
770
|
+
referencedColumns: ["id"];
|
|
771
|
+
}
|
|
772
|
+
];
|
|
773
|
+
};
|
|
723
774
|
document_template_abilities: {
|
|
724
775
|
Row: {
|
|
725
776
|
ability_id: number;
|
|
@@ -760,6 +811,7 @@ export type Database = {
|
|
|
760
811
|
Row: {
|
|
761
812
|
categories: string[];
|
|
762
813
|
description: string | null;
|
|
814
|
+
document_condition_id: number | null;
|
|
763
815
|
entity_for: Database["public"]["Enums"]["document_entity"] | null;
|
|
764
816
|
id: number;
|
|
765
817
|
inserted_at: string;
|
|
@@ -772,6 +824,7 @@ export type Database = {
|
|
|
772
824
|
Insert: {
|
|
773
825
|
categories?: string[];
|
|
774
826
|
description?: string | null;
|
|
827
|
+
document_condition_id?: number | null;
|
|
775
828
|
entity_for?: Database["public"]["Enums"]["document_entity"] | null;
|
|
776
829
|
id?: number;
|
|
777
830
|
inserted_at?: string;
|
|
@@ -784,6 +837,7 @@ export type Database = {
|
|
|
784
837
|
Update: {
|
|
785
838
|
categories?: string[];
|
|
786
839
|
description?: string | null;
|
|
840
|
+
document_condition_id?: number | null;
|
|
787
841
|
entity_for?: Database["public"]["Enums"]["document_entity"] | null;
|
|
788
842
|
id?: number;
|
|
789
843
|
inserted_at?: string;
|
|
@@ -794,6 +848,13 @@ export type Database = {
|
|
|
794
848
|
uses_expiry?: boolean;
|
|
795
849
|
};
|
|
796
850
|
Relationships: [
|
|
851
|
+
{
|
|
852
|
+
foreignKeyName: "document_templates_document_condition_id_fkey";
|
|
853
|
+
columns: ["document_condition_id"];
|
|
854
|
+
isOneToOne: false;
|
|
855
|
+
referencedRelation: "document_conditions";
|
|
856
|
+
referencedColumns: ["id"];
|
|
857
|
+
},
|
|
797
858
|
{
|
|
798
859
|
foreignKeyName: "document_templates_issuer_id_fkey";
|
|
799
860
|
columns: ["issuer_id"];
|
|
@@ -824,6 +885,7 @@ export type Database = {
|
|
|
824
885
|
lifecycle_changed_at: string;
|
|
825
886
|
lifecycle_changed_by: string | null;
|
|
826
887
|
lifecycle_reason: string | null;
|
|
888
|
+
operating_context_id: number | null;
|
|
827
889
|
product_id: number | null;
|
|
828
890
|
related_herd_id: number | null;
|
|
829
891
|
size_bytes: number | null;
|
|
@@ -848,6 +910,7 @@ export type Database = {
|
|
|
848
910
|
lifecycle_changed_at?: string;
|
|
849
911
|
lifecycle_changed_by?: string | null;
|
|
850
912
|
lifecycle_reason?: string | null;
|
|
913
|
+
operating_context_id?: number | null;
|
|
851
914
|
product_id?: number | null;
|
|
852
915
|
related_herd_id?: number | null;
|
|
853
916
|
size_bytes?: number | null;
|
|
@@ -872,6 +935,7 @@ export type Database = {
|
|
|
872
935
|
lifecycle_changed_at?: string;
|
|
873
936
|
lifecycle_changed_by?: string | null;
|
|
874
937
|
lifecycle_reason?: string | null;
|
|
938
|
+
operating_context_id?: number | null;
|
|
875
939
|
product_id?: number | null;
|
|
876
940
|
related_herd_id?: number | null;
|
|
877
941
|
size_bytes?: number | null;
|
|
@@ -919,6 +983,13 @@ export type Database = {
|
|
|
919
983
|
referencedRelation: "users";
|
|
920
984
|
referencedColumns: ["id"];
|
|
921
985
|
},
|
|
986
|
+
{
|
|
987
|
+
foreignKeyName: "documents_operating_context_id_fkey";
|
|
988
|
+
columns: ["operating_context_id"];
|
|
989
|
+
isOneToOne: false;
|
|
990
|
+
referencedRelation: "operating_contexts";
|
|
991
|
+
referencedColumns: ["id"];
|
|
992
|
+
},
|
|
922
993
|
{
|
|
923
994
|
foreignKeyName: "documents_product_id_fkey";
|
|
924
995
|
columns: ["product_id"];
|
|
@@ -1685,214 +1756,927 @@ export type Database = {
|
|
|
1685
1756
|
};
|
|
1686
1757
|
Relationships: [
|
|
1687
1758
|
{
|
|
1688
|
-
foreignKeyName: "maintenance_requests_creator_user_id_fkey";
|
|
1689
|
-
columns: ["creator_user_id"];
|
|
1759
|
+
foreignKeyName: "maintenance_requests_creator_user_id_fkey";
|
|
1760
|
+
columns: ["creator_user_id"];
|
|
1761
|
+
isOneToOne: false;
|
|
1762
|
+
referencedRelation: "users";
|
|
1763
|
+
referencedColumns: ["id"];
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
foreignKeyName: "maintenance_requests_device_id_fkey";
|
|
1767
|
+
columns: ["device_id"];
|
|
1768
|
+
isOneToOne: false;
|
|
1769
|
+
referencedRelation: "devices";
|
|
1770
|
+
referencedColumns: ["id"];
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
foreignKeyName: "maintenance_requests_part_id_fkey";
|
|
1774
|
+
columns: ["part_id"];
|
|
1775
|
+
isOneToOne: false;
|
|
1776
|
+
referencedRelation: "parts";
|
|
1777
|
+
referencedColumns: ["id"];
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
foreignKeyName: "maintenance_requests_remediation_completed_user_id_fkey";
|
|
1781
|
+
columns: ["remediation_completed_user_id"];
|
|
1782
|
+
isOneToOne: false;
|
|
1783
|
+
referencedRelation: "users";
|
|
1784
|
+
referencedColumns: ["id"];
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
foreignKeyName: "maintenance_requests_session_incident_id_fkey";
|
|
1788
|
+
columns: ["session_incident_id"];
|
|
1789
|
+
isOneToOne: false;
|
|
1790
|
+
referencedRelation: "session_incidents";
|
|
1791
|
+
referencedColumns: ["id"];
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
foreignKeyName: "maintenance_requests_updated_by_user_id_fkey";
|
|
1795
|
+
columns: ["updated_by_user_id"];
|
|
1796
|
+
isOneToOne: false;
|
|
1797
|
+
referencedRelation: "users";
|
|
1798
|
+
referencedColumns: ["id"];
|
|
1799
|
+
}
|
|
1800
|
+
];
|
|
1801
|
+
};
|
|
1802
|
+
manufacturers: {
|
|
1803
|
+
Row: {
|
|
1804
|
+
country: string | null;
|
|
1805
|
+
gln: string | null;
|
|
1806
|
+
id: number;
|
|
1807
|
+
inserted_at: string;
|
|
1808
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1809
|
+
lifecycle_changed_at: string;
|
|
1810
|
+
lifecycle_changed_by: string | null;
|
|
1811
|
+
lifecycle_reason: string | null;
|
|
1812
|
+
name: string;
|
|
1813
|
+
website: string | null;
|
|
1814
|
+
};
|
|
1815
|
+
Insert: {
|
|
1816
|
+
country?: string | null;
|
|
1817
|
+
gln?: string | null;
|
|
1818
|
+
id?: number;
|
|
1819
|
+
inserted_at?: string;
|
|
1820
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1821
|
+
lifecycle_changed_at?: string;
|
|
1822
|
+
lifecycle_changed_by?: string | null;
|
|
1823
|
+
lifecycle_reason?: string | null;
|
|
1824
|
+
name: string;
|
|
1825
|
+
website?: string | null;
|
|
1826
|
+
};
|
|
1827
|
+
Update: {
|
|
1828
|
+
country?: string | null;
|
|
1829
|
+
gln?: string | null;
|
|
1830
|
+
id?: number;
|
|
1831
|
+
inserted_at?: string;
|
|
1832
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1833
|
+
lifecycle_changed_at?: string;
|
|
1834
|
+
lifecycle_changed_by?: string | null;
|
|
1835
|
+
lifecycle_reason?: string | null;
|
|
1836
|
+
name?: string;
|
|
1837
|
+
website?: string | null;
|
|
1838
|
+
};
|
|
1839
|
+
Relationships: [
|
|
1840
|
+
{
|
|
1841
|
+
foreignKeyName: "manufacturers_lifecycle_changed_by_fkey";
|
|
1842
|
+
columns: ["lifecycle_changed_by"];
|
|
1843
|
+
isOneToOne: false;
|
|
1844
|
+
referencedRelation: "users";
|
|
1845
|
+
referencedColumns: ["id"];
|
|
1846
|
+
}
|
|
1847
|
+
];
|
|
1848
|
+
};
|
|
1849
|
+
models: {
|
|
1850
|
+
Row: {
|
|
1851
|
+
capabilities: string[];
|
|
1852
|
+
id: number;
|
|
1853
|
+
inserted_at: string;
|
|
1854
|
+
is_active: boolean;
|
|
1855
|
+
metadata: Json;
|
|
1856
|
+
name: string;
|
|
1857
|
+
version: string;
|
|
1858
|
+
weights_sha256: string | null;
|
|
1859
|
+
weights_uri: string | null;
|
|
1860
|
+
};
|
|
1861
|
+
Insert: {
|
|
1862
|
+
capabilities?: string[];
|
|
1863
|
+
id?: number;
|
|
1864
|
+
inserted_at?: string;
|
|
1865
|
+
is_active?: boolean;
|
|
1866
|
+
metadata?: Json;
|
|
1867
|
+
name: string;
|
|
1868
|
+
version?: string;
|
|
1869
|
+
weights_sha256?: string | null;
|
|
1870
|
+
weights_uri?: string | null;
|
|
1871
|
+
};
|
|
1872
|
+
Update: {
|
|
1873
|
+
capabilities?: string[];
|
|
1874
|
+
id?: number;
|
|
1875
|
+
inserted_at?: string;
|
|
1876
|
+
is_active?: boolean;
|
|
1877
|
+
metadata?: Json;
|
|
1878
|
+
name?: string;
|
|
1879
|
+
version?: string;
|
|
1880
|
+
weights_sha256?: string | null;
|
|
1881
|
+
weights_uri?: string | null;
|
|
1882
|
+
};
|
|
1883
|
+
Relationships: [];
|
|
1884
|
+
};
|
|
1885
|
+
models_per_jobs_per_herd: {
|
|
1886
|
+
Row: {
|
|
1887
|
+
enabled: boolean;
|
|
1888
|
+
herd_id: number;
|
|
1889
|
+
id: number;
|
|
1890
|
+
inserted_at: string;
|
|
1891
|
+
job_type: string;
|
|
1892
|
+
model_id: number;
|
|
1893
|
+
priority: number;
|
|
1894
|
+
};
|
|
1895
|
+
Insert: {
|
|
1896
|
+
enabled?: boolean;
|
|
1897
|
+
herd_id: number;
|
|
1898
|
+
id?: number;
|
|
1899
|
+
inserted_at?: string;
|
|
1900
|
+
job_type: string;
|
|
1901
|
+
model_id: number;
|
|
1902
|
+
priority?: number;
|
|
1903
|
+
};
|
|
1904
|
+
Update: {
|
|
1905
|
+
enabled?: boolean;
|
|
1906
|
+
herd_id?: number;
|
|
1907
|
+
id?: number;
|
|
1908
|
+
inserted_at?: string;
|
|
1909
|
+
job_type?: string;
|
|
1910
|
+
model_id?: number;
|
|
1911
|
+
priority?: number;
|
|
1912
|
+
};
|
|
1913
|
+
Relationships: [
|
|
1914
|
+
{
|
|
1915
|
+
foreignKeyName: "models_per_jobs_per_herd_herd_id_fkey";
|
|
1916
|
+
columns: ["herd_id"];
|
|
1917
|
+
isOneToOne: false;
|
|
1918
|
+
referencedRelation: "herds";
|
|
1919
|
+
referencedColumns: ["id"];
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
foreignKeyName: "models_per_jobs_per_herd_model_id_fkey";
|
|
1923
|
+
columns: ["model_id"];
|
|
1924
|
+
isOneToOne: false;
|
|
1925
|
+
referencedRelation: "models";
|
|
1926
|
+
referencedColumns: ["id"];
|
|
1927
|
+
}
|
|
1928
|
+
];
|
|
1929
|
+
};
|
|
1930
|
+
observations: {
|
|
1931
|
+
Row: {
|
|
1932
|
+
action_complete: boolean;
|
|
1933
|
+
action_required: string | null;
|
|
1934
|
+
description: string;
|
|
1935
|
+
id: number;
|
|
1936
|
+
inserted_at: string;
|
|
1937
|
+
session_id: number;
|
|
1938
|
+
timestamp: string | null;
|
|
1939
|
+
updated_at: string | null;
|
|
1940
|
+
};
|
|
1941
|
+
Insert: {
|
|
1942
|
+
action_complete?: boolean;
|
|
1943
|
+
action_required?: string | null;
|
|
1944
|
+
description: string;
|
|
1945
|
+
id?: number;
|
|
1946
|
+
inserted_at?: string;
|
|
1947
|
+
session_id: number;
|
|
1948
|
+
timestamp?: string | null;
|
|
1949
|
+
updated_at?: string | null;
|
|
1950
|
+
};
|
|
1951
|
+
Update: {
|
|
1952
|
+
action_complete?: boolean;
|
|
1953
|
+
action_required?: string | null;
|
|
1954
|
+
description?: string;
|
|
1955
|
+
id?: number;
|
|
1956
|
+
inserted_at?: string;
|
|
1957
|
+
session_id?: number;
|
|
1958
|
+
timestamp?: string | null;
|
|
1959
|
+
updated_at?: string | null;
|
|
1960
|
+
};
|
|
1961
|
+
Relationships: [
|
|
1962
|
+
{
|
|
1963
|
+
foreignKeyName: "observations_session_id_fkey";
|
|
1964
|
+
columns: ["session_id"];
|
|
1965
|
+
isOneToOne: false;
|
|
1966
|
+
referencedRelation: "sessions";
|
|
1967
|
+
referencedColumns: ["id"];
|
|
1968
|
+
}
|
|
1969
|
+
];
|
|
1970
|
+
};
|
|
1971
|
+
operating_context_equipment_categories: {
|
|
1972
|
+
Row: {
|
|
1973
|
+
id: number;
|
|
1974
|
+
inserted_at: string;
|
|
1975
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1976
|
+
lifecycle_changed_at: string;
|
|
1977
|
+
lifecycle_changed_by: string | null;
|
|
1978
|
+
lifecycle_reason: string | null;
|
|
1979
|
+
localization_id: number;
|
|
1980
|
+
name: string;
|
|
1981
|
+
};
|
|
1982
|
+
Insert: {
|
|
1983
|
+
id?: number;
|
|
1984
|
+
inserted_at?: string;
|
|
1985
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1986
|
+
lifecycle_changed_at?: string;
|
|
1987
|
+
lifecycle_changed_by?: string | null;
|
|
1988
|
+
lifecycle_reason?: string | null;
|
|
1989
|
+
localization_id: number;
|
|
1990
|
+
name: string;
|
|
1991
|
+
};
|
|
1992
|
+
Update: {
|
|
1993
|
+
id?: number;
|
|
1994
|
+
inserted_at?: string;
|
|
1995
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1996
|
+
lifecycle_changed_at?: string;
|
|
1997
|
+
lifecycle_changed_by?: string | null;
|
|
1998
|
+
lifecycle_reason?: string | null;
|
|
1999
|
+
localization_id?: number;
|
|
2000
|
+
name?: string;
|
|
2001
|
+
};
|
|
2002
|
+
Relationships: [
|
|
2003
|
+
{
|
|
2004
|
+
foreignKeyName: "operating_context_equipment_categorie_lifecycle_changed_by_fkey";
|
|
2005
|
+
columns: ["lifecycle_changed_by"];
|
|
2006
|
+
isOneToOne: false;
|
|
2007
|
+
referencedRelation: "users";
|
|
2008
|
+
referencedColumns: ["id"];
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
foreignKeyName: "operating_context_equipment_categories_localization_id_fkey";
|
|
2012
|
+
columns: ["localization_id"];
|
|
2013
|
+
isOneToOne: false;
|
|
2014
|
+
referencedRelation: "localizations";
|
|
2015
|
+
referencedColumns: ["id"];
|
|
2016
|
+
}
|
|
2017
|
+
];
|
|
2018
|
+
};
|
|
2019
|
+
operating_context_equipment_items: {
|
|
2020
|
+
Row: {
|
|
2021
|
+
equipment_category_id: number;
|
|
2022
|
+
id: number;
|
|
2023
|
+
inserted_at: string;
|
|
2024
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2025
|
+
lifecycle_changed_at: string;
|
|
2026
|
+
lifecycle_changed_by: string | null;
|
|
2027
|
+
lifecycle_reason: string | null;
|
|
2028
|
+
name: string;
|
|
2029
|
+
};
|
|
2030
|
+
Insert: {
|
|
2031
|
+
equipment_category_id: number;
|
|
2032
|
+
id?: number;
|
|
2033
|
+
inserted_at?: string;
|
|
2034
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2035
|
+
lifecycle_changed_at?: string;
|
|
2036
|
+
lifecycle_changed_by?: string | null;
|
|
2037
|
+
lifecycle_reason?: string | null;
|
|
2038
|
+
name: string;
|
|
2039
|
+
};
|
|
2040
|
+
Update: {
|
|
2041
|
+
equipment_category_id?: number;
|
|
2042
|
+
id?: number;
|
|
2043
|
+
inserted_at?: string;
|
|
2044
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2045
|
+
lifecycle_changed_at?: string;
|
|
2046
|
+
lifecycle_changed_by?: string | null;
|
|
2047
|
+
lifecycle_reason?: string | null;
|
|
2048
|
+
name?: string;
|
|
2049
|
+
};
|
|
2050
|
+
Relationships: [
|
|
2051
|
+
{
|
|
2052
|
+
foreignKeyName: "operating_context_equipment_items_equipment_category_id_fkey";
|
|
2053
|
+
columns: ["equipment_category_id"];
|
|
2054
|
+
isOneToOne: false;
|
|
2055
|
+
referencedRelation: "operating_context_equipment_categories";
|
|
2056
|
+
referencedColumns: ["id"];
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
foreignKeyName: "operating_context_equipment_items_lifecycle_changed_by_fkey";
|
|
2060
|
+
columns: ["lifecycle_changed_by"];
|
|
2061
|
+
isOneToOne: false;
|
|
2062
|
+
referencedRelation: "users";
|
|
2063
|
+
referencedColumns: ["id"];
|
|
2064
|
+
}
|
|
2065
|
+
];
|
|
2066
|
+
};
|
|
2067
|
+
operating_context_equipment_requirements: {
|
|
2068
|
+
Row: {
|
|
2069
|
+
equipment_item_id: number;
|
|
2070
|
+
id: number;
|
|
2071
|
+
inserted_at: string;
|
|
2072
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2073
|
+
lifecycle_changed_at: string;
|
|
2074
|
+
lifecycle_changed_by: string | null;
|
|
2075
|
+
lifecycle_reason: string | null;
|
|
2076
|
+
operating_context_id: number;
|
|
2077
|
+
};
|
|
2078
|
+
Insert: {
|
|
2079
|
+
equipment_item_id: number;
|
|
2080
|
+
id?: number;
|
|
2081
|
+
inserted_at?: string;
|
|
2082
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2083
|
+
lifecycle_changed_at?: string;
|
|
2084
|
+
lifecycle_changed_by?: string | null;
|
|
2085
|
+
lifecycle_reason?: string | null;
|
|
2086
|
+
operating_context_id: number;
|
|
2087
|
+
};
|
|
2088
|
+
Update: {
|
|
2089
|
+
equipment_item_id?: number;
|
|
2090
|
+
id?: number;
|
|
2091
|
+
inserted_at?: string;
|
|
2092
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2093
|
+
lifecycle_changed_at?: string;
|
|
2094
|
+
lifecycle_changed_by?: string | null;
|
|
2095
|
+
lifecycle_reason?: string | null;
|
|
2096
|
+
operating_context_id?: number;
|
|
2097
|
+
};
|
|
2098
|
+
Relationships: [
|
|
2099
|
+
{
|
|
2100
|
+
foreignKeyName: "operating_context_equipment_requireme_lifecycle_changed_by_fkey";
|
|
2101
|
+
columns: ["lifecycle_changed_by"];
|
|
2102
|
+
isOneToOne: false;
|
|
2103
|
+
referencedRelation: "users";
|
|
2104
|
+
referencedColumns: ["id"];
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
foreignKeyName: "operating_context_equipment_requireme_operating_context_id_fkey";
|
|
2108
|
+
columns: ["operating_context_id"];
|
|
2109
|
+
isOneToOne: false;
|
|
2110
|
+
referencedRelation: "operating_contexts";
|
|
2111
|
+
referencedColumns: ["id"];
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
foreignKeyName: "operating_context_equipment_requirements_equipment_item_id_fkey";
|
|
2115
|
+
columns: ["equipment_item_id"];
|
|
2116
|
+
isOneToOne: false;
|
|
2117
|
+
referencedRelation: "operating_context_equipment_items";
|
|
2118
|
+
referencedColumns: ["id"];
|
|
2119
|
+
}
|
|
2120
|
+
];
|
|
2121
|
+
};
|
|
2122
|
+
operating_context_payloads: {
|
|
2123
|
+
Row: {
|
|
2124
|
+
created_at: string;
|
|
2125
|
+
created_by: string;
|
|
2126
|
+
description: string | null;
|
|
2127
|
+
id: number;
|
|
2128
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2129
|
+
lifecycle_changed_at: string;
|
|
2130
|
+
lifecycle_changed_by: string | null;
|
|
2131
|
+
lifecycle_reason: string | null;
|
|
2132
|
+
operating_context_id: number;
|
|
2133
|
+
payload_type: Database["public"]["Enums"]["operating_context_payload_type"];
|
|
2134
|
+
updated_at: string;
|
|
2135
|
+
updated_by: string | null;
|
|
2136
|
+
weight_kg: number;
|
|
2137
|
+
};
|
|
2138
|
+
Insert: {
|
|
2139
|
+
created_at?: string;
|
|
2140
|
+
created_by: string;
|
|
2141
|
+
description?: string | null;
|
|
2142
|
+
id?: number;
|
|
2143
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2144
|
+
lifecycle_changed_at?: string;
|
|
2145
|
+
lifecycle_changed_by?: string | null;
|
|
2146
|
+
lifecycle_reason?: string | null;
|
|
2147
|
+
operating_context_id: number;
|
|
2148
|
+
payload_type: Database["public"]["Enums"]["operating_context_payload_type"];
|
|
2149
|
+
updated_at?: string;
|
|
2150
|
+
updated_by?: string | null;
|
|
2151
|
+
weight_kg: number;
|
|
2152
|
+
};
|
|
2153
|
+
Update: {
|
|
2154
|
+
created_at?: string;
|
|
2155
|
+
created_by?: string;
|
|
2156
|
+
description?: string | null;
|
|
2157
|
+
id?: number;
|
|
2158
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2159
|
+
lifecycle_changed_at?: string;
|
|
2160
|
+
lifecycle_changed_by?: string | null;
|
|
2161
|
+
lifecycle_reason?: string | null;
|
|
2162
|
+
operating_context_id?: number;
|
|
2163
|
+
payload_type?: Database["public"]["Enums"]["operating_context_payload_type"];
|
|
2164
|
+
updated_at?: string;
|
|
2165
|
+
updated_by?: string | null;
|
|
2166
|
+
weight_kg?: number;
|
|
2167
|
+
};
|
|
2168
|
+
Relationships: [
|
|
2169
|
+
{
|
|
2170
|
+
foreignKeyName: "operating_context_payloads_created_by_fkey";
|
|
2171
|
+
columns: ["created_by"];
|
|
2172
|
+
isOneToOne: false;
|
|
2173
|
+
referencedRelation: "users";
|
|
2174
|
+
referencedColumns: ["id"];
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
foreignKeyName: "operating_context_payloads_lifecycle_changed_by_fkey";
|
|
2178
|
+
columns: ["lifecycle_changed_by"];
|
|
2179
|
+
isOneToOne: false;
|
|
2180
|
+
referencedRelation: "users";
|
|
2181
|
+
referencedColumns: ["id"];
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
foreignKeyName: "operating_context_payloads_operating_context_id_fkey";
|
|
2185
|
+
columns: ["operating_context_id"];
|
|
2186
|
+
isOneToOne: false;
|
|
2187
|
+
referencedRelation: "operating_contexts";
|
|
2188
|
+
referencedColumns: ["id"];
|
|
2189
|
+
},
|
|
2190
|
+
{
|
|
2191
|
+
foreignKeyName: "operating_context_payloads_updated_by_fkey";
|
|
2192
|
+
columns: ["updated_by"];
|
|
2193
|
+
isOneToOne: false;
|
|
2194
|
+
referencedRelation: "users";
|
|
2195
|
+
referencedColumns: ["id"];
|
|
2196
|
+
}
|
|
2197
|
+
];
|
|
2198
|
+
};
|
|
2199
|
+
operating_context_regions: {
|
|
2200
|
+
Row: {
|
|
2201
|
+
created_at: string;
|
|
2202
|
+
created_by: string;
|
|
2203
|
+
id: number;
|
|
2204
|
+
is_exclusion: boolean;
|
|
2205
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2206
|
+
lifecycle_changed_at: string;
|
|
2207
|
+
lifecycle_changed_by: string | null;
|
|
2208
|
+
lifecycle_reason: string | null;
|
|
2209
|
+
name: string | null;
|
|
2210
|
+
operating_context_id: number;
|
|
2211
|
+
region: unknown;
|
|
2212
|
+
updated_at: string;
|
|
2213
|
+
updated_by: string | null;
|
|
2214
|
+
weather_origin: unknown;
|
|
2215
|
+
};
|
|
2216
|
+
Insert: {
|
|
2217
|
+
created_at?: string;
|
|
2218
|
+
created_by: string;
|
|
2219
|
+
id?: number;
|
|
2220
|
+
is_exclusion: boolean;
|
|
2221
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2222
|
+
lifecycle_changed_at?: string;
|
|
2223
|
+
lifecycle_changed_by?: string | null;
|
|
2224
|
+
lifecycle_reason?: string | null;
|
|
2225
|
+
name?: string | null;
|
|
2226
|
+
operating_context_id: number;
|
|
2227
|
+
region: unknown;
|
|
2228
|
+
updated_at?: string;
|
|
2229
|
+
updated_by?: string | null;
|
|
2230
|
+
weather_origin?: unknown;
|
|
2231
|
+
};
|
|
2232
|
+
Update: {
|
|
2233
|
+
created_at?: string;
|
|
2234
|
+
created_by?: string;
|
|
2235
|
+
id?: number;
|
|
2236
|
+
is_exclusion?: boolean;
|
|
2237
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2238
|
+
lifecycle_changed_at?: string;
|
|
2239
|
+
lifecycle_changed_by?: string | null;
|
|
2240
|
+
lifecycle_reason?: string | null;
|
|
2241
|
+
name?: string | null;
|
|
2242
|
+
operating_context_id?: number;
|
|
2243
|
+
region?: unknown;
|
|
2244
|
+
updated_at?: string;
|
|
2245
|
+
updated_by?: string | null;
|
|
2246
|
+
weather_origin?: unknown;
|
|
2247
|
+
};
|
|
2248
|
+
Relationships: [
|
|
2249
|
+
{
|
|
2250
|
+
foreignKeyName: "operating_context_regions_created_by_fkey";
|
|
2251
|
+
columns: ["created_by"];
|
|
2252
|
+
isOneToOne: false;
|
|
2253
|
+
referencedRelation: "users";
|
|
2254
|
+
referencedColumns: ["id"];
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
foreignKeyName: "operating_context_regions_lifecycle_changed_by_fkey";
|
|
2258
|
+
columns: ["lifecycle_changed_by"];
|
|
2259
|
+
isOneToOne: false;
|
|
2260
|
+
referencedRelation: "users";
|
|
2261
|
+
referencedColumns: ["id"];
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
foreignKeyName: "operating_context_regions_operating_context_id_fkey";
|
|
2265
|
+
columns: ["operating_context_id"];
|
|
2266
|
+
isOneToOne: false;
|
|
2267
|
+
referencedRelation: "operating_contexts";
|
|
2268
|
+
referencedColumns: ["id"];
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
foreignKeyName: "operating_context_regions_updated_by_fkey";
|
|
2272
|
+
columns: ["updated_by"];
|
|
2273
|
+
isOneToOne: false;
|
|
2274
|
+
referencedRelation: "users";
|
|
2275
|
+
referencedColumns: ["id"];
|
|
2276
|
+
}
|
|
2277
|
+
];
|
|
2278
|
+
};
|
|
2279
|
+
operating_context_risks: {
|
|
2280
|
+
Row: {
|
|
2281
|
+
created_at: string;
|
|
2282
|
+
created_by: string;
|
|
2283
|
+
hazard: string;
|
|
2284
|
+
id: number;
|
|
2285
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2286
|
+
lifecycle_changed_at: string;
|
|
2287
|
+
lifecycle_changed_by: string | null;
|
|
2288
|
+
lifecycle_reason: string | null;
|
|
2289
|
+
mitigation: string;
|
|
2290
|
+
operating_context_id: number;
|
|
2291
|
+
probability_after: Database["public"]["Enums"]["operating_context_risk_probability"];
|
|
2292
|
+
probability_before: Database["public"]["Enums"]["operating_context_risk_probability"];
|
|
2293
|
+
severity_after: Database["public"]["Enums"]["operating_context_risk_severity"];
|
|
2294
|
+
severity_before: Database["public"]["Enums"]["operating_context_risk_severity"];
|
|
2295
|
+
updated_at: string;
|
|
2296
|
+
updated_by: string | null;
|
|
2297
|
+
};
|
|
2298
|
+
Insert: {
|
|
2299
|
+
created_at?: string;
|
|
2300
|
+
created_by: string;
|
|
2301
|
+
hazard: string;
|
|
2302
|
+
id?: number;
|
|
2303
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2304
|
+
lifecycle_changed_at?: string;
|
|
2305
|
+
lifecycle_changed_by?: string | null;
|
|
2306
|
+
lifecycle_reason?: string | null;
|
|
2307
|
+
mitigation: string;
|
|
2308
|
+
operating_context_id: number;
|
|
2309
|
+
probability_after: Database["public"]["Enums"]["operating_context_risk_probability"];
|
|
2310
|
+
probability_before: Database["public"]["Enums"]["operating_context_risk_probability"];
|
|
2311
|
+
severity_after: Database["public"]["Enums"]["operating_context_risk_severity"];
|
|
2312
|
+
severity_before: Database["public"]["Enums"]["operating_context_risk_severity"];
|
|
2313
|
+
updated_at?: string;
|
|
2314
|
+
updated_by?: string | null;
|
|
2315
|
+
};
|
|
2316
|
+
Update: {
|
|
2317
|
+
created_at?: string;
|
|
2318
|
+
created_by?: string;
|
|
2319
|
+
hazard?: string;
|
|
2320
|
+
id?: number;
|
|
2321
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2322
|
+
lifecycle_changed_at?: string;
|
|
2323
|
+
lifecycle_changed_by?: string | null;
|
|
2324
|
+
lifecycle_reason?: string | null;
|
|
2325
|
+
mitigation?: string;
|
|
2326
|
+
operating_context_id?: number;
|
|
2327
|
+
probability_after?: Database["public"]["Enums"]["operating_context_risk_probability"];
|
|
2328
|
+
probability_before?: Database["public"]["Enums"]["operating_context_risk_probability"];
|
|
2329
|
+
severity_after?: Database["public"]["Enums"]["operating_context_risk_severity"];
|
|
2330
|
+
severity_before?: Database["public"]["Enums"]["operating_context_risk_severity"];
|
|
2331
|
+
updated_at?: string;
|
|
2332
|
+
updated_by?: string | null;
|
|
2333
|
+
};
|
|
2334
|
+
Relationships: [
|
|
2335
|
+
{
|
|
2336
|
+
foreignKeyName: "operating_context_risks_created_by_fkey";
|
|
2337
|
+
columns: ["created_by"];
|
|
1690
2338
|
isOneToOne: false;
|
|
1691
2339
|
referencedRelation: "users";
|
|
1692
2340
|
referencedColumns: ["id"];
|
|
1693
2341
|
},
|
|
1694
2342
|
{
|
|
1695
|
-
foreignKeyName: "
|
|
1696
|
-
columns: ["
|
|
2343
|
+
foreignKeyName: "operating_context_risks_lifecycle_changed_by_fkey";
|
|
2344
|
+
columns: ["lifecycle_changed_by"];
|
|
1697
2345
|
isOneToOne: false;
|
|
1698
|
-
referencedRelation: "
|
|
2346
|
+
referencedRelation: "users";
|
|
1699
2347
|
referencedColumns: ["id"];
|
|
1700
2348
|
},
|
|
1701
2349
|
{
|
|
1702
|
-
foreignKeyName: "
|
|
1703
|
-
columns: ["
|
|
2350
|
+
foreignKeyName: "operating_context_risks_operating_context_id_fkey";
|
|
2351
|
+
columns: ["operating_context_id"];
|
|
1704
2352
|
isOneToOne: false;
|
|
1705
|
-
referencedRelation: "
|
|
2353
|
+
referencedRelation: "operating_contexts";
|
|
1706
2354
|
referencedColumns: ["id"];
|
|
1707
2355
|
},
|
|
1708
2356
|
{
|
|
1709
|
-
foreignKeyName: "
|
|
1710
|
-
columns: ["
|
|
2357
|
+
foreignKeyName: "operating_context_risks_updated_by_fkey";
|
|
2358
|
+
columns: ["updated_by"];
|
|
1711
2359
|
isOneToOne: false;
|
|
1712
2360
|
referencedRelation: "users";
|
|
1713
2361
|
referencedColumns: ["id"];
|
|
2362
|
+
}
|
|
2363
|
+
];
|
|
2364
|
+
};
|
|
2365
|
+
operating_context_role_assignments: {
|
|
2366
|
+
Row: {
|
|
2367
|
+
herd_id: number;
|
|
2368
|
+
id: number;
|
|
2369
|
+
inserted_at: string;
|
|
2370
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2371
|
+
lifecycle_changed_at: string;
|
|
2372
|
+
lifecycle_changed_by: string | null;
|
|
2373
|
+
lifecycle_reason: string | null;
|
|
2374
|
+
membership_id: number;
|
|
2375
|
+
operating_context_id: number;
|
|
2376
|
+
role_id: number;
|
|
2377
|
+
};
|
|
2378
|
+
Insert: {
|
|
2379
|
+
herd_id: number;
|
|
2380
|
+
id?: number;
|
|
2381
|
+
inserted_at?: string;
|
|
2382
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2383
|
+
lifecycle_changed_at?: string;
|
|
2384
|
+
lifecycle_changed_by?: string | null;
|
|
2385
|
+
lifecycle_reason?: string | null;
|
|
2386
|
+
membership_id: number;
|
|
2387
|
+
operating_context_id: number;
|
|
2388
|
+
role_id: number;
|
|
2389
|
+
};
|
|
2390
|
+
Update: {
|
|
2391
|
+
herd_id?: number;
|
|
2392
|
+
id?: number;
|
|
2393
|
+
inserted_at?: string;
|
|
2394
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2395
|
+
lifecycle_changed_at?: string;
|
|
2396
|
+
lifecycle_changed_by?: string | null;
|
|
2397
|
+
lifecycle_reason?: string | null;
|
|
2398
|
+
membership_id?: number;
|
|
2399
|
+
operating_context_id?: number;
|
|
2400
|
+
role_id?: number;
|
|
2401
|
+
};
|
|
2402
|
+
Relationships: [
|
|
2403
|
+
{
|
|
2404
|
+
foreignKeyName: "operating_context_role_assignment_context_fkey";
|
|
2405
|
+
columns: ["operating_context_id", "herd_id"];
|
|
2406
|
+
isOneToOne: false;
|
|
2407
|
+
referencedRelation: "operating_contexts";
|
|
2408
|
+
referencedColumns: ["id", "herd_id"];
|
|
1714
2409
|
},
|
|
1715
2410
|
{
|
|
1716
|
-
foreignKeyName: "
|
|
1717
|
-
columns: ["
|
|
2411
|
+
foreignKeyName: "operating_context_role_assignment_membership_fkey";
|
|
2412
|
+
columns: ["membership_id", "herd_id"];
|
|
1718
2413
|
isOneToOne: false;
|
|
1719
|
-
referencedRelation: "
|
|
1720
|
-
referencedColumns: ["id"];
|
|
2414
|
+
referencedRelation: "users_roles_per_herd";
|
|
2415
|
+
referencedColumns: ["id", "herd_id"];
|
|
1721
2416
|
},
|
|
1722
2417
|
{
|
|
1723
|
-
foreignKeyName: "
|
|
1724
|
-
columns: ["
|
|
2418
|
+
foreignKeyName: "operating_context_role_assignments_lifecycle_changed_by_fkey";
|
|
2419
|
+
columns: ["lifecycle_changed_by"];
|
|
1725
2420
|
isOneToOne: false;
|
|
1726
2421
|
referencedRelation: "users";
|
|
1727
2422
|
referencedColumns: ["id"];
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
foreignKeyName: "operating_context_role_assignments_role_id_fkey";
|
|
2426
|
+
columns: ["role_id"];
|
|
2427
|
+
isOneToOne: false;
|
|
2428
|
+
referencedRelation: "operating_context_roles";
|
|
2429
|
+
referencedColumns: ["id"];
|
|
1728
2430
|
}
|
|
1729
2431
|
];
|
|
1730
2432
|
};
|
|
1731
|
-
|
|
2433
|
+
operating_context_roles: {
|
|
1732
2434
|
Row: {
|
|
1733
|
-
country: string | null;
|
|
1734
|
-
gln: string | null;
|
|
1735
2435
|
id: number;
|
|
1736
2436
|
inserted_at: string;
|
|
1737
2437
|
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1738
2438
|
lifecycle_changed_at: string;
|
|
1739
2439
|
lifecycle_changed_by: string | null;
|
|
1740
2440
|
lifecycle_reason: string | null;
|
|
2441
|
+
localization_id: number;
|
|
1741
2442
|
name: string;
|
|
1742
|
-
website: string | null;
|
|
1743
2443
|
};
|
|
1744
2444
|
Insert: {
|
|
1745
|
-
country?: string | null;
|
|
1746
|
-
gln?: string | null;
|
|
1747
2445
|
id?: number;
|
|
1748
2446
|
inserted_at?: string;
|
|
1749
2447
|
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1750
2448
|
lifecycle_changed_at?: string;
|
|
1751
2449
|
lifecycle_changed_by?: string | null;
|
|
1752
2450
|
lifecycle_reason?: string | null;
|
|
2451
|
+
localization_id: number;
|
|
1753
2452
|
name: string;
|
|
1754
|
-
website?: string | null;
|
|
1755
2453
|
};
|
|
1756
2454
|
Update: {
|
|
1757
|
-
country?: string | null;
|
|
1758
|
-
gln?: string | null;
|
|
1759
2455
|
id?: number;
|
|
1760
2456
|
inserted_at?: string;
|
|
1761
2457
|
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1762
2458
|
lifecycle_changed_at?: string;
|
|
1763
2459
|
lifecycle_changed_by?: string | null;
|
|
1764
2460
|
lifecycle_reason?: string | null;
|
|
2461
|
+
localization_id?: number;
|
|
1765
2462
|
name?: string;
|
|
1766
|
-
website?: string | null;
|
|
1767
2463
|
};
|
|
1768
2464
|
Relationships: [
|
|
1769
2465
|
{
|
|
1770
|
-
foreignKeyName: "
|
|
2466
|
+
foreignKeyName: "operating_context_roles_lifecycle_changed_by_fkey";
|
|
1771
2467
|
columns: ["lifecycle_changed_by"];
|
|
1772
2468
|
isOneToOne: false;
|
|
1773
2469
|
referencedRelation: "users";
|
|
1774
2470
|
referencedColumns: ["id"];
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
foreignKeyName: "operating_context_roles_localization_id_fkey";
|
|
2474
|
+
columns: ["localization_id"];
|
|
2475
|
+
isOneToOne: false;
|
|
2476
|
+
referencedRelation: "localizations";
|
|
2477
|
+
referencedColumns: ["id"];
|
|
1775
2478
|
}
|
|
1776
2479
|
];
|
|
1777
2480
|
};
|
|
1778
|
-
|
|
2481
|
+
operating_context_types: {
|
|
1779
2482
|
Row: {
|
|
1780
|
-
capabilities: string[];
|
|
1781
2483
|
id: number;
|
|
1782
2484
|
inserted_at: string;
|
|
1783
|
-
|
|
1784
|
-
|
|
2485
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2486
|
+
lifecycle_changed_at: string;
|
|
2487
|
+
lifecycle_changed_by: string | null;
|
|
2488
|
+
lifecycle_reason: string | null;
|
|
2489
|
+
localization_id: number;
|
|
1785
2490
|
name: string;
|
|
1786
|
-
version: string;
|
|
1787
|
-
weights_sha256: string | null;
|
|
1788
|
-
weights_uri: string | null;
|
|
1789
2491
|
};
|
|
1790
2492
|
Insert: {
|
|
1791
|
-
capabilities?: string[];
|
|
1792
2493
|
id?: number;
|
|
1793
2494
|
inserted_at?: string;
|
|
1794
|
-
|
|
1795
|
-
|
|
2495
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2496
|
+
lifecycle_changed_at?: string;
|
|
2497
|
+
lifecycle_changed_by?: string | null;
|
|
2498
|
+
lifecycle_reason?: string | null;
|
|
2499
|
+
localization_id: number;
|
|
1796
2500
|
name: string;
|
|
1797
|
-
version?: string;
|
|
1798
|
-
weights_sha256?: string | null;
|
|
1799
|
-
weights_uri?: string | null;
|
|
1800
2501
|
};
|
|
1801
2502
|
Update: {
|
|
1802
|
-
capabilities?: string[];
|
|
1803
2503
|
id?: number;
|
|
1804
2504
|
inserted_at?: string;
|
|
1805
|
-
|
|
1806
|
-
|
|
2505
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2506
|
+
lifecycle_changed_at?: string;
|
|
2507
|
+
lifecycle_changed_by?: string | null;
|
|
2508
|
+
lifecycle_reason?: string | null;
|
|
2509
|
+
localization_id?: number;
|
|
1807
2510
|
name?: string;
|
|
1808
|
-
version?: string;
|
|
1809
|
-
weights_sha256?: string | null;
|
|
1810
|
-
weights_uri?: string | null;
|
|
1811
2511
|
};
|
|
1812
|
-
Relationships: [
|
|
2512
|
+
Relationships: [
|
|
2513
|
+
{
|
|
2514
|
+
foreignKeyName: "operating_context_types_lifecycle_changed_by_fkey";
|
|
2515
|
+
columns: ["lifecycle_changed_by"];
|
|
2516
|
+
isOneToOne: false;
|
|
2517
|
+
referencedRelation: "users";
|
|
2518
|
+
referencedColumns: ["id"];
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
foreignKeyName: "operating_context_types_localization_id_fkey";
|
|
2522
|
+
columns: ["localization_id"];
|
|
2523
|
+
isOneToOne: false;
|
|
2524
|
+
referencedRelation: "localizations";
|
|
2525
|
+
referencedColumns: ["id"];
|
|
2526
|
+
}
|
|
2527
|
+
];
|
|
1813
2528
|
};
|
|
1814
|
-
|
|
2529
|
+
operating_context_weather_snapshots: {
|
|
1815
2530
|
Row: {
|
|
1816
|
-
|
|
1817
|
-
|
|
2531
|
+
collected_at: string;
|
|
2532
|
+
density_altitude_meters: number | null;
|
|
1818
2533
|
id: number;
|
|
1819
2534
|
inserted_at: string;
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
2535
|
+
kp_index: number | null;
|
|
2536
|
+
operating_context_region_id: number;
|
|
2537
|
+
precipitation_millimeters: number | null;
|
|
2538
|
+
static_buildup_category: string | null;
|
|
2539
|
+
temperature_max_celsius: number | null;
|
|
2540
|
+
temperature_min_celsius: number | null;
|
|
2541
|
+
visibility_meters: number | null;
|
|
2542
|
+
wind_heading_degrees: number | null;
|
|
2543
|
+
wind_speed_meters_per_second: number | null;
|
|
1823
2544
|
};
|
|
1824
2545
|
Insert: {
|
|
1825
|
-
|
|
1826
|
-
|
|
2546
|
+
collected_at: string;
|
|
2547
|
+
density_altitude_meters?: number | null;
|
|
1827
2548
|
id?: number;
|
|
1828
2549
|
inserted_at?: string;
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
2550
|
+
kp_index?: number | null;
|
|
2551
|
+
operating_context_region_id: number;
|
|
2552
|
+
precipitation_millimeters?: number | null;
|
|
2553
|
+
static_buildup_category?: string | null;
|
|
2554
|
+
temperature_max_celsius?: number | null;
|
|
2555
|
+
temperature_min_celsius?: number | null;
|
|
2556
|
+
visibility_meters?: number | null;
|
|
2557
|
+
wind_heading_degrees?: number | null;
|
|
2558
|
+
wind_speed_meters_per_second?: number | null;
|
|
1832
2559
|
};
|
|
1833
2560
|
Update: {
|
|
1834
|
-
|
|
1835
|
-
|
|
2561
|
+
collected_at?: string;
|
|
2562
|
+
density_altitude_meters?: number | null;
|
|
1836
2563
|
id?: number;
|
|
1837
2564
|
inserted_at?: string;
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
2565
|
+
kp_index?: number | null;
|
|
2566
|
+
operating_context_region_id?: number;
|
|
2567
|
+
precipitation_millimeters?: number | null;
|
|
2568
|
+
static_buildup_category?: string | null;
|
|
2569
|
+
temperature_max_celsius?: number | null;
|
|
2570
|
+
temperature_min_celsius?: number | null;
|
|
2571
|
+
visibility_meters?: number | null;
|
|
2572
|
+
wind_heading_degrees?: number | null;
|
|
2573
|
+
wind_speed_meters_per_second?: number | null;
|
|
1841
2574
|
};
|
|
1842
2575
|
Relationships: [
|
|
1843
2576
|
{
|
|
1844
|
-
foreignKeyName: "
|
|
1845
|
-
columns: ["
|
|
1846
|
-
isOneToOne: false;
|
|
1847
|
-
referencedRelation: "herds";
|
|
1848
|
-
referencedColumns: ["id"];
|
|
1849
|
-
},
|
|
1850
|
-
{
|
|
1851
|
-
foreignKeyName: "models_per_jobs_per_herd_model_id_fkey";
|
|
1852
|
-
columns: ["model_id"];
|
|
2577
|
+
foreignKeyName: "operating_context_weather_snap_operating_context_region_id_fkey";
|
|
2578
|
+
columns: ["operating_context_region_id"];
|
|
1853
2579
|
isOneToOne: false;
|
|
1854
|
-
referencedRelation: "
|
|
2580
|
+
referencedRelation: "operating_context_regions";
|
|
1855
2581
|
referencedColumns: ["id"];
|
|
1856
2582
|
}
|
|
1857
2583
|
];
|
|
1858
2584
|
};
|
|
1859
|
-
|
|
2585
|
+
operating_contexts: {
|
|
1860
2586
|
Row: {
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
2587
|
+
altitude_agl_max: number;
|
|
2588
|
+
created_at: string;
|
|
2589
|
+
created_by: string;
|
|
2590
|
+
description: string | null;
|
|
2591
|
+
distance_max_from_home: number;
|
|
2592
|
+
herd_id: number;
|
|
1864
2593
|
id: number;
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
2594
|
+
involves_third_party_land: boolean;
|
|
2595
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2596
|
+
lifecycle_changed_at: string;
|
|
2597
|
+
lifecycle_changed_by: string | null;
|
|
2598
|
+
lifecycle_reason: string | null;
|
|
2599
|
+
name: string;
|
|
2600
|
+
operating_context_type_id: number;
|
|
2601
|
+
updated_at: string;
|
|
2602
|
+
updated_by: string | null;
|
|
2603
|
+
valid_from: string;
|
|
2604
|
+
valid_to: string;
|
|
1869
2605
|
};
|
|
1870
2606
|
Insert: {
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
2607
|
+
altitude_agl_max: number;
|
|
2608
|
+
created_at?: string;
|
|
2609
|
+
created_by: string;
|
|
2610
|
+
description?: string | null;
|
|
2611
|
+
distance_max_from_home: number;
|
|
2612
|
+
herd_id: number;
|
|
1874
2613
|
id?: number;
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
2614
|
+
involves_third_party_land: boolean;
|
|
2615
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2616
|
+
lifecycle_changed_at?: string;
|
|
2617
|
+
lifecycle_changed_by?: string | null;
|
|
2618
|
+
lifecycle_reason?: string | null;
|
|
2619
|
+
name: string;
|
|
2620
|
+
operating_context_type_id: number;
|
|
2621
|
+
updated_at?: string;
|
|
2622
|
+
updated_by?: string | null;
|
|
2623
|
+
valid_from: string;
|
|
2624
|
+
valid_to: string;
|
|
1879
2625
|
};
|
|
1880
2626
|
Update: {
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2627
|
+
altitude_agl_max?: number;
|
|
2628
|
+
created_at?: string;
|
|
2629
|
+
created_by?: string;
|
|
2630
|
+
description?: string | null;
|
|
2631
|
+
distance_max_from_home?: number;
|
|
2632
|
+
herd_id?: number;
|
|
1884
2633
|
id?: number;
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
2634
|
+
involves_third_party_land?: boolean;
|
|
2635
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2636
|
+
lifecycle_changed_at?: string;
|
|
2637
|
+
lifecycle_changed_by?: string | null;
|
|
2638
|
+
lifecycle_reason?: string | null;
|
|
2639
|
+
name?: string;
|
|
2640
|
+
operating_context_type_id?: number;
|
|
2641
|
+
updated_at?: string;
|
|
2642
|
+
updated_by?: string | null;
|
|
2643
|
+
valid_from?: string;
|
|
2644
|
+
valid_to?: string;
|
|
1889
2645
|
};
|
|
1890
2646
|
Relationships: [
|
|
1891
2647
|
{
|
|
1892
|
-
foreignKeyName: "
|
|
1893
|
-
columns: ["
|
|
2648
|
+
foreignKeyName: "operating_contexts_created_by_fkey";
|
|
2649
|
+
columns: ["created_by"];
|
|
1894
2650
|
isOneToOne: false;
|
|
1895
|
-
referencedRelation: "
|
|
2651
|
+
referencedRelation: "users";
|
|
2652
|
+
referencedColumns: ["id"];
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
foreignKeyName: "operating_contexts_herd_id_fkey";
|
|
2656
|
+
columns: ["herd_id"];
|
|
2657
|
+
isOneToOne: false;
|
|
2658
|
+
referencedRelation: "herds";
|
|
2659
|
+
referencedColumns: ["id"];
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
foreignKeyName: "operating_contexts_lifecycle_changed_by_fkey";
|
|
2663
|
+
columns: ["lifecycle_changed_by"];
|
|
2664
|
+
isOneToOne: false;
|
|
2665
|
+
referencedRelation: "users";
|
|
2666
|
+
referencedColumns: ["id"];
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
foreignKeyName: "operating_contexts_operating_context_type_id_fkey";
|
|
2670
|
+
columns: ["operating_context_type_id"];
|
|
2671
|
+
isOneToOne: false;
|
|
2672
|
+
referencedRelation: "operating_context_types";
|
|
2673
|
+
referencedColumns: ["id"];
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
foreignKeyName: "operating_contexts_updated_by_fkey";
|
|
2677
|
+
columns: ["updated_by"];
|
|
2678
|
+
isOneToOne: false;
|
|
2679
|
+
referencedRelation: "users";
|
|
1896
2680
|
referencedColumns: ["id"];
|
|
1897
2681
|
}
|
|
1898
2682
|
];
|
|
@@ -4169,6 +4953,35 @@ export type Database = {
|
|
|
4169
4953
|
subject_id: number;
|
|
4170
4954
|
}[];
|
|
4171
4955
|
};
|
|
4956
|
+
get_operating_context_weather_snapshots: {
|
|
4957
|
+
Args: {
|
|
4958
|
+
cursor_collected_at?: string;
|
|
4959
|
+
cursor_id?: number;
|
|
4960
|
+
limit_caller?: number;
|
|
4961
|
+
operating_context_id_caller: number;
|
|
4962
|
+
};
|
|
4963
|
+
Returns: {
|
|
4964
|
+
collected_at: string;
|
|
4965
|
+
density_altitude_meters: number | null;
|
|
4966
|
+
id: number;
|
|
4967
|
+
inserted_at: string;
|
|
4968
|
+
kp_index: number | null;
|
|
4969
|
+
operating_context_region_id: number;
|
|
4970
|
+
precipitation_millimeters: number | null;
|
|
4971
|
+
static_buildup_category: string | null;
|
|
4972
|
+
temperature_max_celsius: number | null;
|
|
4973
|
+
temperature_min_celsius: number | null;
|
|
4974
|
+
visibility_meters: number | null;
|
|
4975
|
+
wind_heading_degrees: number | null;
|
|
4976
|
+
wind_speed_meters_per_second: number | null;
|
|
4977
|
+
}[];
|
|
4978
|
+
SetofOptions: {
|
|
4979
|
+
from: "*";
|
|
4980
|
+
to: "operating_context_weather_snapshots";
|
|
4981
|
+
isOneToOne: false;
|
|
4982
|
+
isSetofReturn: true;
|
|
4983
|
+
};
|
|
4984
|
+
};
|
|
4172
4985
|
get_parts_for_herd: {
|
|
4173
4986
|
Args: {
|
|
4174
4987
|
herd_id_caller: number;
|
|
@@ -4837,12 +5650,15 @@ export type Database = {
|
|
|
4837
5650
|
analysis_work_status: "waiting" | "cancelled" | "processing" | "failed" | "success";
|
|
4838
5651
|
app_permission: "herds.delete" | "events.delete";
|
|
4839
5652
|
device_type: "trail_camera" | "drone_fixed_wing" | "drone_quad" | "gps_tracker" | "sentry_tower" | "smart_buoy" | "radio_mesh_base_station" | "radio_mesh_repeater" | "unknown" | "gps_tracker_vehicle" | "gps_tracker_person" | "radio_mesh_base_station_gateway" | "remote_controller" | "docking_station" | "smart_battery" | "charging_station";
|
|
4840
|
-
document_entity: "user" | "herd" | "device" | "product";
|
|
5653
|
+
document_entity: "user" | "herd" | "device" | "product" | "operating_context";
|
|
4841
5654
|
entity_lifecycle: "active" | "retired" | "deleted";
|
|
4842
5655
|
health_item: "healthy" | "repairable" | "unrepairable";
|
|
4843
5656
|
herd_invitation_status: "pending" | "accepted" | "revoked" | "expired";
|
|
4844
5657
|
link_type: "wifi" | "ocusync" | "lte" | "satellite" | "mesh" | "lora" | "unknown";
|
|
4845
5658
|
media_type: "image" | "video" | "audio" | "text";
|
|
5659
|
+
operating_context_payload_type: "drop_supply" | "drop_firestarter" | "other";
|
|
5660
|
+
operating_context_risk_probability: "extremely_improbable" | "improbable" | "unlikely" | "occasional" | "frequent";
|
|
5661
|
+
operating_context_risk_severity: "negligible" | "minor" | "major" | "hazardous" | "catastrophic";
|
|
4846
5662
|
plan_type: "mission" | "fence" | "rally" | "markov";
|
|
4847
5663
|
review_status: "pending" | "annotating" | "in_review" | "completed" | "rejected";
|
|
4848
5664
|
session_end_reason: "completed" | "superseded" | "reporting_lost" | "inactivity_timeout" | "operator_cancelled" | "system_cancelled" | "other";
|
|
@@ -5169,12 +5985,15 @@ export declare const Constants: {
|
|
|
5169
5985
|
readonly analysis_work_status: readonly ["waiting", "cancelled", "processing", "failed", "success"];
|
|
5170
5986
|
readonly app_permission: readonly ["herds.delete", "events.delete"];
|
|
5171
5987
|
readonly device_type: readonly ["trail_camera", "drone_fixed_wing", "drone_quad", "gps_tracker", "sentry_tower", "smart_buoy", "radio_mesh_base_station", "radio_mesh_repeater", "unknown", "gps_tracker_vehicle", "gps_tracker_person", "radio_mesh_base_station_gateway", "remote_controller", "docking_station", "smart_battery", "charging_station"];
|
|
5172
|
-
readonly document_entity: readonly ["user", "herd", "device", "product"];
|
|
5988
|
+
readonly document_entity: readonly ["user", "herd", "device", "product", "operating_context"];
|
|
5173
5989
|
readonly entity_lifecycle: readonly ["active", "retired", "deleted"];
|
|
5174
5990
|
readonly health_item: readonly ["healthy", "repairable", "unrepairable"];
|
|
5175
5991
|
readonly herd_invitation_status: readonly ["pending", "accepted", "revoked", "expired"];
|
|
5176
5992
|
readonly link_type: readonly ["wifi", "ocusync", "lte", "satellite", "mesh", "lora", "unknown"];
|
|
5177
5993
|
readonly media_type: readonly ["image", "video", "audio", "text"];
|
|
5994
|
+
readonly operating_context_payload_type: readonly ["drop_supply", "drop_firestarter", "other"];
|
|
5995
|
+
readonly operating_context_risk_probability: readonly ["extremely_improbable", "improbable", "unlikely", "occasional", "frequent"];
|
|
5996
|
+
readonly operating_context_risk_severity: readonly ["negligible", "minor", "major", "hazardous", "catastrophic"];
|
|
5178
5997
|
readonly plan_type: readonly ["mission", "fence", "rally", "markov"];
|
|
5179
5998
|
readonly review_status: readonly ["pending", "annotating", "in_review", "completed", "rejected"];
|
|
5180
5999
|
readonly session_end_reason: readonly ["completed", "superseded", "reporting_lost", "inactivity_timeout", "operator_cancelled", "system_cancelled", "other"];
|