@adventurelabs/scout-core 2.0.0 → 2.0.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/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/helpers/compliance.d.ts +26 -0
- package/dist/helpers/compliance.js +74 -0
- package/dist/helpers/compliance.queries.d.ts +28 -0
- package/dist/helpers/compliance.queries.js +167 -0
- package/dist/helpers/contacts_server.d.ts +12 -0
- package/dist/helpers/lifecycle_server.d.ts +3 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/types/db.d.ts +45 -1
- package/dist/types/supabase.d.ts +512 -0
- package/package.json +1 -1
package/dist/client/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { create_issuer_query as create_issuer, get_issuer_by_id_query as get_iss
|
|
|
53
53
|
export { get_layers_by_herd_ids_query as get_layers_by_herd_ids, get_layers_by_herd_query as get_layers_by_herd, } from "../helpers/layers.queries";
|
|
54
54
|
export { create_localization_query as create_localization, get_localization_by_id_query as get_localization_by_id, get_localizations_query as get_localizations, update_localization_query as update_localization, } from "../helpers/localizations.queries";
|
|
55
55
|
export { create_manufacturer_query as create_manufacturer, get_manufacturer_by_id_query as get_manufacturer_by_id, get_manufacturers_query as get_manufacturers, update_manufacturer_query as update_manufacturer, } from "../helpers/manufacturers.queries";
|
|
56
|
+
export { create_compliance_resource_query as create_compliance_resource, create_compliance_resource_type_query as create_compliance_resource_type, create_contact_type_query as create_contact_type, create_herd_operating_permission_query as create_herd_operating_permission, create_operating_context_contact_query as create_operating_context_contact, create_operating_context_point_of_interest_query as create_operating_context_point_of_interest, create_operating_context_point_of_interest_type_query as create_operating_context_point_of_interest_type, create_operating_permission_query as create_operating_permission, get_compliance_resource_types_query as get_compliance_resource_types, get_compliance_resources_by_localization_query as get_compliance_resources_by_localization, get_contact_types_by_localization_query as get_contact_types_by_localization, get_herd_operating_permissions_by_herd_query as get_herd_operating_permissions_by_herd, get_operating_context_contacts_by_operating_context_query as get_operating_context_contacts_by_operating_context, get_operating_context_point_of_interest_types_by_localization_query as get_operating_context_point_of_interest_types_by_localization, get_operating_context_points_of_interest_by_operating_context_query as get_operating_context_points_of_interest_by_operating_context, get_operating_permissions_by_localization_query as get_operating_permissions_by_localization, update_compliance_resource_query as update_compliance_resource, update_compliance_resource_type_query as update_compliance_resource_type, update_contact_type_query as update_contact_type, update_herd_operating_permission_query as update_herd_operating_permission, update_operating_context_contact_query as update_operating_context_contact, update_operating_context_point_of_interest_query as update_operating_context_point_of_interest, update_operating_context_point_of_interest_type_query as update_operating_context_point_of_interest_type, update_operating_permission_query as update_operating_permission, } from "../helpers/compliance.queries";
|
|
56
57
|
export { create_models_per_jobs_per_herd_query as create_models_per_jobs_per_herd, delete_models_per_jobs_per_herd_by_ids_query as delete_models_per_jobs_per_herd_by_ids, get_model_by_id_query as get_model_by_id, get_models_by_ids_query as get_models_by_ids, get_models_per_jobs_per_herd_by_herd_query as get_models_per_jobs_per_herd_by_herd, get_models_query as get_models, update_models_per_jobs_per_herd_query as update_models_per_jobs_per_herd, } from "../helpers/models.queries";
|
|
57
58
|
export { create_document_condition_query as create_document_condition, create_operating_context_device_query as create_operating_context_device, create_operating_context_equipment_category_query as create_operating_context_equipment_category, create_operating_context_equipment_item_query as create_operating_context_equipment_item, create_operating_context_equipment_requirement_query as create_operating_context_equipment_requirement, create_operating_context_payload_query as create_operating_context_payload, create_operating_context_query as create_operating_context, create_operating_context_region_query as create_operating_context_region, create_operating_context_risk_query as create_operating_context_risk, create_operating_context_role_assignment_query as create_operating_context_role_assignment, create_operating_context_role_query as create_operating_context_role, create_operating_context_type_query as create_operating_context_type, get_document_conditions_by_localization_query as get_document_conditions_by_localization, get_operating_context_by_id_query as get_operating_context_by_id, get_operating_context_devices_by_operating_context_query as get_operating_context_devices_by_operating_context, get_operating_context_equipment_categories_by_localization_query as get_operating_context_equipment_categories_by_localization, get_operating_context_equipment_items_by_category_query as get_operating_context_equipment_items_by_category, get_operating_context_equipment_requirements_by_operating_context_query as get_operating_context_equipment_requirements_by_operating_context, get_operating_context_payloads_by_operating_context_query as get_operating_context_payloads_by_operating_context, get_operating_context_regions_by_operating_context_query as get_operating_context_regions_by_operating_context, get_operating_context_risks_by_operating_context_query as get_operating_context_risks_by_operating_context, get_operating_context_role_assignments_by_operating_context_query as get_operating_context_role_assignments_by_operating_context, get_operating_context_roles_by_localization_query as get_operating_context_roles_by_localization, get_operating_context_types_by_localization_query as get_operating_context_types_by_localization, get_operating_context_weather_snapshots_query as get_operating_context_weather_snapshots, get_operating_contexts_by_herd_query as get_operating_contexts_by_herd, update_document_condition_query as update_document_condition, update_operating_context_device_query as update_operating_context_device, update_operating_context_equipment_category_query as update_operating_context_equipment_category, update_operating_context_equipment_item_query as update_operating_context_equipment_item, update_operating_context_equipment_requirement_query as update_operating_context_equipment_requirement, update_operating_context_payload_query as update_operating_context_payload, update_operating_context_query as update_operating_context, update_operating_context_region_query as update_operating_context_region, update_operating_context_risk_query as update_operating_context_risk, update_operating_context_role_assignment_query as update_operating_context_role_assignment, update_operating_context_role_query as update_operating_context_role, update_operating_context_type_query as update_operating_context_type, } from "../helpers/operating_contexts.queries";
|
|
58
59
|
export { get_operators_by_session_id_filtered_query as get_operators_by_session_id_filtered, get_operators_by_session_id_query as get_operators_by_session_id, get_operators_by_user_id_query as get_operators_by_user_id, } from "../helpers/operators.queries";
|
package/dist/client/index.js
CHANGED
|
@@ -58,6 +58,7 @@ export { create_issuer_query as create_issuer, get_issuer_by_id_query as get_iss
|
|
|
58
58
|
export { get_layers_by_herd_ids_query as get_layers_by_herd_ids, get_layers_by_herd_query as get_layers_by_herd, } from "../helpers/layers.queries";
|
|
59
59
|
export { create_localization_query as create_localization, get_localization_by_id_query as get_localization_by_id, get_localizations_query as get_localizations, update_localization_query as update_localization, } from "../helpers/localizations.queries";
|
|
60
60
|
export { create_manufacturer_query as create_manufacturer, get_manufacturer_by_id_query as get_manufacturer_by_id, get_manufacturers_query as get_manufacturers, update_manufacturer_query as update_manufacturer, } from "../helpers/manufacturers.queries";
|
|
61
|
+
export { create_compliance_resource_query as create_compliance_resource, create_compliance_resource_type_query as create_compliance_resource_type, create_contact_type_query as create_contact_type, create_herd_operating_permission_query as create_herd_operating_permission, create_operating_context_contact_query as create_operating_context_contact, create_operating_context_point_of_interest_query as create_operating_context_point_of_interest, create_operating_context_point_of_interest_type_query as create_operating_context_point_of_interest_type, create_operating_permission_query as create_operating_permission, get_compliance_resource_types_query as get_compliance_resource_types, get_compliance_resources_by_localization_query as get_compliance_resources_by_localization, get_contact_types_by_localization_query as get_contact_types_by_localization, get_herd_operating_permissions_by_herd_query as get_herd_operating_permissions_by_herd, get_operating_context_contacts_by_operating_context_query as get_operating_context_contacts_by_operating_context, get_operating_context_point_of_interest_types_by_localization_query as get_operating_context_point_of_interest_types_by_localization, get_operating_context_points_of_interest_by_operating_context_query as get_operating_context_points_of_interest_by_operating_context, get_operating_permissions_by_localization_query as get_operating_permissions_by_localization, update_compliance_resource_query as update_compliance_resource, update_compliance_resource_type_query as update_compliance_resource_type, update_contact_type_query as update_contact_type, update_herd_operating_permission_query as update_herd_operating_permission, update_operating_context_contact_query as update_operating_context_contact, update_operating_context_point_of_interest_query as update_operating_context_point_of_interest, update_operating_context_point_of_interest_type_query as update_operating_context_point_of_interest_type, update_operating_permission_query as update_operating_permission, } from "../helpers/compliance.queries";
|
|
61
62
|
export { create_models_per_jobs_per_herd_query as create_models_per_jobs_per_herd, delete_models_per_jobs_per_herd_by_ids_query as delete_models_per_jobs_per_herd_by_ids, get_model_by_id_query as get_model_by_id, get_models_by_ids_query as get_models_by_ids, get_models_per_jobs_per_herd_by_herd_query as get_models_per_jobs_per_herd_by_herd, get_models_query as get_models, update_models_per_jobs_per_herd_query as update_models_per_jobs_per_herd, } from "../helpers/models.queries";
|
|
62
63
|
export { create_document_condition_query as create_document_condition, create_operating_context_device_query as create_operating_context_device, create_operating_context_equipment_category_query as create_operating_context_equipment_category, create_operating_context_equipment_item_query as create_operating_context_equipment_item, create_operating_context_equipment_requirement_query as create_operating_context_equipment_requirement, create_operating_context_payload_query as create_operating_context_payload, create_operating_context_query as create_operating_context, create_operating_context_region_query as create_operating_context_region, create_operating_context_risk_query as create_operating_context_risk, create_operating_context_role_assignment_query as create_operating_context_role_assignment, create_operating_context_role_query as create_operating_context_role, create_operating_context_type_query as create_operating_context_type, get_document_conditions_by_localization_query as get_document_conditions_by_localization, get_operating_context_by_id_query as get_operating_context_by_id, get_operating_context_devices_by_operating_context_query as get_operating_context_devices_by_operating_context, get_operating_context_equipment_categories_by_localization_query as get_operating_context_equipment_categories_by_localization, get_operating_context_equipment_items_by_category_query as get_operating_context_equipment_items_by_category, get_operating_context_equipment_requirements_by_operating_context_query as get_operating_context_equipment_requirements_by_operating_context, get_operating_context_payloads_by_operating_context_query as get_operating_context_payloads_by_operating_context, get_operating_context_regions_by_operating_context_query as get_operating_context_regions_by_operating_context, get_operating_context_risks_by_operating_context_query as get_operating_context_risks_by_operating_context, get_operating_context_role_assignments_by_operating_context_query as get_operating_context_role_assignments_by_operating_context, get_operating_context_roles_by_localization_query as get_operating_context_roles_by_localization, get_operating_context_types_by_localization_query as get_operating_context_types_by_localization, get_operating_context_weather_snapshots_query as get_operating_context_weather_snapshots, get_operating_contexts_by_herd_query as get_operating_contexts_by_herd, update_document_condition_query as update_document_condition, update_operating_context_device_query as update_operating_context_device, update_operating_context_equipment_category_query as update_operating_context_equipment_category, update_operating_context_equipment_item_query as update_operating_context_equipment_item, update_operating_context_equipment_requirement_query as update_operating_context_equipment_requirement, update_operating_context_payload_query as update_operating_context_payload, update_operating_context_query as update_operating_context, update_operating_context_region_query as update_operating_context_region, update_operating_context_risk_query as update_operating_context_risk, update_operating_context_role_assignment_query as update_operating_context_role_assignment, update_operating_context_role_query as update_operating_context_role, update_operating_context_type_query as update_operating_context_type, } from "../helpers/operating_contexts.queries";
|
|
63
64
|
export { get_operators_by_session_id_filtered_query as get_operators_by_session_id_filtered, get_operators_by_session_id_query as get_operators_by_session_id, get_operators_by_user_id_query as get_operators_by_user_id, } from "../helpers/operators.queries";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComplianceResourceCreateInput, ComplianceResourceTypeCreateInput, ComplianceResourceTypeUpdateInput, ComplianceResourceUpdateInput, ContactTypeCreateInput, ContactTypeUpdateInput, HerdOperatingPermissionCreateInput, HerdOperatingPermissionUpdateInput, IComplianceResource, IComplianceResourceType, IContactType, IHerdOperatingPermission, IOperatingContextContact, IOperatingContextPointOfInterest, IOperatingContextPointOfInterestType, IOperatingPermission, OperatingContextContactCreateInput, OperatingContextContactUpdateInput, OperatingContextListOptions, OperatingContextPointOfInterestCreateInput, OperatingContextPointOfInterestTypeCreateInput, OperatingContextPointOfInterestTypeUpdateInput, OperatingContextPointOfInterestUpdateInput, OperatingPermissionCreateInput, OperatingPermissionUpdateInput } from "../types/db";
|
|
2
|
+
import type { IWebResponseCompatible } from "../types/requests";
|
|
3
|
+
export declare function server_get_contact_types_by_localization(localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IContactType[]>>;
|
|
4
|
+
export declare function server_create_contact_type(row: ContactTypeCreateInput): Promise<IWebResponseCompatible<IContactType | null>>;
|
|
5
|
+
export declare function server_update_contact_type(id: number, updates: ContactTypeUpdateInput): Promise<IWebResponseCompatible<IContactType | null>>;
|
|
6
|
+
export declare function server_get_operating_context_point_of_interest_types_by_localization(localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingContextPointOfInterestType[]>>;
|
|
7
|
+
export declare function server_create_operating_context_point_of_interest_type(row: OperatingContextPointOfInterestTypeCreateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterestType | null>>;
|
|
8
|
+
export declare function server_update_operating_context_point_of_interest_type(id: number, updates: OperatingContextPointOfInterestTypeUpdateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterestType | null>>;
|
|
9
|
+
export declare function server_get_operating_permissions_by_localization(localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingPermission[]>>;
|
|
10
|
+
export declare function server_create_operating_permission(row: OperatingPermissionCreateInput): Promise<IWebResponseCompatible<IOperatingPermission | null>>;
|
|
11
|
+
export declare function server_update_operating_permission(id: number, updates: OperatingPermissionUpdateInput): Promise<IWebResponseCompatible<IOperatingPermission | null>>;
|
|
12
|
+
export declare function server_get_compliance_resource_types(options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IComplianceResourceType[]>>;
|
|
13
|
+
export declare function server_create_compliance_resource_type(row: ComplianceResourceTypeCreateInput): Promise<IWebResponseCompatible<IComplianceResourceType | null>>;
|
|
14
|
+
export declare function server_update_compliance_resource_type(id: number, updates: ComplianceResourceTypeUpdateInput): Promise<IWebResponseCompatible<IComplianceResourceType | null>>;
|
|
15
|
+
export declare function server_get_compliance_resources_by_localization(localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IComplianceResource[]>>;
|
|
16
|
+
export declare function server_create_compliance_resource(row: ComplianceResourceCreateInput): Promise<IWebResponseCompatible<IComplianceResource | null>>;
|
|
17
|
+
export declare function server_update_compliance_resource(id: number, updates: ComplianceResourceUpdateInput): Promise<IWebResponseCompatible<IComplianceResource | null>>;
|
|
18
|
+
export declare function server_get_operating_context_points_of_interest_by_operating_context(operatingContextId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingContextPointOfInterest[]>>;
|
|
19
|
+
export declare function server_create_operating_context_point_of_interest(row: OperatingContextPointOfInterestCreateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterest | null>>;
|
|
20
|
+
export declare function server_update_operating_context_point_of_interest(id: number, updates: OperatingContextPointOfInterestUpdateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterest | null>>;
|
|
21
|
+
export declare function server_get_operating_context_contacts_by_operating_context(operatingContextId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingContextContact[]>>;
|
|
22
|
+
export declare function server_create_operating_context_contact(row: OperatingContextContactCreateInput): Promise<IWebResponseCompatible<IOperatingContextContact | null>>;
|
|
23
|
+
export declare function server_update_operating_context_contact(id: number, updates: OperatingContextContactUpdateInput): Promise<IWebResponseCompatible<IOperatingContextContact | null>>;
|
|
24
|
+
export declare function server_get_herd_operating_permissions_by_herd(herdId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IHerdOperatingPermission[]>>;
|
|
25
|
+
export declare function server_create_herd_operating_permission(row: HerdOperatingPermissionCreateInput): Promise<IWebResponseCompatible<IHerdOperatingPermission | null>>;
|
|
26
|
+
export declare function server_update_herd_operating_permission(id: number, updates: HerdOperatingPermissionUpdateInput): Promise<IWebResponseCompatible<IHerdOperatingPermission | null>>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { newServerClient } from "../supabase/server";
|
|
2
|
+
import * as queries from "./compliance.queries";
|
|
3
|
+
export async function server_get_contact_types_by_localization(localizationId, options) {
|
|
4
|
+
return queries.get_contact_types_by_localization_query(await newServerClient(), localizationId, options);
|
|
5
|
+
}
|
|
6
|
+
export async function server_create_contact_type(row) {
|
|
7
|
+
return queries.create_contact_type_query(await newServerClient(), row);
|
|
8
|
+
}
|
|
9
|
+
export async function server_update_contact_type(id, updates) {
|
|
10
|
+
return queries.update_contact_type_query(await newServerClient(), id, updates);
|
|
11
|
+
}
|
|
12
|
+
export async function server_get_operating_context_point_of_interest_types_by_localization(localizationId, options) {
|
|
13
|
+
return queries.get_operating_context_point_of_interest_types_by_localization_query(await newServerClient(), localizationId, options);
|
|
14
|
+
}
|
|
15
|
+
export async function server_create_operating_context_point_of_interest_type(row) {
|
|
16
|
+
return queries.create_operating_context_point_of_interest_type_query(await newServerClient(), row);
|
|
17
|
+
}
|
|
18
|
+
export async function server_update_operating_context_point_of_interest_type(id, updates) {
|
|
19
|
+
return queries.update_operating_context_point_of_interest_type_query(await newServerClient(), id, updates);
|
|
20
|
+
}
|
|
21
|
+
export async function server_get_operating_permissions_by_localization(localizationId, options) {
|
|
22
|
+
return queries.get_operating_permissions_by_localization_query(await newServerClient(), localizationId, options);
|
|
23
|
+
}
|
|
24
|
+
export async function server_create_operating_permission(row) {
|
|
25
|
+
return queries.create_operating_permission_query(await newServerClient(), row);
|
|
26
|
+
}
|
|
27
|
+
export async function server_update_operating_permission(id, updates) {
|
|
28
|
+
return queries.update_operating_permission_query(await newServerClient(), id, updates);
|
|
29
|
+
}
|
|
30
|
+
export async function server_get_compliance_resource_types(options) {
|
|
31
|
+
return queries.get_compliance_resource_types_query(await newServerClient(), options);
|
|
32
|
+
}
|
|
33
|
+
export async function server_create_compliance_resource_type(row) {
|
|
34
|
+
return queries.create_compliance_resource_type_query(await newServerClient(), row);
|
|
35
|
+
}
|
|
36
|
+
export async function server_update_compliance_resource_type(id, updates) {
|
|
37
|
+
return queries.update_compliance_resource_type_query(await newServerClient(), id, updates);
|
|
38
|
+
}
|
|
39
|
+
export async function server_get_compliance_resources_by_localization(localizationId, options) {
|
|
40
|
+
return queries.get_compliance_resources_by_localization_query(await newServerClient(), localizationId, options);
|
|
41
|
+
}
|
|
42
|
+
export async function server_create_compliance_resource(row) {
|
|
43
|
+
return queries.create_compliance_resource_query(await newServerClient(), row);
|
|
44
|
+
}
|
|
45
|
+
export async function server_update_compliance_resource(id, updates) {
|
|
46
|
+
return queries.update_compliance_resource_query(await newServerClient(), id, updates);
|
|
47
|
+
}
|
|
48
|
+
export async function server_get_operating_context_points_of_interest_by_operating_context(operatingContextId, options) {
|
|
49
|
+
return queries.get_operating_context_points_of_interest_by_operating_context_query(await newServerClient(), operatingContextId, options);
|
|
50
|
+
}
|
|
51
|
+
export async function server_create_operating_context_point_of_interest(row) {
|
|
52
|
+
return queries.create_operating_context_point_of_interest_query(await newServerClient(), row);
|
|
53
|
+
}
|
|
54
|
+
export async function server_update_operating_context_point_of_interest(id, updates) {
|
|
55
|
+
return queries.update_operating_context_point_of_interest_query(await newServerClient(), id, updates);
|
|
56
|
+
}
|
|
57
|
+
export async function server_get_operating_context_contacts_by_operating_context(operatingContextId, options) {
|
|
58
|
+
return queries.get_operating_context_contacts_by_operating_context_query(await newServerClient(), operatingContextId, options);
|
|
59
|
+
}
|
|
60
|
+
export async function server_create_operating_context_contact(row) {
|
|
61
|
+
return queries.create_operating_context_contact_query(await newServerClient(), row);
|
|
62
|
+
}
|
|
63
|
+
export async function server_update_operating_context_contact(id, updates) {
|
|
64
|
+
return queries.update_operating_context_contact_query(await newServerClient(), id, updates);
|
|
65
|
+
}
|
|
66
|
+
export async function server_get_herd_operating_permissions_by_herd(herdId, options) {
|
|
67
|
+
return queries.get_herd_operating_permissions_by_herd_query(await newServerClient(), herdId, options);
|
|
68
|
+
}
|
|
69
|
+
export async function server_create_herd_operating_permission(row) {
|
|
70
|
+
return queries.create_herd_operating_permission_query(await newServerClient(), row);
|
|
71
|
+
}
|
|
72
|
+
export async function server_update_herd_operating_permission(id, updates) {
|
|
73
|
+
return queries.update_herd_operating_permission_query(await newServerClient(), id, updates);
|
|
74
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
2
|
+
import type { ComplianceResourceCreateInput, ComplianceResourceTypeCreateInput, ComplianceResourceTypeUpdateInput, ComplianceResourceUpdateInput, ContactTypeCreateInput, ContactTypeUpdateInput, HerdOperatingPermissionCreateInput, HerdOperatingPermissionUpdateInput, IComplianceResource, IComplianceResourceType, IContactType, IHerdOperatingPermission, IOperatingContextContact, IOperatingContextPointOfInterest, IOperatingContextPointOfInterestType, IOperatingPermission, OperatingContextContactCreateInput, OperatingContextContactUpdateInput, OperatingContextListOptions, OperatingContextPointOfInterestCreateInput, OperatingContextPointOfInterestTypeCreateInput, OperatingContextPointOfInterestTypeUpdateInput, OperatingContextPointOfInterestUpdateInput, OperatingPermissionCreateInput, OperatingPermissionUpdateInput } from "../types/db";
|
|
3
|
+
import { type IWebResponseCompatible } from "../types/requests";
|
|
4
|
+
import type { Database } from "../types/supabase";
|
|
5
|
+
export declare function get_contact_types_by_localization_query(client: SupabaseClient<Database>, localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IContactType[]>>;
|
|
6
|
+
export declare function create_contact_type_query(client: SupabaseClient<Database>, row: ContactTypeCreateInput): Promise<IWebResponseCompatible<IContactType | null>>;
|
|
7
|
+
export declare function update_contact_type_query(client: SupabaseClient<Database>, id: number, updates: ContactTypeUpdateInput): Promise<IWebResponseCompatible<IContactType | null>>;
|
|
8
|
+
export declare function get_operating_context_point_of_interest_types_by_localization_query(client: SupabaseClient<Database>, localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingContextPointOfInterestType[]>>;
|
|
9
|
+
export declare function create_operating_context_point_of_interest_type_query(client: SupabaseClient<Database>, row: OperatingContextPointOfInterestTypeCreateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterestType | null>>;
|
|
10
|
+
export declare function update_operating_context_point_of_interest_type_query(client: SupabaseClient<Database>, id: number, updates: OperatingContextPointOfInterestTypeUpdateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterestType | null>>;
|
|
11
|
+
export declare function get_operating_permissions_by_localization_query(client: SupabaseClient<Database>, localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingPermission[]>>;
|
|
12
|
+
export declare function create_operating_permission_query(client: SupabaseClient<Database>, row: OperatingPermissionCreateInput): Promise<IWebResponseCompatible<IOperatingPermission | null>>;
|
|
13
|
+
export declare function update_operating_permission_query(client: SupabaseClient<Database>, id: number, updates: OperatingPermissionUpdateInput): Promise<IWebResponseCompatible<IOperatingPermission | null>>;
|
|
14
|
+
export declare function get_compliance_resource_types_query(client: SupabaseClient<Database>, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IComplianceResourceType[]>>;
|
|
15
|
+
export declare function create_compliance_resource_type_query(client: SupabaseClient<Database>, row: ComplianceResourceTypeCreateInput): Promise<IWebResponseCompatible<IComplianceResourceType | null>>;
|
|
16
|
+
export declare function update_compliance_resource_type_query(client: SupabaseClient<Database>, id: number, updates: ComplianceResourceTypeUpdateInput): Promise<IWebResponseCompatible<IComplianceResourceType | null>>;
|
|
17
|
+
export declare function get_compliance_resources_by_localization_query(client: SupabaseClient<Database>, localizationId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IComplianceResource[]>>;
|
|
18
|
+
export declare function create_compliance_resource_query(client: SupabaseClient<Database>, row: ComplianceResourceCreateInput): Promise<IWebResponseCompatible<IComplianceResource | null>>;
|
|
19
|
+
export declare function update_compliance_resource_query(client: SupabaseClient<Database>, id: number, updates: ComplianceResourceUpdateInput): Promise<IWebResponseCompatible<IComplianceResource | null>>;
|
|
20
|
+
export declare function get_operating_context_points_of_interest_by_operating_context_query(client: SupabaseClient<Database>, operatingContextId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingContextPointOfInterest[]>>;
|
|
21
|
+
export declare function create_operating_context_point_of_interest_query(client: SupabaseClient<Database>, row: OperatingContextPointOfInterestCreateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterest | null>>;
|
|
22
|
+
export declare function update_operating_context_point_of_interest_query(client: SupabaseClient<Database>, id: number, updates: OperatingContextPointOfInterestUpdateInput): Promise<IWebResponseCompatible<IOperatingContextPointOfInterest | null>>;
|
|
23
|
+
export declare function get_operating_context_contacts_by_operating_context_query(client: SupabaseClient<Database>, operatingContextId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IOperatingContextContact[]>>;
|
|
24
|
+
export declare function create_operating_context_contact_query(client: SupabaseClient<Database>, row: OperatingContextContactCreateInput): Promise<IWebResponseCompatible<IOperatingContextContact | null>>;
|
|
25
|
+
export declare function update_operating_context_contact_query(client: SupabaseClient<Database>, id: number, updates: OperatingContextContactUpdateInput): Promise<IWebResponseCompatible<IOperatingContextContact | null>>;
|
|
26
|
+
export declare function get_herd_operating_permissions_by_herd_query(client: SupabaseClient<Database>, herdId: number, options?: OperatingContextListOptions): Promise<IWebResponseCompatible<IHerdOperatingPermission[]>>;
|
|
27
|
+
export declare function create_herd_operating_permission_query(client: SupabaseClient<Database>, row: HerdOperatingPermissionCreateInput): Promise<IWebResponseCompatible<IHerdOperatingPermission | null>>;
|
|
28
|
+
export declare function update_herd_operating_permission_query(client: SupabaseClient<Database>, id: number, updates: HerdOperatingPermissionUpdateInput): Promise<IWebResponseCompatible<IHerdOperatingPermission | null>>;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { IWebResponse } from "../types/requests";
|
|
2
|
+
function responseError(message) {
|
|
3
|
+
return IWebResponse.error(message).to_compatible();
|
|
4
|
+
}
|
|
5
|
+
function pageLimit(options) {
|
|
6
|
+
const limit = options?.limit ?? 100;
|
|
7
|
+
return limit < 1 || limit > 500 ? null : limit;
|
|
8
|
+
}
|
|
9
|
+
function updateError(updates) {
|
|
10
|
+
if (Object.keys(updates).length === 0)
|
|
11
|
+
return "no fields to update";
|
|
12
|
+
if (updates.lifecycle_reason !== undefined && updates.lifecycle === undefined) {
|
|
13
|
+
return "lifecycle_reason requires lifecycle";
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
async function authenticatedUserId(client) {
|
|
18
|
+
const { data, error } = await client.auth.getUser();
|
|
19
|
+
return error ? null : (data.user?.id ?? null);
|
|
20
|
+
}
|
|
21
|
+
function withLifecycleActor(updates, userId) {
|
|
22
|
+
return updates.lifecycle
|
|
23
|
+
? { ...updates, lifecycle_changed_by: userId }
|
|
24
|
+
: updates;
|
|
25
|
+
}
|
|
26
|
+
async function listBy(client, table, column, value, options) {
|
|
27
|
+
const limit = pageLimit(options);
|
|
28
|
+
if (limit == null)
|
|
29
|
+
return responseError("limit must be between 1 and 500");
|
|
30
|
+
let query = client
|
|
31
|
+
.from(table)
|
|
32
|
+
.select("*")
|
|
33
|
+
.eq(column, value)
|
|
34
|
+
.order("id")
|
|
35
|
+
.limit(limit);
|
|
36
|
+
if (!options?.include_inactive)
|
|
37
|
+
query = query.eq("lifecycle", "active");
|
|
38
|
+
if (options?.after_id != null)
|
|
39
|
+
query = query.gt("id", options.after_id);
|
|
40
|
+
const { data, error } = await query;
|
|
41
|
+
return error
|
|
42
|
+
? responseError(error.message)
|
|
43
|
+
: IWebResponse.success((data ?? [])).to_compatible();
|
|
44
|
+
}
|
|
45
|
+
async function listAll(client, table, options) {
|
|
46
|
+
const limit = pageLimit(options);
|
|
47
|
+
if (limit == null)
|
|
48
|
+
return responseError("limit must be between 1 and 500");
|
|
49
|
+
let query = client.from(table).select("*").order("id").limit(limit);
|
|
50
|
+
if (!options?.include_inactive)
|
|
51
|
+
query = query.eq("lifecycle", "active");
|
|
52
|
+
if (options?.after_id != null)
|
|
53
|
+
query = query.gt("id", options.after_id);
|
|
54
|
+
const { data, error } = await query;
|
|
55
|
+
return error
|
|
56
|
+
? responseError(error.message)
|
|
57
|
+
: IWebResponse.success((data ?? [])).to_compatible();
|
|
58
|
+
}
|
|
59
|
+
async function insertRow(client, table, row) {
|
|
60
|
+
const { data, error } = await client
|
|
61
|
+
.from(table)
|
|
62
|
+
.insert(row)
|
|
63
|
+
.select("*")
|
|
64
|
+
.single();
|
|
65
|
+
return error
|
|
66
|
+
? responseError(error.message)
|
|
67
|
+
: IWebResponse.success(data).to_compatible();
|
|
68
|
+
}
|
|
69
|
+
async function insertWithCreator(client, table, row) {
|
|
70
|
+
const userId = await authenticatedUserId(client);
|
|
71
|
+
if (!userId)
|
|
72
|
+
return responseError("authentication required");
|
|
73
|
+
return insertRow(client, table, { ...row, created_by: userId });
|
|
74
|
+
}
|
|
75
|
+
async function patchRow(client, table, id, updates, trackUpdater = false) {
|
|
76
|
+
const invalid = updateError(updates);
|
|
77
|
+
if (invalid)
|
|
78
|
+
return responseError(invalid);
|
|
79
|
+
const userId = await authenticatedUserId(client);
|
|
80
|
+
if (!userId)
|
|
81
|
+
return responseError("authentication required");
|
|
82
|
+
const payload = {
|
|
83
|
+
...withLifecycleActor(updates, userId),
|
|
84
|
+
...(trackUpdater && { updated_by: userId }),
|
|
85
|
+
};
|
|
86
|
+
const { data, error } = await client
|
|
87
|
+
.from(table)
|
|
88
|
+
.update(payload)
|
|
89
|
+
.eq("id", id)
|
|
90
|
+
.select("*")
|
|
91
|
+
.single();
|
|
92
|
+
return error
|
|
93
|
+
? responseError(error.message)
|
|
94
|
+
: IWebResponse.success(data).to_compatible();
|
|
95
|
+
}
|
|
96
|
+
export async function get_contact_types_by_localization_query(client, localizationId, options) {
|
|
97
|
+
return listBy(client, "contact_types", "localization_id", localizationId, options);
|
|
98
|
+
}
|
|
99
|
+
export async function create_contact_type_query(client, row) {
|
|
100
|
+
return insertRow(client, "contact_types", row);
|
|
101
|
+
}
|
|
102
|
+
export async function update_contact_type_query(client, id, updates) {
|
|
103
|
+
return patchRow(client, "contact_types", id, updates);
|
|
104
|
+
}
|
|
105
|
+
export async function get_operating_context_point_of_interest_types_by_localization_query(client, localizationId, options) {
|
|
106
|
+
return listBy(client, "operating_context_point_of_interest_types", "localization_id", localizationId, options);
|
|
107
|
+
}
|
|
108
|
+
export async function create_operating_context_point_of_interest_type_query(client, row) {
|
|
109
|
+
return insertRow(client, "operating_context_point_of_interest_types", row);
|
|
110
|
+
}
|
|
111
|
+
export async function update_operating_context_point_of_interest_type_query(client, id, updates) {
|
|
112
|
+
return patchRow(client, "operating_context_point_of_interest_types", id, updates);
|
|
113
|
+
}
|
|
114
|
+
export async function get_operating_permissions_by_localization_query(client, localizationId, options) {
|
|
115
|
+
return listBy(client, "operating_permissions", "localization_id", localizationId, options);
|
|
116
|
+
}
|
|
117
|
+
export async function create_operating_permission_query(client, row) {
|
|
118
|
+
return insertRow(client, "operating_permissions", row);
|
|
119
|
+
}
|
|
120
|
+
export async function update_operating_permission_query(client, id, updates) {
|
|
121
|
+
return patchRow(client, "operating_permissions", id, updates);
|
|
122
|
+
}
|
|
123
|
+
export async function get_compliance_resource_types_query(client, options) {
|
|
124
|
+
return listAll(client, "compliance_resource_types", options);
|
|
125
|
+
}
|
|
126
|
+
export async function create_compliance_resource_type_query(client, row) {
|
|
127
|
+
return insertRow(client, "compliance_resource_types", row);
|
|
128
|
+
}
|
|
129
|
+
export async function update_compliance_resource_type_query(client, id, updates) {
|
|
130
|
+
return patchRow(client, "compliance_resource_types", id, updates);
|
|
131
|
+
}
|
|
132
|
+
export async function get_compliance_resources_by_localization_query(client, localizationId, options) {
|
|
133
|
+
return listBy(client, "compliance_resources", "localization_id", localizationId, options);
|
|
134
|
+
}
|
|
135
|
+
export async function create_compliance_resource_query(client, row) {
|
|
136
|
+
return insertRow(client, "compliance_resources", row);
|
|
137
|
+
}
|
|
138
|
+
export async function update_compliance_resource_query(client, id, updates) {
|
|
139
|
+
return patchRow(client, "compliance_resources", id, updates);
|
|
140
|
+
}
|
|
141
|
+
export async function get_operating_context_points_of_interest_by_operating_context_query(client, operatingContextId, options) {
|
|
142
|
+
return listBy(client, "operating_context_points_of_interest", "operating_context_id", operatingContextId, options);
|
|
143
|
+
}
|
|
144
|
+
export async function create_operating_context_point_of_interest_query(client, row) {
|
|
145
|
+
return insertWithCreator(client, "operating_context_points_of_interest", row);
|
|
146
|
+
}
|
|
147
|
+
export async function update_operating_context_point_of_interest_query(client, id, updates) {
|
|
148
|
+
return patchRow(client, "operating_context_points_of_interest", id, updates, true);
|
|
149
|
+
}
|
|
150
|
+
export async function get_operating_context_contacts_by_operating_context_query(client, operatingContextId, options) {
|
|
151
|
+
return listBy(client, "operating_context_contacts", "operating_context_id", operatingContextId, options);
|
|
152
|
+
}
|
|
153
|
+
export async function create_operating_context_contact_query(client, row) {
|
|
154
|
+
return insertRow(client, "operating_context_contacts", row);
|
|
155
|
+
}
|
|
156
|
+
export async function update_operating_context_contact_query(client, id, updates) {
|
|
157
|
+
return patchRow(client, "operating_context_contacts", id, updates);
|
|
158
|
+
}
|
|
159
|
+
export async function get_herd_operating_permissions_by_herd_query(client, herdId, options) {
|
|
160
|
+
return listBy(client, "herd_operating_permissions", "herd_id", herdId, options);
|
|
161
|
+
}
|
|
162
|
+
export async function create_herd_operating_permission_query(client, row) {
|
|
163
|
+
return insertRow(client, "herd_operating_permissions", row);
|
|
164
|
+
}
|
|
165
|
+
export async function update_herd_operating_permission_query(client, id, updates) {
|
|
166
|
+
return patchRow(client, "herd_operating_permissions", id, updates);
|
|
167
|
+
}
|
|
@@ -2,6 +2,7 @@ import { ContactInsert, ContactUpdate } from "../types/db";
|
|
|
2
2
|
export declare function server_get_contacts_by_herd_id(herd_id: number, options?: {
|
|
3
3
|
include_inactive?: boolean;
|
|
4
4
|
}): Promise<import("../types").IWebResponseCompatible<{
|
|
5
|
+
contact_type_id: number | null;
|
|
5
6
|
created_at: string;
|
|
6
7
|
created_by: string | null;
|
|
7
8
|
email: string | null;
|
|
@@ -12,11 +13,14 @@ export declare function server_get_contacts_by_herd_id(herd_id: number, options?
|
|
|
12
13
|
lifecycle_changed_by: string | null;
|
|
13
14
|
lifecycle_reason: string | null;
|
|
14
15
|
name: string;
|
|
16
|
+
notes: string | null;
|
|
15
17
|
phone: string | null;
|
|
18
|
+
radio_frequency: string | null;
|
|
16
19
|
updated_at: string;
|
|
17
20
|
updated_by: string | null;
|
|
18
21
|
}[]>>;
|
|
19
22
|
export declare function server_get_contact_by_id(contact_id: number): Promise<import("../types").IWebResponseCompatible<{
|
|
23
|
+
contact_type_id: number | null;
|
|
20
24
|
created_at: string;
|
|
21
25
|
created_by: string | null;
|
|
22
26
|
email: string | null;
|
|
@@ -27,11 +31,14 @@ export declare function server_get_contact_by_id(contact_id: number): Promise<im
|
|
|
27
31
|
lifecycle_changed_by: string | null;
|
|
28
32
|
lifecycle_reason: string | null;
|
|
29
33
|
name: string;
|
|
34
|
+
notes: string | null;
|
|
30
35
|
phone: string | null;
|
|
36
|
+
radio_frequency: string | null;
|
|
31
37
|
updated_at: string;
|
|
32
38
|
updated_by: string | null;
|
|
33
39
|
} | null>>;
|
|
34
40
|
export declare function server_create_contact(row: ContactInsert): Promise<import("../types").IWebResponseCompatible<{
|
|
41
|
+
contact_type_id: number | null;
|
|
35
42
|
created_at: string;
|
|
36
43
|
created_by: string | null;
|
|
37
44
|
email: string | null;
|
|
@@ -42,11 +49,14 @@ export declare function server_create_contact(row: ContactInsert): Promise<impor
|
|
|
42
49
|
lifecycle_changed_by: string | null;
|
|
43
50
|
lifecycle_reason: string | null;
|
|
44
51
|
name: string;
|
|
52
|
+
notes: string | null;
|
|
45
53
|
phone: string | null;
|
|
54
|
+
radio_frequency: string | null;
|
|
46
55
|
updated_at: string;
|
|
47
56
|
updated_by: string | null;
|
|
48
57
|
} | null>>;
|
|
49
58
|
export declare function server_update_contact(contact_id: number, patch: ContactUpdate): Promise<import("../types").IWebResponseCompatible<{
|
|
59
|
+
contact_type_id: number | null;
|
|
50
60
|
created_at: string;
|
|
51
61
|
created_by: string | null;
|
|
52
62
|
email: string | null;
|
|
@@ -57,7 +67,9 @@ export declare function server_update_contact(contact_id: number, patch: Contact
|
|
|
57
67
|
lifecycle_changed_by: string | null;
|
|
58
68
|
lifecycle_reason: string | null;
|
|
59
69
|
name: string;
|
|
70
|
+
notes: string | null;
|
|
60
71
|
phone: string | null;
|
|
72
|
+
radio_frequency: string | null;
|
|
61
73
|
updated_at: string;
|
|
62
74
|
updated_by: string | null;
|
|
63
75
|
} | null>>;
|
|
@@ -149,6 +149,7 @@ export declare function server_update_user_role_per_herd_lifecycle(membership_id
|
|
|
149
149
|
user_id: string;
|
|
150
150
|
} | null>>;
|
|
151
151
|
export declare function server_update_contact_lifecycle(contact_id: number, lifecycle: EntityLifecycle, options?: LifecycleUpdateOptions): Promise<import("../types").IWebResponseCompatible<{
|
|
152
|
+
contact_type_id: number | null;
|
|
152
153
|
created_at: string;
|
|
153
154
|
created_by: string | null;
|
|
154
155
|
email: string | null;
|
|
@@ -159,7 +160,9 @@ export declare function server_update_contact_lifecycle(contact_id: number, life
|
|
|
159
160
|
lifecycle_changed_by: string | null;
|
|
160
161
|
lifecycle_reason: string | null;
|
|
161
162
|
name: string;
|
|
163
|
+
notes: string | null;
|
|
162
164
|
phone: string | null;
|
|
165
|
+
radio_frequency: string | null;
|
|
163
166
|
updated_at: string;
|
|
164
167
|
updated_by: string | null;
|
|
165
168
|
} | null>>;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export { server_create_issuer as create_issuer, server_get_issuer_by_id as get_i
|
|
|
36
36
|
export { server_get_layers_by_herd_ids as get_layers_by_herd_ids, server_get_layers_by_herd as get_layers_by_herd, } from "../helpers/layers";
|
|
37
37
|
export { server_create_localization as create_localization, server_get_localization_by_id as get_localization_by_id, server_get_localizations as get_localizations, server_update_localization as update_localization, } from "../helpers/localizations";
|
|
38
38
|
export { server_create_manufacturer as create_manufacturer, server_get_manufacturer_by_id as get_manufacturer_by_id, server_get_manufacturers as get_manufacturers, server_update_manufacturer as update_manufacturer, } from "../helpers/manufacturers";
|
|
39
|
+
export { server_create_compliance_resource as create_compliance_resource, server_create_compliance_resource_type as create_compliance_resource_type, server_create_contact_type as create_contact_type, server_create_herd_operating_permission as create_herd_operating_permission, server_create_operating_context_contact as create_operating_context_contact, server_create_operating_context_point_of_interest as create_operating_context_point_of_interest, server_create_operating_context_point_of_interest_type as create_operating_context_point_of_interest_type, server_create_operating_permission as create_operating_permission, server_get_compliance_resource_types as get_compliance_resource_types, server_get_compliance_resources_by_localization as get_compliance_resources_by_localization, server_get_contact_types_by_localization as get_contact_types_by_localization, server_get_herd_operating_permissions_by_herd as get_herd_operating_permissions_by_herd, server_get_operating_context_contacts_by_operating_context as get_operating_context_contacts_by_operating_context, server_get_operating_context_point_of_interest_types_by_localization as get_operating_context_point_of_interest_types_by_localization, server_get_operating_context_points_of_interest_by_operating_context as get_operating_context_points_of_interest_by_operating_context, server_get_operating_permissions_by_localization as get_operating_permissions_by_localization, server_update_compliance_resource as update_compliance_resource, server_update_compliance_resource_type as update_compliance_resource_type, server_update_contact_type as update_contact_type, server_update_herd_operating_permission as update_herd_operating_permission, server_update_operating_context_contact as update_operating_context_contact, server_update_operating_context_point_of_interest as update_operating_context_point_of_interest, server_update_operating_context_point_of_interest_type as update_operating_context_point_of_interest_type, server_update_operating_permission as update_operating_permission, } from "../helpers/compliance";
|
|
39
40
|
export { server_create_models_per_jobs_per_herd as create_models_per_jobs_per_herd, server_delete_models_per_jobs_per_herd_by_ids as delete_models_per_jobs_per_herd_by_ids, server_get_model_by_id as get_model_by_id, server_get_models_by_ids as get_models_by_ids, server_get_models_per_jobs_per_herd_by_herd as get_models_per_jobs_per_herd_by_herd, server_get_models as get_models, server_update_models_per_jobs_per_herd as update_models_per_jobs_per_herd, } from "../helpers/models";
|
|
40
41
|
export { server_create_document_condition as create_document_condition, server_create_operating_context_device as create_operating_context_device, server_create_operating_context_equipment_category as create_operating_context_equipment_category, server_create_operating_context_equipment_item as create_operating_context_equipment_item, server_create_operating_context_equipment_requirement as create_operating_context_equipment_requirement, server_create_operating_context_payload as create_operating_context_payload, server_create_operating_context as create_operating_context, server_create_operating_context_region as create_operating_context_region, server_create_operating_context_risk as create_operating_context_risk, server_create_operating_context_role_assignment as create_operating_context_role_assignment, server_create_operating_context_role as create_operating_context_role, server_create_operating_context_type as create_operating_context_type, server_get_document_conditions_by_localization as get_document_conditions_by_localization, server_get_operating_context_by_id as get_operating_context_by_id, server_get_operating_context_devices_by_operating_context as get_operating_context_devices_by_operating_context, server_get_operating_context_equipment_categories_by_localization as get_operating_context_equipment_categories_by_localization, server_get_operating_context_equipment_items_by_category as get_operating_context_equipment_items_by_category, server_get_operating_context_equipment_requirements_by_operating_context as get_operating_context_equipment_requirements_by_operating_context, server_get_operating_context_payloads_by_operating_context as get_operating_context_payloads_by_operating_context, server_get_operating_context_regions_by_operating_context as get_operating_context_regions_by_operating_context, server_get_operating_context_risks_by_operating_context as get_operating_context_risks_by_operating_context, server_get_operating_context_role_assignments_by_operating_context as get_operating_context_role_assignments_by_operating_context, server_get_operating_context_roles_by_localization as get_operating_context_roles_by_localization, server_get_operating_context_types_by_localization as get_operating_context_types_by_localization, server_get_operating_context_weather_snapshots as get_operating_context_weather_snapshots, server_get_operating_contexts_by_herd as get_operating_contexts_by_herd, server_update_document_condition as update_document_condition, server_update_operating_context_device as update_operating_context_device, server_update_operating_context_equipment_category as update_operating_context_equipment_category, server_update_operating_context_equipment_item as update_operating_context_equipment_item, server_update_operating_context_equipment_requirement as update_operating_context_equipment_requirement, server_update_operating_context_payload as update_operating_context_payload, server_update_operating_context as update_operating_context, server_update_operating_context_region as update_operating_context_region, server_update_operating_context_risk as update_operating_context_risk, server_update_operating_context_role_assignment as update_operating_context_role_assignment, server_update_operating_context_role as update_operating_context_role, server_update_operating_context_type as update_operating_context_type, } from "../helpers/operating_contexts";
|
|
41
42
|
export { server_get_operators_by_session_id_filtered as get_operators_by_session_id_filtered, server_get_operators_by_session_id as get_operators_by_session_id, server_get_operators_by_user_id as get_operators_by_user_id, } from "../helpers/operators";
|
package/dist/server/index.js
CHANGED
|
@@ -36,6 +36,7 @@ export { server_create_issuer as create_issuer, server_get_issuer_by_id as get_i
|
|
|
36
36
|
export { server_get_layers_by_herd_ids as get_layers_by_herd_ids, server_get_layers_by_herd as get_layers_by_herd, } from "../helpers/layers";
|
|
37
37
|
export { server_create_localization as create_localization, server_get_localization_by_id as get_localization_by_id, server_get_localizations as get_localizations, server_update_localization as update_localization, } from "../helpers/localizations";
|
|
38
38
|
export { server_create_manufacturer as create_manufacturer, server_get_manufacturer_by_id as get_manufacturer_by_id, server_get_manufacturers as get_manufacturers, server_update_manufacturer as update_manufacturer, } from "../helpers/manufacturers";
|
|
39
|
+
export { server_create_compliance_resource as create_compliance_resource, server_create_compliance_resource_type as create_compliance_resource_type, server_create_contact_type as create_contact_type, server_create_herd_operating_permission as create_herd_operating_permission, server_create_operating_context_contact as create_operating_context_contact, server_create_operating_context_point_of_interest as create_operating_context_point_of_interest, server_create_operating_context_point_of_interest_type as create_operating_context_point_of_interest_type, server_create_operating_permission as create_operating_permission, server_get_compliance_resource_types as get_compliance_resource_types, server_get_compliance_resources_by_localization as get_compliance_resources_by_localization, server_get_contact_types_by_localization as get_contact_types_by_localization, server_get_herd_operating_permissions_by_herd as get_herd_operating_permissions_by_herd, server_get_operating_context_contacts_by_operating_context as get_operating_context_contacts_by_operating_context, server_get_operating_context_point_of_interest_types_by_localization as get_operating_context_point_of_interest_types_by_localization, server_get_operating_context_points_of_interest_by_operating_context as get_operating_context_points_of_interest_by_operating_context, server_get_operating_permissions_by_localization as get_operating_permissions_by_localization, server_update_compliance_resource as update_compliance_resource, server_update_compliance_resource_type as update_compliance_resource_type, server_update_contact_type as update_contact_type, server_update_herd_operating_permission as update_herd_operating_permission, server_update_operating_context_contact as update_operating_context_contact, server_update_operating_context_point_of_interest as update_operating_context_point_of_interest, server_update_operating_context_point_of_interest_type as update_operating_context_point_of_interest_type, server_update_operating_permission as update_operating_permission, } from "../helpers/compliance";
|
|
39
40
|
export { server_create_models_per_jobs_per_herd as create_models_per_jobs_per_herd, server_delete_models_per_jobs_per_herd_by_ids as delete_models_per_jobs_per_herd_by_ids, server_get_model_by_id as get_model_by_id, server_get_models_by_ids as get_models_by_ids, server_get_models_per_jobs_per_herd_by_herd as get_models_per_jobs_per_herd_by_herd, server_get_models as get_models, server_update_models_per_jobs_per_herd as update_models_per_jobs_per_herd, } from "../helpers/models";
|
|
40
41
|
export { server_create_document_condition as create_document_condition, server_create_operating_context_device as create_operating_context_device, server_create_operating_context_equipment_category as create_operating_context_equipment_category, server_create_operating_context_equipment_item as create_operating_context_equipment_item, server_create_operating_context_equipment_requirement as create_operating_context_equipment_requirement, server_create_operating_context_payload as create_operating_context_payload, server_create_operating_context as create_operating_context, server_create_operating_context_region as create_operating_context_region, server_create_operating_context_risk as create_operating_context_risk, server_create_operating_context_role_assignment as create_operating_context_role_assignment, server_create_operating_context_role as create_operating_context_role, server_create_operating_context_type as create_operating_context_type, server_get_document_conditions_by_localization as get_document_conditions_by_localization, server_get_operating_context_by_id as get_operating_context_by_id, server_get_operating_context_devices_by_operating_context as get_operating_context_devices_by_operating_context, server_get_operating_context_equipment_categories_by_localization as get_operating_context_equipment_categories_by_localization, server_get_operating_context_equipment_items_by_category as get_operating_context_equipment_items_by_category, server_get_operating_context_equipment_requirements_by_operating_context as get_operating_context_equipment_requirements_by_operating_context, server_get_operating_context_payloads_by_operating_context as get_operating_context_payloads_by_operating_context, server_get_operating_context_regions_by_operating_context as get_operating_context_regions_by_operating_context, server_get_operating_context_risks_by_operating_context as get_operating_context_risks_by_operating_context, server_get_operating_context_role_assignments_by_operating_context as get_operating_context_role_assignments_by_operating_context, server_get_operating_context_roles_by_localization as get_operating_context_roles_by_localization, server_get_operating_context_types_by_localization as get_operating_context_types_by_localization, server_get_operating_context_weather_snapshots as get_operating_context_weather_snapshots, server_get_operating_contexts_by_herd as get_operating_contexts_by_herd, server_update_document_condition as update_document_condition, server_update_operating_context_device as update_operating_context_device, server_update_operating_context_equipment_category as update_operating_context_equipment_category, server_update_operating_context_equipment_item as update_operating_context_equipment_item, server_update_operating_context_equipment_requirement as update_operating_context_equipment_requirement, server_update_operating_context_payload as update_operating_context_payload, server_update_operating_context as update_operating_context, server_update_operating_context_region as update_operating_context_region, server_update_operating_context_risk as update_operating_context_risk, server_update_operating_context_role_assignment as update_operating_context_role_assignment, server_update_operating_context_role as update_operating_context_role, server_update_operating_context_type as update_operating_context_type, } from "../helpers/operating_contexts";
|
|
41
42
|
export { server_get_operators_by_session_id_filtered as get_operators_by_session_id_filtered, server_get_operators_by_session_id as get_operators_by_session_id, server_get_operators_by_user_id as get_operators_by_user_id, } from "../helpers/operators";
|
package/dist/types/db.d.ts
CHANGED
|
@@ -73,6 +73,10 @@ export type IMaintenanceRequest = Database["public"]["Tables"]["maintenance_requ
|
|
|
73
73
|
export type ISessionIncident = Database["public"]["Tables"]["session_incidents"]["Row"];
|
|
74
74
|
export type SessionIncidentType = Database["public"]["Enums"]["session_incident_type"];
|
|
75
75
|
export type IContact = Database["public"]["Tables"]["contacts"]["Row"];
|
|
76
|
+
export type IContactType = Database["public"]["Tables"]["contact_types"]["Row"];
|
|
77
|
+
export type IComplianceResourceType = Database["public"]["Tables"]["compliance_resource_types"]["Row"];
|
|
78
|
+
export type IComplianceResource = Database["public"]["Tables"]["compliance_resources"]["Row"];
|
|
79
|
+
export type IHerdOperatingPermission = Database["public"]["Tables"]["herd_operating_permissions"]["Row"];
|
|
76
80
|
export type IDocumentCondition = Database["public"]["Tables"]["document_conditions"]["Row"];
|
|
77
81
|
export type IOperatingContextType = Database["public"]["Tables"]["operating_context_types"]["Row"];
|
|
78
82
|
export type IOperatingContextRole = Database["public"]["Tables"]["operating_context_roles"]["Row"];
|
|
@@ -86,6 +90,10 @@ export type IOperatingContextEquipmentRequirement = Database["public"]["Tables"]
|
|
|
86
90
|
export type IOperatingContextRegion = Database["public"]["Tables"]["operating_context_regions"]["Row"];
|
|
87
91
|
export type IOperatingContextRisk = Database["public"]["Tables"]["operating_context_risks"]["Row"];
|
|
88
92
|
export type IOperatingContextWeatherSnapshot = Database["public"]["Tables"]["operating_context_weather_snapshots"]["Row"];
|
|
93
|
+
export type IOperatingContextPointOfInterestType = Database["public"]["Tables"]["operating_context_point_of_interest_types"]["Row"];
|
|
94
|
+
export type IOperatingContextPointOfInterest = Database["public"]["Tables"]["operating_context_points_of_interest"]["Row"];
|
|
95
|
+
export type IOperatingPermission = Database["public"]["Tables"]["operating_permissions"]["Row"];
|
|
96
|
+
export type IOperatingContextContact = Database["public"]["Tables"]["operating_context_contacts"]["Row"];
|
|
89
97
|
export type OperatingContextPayloadType = Database["public"]["Enums"]["operating_context_payload_type"];
|
|
90
98
|
export type OperatingContextRiskProbability = Database["public"]["Enums"]["operating_context_risk_probability"];
|
|
91
99
|
export type OperatingContextRiskSeverity = Database["public"]["Enums"]["operating_context_risk_severity"];
|
|
@@ -116,7 +124,7 @@ export type OperatingContextEquipmentCategoryCreateInput = Pick<OperatingContext
|
|
|
116
124
|
export type OperatingContextEquipmentCategoryUpdateInput = Partial<OperatingContextEquipmentCategoryCreateInput> & LifecyclePatch;
|
|
117
125
|
export type OperatingContextEquipmentItemCreateInput = Pick<OperatingContextEquipmentItemInsert, "equipment_category_id" | "name">;
|
|
118
126
|
export type OperatingContextEquipmentItemUpdateInput = Partial<OperatingContextEquipmentItemCreateInput> & LifecyclePatch;
|
|
119
|
-
export type OperatingContextCreateInput = Pick<OperatingContextInsert, "herd_id" | "operating_context_type_id" | "name" | "description" | "valid_from" | "valid_to" | "distance_max_from_home" | "altitude_agl_max" | "involves_third_party_land">;
|
|
127
|
+
export type OperatingContextCreateInput = Pick<OperatingContextInsert, "herd_id" | "operating_context_type_id" | "name" | "description" | "local_notes" | "valid_from" | "valid_to" | "distance_max_from_home" | "altitude_agl_max" | "involves_third_party_land">;
|
|
120
128
|
export type OperatingContextUpdateInput = Partial<Omit<OperatingContextCreateInput, "herd_id">> & LifecyclePatch;
|
|
121
129
|
export type OperatingContextPayloadCreateInput = Pick<OperatingContextPayloadInsert, "operating_context_id" | "payload_type" | "weight_kg" | "description">;
|
|
122
130
|
export type OperatingContextPayloadUpdateInput = Partial<Omit<OperatingContextPayloadCreateInput, "operating_context_id">> & LifecyclePatch;
|
|
@@ -136,6 +144,26 @@ export interface OperatingContextRegionCreateInput {
|
|
|
136
144
|
export type OperatingContextRegionUpdateInput = Partial<Omit<OperatingContextRegionCreateInput, "operating_context_id">> & LifecyclePatch;
|
|
137
145
|
export type OperatingContextRiskCreateInput = Pick<OperatingContextRiskInsert, "operating_context_id" | "severity_before" | "probability_before" | "hazard" | "mitigation" | "severity_after" | "probability_after">;
|
|
138
146
|
export type OperatingContextRiskUpdateInput = Partial<Omit<OperatingContextRiskCreateInput, "operating_context_id">> & LifecyclePatch;
|
|
147
|
+
export type ContactTypeCreateInput = Pick<ContactTypeInsert, "localization_id" | "name" | "description" | "num_required">;
|
|
148
|
+
export type ContactTypeUpdateInput = Partial<ContactTypeCreateInput> & LifecyclePatch;
|
|
149
|
+
export type OperatingContextPointOfInterestTypeCreateInput = Pick<OperatingContextPointOfInterestTypeInsert, "localization_id" | "system_name" | "name" | "num_required">;
|
|
150
|
+
export type OperatingContextPointOfInterestTypeUpdateInput = Partial<OperatingContextPointOfInterestTypeCreateInput> & LifecyclePatch;
|
|
151
|
+
export type OperatingPermissionCreateInput = Pick<OperatingPermissionInsert, "localization_id" | "name" | "description">;
|
|
152
|
+
export type OperatingPermissionUpdateInput = Partial<OperatingPermissionCreateInput> & LifecyclePatch;
|
|
153
|
+
export type ComplianceResourceTypeCreateInput = Pick<ComplianceResourceTypeInsert, "system_name" | "name" | "description">;
|
|
154
|
+
export type ComplianceResourceTypeUpdateInput = Partial<ComplianceResourceTypeCreateInput> & LifecyclePatch;
|
|
155
|
+
export type ComplianceResourceCreateInput = Pick<ComplianceResourceInsert, "localization_id" | "compliance_resource_type_id" | "name" | "description" | "url" | "file_uri" | "published_at">;
|
|
156
|
+
export type ComplianceResourceUpdateInput = Partial<ComplianceResourceCreateInput> & LifecyclePatch;
|
|
157
|
+
export interface OperatingContextPointOfInterestCreateInput {
|
|
158
|
+
operating_context_id: number;
|
|
159
|
+
point_of_interest_type_id: number;
|
|
160
|
+
location: GeographyPoint | string;
|
|
161
|
+
}
|
|
162
|
+
export type OperatingContextPointOfInterestUpdateInput = Partial<Omit<OperatingContextPointOfInterestCreateInput, "operating_context_id">> & LifecyclePatch;
|
|
163
|
+
export type OperatingContextContactCreateInput = Pick<OperatingContextContactInsert, "operating_context_id" | "contact_id" | "herd_id">;
|
|
164
|
+
export type OperatingContextContactUpdateInput = Partial<Pick<OperatingContextContactCreateInput, "contact_id">> & LifecyclePatch;
|
|
165
|
+
export type HerdOperatingPermissionCreateInput = Pick<HerdOperatingPermissionInsert, "herd_id" | "operating_permission_id">;
|
|
166
|
+
export type HerdOperatingPermissionUpdateInput = Partial<Pick<HerdOperatingPermissionCreateInput, "operating_permission_id">> & LifecyclePatch;
|
|
139
167
|
/** A part with its resolved product (parts.product_number -> product_numbers -> products). */
|
|
140
168
|
export type IPartWithProduct = IPart & {
|
|
141
169
|
product?: IProduct | null;
|
|
@@ -215,6 +243,14 @@ export type SessionIncidentInsert = Database["public"]["Tables"]["session_incide
|
|
|
215
243
|
export type SessionIncidentUpdate = Database["public"]["Tables"]["session_incidents"]["Update"];
|
|
216
244
|
export type ContactInsert = Database["public"]["Tables"]["contacts"]["Insert"];
|
|
217
245
|
export type ContactUpdate = Database["public"]["Tables"]["contacts"]["Update"];
|
|
246
|
+
export type ContactTypeInsert = Database["public"]["Tables"]["contact_types"]["Insert"];
|
|
247
|
+
export type ContactTypeUpdate = Database["public"]["Tables"]["contact_types"]["Update"];
|
|
248
|
+
export type ComplianceResourceTypeInsert = Database["public"]["Tables"]["compliance_resource_types"]["Insert"];
|
|
249
|
+
export type ComplianceResourceTypeUpdate = Database["public"]["Tables"]["compliance_resource_types"]["Update"];
|
|
250
|
+
export type ComplianceResourceInsert = Database["public"]["Tables"]["compliance_resources"]["Insert"];
|
|
251
|
+
export type ComplianceResourceUpdate = Database["public"]["Tables"]["compliance_resources"]["Update"];
|
|
252
|
+
export type HerdOperatingPermissionInsert = Database["public"]["Tables"]["herd_operating_permissions"]["Insert"];
|
|
253
|
+
export type HerdOperatingPermissionUpdate = Database["public"]["Tables"]["herd_operating_permissions"]["Update"];
|
|
218
254
|
export type DocumentConditionInsert = Database["public"]["Tables"]["document_conditions"]["Insert"];
|
|
219
255
|
export type DocumentConditionUpdate = Database["public"]["Tables"]["document_conditions"]["Update"];
|
|
220
256
|
export type OperatingContextTypeInsert = Database["public"]["Tables"]["operating_context_types"]["Insert"];
|
|
@@ -239,6 +275,14 @@ export type OperatingContextRegionInsert = Database["public"]["Tables"]["operati
|
|
|
239
275
|
export type OperatingContextRegionUpdate = Database["public"]["Tables"]["operating_context_regions"]["Update"];
|
|
240
276
|
export type OperatingContextRiskInsert = Database["public"]["Tables"]["operating_context_risks"]["Insert"];
|
|
241
277
|
export type OperatingContextRiskUpdate = Database["public"]["Tables"]["operating_context_risks"]["Update"];
|
|
278
|
+
export type OperatingContextPointOfInterestTypeInsert = Database["public"]["Tables"]["operating_context_point_of_interest_types"]["Insert"];
|
|
279
|
+
export type OperatingContextPointOfInterestTypeUpdate = Database["public"]["Tables"]["operating_context_point_of_interest_types"]["Update"];
|
|
280
|
+
export type OperatingContextPointOfInterestInsert = Database["public"]["Tables"]["operating_context_points_of_interest"]["Insert"];
|
|
281
|
+
export type OperatingContextPointOfInterestUpdate = Database["public"]["Tables"]["operating_context_points_of_interest"]["Update"];
|
|
282
|
+
export type OperatingPermissionInsert = Database["public"]["Tables"]["operating_permissions"]["Insert"];
|
|
283
|
+
export type OperatingPermissionUpdate = Database["public"]["Tables"]["operating_permissions"]["Update"];
|
|
284
|
+
export type OperatingContextContactInsert = Database["public"]["Tables"]["operating_context_contacts"]["Insert"];
|
|
285
|
+
export type OperatingContextContactUpdate = Database["public"]["Tables"]["operating_context_contacts"]["Update"];
|
|
242
286
|
export interface CredentialQueryArgs {
|
|
243
287
|
type?: string;
|
|
244
288
|
}
|
package/dist/types/supabase.d.ts
CHANGED
|
@@ -492,6 +492,120 @@ export type Database = {
|
|
|
492
492
|
};
|
|
493
493
|
Relationships: [];
|
|
494
494
|
};
|
|
495
|
+
compliance_resource_types: {
|
|
496
|
+
Row: {
|
|
497
|
+
description: string | null;
|
|
498
|
+
id: number;
|
|
499
|
+
inserted_at: string;
|
|
500
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
501
|
+
lifecycle_changed_at: string;
|
|
502
|
+
lifecycle_changed_by: string | null;
|
|
503
|
+
lifecycle_reason: string | null;
|
|
504
|
+
name: string;
|
|
505
|
+
system_name: string;
|
|
506
|
+
};
|
|
507
|
+
Insert: {
|
|
508
|
+
description?: string | null;
|
|
509
|
+
id?: number;
|
|
510
|
+
inserted_at?: string;
|
|
511
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
512
|
+
lifecycle_changed_at?: string;
|
|
513
|
+
lifecycle_changed_by?: string | null;
|
|
514
|
+
lifecycle_reason?: string | null;
|
|
515
|
+
name: string;
|
|
516
|
+
system_name: string;
|
|
517
|
+
};
|
|
518
|
+
Update: {
|
|
519
|
+
description?: string | null;
|
|
520
|
+
id?: number;
|
|
521
|
+
inserted_at?: string;
|
|
522
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
523
|
+
lifecycle_changed_at?: string;
|
|
524
|
+
lifecycle_changed_by?: string | null;
|
|
525
|
+
lifecycle_reason?: string | null;
|
|
526
|
+
name?: string;
|
|
527
|
+
system_name?: string;
|
|
528
|
+
};
|
|
529
|
+
Relationships: [
|
|
530
|
+
{
|
|
531
|
+
foreignKeyName: "compliance_resource_types_lifecycle_changed_by_fkey";
|
|
532
|
+
columns: ["lifecycle_changed_by"];
|
|
533
|
+
isOneToOne: false;
|
|
534
|
+
referencedRelation: "users";
|
|
535
|
+
referencedColumns: ["id"];
|
|
536
|
+
}
|
|
537
|
+
];
|
|
538
|
+
};
|
|
539
|
+
compliance_resources: {
|
|
540
|
+
Row: {
|
|
541
|
+
compliance_resource_type_id: number;
|
|
542
|
+
description: string | null;
|
|
543
|
+
file_uri: string | null;
|
|
544
|
+
id: number;
|
|
545
|
+
inserted_at: string;
|
|
546
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
547
|
+
lifecycle_changed_at: string;
|
|
548
|
+
lifecycle_changed_by: string | null;
|
|
549
|
+
lifecycle_reason: string | null;
|
|
550
|
+
localization_id: number;
|
|
551
|
+
name: string;
|
|
552
|
+
published_at: string | null;
|
|
553
|
+
url: string | null;
|
|
554
|
+
};
|
|
555
|
+
Insert: {
|
|
556
|
+
compliance_resource_type_id: number;
|
|
557
|
+
description?: string | null;
|
|
558
|
+
file_uri?: string | null;
|
|
559
|
+
id?: number;
|
|
560
|
+
inserted_at?: string;
|
|
561
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
562
|
+
lifecycle_changed_at?: string;
|
|
563
|
+
lifecycle_changed_by?: string | null;
|
|
564
|
+
lifecycle_reason?: string | null;
|
|
565
|
+
localization_id: number;
|
|
566
|
+
name: string;
|
|
567
|
+
published_at?: string | null;
|
|
568
|
+
url?: string | null;
|
|
569
|
+
};
|
|
570
|
+
Update: {
|
|
571
|
+
compliance_resource_type_id?: number;
|
|
572
|
+
description?: string | null;
|
|
573
|
+
file_uri?: string | null;
|
|
574
|
+
id?: number;
|
|
575
|
+
inserted_at?: string;
|
|
576
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
577
|
+
lifecycle_changed_at?: string;
|
|
578
|
+
lifecycle_changed_by?: string | null;
|
|
579
|
+
lifecycle_reason?: string | null;
|
|
580
|
+
localization_id?: number;
|
|
581
|
+
name?: string;
|
|
582
|
+
published_at?: string | null;
|
|
583
|
+
url?: string | null;
|
|
584
|
+
};
|
|
585
|
+
Relationships: [
|
|
586
|
+
{
|
|
587
|
+
foreignKeyName: "compliance_resources_compliance_resource_type_id_fkey";
|
|
588
|
+
columns: ["compliance_resource_type_id"];
|
|
589
|
+
isOneToOne: false;
|
|
590
|
+
referencedRelation: "compliance_resource_types";
|
|
591
|
+
referencedColumns: ["id"];
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
foreignKeyName: "compliance_resources_lifecycle_changed_by_fkey";
|
|
595
|
+
columns: ["lifecycle_changed_by"];
|
|
596
|
+
isOneToOne: false;
|
|
597
|
+
referencedRelation: "users";
|
|
598
|
+
referencedColumns: ["id"];
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
foreignKeyName: "compliance_resources_localization_id_fkey";
|
|
602
|
+
columns: ["localization_id"];
|
|
603
|
+
isOneToOne: false;
|
|
604
|
+
referencedRelation: "localizations";
|
|
605
|
+
referencedColumns: ["id"];
|
|
606
|
+
}
|
|
607
|
+
];
|
|
608
|
+
};
|
|
495
609
|
connectivity: {
|
|
496
610
|
Row: {
|
|
497
611
|
altitude: number;
|
|
@@ -582,8 +696,63 @@ export type Database = {
|
|
|
582
696
|
}
|
|
583
697
|
];
|
|
584
698
|
};
|
|
699
|
+
contact_types: {
|
|
700
|
+
Row: {
|
|
701
|
+
description: string | null;
|
|
702
|
+
id: number;
|
|
703
|
+
inserted_at: string;
|
|
704
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
705
|
+
lifecycle_changed_at: string;
|
|
706
|
+
lifecycle_changed_by: string | null;
|
|
707
|
+
lifecycle_reason: string | null;
|
|
708
|
+
localization_id: number;
|
|
709
|
+
name: string;
|
|
710
|
+
num_required: number;
|
|
711
|
+
};
|
|
712
|
+
Insert: {
|
|
713
|
+
description?: string | null;
|
|
714
|
+
id?: number;
|
|
715
|
+
inserted_at?: string;
|
|
716
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
717
|
+
lifecycle_changed_at?: string;
|
|
718
|
+
lifecycle_changed_by?: string | null;
|
|
719
|
+
lifecycle_reason?: string | null;
|
|
720
|
+
localization_id: number;
|
|
721
|
+
name: string;
|
|
722
|
+
num_required?: number;
|
|
723
|
+
};
|
|
724
|
+
Update: {
|
|
725
|
+
description?: string | null;
|
|
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
|
+
name?: string;
|
|
734
|
+
num_required?: number;
|
|
735
|
+
};
|
|
736
|
+
Relationships: [
|
|
737
|
+
{
|
|
738
|
+
foreignKeyName: "contact_types_lifecycle_changed_by_fkey";
|
|
739
|
+
columns: ["lifecycle_changed_by"];
|
|
740
|
+
isOneToOne: false;
|
|
741
|
+
referencedRelation: "users";
|
|
742
|
+
referencedColumns: ["id"];
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
foreignKeyName: "contact_types_localization_id_fkey";
|
|
746
|
+
columns: ["localization_id"];
|
|
747
|
+
isOneToOne: false;
|
|
748
|
+
referencedRelation: "localizations";
|
|
749
|
+
referencedColumns: ["id"];
|
|
750
|
+
}
|
|
751
|
+
];
|
|
752
|
+
};
|
|
585
753
|
contacts: {
|
|
586
754
|
Row: {
|
|
755
|
+
contact_type_id: number | null;
|
|
587
756
|
created_at: string;
|
|
588
757
|
created_by: string | null;
|
|
589
758
|
email: string | null;
|
|
@@ -594,11 +763,14 @@ export type Database = {
|
|
|
594
763
|
lifecycle_changed_by: string | null;
|
|
595
764
|
lifecycle_reason: string | null;
|
|
596
765
|
name: string;
|
|
766
|
+
notes: string | null;
|
|
597
767
|
phone: string | null;
|
|
768
|
+
radio_frequency: string | null;
|
|
598
769
|
updated_at: string;
|
|
599
770
|
updated_by: string | null;
|
|
600
771
|
};
|
|
601
772
|
Insert: {
|
|
773
|
+
contact_type_id?: number | null;
|
|
602
774
|
created_at?: string;
|
|
603
775
|
created_by?: string | null;
|
|
604
776
|
email?: string | null;
|
|
@@ -609,11 +781,14 @@ export type Database = {
|
|
|
609
781
|
lifecycle_changed_by?: string | null;
|
|
610
782
|
lifecycle_reason?: string | null;
|
|
611
783
|
name: string;
|
|
784
|
+
notes?: string | null;
|
|
612
785
|
phone?: string | null;
|
|
786
|
+
radio_frequency?: string | null;
|
|
613
787
|
updated_at?: string;
|
|
614
788
|
updated_by?: string | null;
|
|
615
789
|
};
|
|
616
790
|
Update: {
|
|
791
|
+
contact_type_id?: number | null;
|
|
617
792
|
created_at?: string;
|
|
618
793
|
created_by?: string | null;
|
|
619
794
|
email?: string | null;
|
|
@@ -624,11 +799,20 @@ export type Database = {
|
|
|
624
799
|
lifecycle_changed_by?: string | null;
|
|
625
800
|
lifecycle_reason?: string | null;
|
|
626
801
|
name?: string;
|
|
802
|
+
notes?: string | null;
|
|
627
803
|
phone?: string | null;
|
|
804
|
+
radio_frequency?: string | null;
|
|
628
805
|
updated_at?: string;
|
|
629
806
|
updated_by?: string | null;
|
|
630
807
|
};
|
|
631
808
|
Relationships: [
|
|
809
|
+
{
|
|
810
|
+
foreignKeyName: "contacts_contact_type_id_fkey";
|
|
811
|
+
columns: ["contact_type_id"];
|
|
812
|
+
isOneToOne: false;
|
|
813
|
+
referencedRelation: "contact_types";
|
|
814
|
+
referencedColumns: ["id"];
|
|
815
|
+
},
|
|
632
816
|
{
|
|
633
817
|
foreignKeyName: "contacts_created_by_fkey";
|
|
634
818
|
columns: ["created_by"];
|
|
@@ -828,6 +1012,7 @@ export type Database = {
|
|
|
828
1012
|
document_templates: {
|
|
829
1013
|
Row: {
|
|
830
1014
|
categories: string[];
|
|
1015
|
+
compliance_resource_id: number | null;
|
|
831
1016
|
description: string | null;
|
|
832
1017
|
document_condition_id: number | null;
|
|
833
1018
|
entity_for: Database["public"]["Enums"]["document_entity"] | null;
|
|
@@ -841,6 +1026,7 @@ export type Database = {
|
|
|
841
1026
|
};
|
|
842
1027
|
Insert: {
|
|
843
1028
|
categories?: string[];
|
|
1029
|
+
compliance_resource_id?: number | null;
|
|
844
1030
|
description?: string | null;
|
|
845
1031
|
document_condition_id?: number | null;
|
|
846
1032
|
entity_for?: Database["public"]["Enums"]["document_entity"] | null;
|
|
@@ -854,6 +1040,7 @@ export type Database = {
|
|
|
854
1040
|
};
|
|
855
1041
|
Update: {
|
|
856
1042
|
categories?: string[];
|
|
1043
|
+
compliance_resource_id?: number | null;
|
|
857
1044
|
description?: string | null;
|
|
858
1045
|
document_condition_id?: number | null;
|
|
859
1046
|
entity_for?: Database["public"]["Enums"]["document_entity"] | null;
|
|
@@ -866,6 +1053,13 @@ export type Database = {
|
|
|
866
1053
|
uses_expiry?: boolean;
|
|
867
1054
|
};
|
|
868
1055
|
Relationships: [
|
|
1056
|
+
{
|
|
1057
|
+
foreignKeyName: "document_templates_compliance_resource_id_fkey";
|
|
1058
|
+
columns: ["compliance_resource_id"];
|
|
1059
|
+
isOneToOne: false;
|
|
1060
|
+
referencedRelation: "compliance_resources";
|
|
1061
|
+
referencedColumns: ["id"];
|
|
1062
|
+
},
|
|
869
1063
|
{
|
|
870
1064
|
foreignKeyName: "document_templates_document_condition_id_fkey";
|
|
871
1065
|
columns: ["document_condition_id"];
|
|
@@ -1494,6 +1688,61 @@ export type Database = {
|
|
|
1494
1688
|
}
|
|
1495
1689
|
];
|
|
1496
1690
|
};
|
|
1691
|
+
herd_operating_permissions: {
|
|
1692
|
+
Row: {
|
|
1693
|
+
herd_id: number;
|
|
1694
|
+
id: number;
|
|
1695
|
+
inserted_at: string;
|
|
1696
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1697
|
+
lifecycle_changed_at: string;
|
|
1698
|
+
lifecycle_changed_by: string | null;
|
|
1699
|
+
lifecycle_reason: string | null;
|
|
1700
|
+
operating_permission_id: number;
|
|
1701
|
+
};
|
|
1702
|
+
Insert: {
|
|
1703
|
+
herd_id: number;
|
|
1704
|
+
id?: number;
|
|
1705
|
+
inserted_at?: string;
|
|
1706
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1707
|
+
lifecycle_changed_at?: string;
|
|
1708
|
+
lifecycle_changed_by?: string | null;
|
|
1709
|
+
lifecycle_reason?: string | null;
|
|
1710
|
+
operating_permission_id: number;
|
|
1711
|
+
};
|
|
1712
|
+
Update: {
|
|
1713
|
+
herd_id?: number;
|
|
1714
|
+
id?: number;
|
|
1715
|
+
inserted_at?: string;
|
|
1716
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1717
|
+
lifecycle_changed_at?: string;
|
|
1718
|
+
lifecycle_changed_by?: string | null;
|
|
1719
|
+
lifecycle_reason?: string | null;
|
|
1720
|
+
operating_permission_id?: number;
|
|
1721
|
+
};
|
|
1722
|
+
Relationships: [
|
|
1723
|
+
{
|
|
1724
|
+
foreignKeyName: "herd_operating_permissions_herd_id_fkey";
|
|
1725
|
+
columns: ["herd_id"];
|
|
1726
|
+
isOneToOne: false;
|
|
1727
|
+
referencedRelation: "herds";
|
|
1728
|
+
referencedColumns: ["id"];
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
foreignKeyName: "herd_operating_permissions_lifecycle_changed_by_fkey";
|
|
1732
|
+
columns: ["lifecycle_changed_by"];
|
|
1733
|
+
isOneToOne: false;
|
|
1734
|
+
referencedRelation: "users";
|
|
1735
|
+
referencedColumns: ["id"];
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
foreignKeyName: "herd_operating_permissions_operating_permission_id_fkey";
|
|
1739
|
+
columns: ["operating_permission_id"];
|
|
1740
|
+
isOneToOne: false;
|
|
1741
|
+
referencedRelation: "operating_permissions";
|
|
1742
|
+
referencedColumns: ["id"];
|
|
1743
|
+
}
|
|
1744
|
+
];
|
|
1745
|
+
};
|
|
1497
1746
|
herd_role_abilities: {
|
|
1498
1747
|
Row: {
|
|
1499
1748
|
ability_id: number;
|
|
@@ -1992,6 +2241,64 @@ export type Database = {
|
|
|
1992
2241
|
}
|
|
1993
2242
|
];
|
|
1994
2243
|
};
|
|
2244
|
+
operating_context_contacts: {
|
|
2245
|
+
Row: {
|
|
2246
|
+
contact_id: number;
|
|
2247
|
+
herd_id: number;
|
|
2248
|
+
id: number;
|
|
2249
|
+
inserted_at: string;
|
|
2250
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2251
|
+
lifecycle_changed_at: string;
|
|
2252
|
+
lifecycle_changed_by: string | null;
|
|
2253
|
+
lifecycle_reason: string | null;
|
|
2254
|
+
operating_context_id: number;
|
|
2255
|
+
};
|
|
2256
|
+
Insert: {
|
|
2257
|
+
contact_id: number;
|
|
2258
|
+
herd_id: number;
|
|
2259
|
+
id?: number;
|
|
2260
|
+
inserted_at?: string;
|
|
2261
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2262
|
+
lifecycle_changed_at?: string;
|
|
2263
|
+
lifecycle_changed_by?: string | null;
|
|
2264
|
+
lifecycle_reason?: string | null;
|
|
2265
|
+
operating_context_id: number;
|
|
2266
|
+
};
|
|
2267
|
+
Update: {
|
|
2268
|
+
contact_id?: number;
|
|
2269
|
+
herd_id?: number;
|
|
2270
|
+
id?: number;
|
|
2271
|
+
inserted_at?: string;
|
|
2272
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2273
|
+
lifecycle_changed_at?: string;
|
|
2274
|
+
lifecycle_changed_by?: string | null;
|
|
2275
|
+
lifecycle_reason?: string | null;
|
|
2276
|
+
operating_context_id?: number;
|
|
2277
|
+
};
|
|
2278
|
+
Relationships: [
|
|
2279
|
+
{
|
|
2280
|
+
foreignKeyName: "operating_context_contact_contact_fkey";
|
|
2281
|
+
columns: ["contact_id", "herd_id"];
|
|
2282
|
+
isOneToOne: false;
|
|
2283
|
+
referencedRelation: "contacts";
|
|
2284
|
+
referencedColumns: ["id", "herd_id"];
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
foreignKeyName: "operating_context_contact_context_fkey";
|
|
2288
|
+
columns: ["operating_context_id", "herd_id"];
|
|
2289
|
+
isOneToOne: false;
|
|
2290
|
+
referencedRelation: "operating_contexts";
|
|
2291
|
+
referencedColumns: ["id", "herd_id"];
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
foreignKeyName: "operating_context_contacts_lifecycle_changed_by_fkey";
|
|
2295
|
+
columns: ["lifecycle_changed_by"];
|
|
2296
|
+
isOneToOne: false;
|
|
2297
|
+
referencedRelation: "users";
|
|
2298
|
+
referencedColumns: ["id"];
|
|
2299
|
+
}
|
|
2300
|
+
];
|
|
2301
|
+
};
|
|
1995
2302
|
operating_context_equipment_categories: {
|
|
1996
2303
|
Row: {
|
|
1997
2304
|
id: number;
|
|
@@ -2220,6 +2527,141 @@ export type Database = {
|
|
|
2220
2527
|
}
|
|
2221
2528
|
];
|
|
2222
2529
|
};
|
|
2530
|
+
operating_context_point_of_interest_types: {
|
|
2531
|
+
Row: {
|
|
2532
|
+
id: number;
|
|
2533
|
+
inserted_at: string;
|
|
2534
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2535
|
+
lifecycle_changed_at: string;
|
|
2536
|
+
lifecycle_changed_by: string | null;
|
|
2537
|
+
lifecycle_reason: string | null;
|
|
2538
|
+
localization_id: number;
|
|
2539
|
+
name: string;
|
|
2540
|
+
num_required: number;
|
|
2541
|
+
system_name: string;
|
|
2542
|
+
};
|
|
2543
|
+
Insert: {
|
|
2544
|
+
id?: number;
|
|
2545
|
+
inserted_at?: string;
|
|
2546
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2547
|
+
lifecycle_changed_at?: string;
|
|
2548
|
+
lifecycle_changed_by?: string | null;
|
|
2549
|
+
lifecycle_reason?: string | null;
|
|
2550
|
+
localization_id: number;
|
|
2551
|
+
name: string;
|
|
2552
|
+
num_required: number;
|
|
2553
|
+
system_name: string;
|
|
2554
|
+
};
|
|
2555
|
+
Update: {
|
|
2556
|
+
id?: number;
|
|
2557
|
+
inserted_at?: string;
|
|
2558
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2559
|
+
lifecycle_changed_at?: string;
|
|
2560
|
+
lifecycle_changed_by?: string | null;
|
|
2561
|
+
lifecycle_reason?: string | null;
|
|
2562
|
+
localization_id?: number;
|
|
2563
|
+
name?: string;
|
|
2564
|
+
num_required?: number;
|
|
2565
|
+
system_name?: string;
|
|
2566
|
+
};
|
|
2567
|
+
Relationships: [
|
|
2568
|
+
{
|
|
2569
|
+
foreignKeyName: "operating_context_point_of_interest_t_lifecycle_changed_by_fkey";
|
|
2570
|
+
columns: ["lifecycle_changed_by"];
|
|
2571
|
+
isOneToOne: false;
|
|
2572
|
+
referencedRelation: "users";
|
|
2573
|
+
referencedColumns: ["id"];
|
|
2574
|
+
},
|
|
2575
|
+
{
|
|
2576
|
+
foreignKeyName: "operating_context_point_of_interest_types_localization_id_fkey";
|
|
2577
|
+
columns: ["localization_id"];
|
|
2578
|
+
isOneToOne: false;
|
|
2579
|
+
referencedRelation: "localizations";
|
|
2580
|
+
referencedColumns: ["id"];
|
|
2581
|
+
}
|
|
2582
|
+
];
|
|
2583
|
+
};
|
|
2584
|
+
operating_context_points_of_interest: {
|
|
2585
|
+
Row: {
|
|
2586
|
+
created_at: string;
|
|
2587
|
+
created_by: string;
|
|
2588
|
+
id: number;
|
|
2589
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2590
|
+
lifecycle_changed_at: string;
|
|
2591
|
+
lifecycle_changed_by: string | null;
|
|
2592
|
+
lifecycle_reason: string | null;
|
|
2593
|
+
location: unknown;
|
|
2594
|
+
operating_context_id: number;
|
|
2595
|
+
point_of_interest_type_id: number;
|
|
2596
|
+
updated_at: string;
|
|
2597
|
+
updated_by: string | null;
|
|
2598
|
+
};
|
|
2599
|
+
Insert: {
|
|
2600
|
+
created_at?: string;
|
|
2601
|
+
created_by: string;
|
|
2602
|
+
id?: number;
|
|
2603
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2604
|
+
lifecycle_changed_at?: string;
|
|
2605
|
+
lifecycle_changed_by?: string | null;
|
|
2606
|
+
lifecycle_reason?: string | null;
|
|
2607
|
+
location: unknown;
|
|
2608
|
+
operating_context_id: number;
|
|
2609
|
+
point_of_interest_type_id: number;
|
|
2610
|
+
updated_at?: string;
|
|
2611
|
+
updated_by?: string | null;
|
|
2612
|
+
};
|
|
2613
|
+
Update: {
|
|
2614
|
+
created_at?: string;
|
|
2615
|
+
created_by?: string;
|
|
2616
|
+
id?: number;
|
|
2617
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2618
|
+
lifecycle_changed_at?: string;
|
|
2619
|
+
lifecycle_changed_by?: string | null;
|
|
2620
|
+
lifecycle_reason?: string | null;
|
|
2621
|
+
location?: unknown;
|
|
2622
|
+
operating_context_id?: number;
|
|
2623
|
+
point_of_interest_type_id?: number;
|
|
2624
|
+
updated_at?: string;
|
|
2625
|
+
updated_by?: string | null;
|
|
2626
|
+
};
|
|
2627
|
+
Relationships: [
|
|
2628
|
+
{
|
|
2629
|
+
foreignKeyName: "operating_context_points_of_inte_point_of_interest_type_id_fkey";
|
|
2630
|
+
columns: ["point_of_interest_type_id"];
|
|
2631
|
+
isOneToOne: false;
|
|
2632
|
+
referencedRelation: "operating_context_point_of_interest_types";
|
|
2633
|
+
referencedColumns: ["id"];
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
foreignKeyName: "operating_context_points_of_interest_created_by_fkey";
|
|
2637
|
+
columns: ["created_by"];
|
|
2638
|
+
isOneToOne: false;
|
|
2639
|
+
referencedRelation: "users";
|
|
2640
|
+
referencedColumns: ["id"];
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
foreignKeyName: "operating_context_points_of_interest_lifecycle_changed_by_fkey";
|
|
2644
|
+
columns: ["lifecycle_changed_by"];
|
|
2645
|
+
isOneToOne: false;
|
|
2646
|
+
referencedRelation: "users";
|
|
2647
|
+
referencedColumns: ["id"];
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
foreignKeyName: "operating_context_points_of_interest_operating_context_id_fkey";
|
|
2651
|
+
columns: ["operating_context_id"];
|
|
2652
|
+
isOneToOne: false;
|
|
2653
|
+
referencedRelation: "operating_contexts";
|
|
2654
|
+
referencedColumns: ["id"];
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
foreignKeyName: "operating_context_points_of_interest_updated_by_fkey";
|
|
2658
|
+
columns: ["updated_by"];
|
|
2659
|
+
isOneToOne: false;
|
|
2660
|
+
referencedRelation: "users";
|
|
2661
|
+
referencedColumns: ["id"];
|
|
2662
|
+
}
|
|
2663
|
+
];
|
|
2664
|
+
};
|
|
2223
2665
|
operating_context_regions: {
|
|
2224
2666
|
Row: {
|
|
2225
2667
|
created_at: string;
|
|
@@ -2620,6 +3062,7 @@ export type Database = {
|
|
|
2620
3062
|
lifecycle_changed_at: string;
|
|
2621
3063
|
lifecycle_changed_by: string | null;
|
|
2622
3064
|
lifecycle_reason: string | null;
|
|
3065
|
+
local_notes: string | null;
|
|
2623
3066
|
name: string;
|
|
2624
3067
|
operating_context_type_id: number;
|
|
2625
3068
|
updated_at: string;
|
|
@@ -2640,6 +3083,7 @@ export type Database = {
|
|
|
2640
3083
|
lifecycle_changed_at?: string;
|
|
2641
3084
|
lifecycle_changed_by?: string | null;
|
|
2642
3085
|
lifecycle_reason?: string | null;
|
|
3086
|
+
local_notes?: string | null;
|
|
2643
3087
|
name: string;
|
|
2644
3088
|
operating_context_type_id: number;
|
|
2645
3089
|
updated_at?: string;
|
|
@@ -2660,6 +3104,7 @@ export type Database = {
|
|
|
2660
3104
|
lifecycle_changed_at?: string;
|
|
2661
3105
|
lifecycle_changed_by?: string | null;
|
|
2662
3106
|
lifecycle_reason?: string | null;
|
|
3107
|
+
local_notes?: string | null;
|
|
2663
3108
|
name?: string;
|
|
2664
3109
|
operating_context_type_id?: number;
|
|
2665
3110
|
updated_at?: string;
|
|
@@ -2763,6 +3208,57 @@ export type Database = {
|
|
|
2763
3208
|
}
|
|
2764
3209
|
];
|
|
2765
3210
|
};
|
|
3211
|
+
operating_permissions: {
|
|
3212
|
+
Row: {
|
|
3213
|
+
description: string | null;
|
|
3214
|
+
id: number;
|
|
3215
|
+
inserted_at: string;
|
|
3216
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
3217
|
+
lifecycle_changed_at: string;
|
|
3218
|
+
lifecycle_changed_by: string | null;
|
|
3219
|
+
lifecycle_reason: string | null;
|
|
3220
|
+
localization_id: number;
|
|
3221
|
+
name: string;
|
|
3222
|
+
};
|
|
3223
|
+
Insert: {
|
|
3224
|
+
description?: string | null;
|
|
3225
|
+
id?: number;
|
|
3226
|
+
inserted_at?: string;
|
|
3227
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
3228
|
+
lifecycle_changed_at?: string;
|
|
3229
|
+
lifecycle_changed_by?: string | null;
|
|
3230
|
+
lifecycle_reason?: string | null;
|
|
3231
|
+
localization_id: number;
|
|
3232
|
+
name: string;
|
|
3233
|
+
};
|
|
3234
|
+
Update: {
|
|
3235
|
+
description?: string | null;
|
|
3236
|
+
id?: number;
|
|
3237
|
+
inserted_at?: string;
|
|
3238
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
3239
|
+
lifecycle_changed_at?: string;
|
|
3240
|
+
lifecycle_changed_by?: string | null;
|
|
3241
|
+
lifecycle_reason?: string | null;
|
|
3242
|
+
localization_id?: number;
|
|
3243
|
+
name?: string;
|
|
3244
|
+
};
|
|
3245
|
+
Relationships: [
|
|
3246
|
+
{
|
|
3247
|
+
foreignKeyName: "operating_permissions_lifecycle_changed_by_fkey";
|
|
3248
|
+
columns: ["lifecycle_changed_by"];
|
|
3249
|
+
isOneToOne: false;
|
|
3250
|
+
referencedRelation: "users";
|
|
3251
|
+
referencedColumns: ["id"];
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
foreignKeyName: "operating_permissions_localization_id_fkey";
|
|
3255
|
+
columns: ["localization_id"];
|
|
3256
|
+
isOneToOne: false;
|
|
3257
|
+
referencedRelation: "localizations";
|
|
3258
|
+
referencedColumns: ["id"];
|
|
3259
|
+
}
|
|
3260
|
+
];
|
|
3261
|
+
};
|
|
2766
3262
|
operators: {
|
|
2767
3263
|
Row: {
|
|
2768
3264
|
action: string | null;
|
|
@@ -5700,6 +6196,22 @@ export type Database = {
|
|
|
5700
6196
|
isSetofReturn: false;
|
|
5701
6197
|
};
|
|
5702
6198
|
};
|
|
6199
|
+
replace_session_connectivity: {
|
|
6200
|
+
Args: {
|
|
6201
|
+
rows_caller: Json;
|
|
6202
|
+
session_id_caller: number;
|
|
6203
|
+
};
|
|
6204
|
+
Returns: undefined;
|
|
6205
|
+
};
|
|
6206
|
+
replace_session_sensor_poses: {
|
|
6207
|
+
Args: {
|
|
6208
|
+
part_id_caller: number;
|
|
6209
|
+
rows_caller: Json;
|
|
6210
|
+
timestamp_end_caller: string;
|
|
6211
|
+
timestamp_start_caller: string;
|
|
6212
|
+
};
|
|
6213
|
+
Returns: undefined;
|
|
6214
|
+
};
|
|
5703
6215
|
reset_herd_default_role_abilities: {
|
|
5704
6216
|
Args: {
|
|
5705
6217
|
p_herd_id: number;
|