@persei/perseed-api 4.34.5 → 4.34.6

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.
@@ -1,97 +0,0 @@
1
- type ModelName = string;
2
- export declare enum ApiAction {
3
- QUESTIONNAIRE_CREATE = "questionnaire.create",
4
- CRF_CREATE = "crf.create",
5
- CRF_UPDATE = "crf.update",
6
- CRF_DELETE = "crf.delete",
7
- EXTERNAL_API_CALL = "external_api_call"
8
- }
9
- export type NotifiedAboutType = `model_${ModelName}` | `model_displayer_${ModelName}` | `model_${ModelName}_${TriggerAction}` | `model_displayer_${ModelName}_${TriggerAction}`;
10
- export interface CreateTriggerPayload {
11
- notified_about: NotifiedAboutType;
12
- text_content?: string;
13
- configuration?: NotificationConfigurationConf;
14
- }
15
- export type UpdateTriggerPayload = Partial<CreateTriggerPayload>;
16
- export interface ConditionExpression {
17
- [field: string]: ConditionValue;
18
- }
19
- export interface ConditionOperator {
20
- AND?: Conditions[];
21
- OR?: Conditions[];
22
- NOT?: Conditions[];
23
- JQ?: string;
24
- }
25
- export type Conditions = ConditionExpression | ConditionOperator;
26
- export interface ConditionValue {
27
- equal?: string | number | boolean;
28
- not_equal?: string | number | boolean;
29
- contains?: string;
30
- not_contains?: string;
31
- greater_than?: string | number;
32
- less_than?: string | number;
33
- empty?: string | number | boolean;
34
- not_empty?: string | number | boolean;
35
- parseValue?: boolean;
36
- operator?: 'AND' | 'OR';
37
- }
38
- interface LoadPatientDataType {
39
- join?: string[];
40
- where: Record<string, string> | 'auto';
41
- }
42
- export declare enum ConditionsFormat {
43
- JSON_LOGIC = "jsonLogic",
44
- CUSTOM = "custom"
45
- }
46
- /**
47
- * Importing the types from json-logic-js makes the process of generating schema.json fails so we use any instead
48
- */
49
- export type ConditionsRules = Conditions | any;
50
- export interface NotificationConfigurationConf {
51
- conditions?: ConditionsRules;
52
- join?: string[];
53
- load_patient?: LoadPatientDataType;
54
- action?: ApiAction;
55
- conditionsFormat?: ConditionsFormat;
56
- }
57
- export declare enum TriggerAction {
58
- CREATION = "creation",
59
- UPDATE = "update"
60
- }
61
- export declare enum IntrospectionSchemaType {
62
- TEXT = "text",
63
- DATE = "date",
64
- TIME = "time",
65
- BOOLEAN = "boolean",
66
- NUMBER = "number",
67
- SELECT = "select",
68
- MULTISELECT = "multiselect"
69
- }
70
- export interface IntrospectionField {
71
- name: string;
72
- type: IntrospectionSchemaType;
73
- options?: {
74
- value: string;
75
- title: string;
76
- }[];
77
- label: string;
78
- }
79
- export interface IntrospectionOption {
80
- value: string;
81
- label: string;
82
- }
83
- export interface IntrospectionSchemaModel {
84
- label: string;
85
- fields: IntrospectionField[];
86
- relations?: IntrospectionOption[];
87
- canJoinPatient?: boolean;
88
- }
89
- export interface IntrospectionSchema {
90
- models: Record<string, IntrospectionSchemaModel>;
91
- externalApis?: {
92
- value: string;
93
- label: string;
94
- methods?: string | string[];
95
- }[];
96
- }
97
- export {};
@@ -1 +0,0 @@
1
- export * from './types';
@@ -1,34 +0,0 @@
1
- /**
2
- * Any changes here may need changes in Caaring-js packages/perseed-api-client/src/PerseedApiClient.ts
3
- */
4
- export type OrderDir = 'asc' | 'desc';
5
- export type AggFunction = 'avg' | 'count' | 'max' | 'min' | 'sum';
6
- export type OutcomesDateFields = 'from' | 'to';
7
- export type OutcomesDateFunctions = 'date' | 'day' | 'dayname' | 'dayofmonth' | 'dayofweek' | 'dayofyear' | 'hour' | 'minute' | 'month' | 'monthname' | 'time' | 'second' | 'week' | 'weekday' | 'weekofyear' | 'year' | 'yearweek';
8
- export type OutcomeDateField = `${OutcomesDateFields}.${OutcomesDateFunctions}`;
9
- export type OutcomesGroupBy = 'name' | 'identifier' | 'value' | OutcomesDateFields | OutcomeDateField;
10
- export interface OutcomeDateGroup {
11
- [dateGroup: string]: string;
12
- }
13
- export type Outcome = OutcomeDateGroup & {
14
- name: string;
15
- identifier: string;
16
- from: string;
17
- to: string;
18
- value: number;
19
- };
20
- export interface OutcomesParams {
21
- ecosystem: string;
22
- projectName: string;
23
- clinicId?: number;
24
- name: string | string[];
25
- identifier?: string | string[];
26
- from?: string;
27
- to?: string;
28
- datesContained?: boolean;
29
- aggType?: AggFunction;
30
- groupBy?: OutcomesGroupBy | OutcomesGroupBy[];
31
- limit?: number;
32
- orderBy?: string;
33
- orderDir?: OrderDir;
34
- }
@@ -1 +0,0 @@
1
- export * from './types';
@@ -1,7 +0,0 @@
1
- export interface CreateQuestionnairePayload {
2
- patientId?: number;
3
- type: 'unique' | 'periodic';
4
- date: string;
5
- untilDate?: string;
6
- formName: string;
7
- }
@@ -1 +0,0 @@
1
- export * from './types';
@@ -1,5 +0,0 @@
1
- /**
2
- * App font factor
3
- */
4
- export type AppFontFactor = number;
5
- export type GenericBooleanSetting = boolean;