@adventurelabs/scout-core 1.5.5 → 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/README.md +47 -0
- package/dist/api_keys/actions.d.ts +0 -1
- package/dist/api_keys/actions.js +0 -14
- package/dist/client/index.d.ts +76 -0
- package/dist/client/index.js +83 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/helpers/analysis_usage/jobs_server.d.ts +25 -0
- package/dist/helpers/analysis_usage/jobs_server.js +10 -0
- package/dist/helpers/analysis_usage/tasks_server.d.ts +63 -0
- package/dist/helpers/analysis_usage/tasks_server.js +14 -0
- package/dist/helpers/artifacts.d.ts +0 -1
- package/dist/helpers/artifacts.js +10 -147
- package/dist/helpers/artifacts.queries.d.ts +26 -0
- package/dist/helpers/{artifacts.internal.js → artifacts.queries.js} +24 -41
- package/dist/helpers/auth.d.ts +1 -1
- package/dist/helpers/auth.js +2 -3
- package/dist/helpers/auth_server.d.ts +2 -0
- package/dist/helpers/auth_server.js +10 -0
- package/dist/helpers/certificates_server.d.ts +101 -0
- package/dist/helpers/certificates_server.js +42 -0
- package/dist/helpers/chat.d.ts +1 -2
- package/dist/helpers/chat.js +3 -38
- package/dist/helpers/chat.queries.d.ts +13 -0
- package/dist/helpers/chat.queries.js +39 -0
- package/dist/helpers/client_abilities_jwt_keys.js +0 -1
- package/dist/helpers/client_abilities_token_server.d.ts +1 -0
- package/dist/helpers/client_abilities_token_server.js +5 -2
- 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/connectivity.d.ts +1 -5
- package/dist/helpers/connectivity.js +7 -140
- package/dist/helpers/connectivity.queries.d.ts +18 -0
- package/dist/helpers/connectivity.queries.js +121 -0
- package/dist/helpers/contacts_server.d.ts +75 -0
- package/dist/helpers/contacts_server.js +18 -0
- package/dist/helpers/deviceTransfer.js +2 -11
- package/dist/helpers/deviceTransfer.queries.d.ts +4 -0
- package/dist/helpers/deviceTransfer.queries.js +11 -0
- package/dist/helpers/devices.js +4 -61
- package/dist/helpers/devices.queries.d.ts +4 -1
- package/dist/helpers/devices.queries.js +52 -0
- package/dist/helpers/document_templates.js +6 -52
- package/dist/helpers/document_templates.queries.d.ts +9 -0
- package/dist/helpers/document_templates.queries.js +56 -0
- package/dist/helpers/documents_server.d.ts +226 -0
- package/dist/helpers/documents_server.js +38 -0
- package/dist/helpers/email.d.ts +0 -6
- package/dist/helpers/email.js +1 -19
- package/dist/helpers/embeddings.d.ts +0 -5
- package/dist/helpers/embeddings.js +2 -19
- package/dist/helpers/embeddings.queries.d.ts +7 -0
- package/dist/helpers/{embeddings.internal.js → embeddings.queries.js} +2 -2
- package/dist/helpers/eventUtils.d.ts +3 -12
- package/dist/helpers/eventUtils.js +0 -10
- package/dist/helpers/events.d.ts +0 -1
- package/dist/helpers/events.js +7 -107
- package/dist/helpers/events.queries.d.ts +17 -0
- package/dist/helpers/{events.internal.js → events.queries.js} +24 -15
- package/dist/helpers/health_metrics.js +3 -38
- package/dist/helpers/health_metrics.queries.d.ts +12 -0
- package/dist/helpers/health_metrics.queries.js +39 -0
- package/dist/helpers/heartbeats.js +4 -83
- package/dist/helpers/heartbeats.queries.d.ts +11 -0
- package/dist/helpers/heartbeats.queries.js +76 -0
- package/dist/helpers/herd_allowed_domains.js +2 -12
- package/dist/helpers/{herd_allowed_domains_internal.d.ts → herd_allowed_domains.queries.d.ts} +1 -1
- package/dist/helpers/{herd_allowed_domains_internal.js → herd_allowed_domains.queries.js} +2 -2
- package/dist/helpers/herd_credentials_server.d.ts +76 -0
- package/dist/helpers/herd_credentials_server.js +22 -0
- package/dist/helpers/herd_modules.queries.js +10 -7
- package/dist/helpers/herd_roles.js +13 -148
- package/dist/helpers/herd_roles.queries.d.ts +18 -0
- package/dist/helpers/{herd_roles_internal.js → herd_roles.queries.js} +28 -28
- package/dist/helpers/herds.js +5 -47
- package/dist/helpers/herds.queries.d.ts +8 -1
- package/dist/helpers/herds.queries.js +48 -0
- package/dist/helpers/invitations.js +7 -58
- package/dist/helpers/invitations.queries.d.ts +10 -0
- package/dist/helpers/{invitations_internal.js → invitations.queries.js} +12 -12
- package/dist/helpers/issuers.js +6 -52
- package/dist/helpers/issuers.queries.d.ts +9 -0
- package/dist/helpers/issuers.queries.js +53 -0
- package/dist/helpers/layers.js +2 -20
- package/dist/helpers/layers.queries.d.ts +2 -1
- package/dist/helpers/layers.queries.js +9 -13
- package/dist/helpers/lifecycle_server.d.ts +178 -0
- package/dist/helpers/lifecycle_server.js +38 -0
- package/dist/helpers/localizations.js +5 -42
- package/dist/helpers/localizations.queries.d.ts +8 -0
- package/dist/helpers/localizations.queries.js +45 -0
- package/dist/helpers/maintenance_requests_server.d.ts +124 -0
- package/dist/helpers/maintenance_requests_server.js +34 -0
- package/dist/helpers/manufacturers.js +5 -43
- package/dist/helpers/manufacturers.queries.d.ts +10 -0
- package/dist/helpers/manufacturers.queries.js +46 -0
- package/dist/helpers/media_urls.d.ts +13 -0
- package/dist/helpers/media_urls.js +21 -0
- package/dist/helpers/models.js +8 -80
- package/dist/helpers/models.queries.d.ts +13 -0
- package/dist/helpers/models.queries.js +79 -0
- package/dist/helpers/observations_server.d.ts +51 -0
- package/dist/helpers/observations_server.js +22 -0
- package/dist/helpers/operating_contexts.js +39 -154
- package/dist/helpers/operating_contexts.queries.d.ts +48 -0
- package/dist/helpers/operating_contexts.queries.js +223 -0
- package/dist/helpers/operators.js +4 -57
- package/dist/helpers/operators.queries.d.ts +7 -0
- package/dist/helpers/operators.queries.js +55 -0
- package/dist/helpers/parts.d.ts +0 -87
- package/dist/helpers/parts.js +1 -89
- package/dist/helpers/parts_server.d.ts +260 -0
- package/dist/helpers/parts_server.js +71 -0
- package/dist/helpers/pins_server.d.ts +118 -0
- package/dist/helpers/pins_server.js +38 -0
- package/dist/helpers/plans.js +4 -56
- package/dist/helpers/plans.queries.d.ts +4 -1
- package/dist/helpers/plans.queries.js +39 -12
- package/dist/helpers/points_for_user_server.d.ts +9 -0
- package/dist/helpers/points_for_user_server.js +14 -0
- package/dist/helpers/product_compatibilities.js +6 -78
- package/dist/helpers/product_compatibilities.queries.d.ts +9 -0
- package/dist/helpers/product_compatibilities.queries.js +83 -0
- package/dist/helpers/product_numbers.js +6 -55
- package/dist/helpers/product_numbers.queries.d.ts +9 -0
- package/dist/helpers/product_numbers.queries.js +58 -0
- package/dist/helpers/products.js +6 -54
- package/dist/helpers/products.queries.d.ts +11 -0
- package/dist/helpers/products.queries.js +58 -0
- package/dist/helpers/providers.js +5 -71
- package/dist/helpers/providers.queries.d.ts +5 -1
- package/dist/helpers/providers.queries.js +52 -11
- package/dist/helpers/pubsub_token_server.d.ts +1 -0
- package/dist/helpers/pubsub_token_server.js +5 -2
- package/dist/helpers/segmentations_sam3.js +5 -78
- package/dist/helpers/segmentations_sam3.queries.d.ts +16 -0
- package/dist/helpers/segmentations_sam3.queries.js +81 -0
- package/dist/helpers/sensor_poses_server.d.ts +98 -0
- package/dist/helpers/sensor_poses_server.js +26 -0
- package/dist/helpers/session_incidents_server.d.ts +106 -0
- package/dist/helpers/session_incidents_server.js +22 -0
- package/dist/helpers/session_summaries.d.ts +2 -0
- package/dist/helpers/session_summaries.js +7 -23
- package/dist/helpers/session_summaries.queries.d.ts +6 -3
- package/dist/helpers/session_summaries.queries.js +27 -0
- package/dist/helpers/sessions.js +8 -122
- package/dist/helpers/sessions.queries.d.ts +14 -2
- package/dist/helpers/sessions.queries.js +88 -1
- package/dist/helpers/storage.js +0 -1
- package/dist/helpers/supabase_auth.d.ts +6 -0
- package/dist/helpers/supabase_auth.js +37 -0
- package/dist/helpers/tags.d.ts +0 -1
- package/dist/helpers/tags.js +13 -559
- package/dist/helpers/tags.queries.d.ts +33 -0
- package/dist/helpers/tags.queries.js +454 -0
- package/dist/helpers/user_credentials_server.d.ts +76 -0
- package/dist/helpers/user_credentials_server.js +22 -0
- package/dist/helpers/users.d.ts +2 -2
- package/dist/helpers/users.js +8 -107
- package/dist/helpers/users.queries.d.ts +9 -1
- package/dist/helpers/users.queries.js +107 -0
- package/dist/helpers/versions_software.d.ts +3 -1
- package/dist/helpers/versions_software.js +24 -0
- package/dist/helpers/versions_software_server.d.ts +83 -4
- package/dist/helpers/versions_software_server.js +23 -50
- package/dist/helpers/zones.d.ts +1 -16
- package/dist/helpers/zones.js +4 -104
- package/dist/helpers/zones.queries.d.ts +6 -0
- package/dist/helpers/zones.queries.js +78 -0
- package/dist/hooks/useAuthorizedRealtimeTopics.js +8 -2
- package/dist/hooks/useInfiniteQuery.js +18 -14
- package/dist/hooks/useScoutRealtimeBroadcast.js +8 -6
- package/dist/hooks/useScoutRealtimeDocuments.js +3 -2
- package/dist/hooks/useScoutRefresh.d.ts +9 -25
- package/dist/hooks/useScoutRefresh.js +33 -213
- package/dist/providers/ScoutRefreshProvider.d.ts +1 -1
- package/dist/providers/ScoutRefreshProvider.js +56 -13
- package/dist/server/index.d.ts +78 -0
- package/dist/server/index.js +80 -0
- package/dist/server/middleware.d.ts +2 -0
- package/dist/server/middleware.js +2 -0
- package/dist/server/supabase.d.ts +2 -0
- package/dist/server/supabase.js +2 -0
- package/dist/store/api.d.ts +40 -40
- package/dist/store/api.js +38 -109
- package/dist/store/configureStore.d.ts +0 -55
- package/dist/store/configureStore.js +1 -8
- package/dist/store/hooks.js +1 -0
- package/dist/supabase/client.d.ts +3 -0
- package/dist/supabase/client.js +10 -0
- package/dist/supabase/middleware.d.ts +1 -0
- package/dist/supabase/middleware.js +6 -20
- package/dist/supabase/server.d.ts +7 -2
- package/dist/supabase/server.js +13 -1
- package/dist/types/db.d.ts +47 -3
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +5 -0
- package/dist/types/supabase.d.ts +512 -0
- package/package.json +53 -4
- package/dist/api_keys/index.d.ts +0 -1
- package/dist/api_keys/index.js +0 -1
- package/dist/helpers/artifacts.internal.d.ts +0 -22
- package/dist/helpers/client_abilities_jwt_keys_internal.d.ts +0 -9
- package/dist/helpers/client_abilities_jwt_keys_internal.js +0 -20
- package/dist/helpers/connectivity.internal.d.ts +0 -10
- package/dist/helpers/connectivity.internal.js +0 -47
- package/dist/helpers/credentials.d.ts +0 -9
- package/dist/helpers/credentials.js +0 -92
- package/dist/helpers/embeddings.internal.d.ts +0 -5
- package/dist/helpers/events.internal.d.ts +0 -13
- package/dist/helpers/herd_roles_internal.d.ts +0 -18
- package/dist/helpers/index.d.ts +0 -56
- package/dist/helpers/index.js +0 -56
- package/dist/helpers/invitations_internal.d.ts +0 -10
- package/dist/helpers/versions_software_internal.d.ts +0 -6
- package/dist/helpers/versions_software_internal.js +0 -53
- package/dist/hooks/useDeviceDisplayName.d.ts +0 -8
- package/dist/hooks/useDeviceDisplayName.js +0 -49
- package/dist/index.d.ts +0 -108
- package/dist/index.js +0 -114
- package/dist/supabase/index.d.ts +0 -2
- package/dist/supabase/index.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { configureStore } from "@reduxjs/toolkit";
|
|
2
3
|
import { setupListeners } from "@reduxjs/toolkit/query";
|
|
3
4
|
import scoutReducer from "./scout";
|
|
4
5
|
import { scoutApi } from "./api";
|
|
5
|
-
// Configure the Redux store
|
|
6
6
|
export const configureScoutStore = () => {
|
|
7
7
|
const store = configureStore({
|
|
8
8
|
reducer: {
|
|
@@ -11,12 +11,10 @@ export const configureScoutStore = () => {
|
|
|
11
11
|
},
|
|
12
12
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
13
13
|
serializableCheck: {
|
|
14
|
-
// Ignore these action types for serializable check
|
|
15
14
|
ignoredActions: [
|
|
16
15
|
"persist/PERSIST",
|
|
17
16
|
"persist/REHYDRATE",
|
|
18
17
|
"persist/REGISTER",
|
|
19
|
-
// RTK Query actions
|
|
20
18
|
"scoutApi/executeQuery/pending",
|
|
21
19
|
"scoutApi/executeQuery/fulfilled",
|
|
22
20
|
"scoutApi/executeQuery/rejected",
|
|
@@ -24,17 +22,12 @@ export const configureScoutStore = () => {
|
|
|
24
22
|
"scoutApi/executeMutation/fulfilled",
|
|
25
23
|
"scoutApi/executeMutation/rejected",
|
|
26
24
|
],
|
|
27
|
-
// Ignore these field paths in all actions
|
|
28
25
|
ignoredActionsPaths: ["meta.arg", "payload.timestamp"],
|
|
29
|
-
// Ignore these paths in the state
|
|
30
26
|
ignoredPaths: ["scoutApi.queries", "scoutApi.mutations"],
|
|
31
27
|
},
|
|
32
28
|
}).concat(scoutApi.middleware),
|
|
33
29
|
devTools: process.env.NODE_ENV !== "production",
|
|
34
30
|
});
|
|
35
|
-
// Enable listener behavior for the store
|
|
36
31
|
setupListeners(store.dispatch);
|
|
37
32
|
return store;
|
|
38
33
|
};
|
|
39
|
-
// Create a default store instance
|
|
40
|
-
export const store = configureScoutStore();
|
package/dist/store/hooks.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createBrowserClient } from "@supabase/ssr";
|
|
3
|
+
export function createScoutBrowserClient() {
|
|
4
|
+
const url = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
|
5
|
+
const anonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
6
|
+
if (!url || !anonKey) {
|
|
7
|
+
throw new Error("Missing required Supabase environment variables");
|
|
8
|
+
}
|
|
9
|
+
return createBrowserClient(url, anonKey);
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import "server-only";
|
|
1
2
|
import { createServerClient } from "@supabase/ssr";
|
|
2
3
|
import { NextResponse } from "next/server";
|
|
3
4
|
export async function updateSession(request, options) {
|
|
4
|
-
// Validate environment variables
|
|
5
5
|
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
|
6
6
|
const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
7
7
|
if (!supabaseUrl || !supabaseAnonKey) {
|
|
@@ -20,37 +20,23 @@ export async function updateSession(request, options) {
|
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
|
-
// IMPORTANT: Avoid writing any logic between createServerClient and
|
|
24
|
-
// supabase.auth.getClaims(). A simple mistake could make it very hard to debug
|
|
25
|
-
// issues with users being randomly logged out.
|
|
26
23
|
const { data: claims, error } = await supabase.auth.getClaims();
|
|
27
|
-
// Check if current path is allowed without authentication
|
|
28
24
|
const isPublicPath = options.allowed_page_paths_without_auth.some((page) => request.nextUrl.pathname.startsWith(page));
|
|
29
25
|
if (isPublicPath) {
|
|
30
26
|
return supabaseResponse;
|
|
31
27
|
}
|
|
32
|
-
// Check authentication requirements
|
|
33
28
|
const hasValidClaims = !error && claims?.claims?.sub;
|
|
34
29
|
const hasValidEmail = claims?.claims?.email &&
|
|
35
30
|
(!options.allowed_email_domains ||
|
|
36
31
|
options.allowed_email_domains.some((domain) => claims.claims.email.endsWith(`@${domain}`)));
|
|
37
32
|
if (!hasValidClaims || (claims?.claims?.email && !hasValidEmail)) {
|
|
38
|
-
// no valid claims - respond by redirecting the user to the login page
|
|
39
33
|
const url = request.nextUrl.clone();
|
|
40
34
|
url.pathname = options.login_page_path;
|
|
41
|
-
|
|
35
|
+
const redirect = NextResponse.redirect(url);
|
|
36
|
+
supabaseResponse.cookies
|
|
37
|
+
.getAll()
|
|
38
|
+
.forEach((cookie) => redirect.cookies.set(cookie));
|
|
39
|
+
return redirect;
|
|
42
40
|
}
|
|
43
|
-
// IMPORTANT: You *must* return the supabaseResponse object as it is. If you're
|
|
44
|
-
// creating a new response object with NextResponse.next() make sure to:
|
|
45
|
-
// 1. Pass the request in it, like so:
|
|
46
|
-
// const myNewResponse = NextResponse.next({ request })
|
|
47
|
-
// 2. Copy over the cookies, like so:
|
|
48
|
-
// myNewResponse.cookies.setAll(supabaseResponse.cookies.getAll())
|
|
49
|
-
// 3. Change the myNewResponse object to fit your needs, but avoid changing
|
|
50
|
-
// the cookies!
|
|
51
|
-
// 4. Finally:
|
|
52
|
-
// return myNewResponse
|
|
53
|
-
// If this is not done, you may be causing the browser and server to go out
|
|
54
|
-
// of sync and terminate the user's session prematurely!
|
|
55
41
|
return supabaseResponse;
|
|
56
42
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "server-only";
|
|
2
|
+
import type { Database } from "../types/supabase";
|
|
3
|
+
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
3
4
|
export interface IServerClientOptions {
|
|
4
5
|
persistSession?: boolean;
|
|
5
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Reuses one read client per RSC request. Cookie writes are opt-in for
|
|
9
|
+
* auth-mutating actions; middleware persists normal session refreshes.
|
|
10
|
+
*/
|
|
6
11
|
export declare function newServerClient(options?: IServerClientOptions): Promise<SupabaseClient<Database>>;
|
package/dist/supabase/server.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import "server-only";
|
|
1
2
|
import { createServerClient } from "@supabase/ssr";
|
|
2
3
|
import { cookies } from "next/headers";
|
|
3
|
-
|
|
4
|
+
import { cache } from "react";
|
|
5
|
+
async function createRequestClient(options) {
|
|
4
6
|
const cookieStore = await cookies();
|
|
5
7
|
return createServerClient(process.env.NEXT_PUBLIC_SUPABASE_URL, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY, {
|
|
6
8
|
cookies: {
|
|
@@ -21,3 +23,13 @@ export async function newServerClient(options = {}) {
|
|
|
21
23
|
},
|
|
22
24
|
});
|
|
23
25
|
}
|
|
26
|
+
const cachedRequestClient = cache(() => createRequestClient({}));
|
|
27
|
+
/**
|
|
28
|
+
* Reuses one read client per RSC request. Cookie writes are opt-in for
|
|
29
|
+
* auth-mutating actions; middleware persists normal session refreshes.
|
|
30
|
+
*/
|
|
31
|
+
export function newServerClient(options = {}) {
|
|
32
|
+
return options.persistSession
|
|
33
|
+
? createRequestClient(options)
|
|
34
|
+
: cachedRequestClient();
|
|
35
|
+
}
|
package/dist/types/db.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SupabaseClient, User } from "@supabase/supabase-js";
|
|
2
|
-
import { Database } from "./supabase";
|
|
1
|
+
import type { SupabaseClient, User } from "@supabase/supabase-js";
|
|
2
|
+
import type { Database } from "./supabase";
|
|
3
3
|
export type ScoutDatabaseClient = SupabaseClient<Database, "public">;
|
|
4
4
|
export type DeviceType = Database["public"]["Enums"]["device_type"];
|
|
5
5
|
export type MediaType = Database["public"]["Enums"]["media_type"];
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -4,7 +4,12 @@ export * from "./ui";
|
|
|
4
4
|
export * from "./requests";
|
|
5
5
|
export * from "./gps";
|
|
6
6
|
export * from "./supabase";
|
|
7
|
+
export * from "./bounding_boxes";
|
|
7
8
|
export * from "./events";
|
|
8
9
|
export * from "./data_source";
|
|
9
10
|
export * from "./connectivity";
|
|
10
11
|
export * from "./historical";
|
|
12
|
+
export * from "./realtime";
|
|
13
|
+
export * from "./pubsub_token";
|
|
14
|
+
export * from "./client_abilities_token";
|
|
15
|
+
export * from "./jwt_mint";
|
package/dist/types/index.js
CHANGED
|
@@ -4,7 +4,12 @@ export * from "./ui";
|
|
|
4
4
|
export * from "./requests";
|
|
5
5
|
export * from "./gps";
|
|
6
6
|
export * from "./supabase";
|
|
7
|
+
export * from "./bounding_boxes";
|
|
7
8
|
export * from "./events";
|
|
8
9
|
export * from "./data_source";
|
|
9
10
|
export * from "./connectivity";
|
|
10
11
|
export * from "./historical";
|
|
12
|
+
export * from "./realtime";
|
|
13
|
+
export * from "./pubsub_token";
|
|
14
|
+
export * from "./client_abilities_token";
|
|
15
|
+
export * from "./jwt_mint";
|