@whatsscale-app/piece-medilink 0.1.2 → 0.1.3
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/package.json +1 -1
- package/dist/whatsscale-app-piece-medilink-0.1.2.tgz +0 -0
- package/package.json +3 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -61
- package/dist/index.js.map +0 -1
- package/dist/src/lib/actions/create-appointment.d.ts +0 -12
- package/dist/src/lib/actions/create-appointment.d.ts.map +0 -1
- package/dist/src/lib/actions/create-appointment.js +0 -68
- package/dist/src/lib/actions/create-appointment.js.map +0 -1
- package/dist/src/lib/actions/create-patient.d.ts +0 -10
- package/dist/src/lib/actions/create-patient.d.ts.map +0 -1
- package/dist/src/lib/actions/create-patient.js +0 -58
- package/dist/src/lib/actions/create-patient.js.map +0 -1
- package/dist/src/lib/actions/get-appointment.d.ts +0 -5
- package/dist/src/lib/actions/get-appointment.d.ts.map +0 -1
- package/dist/src/lib/actions/get-appointment.js +0 -25
- package/dist/src/lib/actions/get-appointment.js.map +0 -1
- package/dist/src/lib/actions/get-branch.d.ts +0 -5
- package/dist/src/lib/actions/get-branch.d.ts.map +0 -1
- package/dist/src/lib/actions/get-branch.js +0 -25
- package/dist/src/lib/actions/get-branch.js.map +0 -1
- package/dist/src/lib/actions/get-patient-payments.d.ts +0 -5
- package/dist/src/lib/actions/get-patient-payments.d.ts.map +0 -1
- package/dist/src/lib/actions/get-patient-payments.js +0 -25
- package/dist/src/lib/actions/get-patient-payments.js.map +0 -1
- package/dist/src/lib/actions/get-patient.d.ts +0 -5
- package/dist/src/lib/actions/get-patient.d.ts.map +0 -1
- package/dist/src/lib/actions/get-patient.js +0 -25
- package/dist/src/lib/actions/get-patient.js.map +0 -1
- package/dist/src/lib/actions/get-practitioner.d.ts +0 -5
- package/dist/src/lib/actions/get-practitioner.d.ts.map +0 -1
- package/dist/src/lib/actions/get-practitioner.js +0 -25
- package/dist/src/lib/actions/get-practitioner.js.map +0 -1
- package/dist/src/lib/actions/get-treatment-plan.d.ts +0 -5
- package/dist/src/lib/actions/get-treatment-plan.d.ts.map +0 -1
- package/dist/src/lib/actions/get-treatment-plan.js +0 -25
- package/dist/src/lib/actions/get-treatment-plan.js.map +0 -1
- package/dist/src/lib/actions/list-patient-appointments.d.ts +0 -5
- package/dist/src/lib/actions/list-patient-appointments.d.ts.map +0 -1
- package/dist/src/lib/actions/list-patient-appointments.js +0 -25
- package/dist/src/lib/actions/list-patient-appointments.js.map +0 -1
- package/dist/src/lib/actions/list-today-appointments.d.ts +0 -5
- package/dist/src/lib/actions/list-today-appointments.d.ts.map +0 -1
- package/dist/src/lib/actions/list-today-appointments.js +0 -34
- package/dist/src/lib/actions/list-today-appointments.js.map +0 -1
- package/dist/src/lib/actions/search-patients.d.ts +0 -6
- package/dist/src/lib/actions/search-patients.d.ts.map +0 -1
- package/dist/src/lib/actions/search-patients.js +0 -40
- package/dist/src/lib/actions/search-patients.js.map +0 -1
- package/dist/src/lib/actions/update-appointment-status.d.ts +0 -6
- package/dist/src/lib/actions/update-appointment-status.d.ts.map +0 -1
- package/dist/src/lib/actions/update-appointment-status.js +0 -30
- package/dist/src/lib/actions/update-appointment-status.js.map +0 -1
- package/dist/src/lib/auth.d.ts +0 -3
- package/dist/src/lib/auth.d.ts.map +0 -1
- package/dist/src/lib/auth.js +0 -38
- package/dist/src/lib/auth.js.map +0 -1
- package/dist/src/lib/common/client.d.ts +0 -4
- package/dist/src/lib/common/client.d.ts.map +0 -1
- package/dist/src/lib/common/client.js +0 -67
- package/dist/src/lib/common/client.js.map +0 -1
- package/dist/src/lib/common/props.d.ts +0 -9
- package/dist/src/lib/common/props.d.ts.map +0 -1
- package/dist/src/lib/common/props.js +0 -64
- package/dist/src/lib/common/props.js.map +0 -1
- package/dist/src/lib/common/types.d.ts +0 -86
- package/dist/src/lib/common/types.d.ts.map +0 -1
- package/dist/src/lib/common/types.js +0 -3
- package/dist/src/lib/common/types.js.map +0 -1
- package/dist/src/lib/triggers/appointment-cancelled.d.ts +0 -18
- package/dist/src/lib/triggers/appointment-cancelled.d.ts.map +0 -1
- package/dist/src/lib/triggers/appointment-cancelled.js +0 -99
- package/dist/src/lib/triggers/appointment-cancelled.js.map +0 -1
- package/dist/src/lib/triggers/appointment-status-changed.d.ts +0 -18
- package/dist/src/lib/triggers/appointment-status-changed.d.ts.map +0 -1
- package/dist/src/lib/triggers/appointment-status-changed.js +0 -97
- package/dist/src/lib/triggers/appointment-status-changed.js.map +0 -1
- package/dist/src/lib/triggers/new-appointment.d.ts +0 -18
- package/dist/src/lib/triggers/new-appointment.d.ts.map +0 -1
- package/dist/src/lib/triggers/new-appointment.js +0 -94
- package/dist/src/lib/triggers/new-appointment.js.map +0 -1
- package/dist/src/lib/triggers/new-patient-registered.d.ts +0 -10
- package/dist/src/lib/triggers/new-patient-registered.d.ts.map +0 -1
- package/dist/src/lib/triggers/new-patient-registered.js +0 -74
- package/dist/src/lib/triggers/new-patient-registered.js.map +0 -1
- package/dist/src/lib/triggers/new-payment-received.d.ts +0 -18
- package/dist/src/lib/triggers/new-payment-received.d.ts.map +0 -1
- package/dist/src/lib/triggers/new-payment-received.js +0 -79
- package/dist/src/lib/triggers/new-payment-received.js.map +0 -1
- package/dist/src/lib/triggers/outstanding-debt-detected.d.ts +0 -22
- package/dist/src/lib/triggers/outstanding-debt-detected.d.ts.map +0 -1
- package/dist/src/lib/triggers/outstanding-debt-detected.js +0 -96
- package/dist/src/lib/triggers/outstanding-debt-detected.js.map +0 -1
- package/dist/src/lib/triggers/session-completed.d.ts +0 -18
- package/dist/src/lib/triggers/session-completed.d.ts.map +0 -1
- package/dist/src/lib/triggers/session-completed.js +0 -103
- package/dist/src/lib/triggers/session-completed.js.map +0 -1
- package/dist/src/lib/triggers/treatment-plan-completed.d.ts +0 -18
- package/dist/src/lib/triggers/treatment-plan-completed.d.ts.map +0 -1
- package/dist/src/lib/triggers/treatment-plan-completed.js +0 -90
- package/dist/src/lib/triggers/treatment-plan-completed.js.map +0 -1
- package/dist/whatsscale-app-piece-medilink-0.1.0.tgz +0 -0
- package/dist/whatsscale-app-piece-medilink-0.1.1.tgz +0 -0
package/dist/package.json
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatsscale-app/piece-medilink",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Medilink clinic management integration for pip0",
|
|
5
5
|
"keywords": ["medilink", "healthatom", "clinic", "pip0", "automation"],
|
|
6
6
|
"homepage": "https://pip0.ai",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "WhatsScale <mahi@whatsscale.com>",
|
|
13
|
-
"main": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
13
|
+
"main": "./dist/packages/pieces/community/medilink/index.js",
|
|
14
|
+
"types": "./dist/packages/pieces/community/medilink/index.d.ts",
|
|
15
15
|
"files": ["dist/", "package.json"],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@activepieces/pieces-common": "0.11.7",
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,QAAQ,KAgCnB,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.medilink = void 0;
|
|
4
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
-
const auth_1 = require("./src/lib/auth");
|
|
6
|
-
// Triggers
|
|
7
|
-
const new_appointment_1 = require("./src/lib/triggers/new-appointment");
|
|
8
|
-
const appointment_status_changed_1 = require("./src/lib/triggers/appointment-status-changed");
|
|
9
|
-
const appointment_cancelled_1 = require("./src/lib/triggers/appointment-cancelled");
|
|
10
|
-
const session_completed_1 = require("./src/lib/triggers/session-completed");
|
|
11
|
-
const new_patient_registered_1 = require("./src/lib/triggers/new-patient-registered");
|
|
12
|
-
const new_payment_received_1 = require("./src/lib/triggers/new-payment-received");
|
|
13
|
-
const treatment_plan_completed_1 = require("./src/lib/triggers/treatment-plan-completed");
|
|
14
|
-
const outstanding_debt_detected_1 = require("./src/lib/triggers/outstanding-debt-detected");
|
|
15
|
-
// Actions
|
|
16
|
-
const get_patient_1 = require("./src/lib/actions/get-patient");
|
|
17
|
-
const get_appointment_1 = require("./src/lib/actions/get-appointment");
|
|
18
|
-
const list_patient_appointments_1 = require("./src/lib/actions/list-patient-appointments");
|
|
19
|
-
const get_treatment_plan_1 = require("./src/lib/actions/get-treatment-plan");
|
|
20
|
-
const get_patient_payments_1 = require("./src/lib/actions/get-patient-payments");
|
|
21
|
-
const get_practitioner_1 = require("./src/lib/actions/get-practitioner");
|
|
22
|
-
const get_branch_1 = require("./src/lib/actions/get-branch");
|
|
23
|
-
const list_today_appointments_1 = require("./src/lib/actions/list-today-appointments");
|
|
24
|
-
const create_appointment_1 = require("./src/lib/actions/create-appointment");
|
|
25
|
-
const update_appointment_status_1 = require("./src/lib/actions/update-appointment-status");
|
|
26
|
-
const create_patient_1 = require("./src/lib/actions/create-patient");
|
|
27
|
-
const search_patients_1 = require("./src/lib/actions/search-patients");
|
|
28
|
-
exports.medilink = (0, pieces_framework_1.createPiece)({
|
|
29
|
-
displayName: 'Medilink',
|
|
30
|
-
auth: auth_1.medilinkAuth,
|
|
31
|
-
minimumSupportedRelease: '0.36.0',
|
|
32
|
-
logoUrl: 'https://pip0.ai/pieces/medilink-icon.svg',
|
|
33
|
-
authors: ['whatsscale'],
|
|
34
|
-
description: 'Connect Medilink clinic management to WhatsApp automation via pip0.',
|
|
35
|
-
categories: [pieces_framework_1.PieceCategory.CUSTOMER_SUCCESS, pieces_framework_1.PieceCategory.COMMUNICATION],
|
|
36
|
-
actions: [
|
|
37
|
-
get_patient_1.getPatientAction,
|
|
38
|
-
get_appointment_1.getAppointmentAction,
|
|
39
|
-
list_patient_appointments_1.listPatientAppointmentsAction,
|
|
40
|
-
get_treatment_plan_1.getTreatmentPlanAction,
|
|
41
|
-
get_patient_payments_1.getPatientPaymentsAction,
|
|
42
|
-
get_practitioner_1.getPractitionerAction,
|
|
43
|
-
get_branch_1.getBranchAction,
|
|
44
|
-
list_today_appointments_1.listTodayAppointmentsAction,
|
|
45
|
-
create_appointment_1.createAppointmentAction,
|
|
46
|
-
update_appointment_status_1.updateAppointmentStatusAction,
|
|
47
|
-
create_patient_1.createPatientAction,
|
|
48
|
-
search_patients_1.searchPatientsAction,
|
|
49
|
-
],
|
|
50
|
-
triggers: [
|
|
51
|
-
new_appointment_1.newAppointmentTrigger,
|
|
52
|
-
appointment_status_changed_1.appointmentStatusChangedTrigger,
|
|
53
|
-
appointment_cancelled_1.appointmentCancelledTrigger,
|
|
54
|
-
session_completed_1.sessionCompletedTrigger,
|
|
55
|
-
new_patient_registered_1.newPatientRegisteredTrigger,
|
|
56
|
-
new_payment_received_1.newPaymentReceivedTrigger,
|
|
57
|
-
treatment_plan_completed_1.treatmentPlanCompletedTrigger,
|
|
58
|
-
outstanding_debt_detected_1.outstandingDebtDetectedTrigger,
|
|
59
|
-
],
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,qEAA4E;AAC5E,yCAA8C;AAE9C,WAAW;AACX,wEAA2E;AAC3E,8FAAgG;AAChG,oFAAuF;AACvF,4EAA+E;AAC/E,sFAAwF;AACxF,kFAAoF;AACpF,0FAA4F;AAC5F,4FAA8F;AAE9F,UAAU;AACV,+DAAiE;AACjE,uEAAyE;AACzE,2FAA4F;AAC5F,6EAA8E;AAC9E,iFAAkF;AAClF,yEAA2E;AAC3E,6DAA+D;AAC/D,uFAAwF;AACxF,6EAA+E;AAC/E,2FAA4F;AAC5F,qEAAuE;AACvE,uEAAyE;AAE5D,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,mBAAY;IAClB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,0CAA0C;IACnD,OAAO,EAAE,CAAC,YAAY,CAAC;IACvB,WAAW,EAAE,qEAAqE;IAClF,UAAU,EAAE,CAAC,gCAAa,CAAC,gBAAgB,EAAE,gCAAa,CAAC,aAAa,CAAC;IACzE,OAAO,EAAE;QACP,8BAAgB;QAChB,sCAAoB;QACpB,yDAA6B;QAC7B,2CAAsB;QACtB,+CAAwB;QACxB,wCAAqB;QACrB,4BAAe;QACf,qDAA2B;QAC3B,4CAAuB;QACvB,yDAA6B;QAC7B,oCAAmB;QACnB,sCAAoB;KACrB;IACD,QAAQ,EAAE;QACR,uCAAqB;QACrB,4DAA+B;QAC/B,mDAA2B;QAC3B,2CAAuB;QACvB,oDAA2B;QAC3B,gDAAyB;QACzB,wDAA6B;QAC7B,0DAA8B;KAC/B;CACF,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const createAppointmentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
id_paciente: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
5
|
-
id_dentista: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
6
|
-
id_sucursal: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
7
|
-
fecha: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
hora_inicio: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
hora_fin: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
id_tratamiento: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
-
comentarios: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
12
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-appointment.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-appointment.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB,KAsElC,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAppointmentAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.createAppointmentAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.medilinkAuth,
|
|
11
|
-
name: 'medilink_create_appointment',
|
|
12
|
-
displayName: 'Create Appointment',
|
|
13
|
-
description: 'Create a new appointment (cita) in Medilink.',
|
|
14
|
-
props: {
|
|
15
|
-
id_paciente: pieces_framework_1.Property.Number({
|
|
16
|
-
displayName: 'Patient ID',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
id_dentista: pieces_framework_1.Property.Number({
|
|
20
|
-
displayName: 'Practitioner ID',
|
|
21
|
-
required: true,
|
|
22
|
-
}),
|
|
23
|
-
id_sucursal: pieces_framework_1.Property.Number({
|
|
24
|
-
displayName: 'Branch ID',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
fecha: pieces_framework_1.Property.ShortText({
|
|
28
|
-
displayName: 'Date (YYYY-MM-DD)',
|
|
29
|
-
required: true,
|
|
30
|
-
}),
|
|
31
|
-
hora_inicio: pieces_framework_1.Property.ShortText({
|
|
32
|
-
displayName: 'Start Time (HH:MM)',
|
|
33
|
-
required: true,
|
|
34
|
-
}),
|
|
35
|
-
hora_fin: pieces_framework_1.Property.ShortText({
|
|
36
|
-
displayName: 'End Time (HH:MM)',
|
|
37
|
-
required: true,
|
|
38
|
-
}),
|
|
39
|
-
id_tratamiento: pieces_framework_1.Property.Number({
|
|
40
|
-
displayName: 'Treatment ID',
|
|
41
|
-
required: false,
|
|
42
|
-
}),
|
|
43
|
-
comentarios: pieces_framework_1.Property.LongText({
|
|
44
|
-
displayName: 'Comments',
|
|
45
|
-
required: false,
|
|
46
|
-
}),
|
|
47
|
-
},
|
|
48
|
-
run(context) {
|
|
49
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const { id_paciente, id_dentista, id_sucursal, fecha, hora_inicio, hora_fin, id_tratamiento, comentarios, } = context.propsValue;
|
|
51
|
-
const body = {
|
|
52
|
-
id_paciente,
|
|
53
|
-
id_dentista,
|
|
54
|
-
id_sucursal,
|
|
55
|
-
fecha,
|
|
56
|
-
hora_inicio,
|
|
57
|
-
hora_fin,
|
|
58
|
-
};
|
|
59
|
-
if (id_tratamiento)
|
|
60
|
-
body['id_tratamiento'] = id_tratamiento;
|
|
61
|
-
if (comentarios)
|
|
62
|
-
body['comentarios'] = comentarios;
|
|
63
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.POST, '/citas', body);
|
|
64
|
-
return res.body.data;
|
|
65
|
-
});
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
//# sourceMappingURL=create-appointment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-appointment.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-appointment.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAGrC,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,8CAA8C;IAC3D,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC3B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC3B,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,mBAAmB;YAChC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EACJ,WAAW,EACX,WAAW,EACX,WAAW,EACX,KAAK,EACL,WAAW,EACX,QAAQ,EACR,cAAc,EACd,WAAW,GACZ,GAAG,OAAO,CAAC,UAAU,CAAC;YAEvB,MAAM,IAAI,GAA4B;gBACpC,WAAW;gBACX,WAAW;gBACX,WAAW;gBACX,KAAK;gBACL,WAAW;gBACX,QAAQ;aACT,CAAC;YACF,IAAI,cAAc;gBAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAAC;YAC5D,IAAI,WAAW;gBAAK,IAAI,CAAC,aAAa,CAAC,GAAM,WAAW,CAAC;YAEzD,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,IAAI,EACf,QAAQ,EACR,IAAI,CACL,CAAC;YACF,OAAQ,GAAG,CAAC,IAAqC,CAAC,IAAI,CAAC;QACzD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const createPatientAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
nombre: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
apellidos: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
-
celular: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
rut: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
fecha_nacimiento: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-patient.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-patient.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB,KAiD9B,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPatientAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.createPatientAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.medilinkAuth,
|
|
11
|
-
name: 'medilink_create_patient',
|
|
12
|
-
displayName: 'Create Patient',
|
|
13
|
-
description: 'Create a new patient record in Medilink.',
|
|
14
|
-
props: {
|
|
15
|
-
nombre: pieces_framework_1.Property.ShortText({
|
|
16
|
-
displayName: 'First Name',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
apellidos: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Last Names',
|
|
21
|
-
required: true,
|
|
22
|
-
}),
|
|
23
|
-
celular: pieces_framework_1.Property.ShortText({
|
|
24
|
-
displayName: 'Mobile Phone',
|
|
25
|
-
description: 'International format: +56912345678',
|
|
26
|
-
required: false,
|
|
27
|
-
}),
|
|
28
|
-
email: pieces_framework_1.Property.ShortText({
|
|
29
|
-
displayName: 'Email',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
rut: pieces_framework_1.Property.ShortText({
|
|
33
|
-
displayName: 'RUT (Chilean ID)',
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
|
-
fecha_nacimiento: pieces_framework_1.Property.ShortText({
|
|
37
|
-
displayName: 'Date of Birth (YYYY-MM-DD)',
|
|
38
|
-
required: false,
|
|
39
|
-
}),
|
|
40
|
-
},
|
|
41
|
-
run(context) {
|
|
42
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const { nombre, apellidos, celular, email, rut, fecha_nacimiento } = context.propsValue;
|
|
44
|
-
const body = { nombre, apellidos };
|
|
45
|
-
if (celular)
|
|
46
|
-
body['celular'] = celular;
|
|
47
|
-
if (email)
|
|
48
|
-
body['email'] = email;
|
|
49
|
-
if (rut)
|
|
50
|
-
body['rut'] = rut;
|
|
51
|
-
if (fecha_nacimiento)
|
|
52
|
-
body['fecha_nacimiento'] = fecha_nacimiento;
|
|
53
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.POST, '/pacientes', body);
|
|
54
|
-
return res.body.data;
|
|
55
|
-
});
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=create-patient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-patient.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-patient.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAGrC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,gBAAgB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACnC,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAExF,MAAM,IAAI,GAA4B,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;YAC5D,IAAI,OAAO;gBAAW,IAAI,CAAC,SAAS,CAAC,GAAY,OAAO,CAAC;YACzD,IAAI,KAAK;gBAAa,IAAI,CAAC,OAAO,CAAC,GAAc,KAAK,CAAC;YACvD,IAAI,GAAG;gBAAe,IAAI,CAAC,KAAK,CAAC,GAAgB,GAAG,CAAC;YACrD,IAAI,gBAAgB;gBAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;YAElE,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,IAAI,EACf,YAAY,EACZ,IAAI,CACL,CAAC;YACF,OAAQ,GAAG,CAAC,IAAyC,CAAC,IAAI,CAAC;QAC7D,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getAppointmentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
citaId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-appointment.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-appointment.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,KAgB/B,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAppointmentAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.getAppointmentAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_get_appointment',
|
|
13
|
-
displayName: 'Get Appointment',
|
|
14
|
-
description: 'Retrieve a single appointment (cita) by ID.',
|
|
15
|
-
props: {
|
|
16
|
-
citaId: props_1.medilinkProps.citaId,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, `/citas/${context.propsValue.citaId}`);
|
|
21
|
-
return res.body.data;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=get-appointment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-appointment.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-appointment.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAClD,2CAAgD;AAGnC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,6CAA6C;IAC1D,KAAK,EAAE;QACL,MAAM,EAAE,qBAAa,CAAC,MAAM;KAC7B;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,GAAG,EACd,UAAU,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CACtC,CAAC;YACF,OAAQ,GAAG,CAAC,IAAqC,CAAC,IAAI,CAAC;QACzD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getBranchAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
sucursalId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-branch.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-branch.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,KAgB1B,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBranchAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.getBranchAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_get_branch',
|
|
13
|
-
displayName: 'Get Branch',
|
|
14
|
-
description: 'Retrieve a clinic branch (sucursal) by ID.',
|
|
15
|
-
props: {
|
|
16
|
-
sucursalId: props_1.medilinkProps.sucursalId,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, `/sucursales/${context.propsValue.sucursalId}`);
|
|
21
|
-
return res.body.data;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=get-branch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-branch.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-branch.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAClD,2CAAgD;AAGnC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,4CAA4C;IACzD,KAAK,EAAE;QACL,UAAU,EAAE,qBAAa,CAAC,UAAU;KACrC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,GAAG,EACd,eAAe,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAC/C,CAAC;YACF,OAAQ,GAAG,CAAC,IAAyC,CAAC,IAAI,CAAC;QAC7D,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getPatientPaymentsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
patientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient-payments.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-patient-payments.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,wBAAwB,KAgBnC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPatientPaymentsAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.getPatientPaymentsAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_get_patient_payments',
|
|
13
|
-
displayName: 'Get Patient Payments',
|
|
14
|
-
description: 'Retrieve all payments (pagos) for a specific patient.',
|
|
15
|
-
props: {
|
|
16
|
-
patientId: props_1.medilinkProps.patientId,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, `/pacientes/${context.propsValue.patientId}/pagos`);
|
|
21
|
-
return res.body.data;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=get-patient-payments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient-payments.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-patient-payments.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAClD,2CAAgD;AAGnC,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACL,SAAS,EAAE,qBAAa,CAAC,SAAS;KACnC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,GAAG,EACd,cAAc,OAAO,CAAC,UAAU,CAAC,SAAS,QAAQ,CACnD,CAAC;YACF,OAAQ,GAAG,CAAC,IAAmC,CAAC,IAAI,CAAC;QACvD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getPatientAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
patientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-patient.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,KAgB3B,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPatientAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.getPatientAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_get_patient',
|
|
13
|
-
displayName: 'Get Patient',
|
|
14
|
-
description: 'Retrieve a patient record by ID. Returns celular in international format (+56XXXXXXXXX).',
|
|
15
|
-
props: {
|
|
16
|
-
patientId: props_1.medilinkProps.patientId,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, `/pacientes/${context.propsValue.patientId}`);
|
|
21
|
-
return res.body.data;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=get-patient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-patient.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAClD,2CAAgD;AAGnC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,0FAA0F;IACvG,KAAK,EAAE;QACL,SAAS,EAAE,qBAAa,CAAC,SAAS;KACnC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,GAAG,EACd,cAAc,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAC7C,CAAC;YACF,OAAQ,GAAG,CAAC,IAAyC,CAAC,IAAI,CAAC;QAC7D,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getPractitionerAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
dentistaId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-practitioner.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-practitioner.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB,KAgBhC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPractitionerAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.getPractitionerAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_get_practitioner',
|
|
13
|
-
displayName: 'Get Practitioner',
|
|
14
|
-
description: 'Retrieve a practitioner (dentista/profesional) by ID.',
|
|
15
|
-
props: {
|
|
16
|
-
dentistaId: props_1.medilinkProps.dentistaId,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, `/dentistas/${context.propsValue.dentistaId}`);
|
|
21
|
-
return res.body.data;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=get-practitioner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-practitioner.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-practitioner.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAClD,2CAAgD;AAGnC,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACL,UAAU,EAAE,qBAAa,CAAC,UAAU;KACrC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,GAAG,EACd,cAAc,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAC9C,CAAC;YACF,OAAQ,GAAG,CAAC,IAAyC,CAAC,IAAI,CAAC;QAC7D,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getTreatmentPlanAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
atencionId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-treatment-plan.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-treatment-plan.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB,KAgBjC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTreatmentPlanAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.getTreatmentPlanAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_get_treatment_plan',
|
|
13
|
-
displayName: 'Get Treatment Plan',
|
|
14
|
-
description: 'Retrieve a treatment plan (atencion) by ID. Requires /atenciones API access on your Medilink plan.',
|
|
15
|
-
props: {
|
|
16
|
-
atencionId: props_1.medilinkProps.atencionId,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, `/atenciones/${context.propsValue.atencionId}`);
|
|
21
|
-
return res.body.data;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=get-treatment-plan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-treatment-plan.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-treatment-plan.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAClD,2CAAgD;AAGnC,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,oGAAoG;IACjH,KAAK,EAAE;QACL,UAAU,EAAE,qBAAa,CAAC,UAAU;KACrC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,GAAG,EACd,eAAe,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAC/C,CAAC;YACF,OAAQ,GAAG,CAAC,IAAyC,CAAC,IAAI,CAAC;QAC7D,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const listPatientAppointmentsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
patientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-patient-appointments.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-patient-appointments.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,6BAA6B,KAgBxC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listPatientAppointmentsAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.listPatientAppointmentsAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_list_patient_appointments',
|
|
13
|
-
displayName: 'List Patient Appointments',
|
|
14
|
-
description: 'Retrieve all appointments (citas) for a specific patient.',
|
|
15
|
-
props: {
|
|
16
|
-
patientId: props_1.medilinkProps.patientId,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, `/pacientes/${context.propsValue.patientId}/citas`);
|
|
21
|
-
return res.body.data;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=list-patient-appointments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-patient-appointments.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-patient-appointments.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,6CAAkD;AAClD,2CAAgD;AAGnC,QAAA,6BAA6B,GAAG,IAAA,+BAAY,EAAC;IACxD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2DAA2D;IACxE,KAAK,EAAE;QACL,SAAS,EAAE,qBAAa,CAAC,SAAS;KACnC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAc,EAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EACzB,0BAAU,CAAC,GAAG,EACd,cAAc,OAAO,CAAC,UAAU,CAAC,SAAS,QAAQ,CACnD,CAAC;YACF,OAAQ,GAAG,CAAC,IAAmC,CAAC,IAAI,CAAC;QACvD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const listTodayAppointmentsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
access_token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
sucursal: import("@activepieces/pieces-framework").DropdownProperty<unknown, false, undefined>;
|
|
5
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-today-appointments.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-today-appointments.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,2BAA2B,KA8BtC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listTodayAppointmentsAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.listTodayAppointmentsAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.medilinkAuth,
|
|
12
|
-
name: 'medilink_list_today_appointments',
|
|
13
|
-
displayName: 'List Today\'s Appointments',
|
|
14
|
-
description: 'Retrieve all appointments scheduled for today in the clinic\'s timezone, sorted by start time.',
|
|
15
|
-
props: {
|
|
16
|
-
sucursal: props_1.medilinkProps.sucursal,
|
|
17
|
-
},
|
|
18
|
-
run(context) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
// Use clinic timezone from auth to determine "today"
|
|
21
|
-
const today = new Intl.DateTimeFormat('en-CA', {
|
|
22
|
-
timeZone: context.auth.timezone,
|
|
23
|
-
year: 'numeric',
|
|
24
|
-
month: '2-digit',
|
|
25
|
-
day: '2-digit',
|
|
26
|
-
}).format(new Date()); // returns YYYY-MM-DD
|
|
27
|
-
const res = yield (0, client_1.medilinkClient)(context.auth.access_token, pieces_common_1.HttpMethod.GET, '/citas', undefined, { fecha: { eq: today } }, 'hora_inicio:asc');
|
|
28
|
-
const { data } = res.body;
|
|
29
|
-
const { sucursal } = context.propsValue;
|
|
30
|
-
return sucursal ? data.filter((c) => String(c.id_sucursal) === sucursal) : data;
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=list-today-appointments.js.map
|