@persei/perseed-api 4.34.3 → 4.34.5

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,23 +1,142 @@
1
- const n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2
- __proto__: null
3
- }, Symbol.toStringTag, { value: "Module" })), c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
- __proto__: null
5
- }, Symbol.toStringTag, { value: "Module" }));
6
- var a = /* @__PURE__ */ ((e) => (e.OUTCOMES = "outcomes", e))(a || {}), o = /* @__PURE__ */ ((e) => (e.VALUECARD = "ValueCard", e.SECTIONCARD = "SectionCard", e.PATIENTLIST = "PatientList", e))(o || {});
7
- const m = {
8
- data_loaders: n,
9
- widgets: c
10
- }, i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11
- __proto__: null,
12
- DashboardWidgetType: o,
13
- DataLoaderType: a,
14
- default: m
15
- }, Symbol.toStringTag, { value: "Module" })), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16
- __proto__: null
17
- }, Symbol.toStringTag, { value: "Module" }));
18
- var s = /* @__PURE__ */ ((e) => (e.QUESTIONNAIRE_CREATE = "questionnaire.create", e.CRF_CREATE = "crf.create", e.CRF_UPDATE = "crf.update", e.CRF_DELETE = "crf.delete", e))(s || {}), r = /* @__PURE__ */ ((e) => (e.JSON_LOGIC = "jsonLogic", e.CUSTOM = "custom", e))(r || {}), l = /* @__PURE__ */ ((e) => (e.CREATION = "creation", e.UPDATE = "update", e))(l || {}), t = /* @__PURE__ */ ((e) => (e.TEXT = "text", e.DATE = "date", e.TIME = "time", e.BOOLEAN = "boolean", e.NUMBER = "number", e.SELECT = "select", e.MULTISELECT = "multiselect", e))(t || {});
19
- function u(e) {
20
- return {
1
+ var c = /* @__PURE__ */ ((e) => (e.OUTCOMES = "outcomes", e))(c || {}), p = /* @__PURE__ */ ((e) => (e.VALUECARD = "ValueCard", e.SECTIONCARD = "SectionCard", e.PATIENTLIST = "PatientList", e))(p || {}), i = /* @__PURE__ */ ((e) => (e.QUESTIONNAIRE_CREATE = "questionnaire.create", e.CRF_CREATE = "crf.create", e.CRF_UPDATE = "crf.update", e.CRF_DELETE = "crf.delete", e.EXTERNAL_API_CALL = "external_api_call", e))(i || {}), d = /* @__PURE__ */ ((e) => (e.JSON_LOGIC = "jsonLogic", e.CUSTOM = "custom", e))(d || {}), m = /* @__PURE__ */ ((e) => (e.CREATION = "creation", e.UPDATE = "update", e))(m || {}), s = /* @__PURE__ */ ((e) => (e.TEXT = "text", e.DATE = "date", e.TIME = "time", e.BOOLEAN = "boolean", e.NUMBER = "number", e.SELECT = "select", e.MULTISELECT = "multiselect", e))(s || {});
2
+ const u = {}, E = {}, h = {}, T = {}, _ = {
3
+ hostName: "mysql",
4
+ ecosystem: {
5
+ demo: {
6
+ userLogin: {
7
+ username: "admin",
8
+ password: "Sebas3210",
9
+ deviceId: "abc123",
10
+ api: !0
11
+ }
12
+ },
13
+ reseaarch: {
14
+ userLogin: {
15
+ username: "testapi2",
16
+ password: "123456",
17
+ deviceId: "abc123",
18
+ api: !0
19
+ }
20
+ },
21
+ caaring: {
22
+ userLogin: {
23
+ username: "root",
24
+ password: "pass4mike",
25
+ deviceId: "abc123",
26
+ api: !0
27
+ }
28
+ },
29
+ ecoapi: {
30
+ userLogin: {
31
+ username: "root",
32
+ password: "123456",
33
+ deviceId: "abc123",
34
+ api: !0
35
+ }
36
+ },
37
+ clinicaal: {},
38
+ clitinerary: {}
39
+ },
40
+ global: {
41
+ dbCredentials: {
42
+ username: "root",
43
+ password: "root",
44
+ database: "perseed"
45
+ }
46
+ },
47
+ rabbitOptions: {
48
+ protocol: "amqp",
49
+ hostname: "localhost",
50
+ port: 5672,
51
+ username: "perseedweb00-dev",
52
+ password: "Z8rLHAkw",
53
+ locale: "en_US",
54
+ frameMax: 0,
55
+ heartbeat: 0,
56
+ vhost: "/"
57
+ },
58
+ AWS: {
59
+ accessKeyId: "AKIA4Z2DUBRURKXKII5S",
60
+ secretAccessKey: "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",
61
+ apiVersion: "latest",
62
+ tmpPath: "tmp/",
63
+ bucket: {
64
+ name: "testing.perseed-files-eu",
65
+ region: "eu-central-1"
66
+ },
67
+ cloudFront: {
68
+ keypairId: "K1BWQQVLE4YU4F",
69
+ privateKeyPath: "/var/www/perseed_api/config/private_key.pem",
70
+ assetsUrl: "https://test.assets.perseed.eu"
71
+ }
72
+ },
73
+ SMS: {
74
+ apiKey: "4|XildLvmjqzABeekAgj9EaLiwpxdGMWgassPaxewu",
75
+ defaultSender: "Caaring"
76
+ },
77
+ perseedAPI: {
78
+ caaring: {
79
+ username: "ecoadmin",
80
+ password: "1CarefulWithPersonalInfo2@",
81
+ deviceId: "ecoadmin@api"
82
+ },
83
+ clinicaal: {
84
+ username: "perseedapiCLI",
85
+ password: "Ukz4s7LL&Ne3KA#",
86
+ deviceId: "ecoadmin@api"
87
+ },
88
+ onqos: {
89
+ username: "perseedapiCLI",
90
+ password: "Ukz4s7LL&Ne3KA#",
91
+ deviceId: "ecoadmin@api"
92
+ },
93
+ demo: {
94
+ username: "admin",
95
+ password: "Sebas3210",
96
+ deviceId: "admin@api"
97
+ },
98
+ reseaarch: {
99
+ username: "ecoadmin",
100
+ password: "1CarefulWithPersonalInfo2@",
101
+ deviceId: "ecoadmin@api"
102
+ },
103
+ testrcr: {
104
+ username: "ecoadmin",
105
+ password: "1CarefulWithPersonalInfo2",
106
+ deviceId: "ecoadmin@api"
107
+ }
108
+ }
109
+ }, b = {}, o = {};
110
+ let n;
111
+ o.existsSync("./credentials/local.json") && (n = JSON.parse(o.readFileSync("./credentials/local.json").toString()));
112
+ const v = {
113
+ local: n || u,
114
+ local_tmp: E,
115
+ test: _,
116
+ testing: b,
117
+ preproduction: h,
118
+ production: T
119
+ };
120
+ function L(e) {
121
+ return e.replace(/\/$/, "");
122
+ }
123
+ const y = process.env.NODE_ENV || "local";
124
+ process.env.PROXY_FILES;
125
+ L(process.env.API_BASE_URL || "https://api.perseed.eu");
126
+ process.env.JWT_SECRET;
127
+ process.env.REFRESH_JWT_SECRET;
128
+ process.env.JWT_ISSUERS;
129
+ process.env.FULL_LOG;
130
+ (process.env.CSP_FRAME_ANCESTORS || "https://tmp.perseed.eu,https://tmp.api.perseed.eu,https://perseed.eu,https://api.perseed.eu,https://perseed.test,https://app.caaring.com,https://app.clinicaal.com,https://app.onqos.com,https://app.reseaarch.com,https://app.clitinerary.com").split(",");
131
+ process.env.ZERO_DATES_SUPPORT;
132
+ process.env.DEBUG_ERRORS ? process.env.DEBUG_ERRORS : process.env.NODE_ENV;
133
+ process.env.DEFAULT_TZ;
134
+ process.env.SENTRY_DSN;
135
+ parseInt(process.env.JOB_RETRIES ?? "5");
136
+ process.env.BODY_SIZE_LIMIT;
137
+ const O = v[y], a = O.externalApis;
138
+ function w(e) {
139
+ const r = {
21
140
  models: {
22
141
  user: {
23
142
  label: e("introspection-schema.models.user.label", "User"),
@@ -26,152 +145,140 @@ function u(e) {
26
145
  fields: [
27
146
  {
28
147
  name: "username",
29
- type: t.TEXT,
148
+ type: s.TEXT,
30
149
  label: e("introspection-schema.models.user.username", "Username")
31
150
  },
32
151
  {
33
152
  name: "created_user",
34
- type: t.TEXT,
153
+ type: s.TEXT,
35
154
  label: e("introspection-schema.models.user.created_user", "Created user")
36
155
  },
37
156
  {
38
157
  name: "created_mode",
39
- type: t.TEXT,
158
+ type: s.TEXT,
40
159
  label: e("introspection-schema.models.user.created_mode", "Created mode")
41
160
  },
42
161
  {
43
162
  name: "mod_user",
44
- type: t.NUMBER,
163
+ type: s.NUMBER,
45
164
  label: e("introspection-schema.models.user.mod_user", "User modified")
46
165
  },
47
166
  {
48
167
  name: "mod_time",
49
- type: t.DATE,
168
+ type: s.DATE,
50
169
  label: e("introspection-schema.models.user.time", "Update date")
51
170
  },
52
171
  {
53
172
  name: "email",
54
- type: t.TEXT,
173
+ type: s.TEXT,
55
174
  label: e("introspection-schema.models.user.email", "Email")
56
175
  },
57
176
  {
58
177
  name: "password",
59
- type: t.TEXT,
178
+ type: s.TEXT,
60
179
  label: e("introspection-schema.models.user.password", "Password")
61
180
  },
62
181
  {
63
182
  name: "displayName",
64
- type: t.TEXT,
183
+ type: s.TEXT,
65
184
  label: e("introspection-schema.models.user.display-name", "Display name")
66
185
  },
67
186
  {
68
187
  name: "blocked",
69
- type: t.BOOLEAN,
188
+ type: s.BOOLEAN,
70
189
  label: e("introspection-schema.models.user.blocked", "Blocked")
71
190
  },
72
191
  {
73
192
  name: "timestamp",
74
- type: t.DATE,
193
+ type: s.DATE,
75
194
  label: e("introspection-schema.models.user.timestamp", "Creation date")
76
195
  },
77
196
  {
78
197
  name: "state",
79
- type: t.BOOLEAN,
198
+ type: s.BOOLEAN,
80
199
  label: e("introspection-schema.models.user.state", "State")
81
200
  },
82
201
  {
83
202
  name: "newRegister",
84
- type: t.BOOLEAN,
203
+ type: s.BOOLEAN,
85
204
  label: e("introspection-schema.models.user.new-register", "New register")
86
205
  },
87
206
  {
88
207
  name: "password_changed_date",
89
- type: t.DATE,
208
+ type: s.DATE,
90
209
  label: e("introspection-schema.models.user.password-changed-date", "Password changed date")
91
210
  },
92
211
  {
93
212
  name: "token",
94
- type: t.TEXT,
213
+ type: s.TEXT,
95
214
  label: e("introspection-schema.models.user.token", "Token")
96
215
  },
97
216
  {
98
217
  name: "type",
99
- type: t.TEXT,
218
+ type: s.TEXT,
100
219
  label: e("introspection-schema.models.user.type", "Type")
101
220
  },
102
221
  {
103
222
  name: "expiry_date",
104
- type: t.DATE,
223
+ type: s.DATE,
105
224
  label: e("introspection-schema.models.user.expiry-date", "Expiry date")
106
225
  },
107
226
  {
108
227
  name: "allow_upload",
109
- type: t.BOOLEAN,
228
+ type: s.BOOLEAN,
110
229
  label: e("introspection-schema.models.user.allow-upload", "Allow upload")
111
230
  },
112
231
  {
113
232
  name: "allow_change_color",
114
- type: t.BOOLEAN,
233
+ type: s.BOOLEAN,
115
234
  label: e("introspection-schema.models.user.allow-change-color", "Allow change color")
116
235
  },
117
236
  {
118
237
  name: "clinic_request",
119
- type: t.BOOLEAN,
238
+ type: s.BOOLEAN,
120
239
  label: e("introspection-schema.models.user.clinic-request", "Clinic request")
121
240
  },
122
241
  {
123
242
  name: "favourite",
124
- type: t.BOOLEAN,
243
+ type: s.BOOLEAN,
125
244
  label: e("introspection-schema.models.user.favourite", "Favourite")
126
245
  },
127
246
  {
128
247
  name: "last_access",
129
- type: t.DATE,
248
+ type: s.DATE,
130
249
  label: e("introspection-schema.models.user.last-access", "Last access")
131
250
  },
132
251
  {
133
252
  name: "temporary_password",
134
- type: t.TEXT,
253
+ type: s.TEXT,
135
254
  label: e("introspection-schema.models.user.temporary-password", "Temporary password")
136
255
  },
137
256
  {
138
257
  name: "currentFailedCount",
139
- type: t.NUMBER,
258
+ type: s.NUMBER,
140
259
  label: e("introspection-schema.models.user.current-failed-count", "Current failed count")
141
260
  },
142
261
  {
143
262
  name: "tokenDate",
144
- type: t.DATE,
263
+ type: s.DATE,
145
264
  label: e("introspection-schema.models.user.token-date", "Token date")
146
265
  }
147
266
  ]
148
267
  }
149
268
  }
150
269
  };
270
+ return a && Object.keys(a).length && (r.externalApis = Object.entries(a).map(([l, t]) => ({
271
+ value: l,
272
+ label: t.label,
273
+ methods: t.method
274
+ }))), r;
151
275
  }
152
- const p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
153
- __proto__: null,
154
- ApiAction: s,
155
- ConditionsFormat: r,
156
- IntrospectionSchemaType: t,
157
- TriggerAction: l,
158
- getIntrospectionSchema: u
159
- }, Symbol.toStringTag, { value: "Module" })), _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
160
- __proto__: null
161
- }, Symbol.toStringTag, { value: "Module" })), b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
162
- __proto__: null
163
- }, Symbol.toStringTag, { value: "Module" })), E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
164
- __proto__: null
165
- }, Symbol.toStringTag, { value: "Module" })), T = {
166
- dashboard: i,
167
- authentication_security: d,
168
- notification_configuration: p,
169
- outcomes: _,
170
- questionnaire: b,
171
- user_settings: E
172
- }, y = {
173
- schemas: T
174
- };
175
276
  export {
176
- y as default
277
+ i as ApiAction,
278
+ d as ConditionsFormat,
279
+ p as DashboardWidgetType,
280
+ c as DataLoaderType,
281
+ s as IntrospectionSchemaType,
282
+ m as TriggerAction,
283
+ w as getIntrospectionSchema
177
284
  };
