-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into access-request-seed
- Loading branch information
Showing
243 changed files
with
10,079 additions
and
9,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ on: | |
branches: | ||
- dev | ||
- test | ||
- test-spi | ||
- prod | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
/** | ||
* The type of project/survey attachment files. | ||
* | ||
* @export | ||
* @enum {number} | ||
*/ | ||
export enum ATTACHMENT_TYPE { | ||
REPORT = 'Report', | ||
KEYX = 'KeyX', | ||
OTHER = 'Other' | ||
} | ||
|
||
/** | ||
* The type of survey telemetry credential attachment files. | ||
* | ||
* @export | ||
* @enum {number} | ||
*/ | ||
export enum TELEMETRY_CREDENTIAL_ATTACHMENT_TYPE { | ||
/** | ||
* Lotek API key file type. | ||
*/ | ||
KEYX = 'KeyX', | ||
/** | ||
* Vectronic API key file type. | ||
*/ | ||
CFG = 'Cfg' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import { z } from 'zod'; | ||
|
||
export const BctwDeployDevice = z.object({ | ||
device_id: z.number(), | ||
frequency: z.number().optional(), | ||
frequency_unit: z.string().optional(), | ||
device_make: z.string().optional(), | ||
device_model: z.string().optional(), | ||
attachment_start: z.string(), | ||
attachment_end: z.string().nullable(), | ||
critter_id: z.string(), | ||
critterbase_start_capture_id: z.string().uuid(), | ||
critterbase_end_capture_id: z.string().uuid().nullable(), | ||
critterbase_end_mortality_id: z.string().uuid().nullable() | ||
}); | ||
|
||
export type BctwDeployDevice = z.infer<typeof BctwDeployDevice>; | ||
|
||
export type BctwDevice = Omit<BctwDeployDevice, 'attachment_start' | 'attachment_end' | 'critter_id'> & { | ||
collar_id: string; | ||
}; | ||
|
||
export const BctwDeploymentUpdate = z.object({ | ||
deployment_id: z.string(), | ||
attachment_start: z.string(), | ||
attachment_end: z.string() | ||
}); | ||
|
||
export type BctwDeploymentUpdate = z.infer<typeof BctwDeploymentUpdate>; | ||
|
||
export const BctwUploadKeyxResponse = z.object({ | ||
errors: z.array( | ||
z.object({ | ||
row: z.string(), | ||
error: z.string(), | ||
rownum: z.number() | ||
}) | ||
), | ||
results: z.array( | ||
z.object({ | ||
idcollar: z.number(), | ||
comtype: z.string(), | ||
idcom: z.string(), | ||
collarkey: z.string(), | ||
collartype: z.number(), | ||
dtlast_fetch: z.string().nullable() | ||
}) | ||
) | ||
}); | ||
|
||
export type BctwUploadKeyxResponse = z.infer<typeof BctwUploadKeyxResponse>; | ||
|
||
export const BctwKeyXDetails = z.object({ | ||
device_id: z.number(), | ||
keyx: z | ||
.object({ | ||
idcom: z.string(), | ||
comtype: z.string(), | ||
idcollar: z.number(), | ||
collarkey: z.string(), | ||
collartype: z.number() | ||
}) | ||
.nullable() | ||
}); | ||
|
||
export type BctwKeyXDetails = z.infer<typeof BctwKeyXDetails>; | ||
|
||
export const IManualTelemetry = z.object({ | ||
telemetry_manual_id: z.string().uuid(), | ||
deployment_id: z.string().uuid(), | ||
latitude: z.number(), | ||
longitude: z.number(), | ||
date: z.string() | ||
}); | ||
|
||
export type IManualTelemetry = z.infer<typeof IManualTelemetry>; | ||
|
||
export const BctwUser = z.object({ | ||
keycloak_guid: z.string(), | ||
username: z.string() | ||
}); | ||
|
||
export interface ICodeResponse { | ||
code_header_title: string; | ||
code_header_name: string; | ||
id: number; | ||
code: string; | ||
description: string; | ||
long_description: string; | ||
} | ||
|
||
export type BctwUser = z.infer<typeof BctwUser>; | ||
|
||
export interface ICreateManualTelemetry { | ||
deployment_id: string; | ||
latitude: number; | ||
longitude: number; | ||
acquisition_date: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { z } from 'zod'; | ||
|
||
export const SurveyDeployment = z.object({ | ||
deployment_id: z.number().int(), | ||
critter_id: z.number(), | ||
critterbase_critter_id: z.string().optional(), | ||
bctw_deployment_id: z.string().uuid(), | ||
critterbase_start_capture_id: z.string().uuid().nullable(), | ||
critterbase_end_capture_id: z.string().uuid().nullable(), | ||
critterbase_end_mortality_id: z.string().uuid().nullable() | ||
}); | ||
|
||
export type SurveyDeployment = z.infer<typeof SurveyDeployment>; | ||
|
||
export interface ICreateSurveyDeployment extends Omit<SurveyDeployment, 'deployment_id' | 'critterbase_critter_id'> {} | ||
|
||
export interface IUpdateSurveyDeployment | ||
extends Omit<SurveyDeployment, 'bctw_deployment_id' | 'critterbase_critter_id'> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.