@@ -1 +1 @@
1
- (function(o,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(o=typeof globalThis<"u"?globalThis:o||self,o["perseed-api"]=a())})(this,function(){"use strict";const o=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),a=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var s=(e=>(e.OUTCOMES="outcomes",e))(s||{}),r=(e=>(e.VALUECARD="ValueCard",e.SECTIONCARD="SectionCard",e.PATIENTLIST="PatientList",e))(r||{});const c=Object.freeze(Object.defineProperty({__proto__:null,DashboardWidgetType:r,DataLoaderType:s,default:{data_loaders:o,widgets:a}},Symbol.toStringTag,{value:"Module"})),d=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var n=(e=>(e.QUESTIONNAIRE_CREATE="questionnaire.create",e.CRF_CREATE="crf.create",e.CRF_UPDATE="crf.update",e.CRF_DELETE="crf.delete",e))(n||{}),l=(e=>(e.JSON_LOGIC="jsonLogic",e.CUSTOM="custom",e))(l||{}),i=(e=>(e.CREATION="creation",e.UPDATE="update",e))(i||{}),t=(e=>(e.TEXT="text",e.DATE="date",e.TIME="time",e.BOOLEAN="boolean",e.NUMBER="number",e.SELECT="select",e.MULTISELECT="multiselect",e))(t||{});function m(e){return{models:{user:{label:e("introspection-schema.models.user.label","User"),relations:[],canJoinPatient:!0,fields:[{name:"username",type:t.TEXT,label:e("introspection-schema.models.user.username","Username")},{name:"created_user",type:t.TEXT,label:e("introspection-schema.models.user.created_user","Created user")},{name:"created_mode",type:t.TEXT,label:e("introspection-schema.models.user.created_mode","Created mode")},{name:"mod_user",type:t.NUMBER,label:e("introspection-schema.models.user.mod_user","User modified")},{name:"mod_time",type:t.DATE,label:e("introspection-schema.models.user.time","Update date")},{name:"email",type:t.TEXT,label:e("introspection-schema.models.user.email","Email")},{name:"password",type:t.TEXT,label:e("introspection-schema.models.user.password","Password")},{name:"displayName",type:t.TEXT,label:e("introspection-schema.models.user.display-name","Display name")},{name:"blocked",type:t.BOOLEAN,label:e("introspection-schema.models.user.blocked","Blocked")},{name:"timestamp",type:t.DATE,label:e("introspection-schema.models.user.timestamp","Creation date")},{name:"state",type:t.BOOLEAN,label:e("introspection-schema.models.user.state","State")},{name:"newRegister",type:t.BOOLEAN,label:e("introspection-schema.models.user.new-register","New register")},{name:"password_changed_date",type:t.DATE,label:e("introspection-schema.models.user.password-changed-date","Password changed date")},{name:"token",type:t.TEXT,label:e("introspection-schema.models.user.token","Token")},{name:"type",type:t.TEXT,label:e("introspection-schema.models.user.type","Type")},{name:"expiry_date",type:t.DATE,label:e("introspection-schema.models.user.expiry-date","Expiry date")},{name:"allow_upload",type:t.BOOLEAN,label:e("introspection-schema.models.user.allow-upload","Allow upload")},{name:"allow_change_color",type:t.BOOLEAN,label:e("introspection-schema.models.user.allow-change-color","Allow change color")},{name:"clinic_request",type:t.BOOLEAN,label:e("introspection-schema.models.user.clinic-request","Clinic request")},{name:"favourite",type:t.BOOLEAN,label:e("introspection-schema.models.user.favourite","Favourite")},{name:"last_access",type:t.DATE,label:e("introspection-schema.models.user.last-access","Last access")},{name:"temporary_password",type:t.TEXT,label:e("introspection-schema.models.user.temporary-password","Temporary password")},{name:"currentFailedCount",type:t.NUMBER,label:e("introspection-schema.models.user.current-failed-count","Current failed count")},{name:"tokenDate",type:t.DATE,label:e("introspection-schema.models.user.token-date","Token date")}]}}}}return{schemas:{dashboard:c,authentication_security:d,notification_configuration:Object.freeze(Object.defineProperty({__proto__:null,ApiAction:n,ConditionsFormat:l,IntrospectionSchemaType:t,TriggerAction:i,getIntrospectionSchema:m},Symbol.toStringTag,{value:"Module"})),outcomes:Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),questionnaire:Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),user_settings:Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))}}});
1
+ (function(a,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(a=typeof globalThis<"u"?globalThis:a||self,r(a["perseed-api"]={}))})(this,function(a){"use strict";var r=(e=>(e.OUTCOMES="outcomes",e))(r||{}),o=(e=>(e.VALUECARD="ValueCard",e.SECTIONCARD="SectionCard",e.PATIENTLIST="PatientList",e))(o||{}),n=(e=>(e.QUESTIONNAIRE_CREATE="questionnaire.create",e.CRF_CREATE="crf.create",e.CRF_UPDATE="crf.update",e.CRF_DELETE="crf.delete",e.EXTERNAL_API_CALL="external_api_call",e))(n||{}),i=(e=>(e.JSON_LOGIC="jsonLogic",e.CUSTOM="custom",e))(i||{}),l=(e=>(e.CREATION="creation",e.UPDATE="update",e))(l||{}),s=(e=>(e.TEXT="text",e.DATE="date",e.TIME="time",e.BOOLEAN="boolean",e.NUMBER="number",e.SELECT="select",e.MULTISELECT="multiselect",e))(s||{});const u={},E={},h={},T={},b={hostName:"mysql",ecosystem:{demo:{userLogin:{username:"admin",password:"Sebas3210",deviceId:"abc123",api:!0}},reseaarch:{userLogin:{username:"testapi2",password:"123456",deviceId:"abc123",api:!0}},caaring:{userLogin:{username:"root",password:"pass4mike",deviceId:"abc123",api:!0}},ecoapi:{userLogin:{username:"root",password:"123456",deviceId:"abc123",api:!0}},clinicaal:{},clitinerary:{}},global:{dbCredentials:{username:"root",password:"root",database:"perseed"}},rabbitOptions:{protocol:"amqp",hostname:"localhost",port:5672,username:"perseedweb00-dev",password:"Z8rLHAkw",locale:"en_US",frameMax:0,heartbeat:0,vhost:"/"},AWS:{accessKeyId:"AKIA4Z2DUBRURKXKII5S",secretAccessKey:"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",apiVersion:"latest",tmpPath:"tmp/",bucket:{name:"testing.perseed-files-eu",region:"eu-central-1"},cloudFront:{keypairId:"K1BWQQVLE4YU4F",privateKeyPath:"/var/www/perseed_api/config/private_key.pem",assetsUrl:"https://test.assets.perseed.eu"}},SMS:{apiKey:"4|XildLvmjqzABeekAgj9EaLiwpxdGMWgassPaxewu",defaultSender:"Caaring"},perseedAPI:{caaring:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2@",deviceId:"ecoadmin@api"},clinicaal:{username:"perseedapiCLI",password:"Ukz4s7LL&Ne3KA#",deviceId:"ecoadmin@api"},onqos:{username:"perseedapiCLI",password:"Ukz4s7LL&Ne3KA#",deviceId:"ecoadmin@api"},demo:{username:"admin",password:"Sebas3210",deviceId:"admin@api"},reseaarch:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2@",deviceId:"ecoadmin@api"},testrcr:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2",deviceId:"ecoadmin@api"}}},_={},c={};let p;c.existsSync("./credentials/local.json")&&(p=JSON.parse(c.readFileSync("./credentials/local.json").toString()));const y={local:p||u,local_tmp:E,test:b,testing:_,preproduction:h,production:T};function v(e){return e.replace(/\/$/,"")}const L=process.env.NODE_ENV||"local";process.env.PROXY_FILES,v(process.env.API_BASE_URL||"https://api.perseed.eu"),process.env.JWT_SECRET,process.env.REFRESH_JWT_SECRET,process.env.JWT_ISSUERS,process.env.FULL_LOG,(process.env.CSP_FRAME_ANCESTORS||"https://tmp.perseed.eu,https://tmp.api.perseed.eu,https://perseed.eu,https://api.perseed.eu,https://perseed.test,https://app.caaring.com,https://app.clinicaal.com,https://app.onqos.com,https://app.reseaarch.com,https://app.clitinerary.com").split(","),process.env.ZERO_DATES_SUPPORT,process.env.DEBUG_ERRORS?process.env.DEBUG_ERRORS:process.env.NODE_ENV,process.env.DEFAULT_TZ,process.env.SENTRY_DSN,parseInt(process.env.JOB_RETRIES??"5"),process.env.BODY_SIZE_LIMIT;const t=y[L].externalApis;function A(e){const d={models:{user:{label:e("introspection-schema.models.user.label","User"),relations:[],canJoinPatient:!0,fields:[{name:"username",type:s.TEXT,label:e("introspection-schema.models.user.username","Username")},{name:"created_user",type:s.TEXT,label:e("introspection-schema.models.user.created_user","Created user")},{name:"created_mode",type:s.TEXT,label:e("introspection-schema.models.user.created_mode","Created mode")},{name:"mod_user",type:s.NUMBER,label:e("introspection-schema.models.user.mod_user","User modified")},{name:"mod_time",type:s.DATE,label:e("introspection-schema.models.user.time","Update date")},{name:"email",type:s.TEXT,label:e("introspection-schema.models.user.email","Email")},{name:"password",type:s.TEXT,label:e("introspection-schema.models.user.password","Password")},{name:"displayName",type:s.TEXT,label:e("introspection-schema.models.user.display-name","Display name")},{name:"blocked",type:s.BOOLEAN,label:e("introspection-schema.models.user.blocked","Blocked")},{name:"timestamp",type:s.DATE,label:e("introspection-schema.models.user.timestamp","Creation date")},{name:"state",type:s.BOOLEAN,label:e("introspection-schema.models.user.state","State")},{name:"newRegister",type:s.BOOLEAN,label:e("introspection-schema.models.user.new-register","New register")},{name:"password_changed_date",type:s.DATE,label:e("introspection-schema.models.user.password-changed-date","Password changed date")},{name:"token",type:s.TEXT,label:e("introspection-schema.models.user.token","Token")},{name:"type",type:s.TEXT,label:e("introspection-schema.models.user.type","Type")},{name:"expiry_date",type:s.DATE,label:e("introspection-schema.models.user.expiry-date","Expiry date")},{name:"allow_upload",type:s.BOOLEAN,label:e("introspection-schema.models.user.allow-upload","Allow upload")},{name:"allow_change_color",type:s.BOOLEAN,label:e("introspection-schema.models.user.allow-change-color","Allow change color")},{name:"clinic_request",type:s.BOOLEAN,label:e("introspection-schema.models.user.clinic-request","Clinic request")},{name:"favourite",type:s.BOOLEAN,label:e("introspection-schema.models.user.favourite","Favourite")},{name:"last_access",type:s.DATE,label:e("introspection-schema.models.user.last-access","Last access")},{name:"temporary_password",type:s.TEXT,label:e("introspection-schema.models.user.temporary-password","Temporary password")},{name:"currentFailedCount",type:s.NUMBER,label:e("introspection-schema.models.user.current-failed-count","Current failed count")},{name:"tokenDate",type:s.DATE,label:e("introspection-schema.models.user.token-date","Token date")}]}}};return t&&Object.keys(t).length&&(d.externalApis=Object.entries(t).map(([O,m])=>({value:O,label:m.label,methods:m.method}))),d}a.ApiAction=n,a.ConditionsFormat=i,a.DashboardWidgetType=o,a.DataLoaderType=r,a.IntrospectionSchemaType=s,a.TriggerAction=l,a.getIntrospectionSchema=A,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
@@ -140,22 +140,25 @@
140
140
  "I18nTextTranslation": {
141
141
  "anyOf": [
142
142
  {
143
- "type": "object",
144
- "properties": {
145
- "default": {
146
- "type": "string"
147
- }
148
- },
149
- "required": ["default"],
150
- "additionalProperties": {
151
- "type": "string"
152
- }
143
+ "$ref": "#/definitions/I18nTextLocales"
153
144
  },
154
145
  {
155
146
  "type": "string"
156
147
  }
157
148
  ]
158
149
  },
150
+ "I18nTextLocales": {
151
+ "type": "object",
152
+ "properties": {
153
+ "default": {
154
+ "type": "string"
155
+ }
156
+ },
157
+ "required": ["default"],
158
+ "additionalProperties": {
159
+ "type": "string"
160
+ }
161
+ },
159
162
  "ColProps": {
160
163
  "type": "object",
161
164
  "properties": {
@@ -374,8 +377,7 @@
374
377
  "type": "boolean"
375
378
  },
376
379
  "aggType": {
377
- "type": "string",
378
- "enum": ["avg", "count", "max", "min", "sum"]
380
+ "$ref": "#/definitions/AggFunction"
379
381
  },
380
382
  "groupBy": {
381
383
  "anyOf": [
@@ -397,9 +399,7 @@
397
399
  "type": "string"
398
400
  },
399
401
  "orderDir": {
400
- "type": "string",
401
- "enum": ["asc", "desc"],
402
- "description": "Any changes here may need changes in Caaring-js packages/perseed-api-client/src/PerseedApiClient.ts"
402
+ "$ref": "#/definitions/OrderDir"
403
403
  }
404
404
  },
405
405
  "required": ["ecosystem", "projectName", "name"],
@@ -409,14 +409,39 @@
409
409
  "required": ["type", "params"],
410
410
  "additionalProperties": false
411
411
  },
412
+ "AggFunction": {
413
+ "type": "string",
414
+ "enum": ["avg", "count", "max", "min", "sum"]
415
+ },
412
416
  "OutcomesGroupBy": {
417
+ "anyOf": [
418
+ {
419
+ "type": "string",
420
+ "const": "name"
421
+ },
422
+ {
423
+ "type": "string",
424
+ "const": "identifier"
425
+ },
426
+ {
427
+ "type": "string",
428
+ "const": "value"
429
+ },
430
+ {
431
+ "$ref": "#/definitions/OutcomesDateFields"
432
+ },
433
+ {
434
+ "$ref": "#/definitions/OutcomeDateField"
435
+ }
436
+ ]
437
+ },
438
+ "OutcomesDateFields": {
439
+ "type": "string",
440
+ "enum": ["from", "to"]
441
+ },
442
+ "OutcomeDateField": {
413
443
  "type": "string",
414
444
  "enum": [
415
- "name",
416
- "identifier",
417
- "value",
418
- "from",
419
- "to",
420
445
  "from.date",
421
446
  "from.day",
422
447
  "from.dayname",
@@ -453,6 +478,11 @@
453
478
  "to.yearweek"
454
479
  ]
455
480
  },
481
+ "OrderDir": {
482
+ "type": "string",
483
+ "enum": ["asc", "desc"],
484
+ "description": "Any changes here may need changes in Caaring-js packages/perseed-api-client/src/PerseedApiClient.ts"
485
+ },
456
486
  "PatientListProps": {
457
487
  "type": "object",
458
488
  "properties": {
@@ -1,6 +1,5 @@
1
- interface I18nTextLocales {
1
+ export interface I18nTextLocales {
2
2
  [locale: string]: string;
3
3
  default: string;
4
4
  }
5
5
  export type I18nTextTranslation = I18nTextLocales | string;
6
- export {};
@@ -1,10 +1,5 @@
1
- import * as data_loaders from './data_loaders';
2
- import * as widgets from './widgets';
1
+ export * from './data_loaders';
2
+ export * from './widgets';
3
3
  export * from './types';
4
4
  export * from './i18n';
5
5
  export * from './col.d';
6
- declare const dashboard: {
7
- data_loaders: typeof data_loaders;
8
- widgets: typeof widgets;
9
- };
10
- export default dashboard;
@@ -1,7 +1,5 @@
1
1
  import { ColProps } from './col';
2
- import { PatientListProps } from './widgets/PatientListProps';
3
- import { SectionCardProps } from './widgets/SectionCardProps';
4
- import { ValueCardProps } from './widgets/ValueCardProps';
2
+ import { PatientListProps, SectionCardProps, ValueCardProps } from './widgets';
5
3
  /**
6
4
  * Any changes here may need changes in Caaring-js packages/perseed-react-ui-components/src/dashboards/types.ts
7
5
  */
@@ -139,22 +139,25 @@
139
139
  "I18nTextTranslation": {
140
140
  "anyOf": [
141
141
  {
142
- "type": "object",
143
- "properties": {
144
- "default": {
145
- "type": "string"
146
- }
147
- },
148
- "required": ["default"],
149
- "additionalProperties": {
150
- "type": "string"
151
- }
142
+ "$ref": "#/definitions/I18nTextLocales"
152
143
  },
153
144
  {
154
145
  "type": "string"
155
146
  }
156
147
  ]
157
148
  },
149
+ "I18nTextLocales": {
150
+ "type": "object",
151
+ "properties": {
152
+ "default": {
153
+ "type": "string"
154
+ }
155
+ },
156
+ "required": ["default"],
157
+ "additionalProperties": {
158
+ "type": "string"
159
+ }
160
+ },
158
161
  "ColProps": {
159
162
  "type": "object",
160
163
  "properties": {
@@ -373,8 +376,7 @@
373
376
  "type": "boolean"
374
377
  },
375
378
  "aggType": {
376
- "type": "string",
377
- "enum": ["avg", "count", "max", "min", "sum"]
379
+ "$ref": "#/definitions/AggFunction"
378
380
  },
379
381
  "groupBy": {
380
382
  "anyOf": [
@@ -396,9 +398,7 @@
396
398
  "type": "string"
397
399
  },
398
400
  "orderDir": {
399
- "type": "string",
400
- "enum": ["asc", "desc"],
401
- "description": "Any changes here may need changes in Caaring-js packages/perseed-api-client/src/PerseedApiClient.ts"
401
+ "$ref": "#/definitions/OrderDir"
402
402
  }
403
403
  },
404
404
  "required": ["ecosystem", "projectName", "name"],
@@ -408,14 +408,39 @@
408
408
  "required": ["type", "params"],
409
409
  "additionalProperties": false
410
410
  },
411
+ "AggFunction": {
412
+ "type": "string",
413
+ "enum": ["avg", "count", "max", "min", "sum"]
414
+ },
411
415
  "OutcomesGroupBy": {
416
+ "anyOf": [
417
+ {
418
+ "type": "string",
419
+ "const": "name"
420
+ },
421
+ {
422
+ "type": "string",
423
+ "const": "identifier"
424
+ },
425
+ {
426
+ "type": "string",
427
+ "const": "value"
428
+ },
429
+ {
430
+ "$ref": "#/definitions/OutcomesDateFields"
431
+ },
432
+ {
433
+ "$ref": "#/definitions/OutcomeDateField"
434
+ }
435
+ ]
436
+ },
437
+ "OutcomesDateFields": {
438
+ "type": "string",
439
+ "enum": ["from", "to"]
440
+ },
441
+ "OutcomeDateField": {
412
442
  "type": "string",
413
443
  "enum": [
414
- "name",
415
- "identifier",
416
- "value",
417
- "from",
418
- "to",
419
444
  "from.date",
420
445
  "from.day",
421
446
  "from.dayname",
@@ -452,6 +477,11 @@
452
477
  "to.yearweek"
453
478
  ]
454
479
  },
480
+ "OrderDir": {
481
+ "type": "string",
482
+ "enum": ["asc", "desc"],
483
+ "description": "Any changes here may need changes in Caaring-js packages/perseed-api-client/src/PerseedApiClient.ts"
484
+ },
455
485
  "PatientListProps": {
456
486
  "type": "object",
457
487
  "properties": {
@@ -1,15 +1,6 @@
1
- import * as dashboard from './dashboard';
2
- import * as authentication_security from './authentication_security';
3
- import * as notification_configuration from './notification_configuration';
4
- import * as outcomes from './outcomes';
5
- import * as questionnaire from './questionnaire';
6
- import * as user_settings from './user_settings';
7
- declare const schemas: {
8
- dashboard: typeof dashboard;
9
- authentication_security: typeof authentication_security;
10
- notification_configuration: typeof notification_configuration;
11
- outcomes: typeof outcomes;
12
- questionnaire: typeof questionnaire;
13
- user_settings: typeof user_settings;
14
- };
15
- export default schemas;
1
+ export * from './dashboard';
2
+ export * from './authentication_security';
3
+ export * from './notification_configuration';
4
+ export * from './outcomes';
5
+ export * from './questionnaire';
6
+ export * from './user_settings';
@@ -160,7 +160,7 @@
160
160
  },
161
161
  "ApiAction": {
162
162
  "type": "string",
163
- "enum": ["questionnaire.create", "crf.create", "crf.update", "crf.delete"]
163
+ "enum": ["questionnaire.create", "crf.create", "crf.update", "crf.delete", "external_api_call"]
164
164
  },
165
165
  "ConditionsFormat": {
166
166
  "type": "string",
@@ -3,7 +3,8 @@ export declare enum ApiAction {
3
3
  QUESTIONNAIRE_CREATE = "questionnaire.create",
4
4
  CRF_CREATE = "crf.create",
5
5
  CRF_UPDATE = "crf.update",
6
- CRF_DELETE = "crf.delete"
6
+ CRF_DELETE = "crf.delete",
7
+ EXTERNAL_API_CALL = "external_api_call"
7
8
  }
8
9
  export type NotifiedAboutType = `model_${ModelName}` | `model_displayer_${ModelName}` | `model_${ModelName}_${TriggerAction}` | `model_displayer_${ModelName}_${TriggerAction}`;
9
10
  export interface CreateTriggerPayload {
@@ -87,5 +88,10 @@ export interface IntrospectionSchemaModel {
87
88
  }
88
89
  export interface IntrospectionSchema {
89
90
  models: Record<string, IntrospectionSchemaModel>;
91
+ externalApis?: {
92
+ value: string;
93
+ label: string;
94
+ methods?: string | string[];
95
+ }[];
90
96
  }
91
97
  export {};
@@ -159,7 +159,7 @@
159
159
  },
160
160
  "ApiAction": {
161
161
  "type": "string",
162
- "enum": ["questionnaire.create", "crf.create", "crf.update", "crf.delete"]
162
+ "enum": ["questionnaire.create", "crf.create", "crf.update", "crf.delete", "external_api_call"]
163
163
  },
164
164
  "ConditionsFormat": {
165
165
  "type": "string",
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Any changes here may need changes in Caaring-js packages/perseed-api-client/src/PerseedApiClient.ts
3
3
  */
4
- type OrderDir = 'asc' | 'desc';
5
- type AggFunction = 'avg' | 'count' | 'max' | 'min' | 'sum';
6
- type OutcomesDateFields = 'from' | 'to';
7
- type OutcomesDateFunctions = 'date' | 'day' | 'dayname' | 'dayofmonth' | 'dayofweek' | 'dayofyear' | 'hour' | 'minute' | 'month' | 'monthname' | 'time' | 'second' | 'week' | 'weekday' | 'weekofyear' | 'year' | 'yearweek';
8
- type OutcomeDateField = `${OutcomesDateFields}.${OutcomesDateFunctions}`;
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
9
  export type OutcomesGroupBy = 'name' | 'identifier' | 'value' | OutcomesDateFields | OutcomeDateField;
10
- interface OutcomeDateGroup {
10
+ export interface OutcomeDateGroup {
11
11
  [dateGroup: string]: string;
12
12
  }
13
13
  export type Outcome = OutcomeDateGroup & {
@@ -32,4 +32,3 @@ export interface OutcomesParams {
32
32
  orderBy?: string;
33
33
  orderDir?: OrderDir;
34
34
  }
35
- export {};
package/package.json CHANGED
@@ -1,20 +1,16 @@
1
1
  {
2
2
  "name": "@persei/perseed-api",
3
- "version": "4.34.3",
3
+ "version": "4.34.5",
4
4
  "private": false,
5
5
  "main": "./dist/perseed-api.umd.cjs",
6
6
  "module": "./dist/perseed-api.js",
7
7
  "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/perseed-api.js",
11
- "require": "./dist/perseed-api.umd.cjs"
12
- }
13
- },
14
- "files": ["dist"],
8
+ "files": [
9
+ "dist"
10
+ ],
15
11
  "scripts": {
16
- "publish": "npm run precommit && npm run build && npm publish",
17
- "build": "tsc && vite build",
12
+ "publish_package": "npm run precommit && npm run build && npm publish",
13
+ "build": "tsc --noEmit && vite build",
18
14
  "start": "ts-node src/server.ts",
19
15
  "lint": "npm run test:lint",
20
16
  "jshint": "jshint . > report.txt || true",
@@ -173,5 +169,6 @@
173
169
  "vite": "^6.2.4",
174
170
  "vite-plugin-dts": "^4.5.3",
175
171
  "yamljs": "^0.3.0"
176
- }
172
+ },
173
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
177
174
  }