@awell-health/awell-extensions 2.1.25 → 2.1.27
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/extensions/awell/index.js +2 -0
- package/dist/extensions/awell/index.js.map +1 -1
- package/dist/extensions/awell/v1/actions/addAdhocTrack/addAdhocTrack.d.ts +4 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/addAdhocTrack.js +45 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/addAdhocTrack.js.map +1 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/fields.d.ts +18 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/fields.js +18 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/fields.js.map +1 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/index.d.ts +2 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/index.js +9 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/pathway.d.ts +8 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/pathway.js +6 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/config/pathway.js.map +1 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/index.d.ts +1 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/index.js +6 -0
- package/dist/extensions/awell/v1/actions/addAdhocTrack/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/index.d.ts +2 -0
- package/dist/extensions/awell/v1/actions/index.js +5 -1
- package/dist/extensions/awell/v1/actions/index.js.map +1 -1
- package/dist/extensions/awell/v1/actions/stopTrack/config/fields.d.ts +18 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/fields.js +18 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/fields.js.map +1 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/index.d.ts +2 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/index.js +9 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/pathway.d.ts +8 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/pathway.js +6 -0
- package/dist/extensions/awell/v1/actions/stopTrack/config/pathway.js.map +1 -0
- package/dist/extensions/awell/v1/actions/stopTrack/index.d.ts +1 -0
- package/dist/extensions/awell/v1/actions/stopTrack/index.js +6 -0
- package/dist/extensions/awell/v1/actions/stopTrack/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/stopTrack/stopTrack.d.ts +4 -0
- package/dist/extensions/awell/v1/actions/stopTrack/stopTrack.js +76 -0
- package/dist/extensions/awell/v1/actions/stopTrack/stopTrack.js.map +1 -0
- package/dist/extensions/awellTasks/api/schema/GetCareflowComments.schema.d.ts +4 -4
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/checkWorkingHours.d.ts +4 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/checkWorkingHours.js +75 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/checkWorkingHours.js.map +1 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/dataPoints.d.ts +10 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/dataPoints.js +14 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/dataPoints.js.map +1 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/fields.d.ts +38 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/fields.js +38 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/fields.js.map +1 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/index.d.ts +2 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/index.js +9 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/config/index.js.map +1 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/index.d.ts +1 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/index.js +18 -0
- package/dist/extensions/dateHelpers/actions/checkWorkingHours/index.js.map +1 -0
- package/dist/extensions/dateHelpers/actions/index.d.ts +23 -0
- package/dist/extensions/dateHelpers/actions/index.js +2 -0
- package/dist/extensions/dateHelpers/actions/index.js.map +1 -1
- package/dist/extensions/freshdesk/lib/api/schema/UpdateTicket.schema.d.ts +2 -2
- package/package.json +1 -1
|
@@ -16,11 +16,13 @@ exports.Awell = {
|
|
|
16
16
|
},
|
|
17
17
|
settings: settings_1.settings,
|
|
18
18
|
actions: {
|
|
19
|
+
addAdhocTrack: actions_1.addAdhocTrack,
|
|
19
20
|
addIdentifierToPatient: actions_1.addIdentifierToPatient,
|
|
20
21
|
getPatientByIdentifier: actions_1.getPatientByIdentifier,
|
|
21
22
|
startCareFlow: actions_1.startCareFlow,
|
|
22
23
|
updatePatient: actions_1.updatePatient,
|
|
23
24
|
stopCareFlow: actions_1.stopCareFlow,
|
|
25
|
+
stopTrack: actions_1.stopTrack,
|
|
24
26
|
searchPatientsByPatientCode: actions_1.searchPatientsByPatientCode,
|
|
25
27
|
isPatientEnrolledInCareFlow: actions_1.isPatientEnrolledInCareFlow,
|
|
26
28
|
updateBaselineInfo: actions_1.updateBaselineInfo,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/awell/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/awell/index.ts"],"names":[],"mappings":";;;AAAA,0CAgBqB;AAErB,yCAAqC;AACrC,4CAAwC;AACxC,mEAAoE;AAEvD,QAAA,KAAK,GAAc;IAC9B,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EACN,iGAAiG;IACnG,WAAW,EAAE,qDAAqD;IAClE,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;QACb,sBAAsB,EAAtB,gCAAsB;QACtB,sBAAsB,EAAtB,gCAAsB;QACtB,aAAa,EAAb,uBAAa;QACb,aAAa,EAAb,uBAAa;QACb,YAAY,EAAZ,sBAAY;QACZ,SAAS,EAAT,mBAAS;QACT,2BAA2B,EAA3B,qCAA2B;QAC3B,2BAA2B,EAA3B,qCAA2B;QAC3B,kBAAkB,EAAlB,4BAAkB;QAClB,uBAAuB,EAAvB,iCAAuB;QACvB,uBAAuB,EAAvB,iCAAuB;QACvB,iBAAiB,EAAjB,2BAAiB;QACjB,eAAe,EAAf,yBAAe;QACf,iBAAiB,EAAjB,2BAAiB;KAClB;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addAdhocTrack = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const config_1 = require("./config");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const addEventLog_1 = require("../../../../../src/lib/awell/addEventLog");
|
|
8
|
+
exports.addAdhocTrack = {
|
|
9
|
+
key: 'addAdhocTrack',
|
|
10
|
+
category: extensions_core_1.Category.WORKFLOW,
|
|
11
|
+
title: 'Add ad hoc track',
|
|
12
|
+
description: 'Add a pre-configured ad hoc track to a patient care flow.',
|
|
13
|
+
fields: config_1.fields,
|
|
14
|
+
previewable: false, // We don't have pathways in Preview, only cases.
|
|
15
|
+
onEvent: async ({ payload, onComplete, helpers }) => {
|
|
16
|
+
const { fields: { trackId }, pathway: { id: pathwayId }, } = (0, extensions_core_1.validate)({
|
|
17
|
+
schema: zod_1.z.object({
|
|
18
|
+
fields: config_1.FieldsValidationSchema,
|
|
19
|
+
pathway: config_1.PathwayValidationSchema,
|
|
20
|
+
}),
|
|
21
|
+
payload,
|
|
22
|
+
});
|
|
23
|
+
const awellSdk = await helpers.awellSdk();
|
|
24
|
+
await awellSdk.orchestration.mutation({
|
|
25
|
+
addTrack: {
|
|
26
|
+
__args: {
|
|
27
|
+
input: {
|
|
28
|
+
track_id: trackId,
|
|
29
|
+
pathway_id: pathwayId,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
code: true,
|
|
33
|
+
success: true,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
await onComplete({
|
|
37
|
+
events: [
|
|
38
|
+
(0, addEventLog_1.addActivityEventLog)({
|
|
39
|
+
message: `Ad hoc track successfully added to care flow.`,
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=addAdhocTrack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addAdhocTrack.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/addAdhocTrack/addAdhocTrack.ts"],"names":[],"mappings":";;;AAEA,mEAAkE;AAClE,qCAIiB;AACjB,6BAAuB;AACvB,0EAA8E;AAEjE,QAAA,aAAa,GAA2C;IACnE,GAAG,EAAE,eAAe;IACpB,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,2DAA2D;IACxE,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK,EAAE,iDAAiD;IACrE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAiB,EAAE;QACjE,MAAM,EACJ,MAAM,EAAE,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,GAC3B,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;gBAC9B,OAAO,EAAE,gCAAuB;aACjC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;QACzC,MAAM,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;YACpC,QAAQ,EAAE;gBACR,MAAM,EAAE;oBACN,KAAK,EAAE;wBACL,QAAQ,EAAE,OAAO;wBACjB,UAAU,EAAE,SAAS;qBACtB;iBACF;gBACD,IAAI,EAAE,IAAI;gBACV,OAAO,EAAE,IAAI;aACd;SACF,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,MAAM,EAAE;gBACN,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,+CAA+C;iBACzD,CAAC;aACH;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const fields: {
|
|
4
|
+
trackId: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: FieldType.STRING;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
13
|
+
trackId: z.ZodString;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
trackId: string;
|
|
16
|
+
}, {
|
|
17
|
+
trackId: string;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.fields = {
|
|
7
|
+
trackId: {
|
|
8
|
+
id: 'trackId',
|
|
9
|
+
label: 'Track ID',
|
|
10
|
+
description: 'The ID of the ad hoc track that you want to add to the patient care flow.',
|
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
|
16
|
+
trackId: zod_1.z.string().nonempty('Track ID is required'),
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/addAdhocTrack/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,2EAA2E;QAC7E,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;CACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PathwayValidationSchema = exports.FieldsValidationSchema = exports.fields = void 0;
|
|
4
|
+
var fields_1 = require("./fields");
|
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
|
7
|
+
var pathway_1 = require("./pathway");
|
|
8
|
+
Object.defineProperty(exports, "PathwayValidationSchema", { enumerable: true, get: function () { return pathway_1.PathwayValidationSchema; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/addAdhocTrack/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,qCAAmD;AAA1C,kHAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PathwayValidationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PathwayValidationSchema = zod_1.z.object({ id: zod_1.z.string() });
|
|
6
|
+
//# sourceMappingURL=pathway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathway.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/addAdhocTrack/config/pathway.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { addAdhocTrack } from './addAdhocTrack';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addAdhocTrack = void 0;
|
|
4
|
+
var addAdhocTrack_1 = require("./addAdhocTrack");
|
|
5
|
+
Object.defineProperty(exports, "addAdhocTrack", { enumerable: true, get: function () { return addAdhocTrack_1.addAdhocTrack; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/addAdhocTrack/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export { addAdhocTrack } from './addAdhocTrack';
|
|
1
2
|
export { startCareFlow } from './startCareFlow';
|
|
2
3
|
export { updatePatient } from './updatePatient';
|
|
3
4
|
export { stopCareFlow } from './stopCareFlow';
|
|
5
|
+
export { stopTrack } from './stopTrack';
|
|
4
6
|
export { searchPatientsByPatientCode } from './searchPatientsByPatientCode';
|
|
5
7
|
export { isPatientEnrolledInCareFlow } from './isPatientEnrolledInCareFlow';
|
|
6
8
|
export { updateBaselineInfo } from './updateBaselineInfo';
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNaviSession = exports.listFormAnswers = exports.getDataPointValue = exports.startCareFlowAndSession = exports.startHostedPagesSession = exports.addIdentifierToPatient = exports.getPatientByIdentifier = exports.updateBaselineInfo = exports.isPatientEnrolledInCareFlow = exports.searchPatientsByPatientCode = exports.stopCareFlow = exports.updatePatient = exports.startCareFlow = void 0;
|
|
3
|
+
exports.createNaviSession = exports.listFormAnswers = exports.getDataPointValue = exports.startCareFlowAndSession = exports.startHostedPagesSession = exports.addIdentifierToPatient = exports.getPatientByIdentifier = exports.updateBaselineInfo = exports.isPatientEnrolledInCareFlow = exports.searchPatientsByPatientCode = exports.stopTrack = exports.stopCareFlow = exports.updatePatient = exports.startCareFlow = exports.addAdhocTrack = void 0;
|
|
4
|
+
var addAdhocTrack_1 = require("./addAdhocTrack");
|
|
5
|
+
Object.defineProperty(exports, "addAdhocTrack", { enumerable: true, get: function () { return addAdhocTrack_1.addAdhocTrack; } });
|
|
4
6
|
var startCareFlow_1 = require("./startCareFlow");
|
|
5
7
|
Object.defineProperty(exports, "startCareFlow", { enumerable: true, get: function () { return startCareFlow_1.startCareFlow; } });
|
|
6
8
|
var updatePatient_1 = require("./updatePatient");
|
|
7
9
|
Object.defineProperty(exports, "updatePatient", { enumerable: true, get: function () { return updatePatient_1.updatePatient; } });
|
|
8
10
|
var stopCareFlow_1 = require("./stopCareFlow");
|
|
9
11
|
Object.defineProperty(exports, "stopCareFlow", { enumerable: true, get: function () { return stopCareFlow_1.stopCareFlow; } });
|
|
12
|
+
var stopTrack_1 = require("./stopTrack");
|
|
13
|
+
Object.defineProperty(exports, "stopTrack", { enumerable: true, get: function () { return stopTrack_1.stopTrack; } });
|
|
10
14
|
var searchPatientsByPatientCode_1 = require("./searchPatientsByPatientCode");
|
|
11
15
|
Object.defineProperty(exports, "searchPatientsByPatientCode", { enumerable: true, get: function () { return searchPatientsByPatientCode_1.searchPatientsByPatientCode; } });
|
|
12
16
|
var isPatientEnrolledInCareFlow_1 = require("./isPatientEnrolledInCareFlow");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,yCAAuC;AAA9B,sGAAA,SAAS,OAAA;AAClB,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const fields: {
|
|
4
|
+
trackDefinitionId: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: FieldType.STRING;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
13
|
+
trackDefinitionId: z.ZodString;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
trackDefinitionId: string;
|
|
16
|
+
}, {
|
|
17
|
+
trackDefinitionId: string;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.fields = {
|
|
7
|
+
trackDefinitionId: {
|
|
8
|
+
id: 'trackDefinitionId',
|
|
9
|
+
label: 'Track definition ID',
|
|
10
|
+
description: 'The definitionID of the track that you want to stop.',
|
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
|
16
|
+
trackDefinitionId: zod_1.z.string().nonempty('Track definition ID is required'),
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/stopTrack/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,sDAAsD;QACnE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CACxB,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PathwayValidationSchema = exports.FieldsValidationSchema = exports.fields = void 0;
|
|
4
|
+
var fields_1 = require("./fields");
|
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
|
7
|
+
var pathway_1 = require("./pathway");
|
|
8
|
+
Object.defineProperty(exports, "PathwayValidationSchema", { enumerable: true, get: function () { return pathway_1.PathwayValidationSchema; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/stopTrack/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,qCAAmD;AAA1C,kHAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PathwayValidationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PathwayValidationSchema = zod_1.z.object({ id: zod_1.z.string() });
|
|
6
|
+
//# sourceMappingURL=pathway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathway.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/stopTrack/config/pathway.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { stopTrack } from './stopTrack';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stopTrack = void 0;
|
|
4
|
+
var stopTrack_1 = require("./stopTrack");
|
|
5
|
+
Object.defineProperty(exports, "stopTrack", { enumerable: true, get: function () { return stopTrack_1.stopTrack; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/stopTrack/index.ts"],"names":[],"mappings":";;;AAAA,yCAAuC;AAA9B,sGAAA,SAAS,OAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stopTrack = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const addEventLog_1 = require("../../../../../src/lib/awell/addEventLog");
|
|
7
|
+
const config_1 = require("./config");
|
|
8
|
+
exports.stopTrack = {
|
|
9
|
+
key: 'stopTrack',
|
|
10
|
+
category: extensions_core_1.Category.WORKFLOW,
|
|
11
|
+
title: 'Stop track',
|
|
12
|
+
description: 'Stop a track in a patient care flow (pathway).',
|
|
13
|
+
fields: config_1.fields,
|
|
14
|
+
previewable: false, // We don't have pathways in Preview, only cases.
|
|
15
|
+
onEvent: async ({ payload, onComplete, helpers }) => {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const { fields: { trackDefinitionId }, pathway: { id: careFlowId }, } = (0, extensions_core_1.validate)({
|
|
18
|
+
schema: zod_1.z.object({
|
|
19
|
+
fields: config_1.FieldsValidationSchema,
|
|
20
|
+
pathway: config_1.PathwayValidationSchema,
|
|
21
|
+
}),
|
|
22
|
+
payload,
|
|
23
|
+
});
|
|
24
|
+
const awellSdk = await helpers.awellSdk();
|
|
25
|
+
const elementsResponse = await awellSdk.orchestration.query({
|
|
26
|
+
pathwayElements: {
|
|
27
|
+
__args: {
|
|
28
|
+
pathway_id: careFlowId,
|
|
29
|
+
},
|
|
30
|
+
elements: {
|
|
31
|
+
id: true,
|
|
32
|
+
status: true,
|
|
33
|
+
definition_id: true,
|
|
34
|
+
name: true,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const activeTracks = (_b = (_a = elementsResponse.pathwayElements) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.filter((element) => element.definition_id === trackDefinitionId &&
|
|
39
|
+
(element.status === 'ACTIVE' ||
|
|
40
|
+
element.status === 'SCHEDULED' ||
|
|
41
|
+
element.status === 'POSTPONED'));
|
|
42
|
+
if (activeTracks.length > 0) {
|
|
43
|
+
const events = [];
|
|
44
|
+
for (const activeTrack of activeTracks) {
|
|
45
|
+
await awellSdk.orchestration.mutation({
|
|
46
|
+
stopTrack: {
|
|
47
|
+
__args: {
|
|
48
|
+
input: {
|
|
49
|
+
track_id: activeTrack.id,
|
|
50
|
+
pathway_id: careFlowId,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
code: true,
|
|
54
|
+
success: true,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
events.push((0, addEventLog_1.addActivityEventLog)({
|
|
58
|
+
message: `Track ${activeTrack.name} with ID ${activeTrack.id} successfully stopped.`,
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
await onComplete({
|
|
62
|
+
events,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
await onComplete({
|
|
67
|
+
events: [
|
|
68
|
+
(0, addEventLog_1.addActivityEventLog)({
|
|
69
|
+
message: `No active track found with definition ID ${trackDefinitionId} in care flow ${careFlowId}.`,
|
|
70
|
+
}),
|
|
71
|
+
],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=stopTrack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stopTrack.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/stopTrack/stopTrack.ts"],"names":[],"mappings":";;;AAAA,mEAA+E;AAC/E,6BAAuB;AACvB,0EAA8E;AAE9E,qCAIiB;AAEJ,QAAA,SAAS,GAA2C;IAC/D,GAAG,EAAE,WAAW;IAChB,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,gDAAgD;IAC7D,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK,EAAE,iDAAiD;IACrE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAiB,EAAE;;QACjE,MAAM,EACJ,MAAM,EAAE,EAAE,iBAAiB,EAAE,EAC7B,OAAO,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,GAC5B,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;gBAC9B,OAAO,EAAE,gCAAuB;aACjC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;QACzC,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;YAC1D,eAAe,EAAE;gBACf,MAAM,EAAE;oBACN,UAAU,EAAE,UAAU;iBACvB;gBACD,QAAQ,EAAE;oBACR,EAAE,EAAE,IAAI;oBACR,MAAM,EAAE,IAAI;oBACZ,aAAa,EAAE,IAAI;oBACnB,IAAI,EAAE,IAAI;iBACX;aACF;SACF,CAAC,CAAA;QACF,MAAM,YAAY,GAAG,MAAA,MAAA,gBAAgB,CAAC,eAAe,0CAAE,QAAQ,0CAAE,MAAM,CACrE,CAAC,OAAO,EAAE,EAAE,CACV,OAAO,CAAC,aAAa,KAAK,iBAAiB;YAC3C,CAAC,OAAO,CAAC,MAAM,KAAK,QAAQ;gBAC1B,OAAO,CAAC,MAAM,KAAK,WAAW;gBAC9B,OAAO,CAAC,MAAM,KAAK,WAAW,CAAC,CACpC,CAAA;QACD,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,MAAM,GAAG,EAAE,CAAA;YACjB,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;gBACvC,MAAM,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;oBACpC,SAAS,EAAE;wBACT,MAAM,EAAE;4BACN,KAAK,EAAE;gCACL,QAAQ,EAAE,WAAW,CAAC,EAAE;gCACxB,UAAU,EAAE,UAAU;6BACvB;yBACF;wBACD,IAAI,EAAE,IAAI;wBACV,OAAO,EAAE,IAAI;qBACd;iBACF,CAAC,CAAA;gBACF,MAAM,CAAC,IAAI,CACT,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,SAAS,WAAW,CAAC,IAAI,YAAY,WAAW,CAAC,EAAE,wBAAwB;iBACrF,CAAC,CACH,CAAA;YACH,CAAC;YACD,MAAM,UAAU,CAAC;gBACf,MAAM;aACP,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,CAAC;gBACf,MAAM,EAAE;oBACN,IAAA,iCAAmB,EAAC;wBAClB,OAAO,EAAE,4CAA4C,iBAAiB,iBAAiB,UAAU,GAAG;qBACrG,CAAC;iBACH;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -99,6 +99,7 @@ export declare const GetCareflowCommentsResponseSchema: z.ZodObject<{
|
|
|
99
99
|
}>;
|
|
100
100
|
parent_id: z.ZodNullable<z.ZodString>;
|
|
101
101
|
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
parent_id: string | null;
|
|
102
103
|
comment_id: string;
|
|
103
104
|
comment: {
|
|
104
105
|
status: string;
|
|
@@ -120,8 +121,8 @@ export declare const GetCareflowCommentsResponseSchema: z.ZodObject<{
|
|
|
120
121
|
stytch_user_id?: string | undefined;
|
|
121
122
|
};
|
|
122
123
|
};
|
|
123
|
-
parent_id: string | null;
|
|
124
124
|
}, {
|
|
125
|
+
parent_id: string | null;
|
|
125
126
|
comment_id: string;
|
|
126
127
|
comment: {
|
|
127
128
|
status: string;
|
|
@@ -143,7 +144,6 @@ export declare const GetCareflowCommentsResponseSchema: z.ZodObject<{
|
|
|
143
144
|
stytch_user_id?: string | undefined;
|
|
144
145
|
};
|
|
145
146
|
};
|
|
146
|
-
parent_id: string | null;
|
|
147
147
|
}>, "many">;
|
|
148
148
|
pagination: z.ZodObject<{
|
|
149
149
|
total_count: z.ZodNumber;
|
|
@@ -165,6 +165,7 @@ export declare const GetCareflowCommentsResponseSchema: z.ZodObject<{
|
|
|
165
165
|
limit: number;
|
|
166
166
|
};
|
|
167
167
|
comments: {
|
|
168
|
+
parent_id: string | null;
|
|
168
169
|
comment_id: string;
|
|
169
170
|
comment: {
|
|
170
171
|
status: string;
|
|
@@ -186,7 +187,6 @@ export declare const GetCareflowCommentsResponseSchema: z.ZodObject<{
|
|
|
186
187
|
stytch_user_id?: string | undefined;
|
|
187
188
|
};
|
|
188
189
|
};
|
|
189
|
-
parent_id: string | null;
|
|
190
190
|
}[];
|
|
191
191
|
}, {
|
|
192
192
|
pagination: {
|
|
@@ -195,6 +195,7 @@ export declare const GetCareflowCommentsResponseSchema: z.ZodObject<{
|
|
|
195
195
|
limit: number;
|
|
196
196
|
};
|
|
197
197
|
comments: {
|
|
198
|
+
parent_id: string | null;
|
|
198
199
|
comment_id: string;
|
|
199
200
|
comment: {
|
|
200
201
|
status: string;
|
|
@@ -216,7 +217,6 @@ export declare const GetCareflowCommentsResponseSchema: z.ZodObject<{
|
|
|
216
217
|
stytch_user_id?: string | undefined;
|
|
217
218
|
};
|
|
218
219
|
};
|
|
219
|
-
parent_id: string | null;
|
|
220
220
|
}[];
|
|
221
221
|
}>;
|
|
222
222
|
export type GetCareflowCommentsResponseType = z.infer<typeof GetCareflowCommentsResponseSchema>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkWorkingHours = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const date_fns_1 = require("date-fns");
|
|
6
|
+
const date_fns_tz_1 = require("date-fns-tz");
|
|
7
|
+
const config_1 = require("./config");
|
|
8
|
+
exports.checkWorkingHours = {
|
|
9
|
+
key: 'checkWorkingHours',
|
|
10
|
+
title: 'Check Working Hours',
|
|
11
|
+
description: 'Check if the current time is within working hours and calculate minutes to next working hours if not',
|
|
12
|
+
category: extensions_core_1.Category.WORKFLOW,
|
|
13
|
+
fields: config_1.fields,
|
|
14
|
+
dataPoints: config_1.dataPoints,
|
|
15
|
+
previewable: true,
|
|
16
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
|
17
|
+
const { workingHoursStart, workingHoursEnd, timezone } = config_1.FieldsValidationSchema.parse(payload.fields);
|
|
18
|
+
// Get current UTC time
|
|
19
|
+
const now = new Date();
|
|
20
|
+
// Convert current UTC time to the specified timezone
|
|
21
|
+
const currentTimeInTimezone = (0, date_fns_tz_1.utcToZonedTime)(now, timezone);
|
|
22
|
+
// Parse working hours
|
|
23
|
+
const [startHour, startMinute] = workingHoursStart.split(':').map(Number);
|
|
24
|
+
const [endHour, endMinute] = workingHoursEnd.split(':').map(Number);
|
|
25
|
+
// Validate that end time is after start time
|
|
26
|
+
const startTotalMinutes = startHour * 60 + startMinute;
|
|
27
|
+
const endTotalMinutes = endHour * 60 + endMinute;
|
|
28
|
+
if (endTotalMinutes <= startTotalMinutes) {
|
|
29
|
+
await onError({
|
|
30
|
+
events: [
|
|
31
|
+
{
|
|
32
|
+
date: new Date().toISOString(),
|
|
33
|
+
text: {
|
|
34
|
+
en: 'Working hours end time must be after start time. Cross-midnight hours are not supported.',
|
|
35
|
+
},
|
|
36
|
+
error: {
|
|
37
|
+
category: 'BAD_REQUEST',
|
|
38
|
+
message: 'Working hours end time must be after start time',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
// Get current time in minutes since midnight using date-fns
|
|
46
|
+
const currentHour = (0, date_fns_1.getHours)(currentTimeInTimezone);
|
|
47
|
+
const currentMinute = (0, date_fns_1.getMinutes)(currentTimeInTimezone);
|
|
48
|
+
const currentTotalMinutes = currentHour * 60 + currentMinute;
|
|
49
|
+
// Check if within working hours
|
|
50
|
+
const isWithinWorkingHours = currentTotalMinutes >= startTotalMinutes &&
|
|
51
|
+
currentTotalMinutes < endTotalMinutes;
|
|
52
|
+
let minutesToNextWorkingHours;
|
|
53
|
+
// Calculate minutes to next working hours only if not currently within working hours
|
|
54
|
+
if (!isWithinWorkingHours) {
|
|
55
|
+
if (currentTotalMinutes < startTotalMinutes) {
|
|
56
|
+
// Before working hours today
|
|
57
|
+
minutesToNextWorkingHours = startTotalMinutes - currentTotalMinutes;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
// After working hours today, so next working hours is tomorrow
|
|
61
|
+
const minutesUntilMidnight = 24 * 60 - currentTotalMinutes;
|
|
62
|
+
minutesToNextWorkingHours = minutesUntilMidnight + startTotalMinutes;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
await onComplete({
|
|
66
|
+
data_points: {
|
|
67
|
+
isWithinWorkingHours: String(isWithinWorkingHours),
|
|
68
|
+
minutesToNextWorkingHours: minutesToNextWorkingHours !== undefined
|
|
69
|
+
? String(minutesToNextWorkingHours)
|
|
70
|
+
: undefined,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=checkWorkingHours.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkWorkingHours.js","sourceRoot":"","sources":["../../../../../extensions/dateHelpers/actions/checkWorkingHours/checkWorkingHours.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AACxD,uCAA+C;AAC/C,6CAA4C;AAE5C,qCAAqE;AAExD,QAAA,iBAAiB,GAI1B;IACF,GAAG,EAAE,mBAAmB;IACxB,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,sGAAsG;IACxG,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,MAAM,EAAE,iBAAiB,EAAE,eAAe,EAAE,QAAQ,EAAE,GACpD,+BAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAE9C,uBAAuB;QACvB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QAEtB,qDAAqD;QACrD,MAAM,qBAAqB,GAAG,IAAA,4BAAc,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAE3D,sBAAsB;QACtB,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACzE,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAEnE,6CAA6C;QAC7C,MAAM,iBAAiB,GAAG,SAAS,GAAG,EAAE,GAAG,WAAW,CAAA;QACtD,MAAM,eAAe,GAAG,OAAO,GAAG,EAAE,GAAG,SAAS,CAAA;QAEhD,IAAI,eAAe,IAAI,iBAAiB,EAAE,CAAC;YACzC,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE;4BACJ,EAAE,EAAE,0FAA0F;yBAC/F;wBACD,KAAK,EAAE;4BACL,QAAQ,EAAE,aAAa;4BACvB,OAAO,EAAE,iDAAiD;yBAC3D;qBACF;iBACF;aACF,CAAC,CAAA;YACF,OAAM;QACR,CAAC;QAED,4DAA4D;QAC5D,MAAM,WAAW,GAAG,IAAA,mBAAQ,EAAC,qBAAqB,CAAC,CAAA;QACnD,MAAM,aAAa,GAAG,IAAA,qBAAU,EAAC,qBAAqB,CAAC,CAAA;QACvD,MAAM,mBAAmB,GAAG,WAAW,GAAG,EAAE,GAAG,aAAa,CAAA;QAE5D,gCAAgC;QAChC,MAAM,oBAAoB,GACxB,mBAAmB,IAAI,iBAAiB;YACxC,mBAAmB,GAAG,eAAe,CAAA;QAEvC,IAAI,yBAA6C,CAAA;QAEjD,qFAAqF;QACrF,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,IAAI,mBAAmB,GAAG,iBAAiB,EAAE,CAAC;gBAC5C,6BAA6B;gBAC7B,yBAAyB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;YACrE,CAAC;iBAAM,CAAC;gBACN,+DAA+D;gBAC/D,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,mBAAmB,CAAA;gBAC1D,yBAAyB,GAAG,oBAAoB,GAAG,iBAAiB,CAAA;YACtE,CAAC;QACH,CAAC;QAED,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,CAAC;gBAClD,yBAAyB,EACvB,yBAAyB,KAAK,SAAS;oBACrC,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC;oBACnC,CAAC,CAAC,SAAS;aAChB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dataPoints = void 0;
|
|
4
|
+
exports.dataPoints = {
|
|
5
|
+
isWithinWorkingHours: {
|
|
6
|
+
key: 'isWithinWorkingHours',
|
|
7
|
+
valueType: 'boolean',
|
|
8
|
+
},
|
|
9
|
+
minutesToNextWorkingHours: {
|
|
10
|
+
key: 'minutesToNextWorkingHours',
|
|
11
|
+
valueType: 'number',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=dataPoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/checkWorkingHours/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,oBAAoB,EAAE;QACpB,GAAG,EAAE,sBAAsB;QAC3B,SAAS,EAAE,SAAS;KACrB;IACD,yBAAyB,EAAE;QACzB,GAAG,EAAE,2BAA2B;QAChC,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { FieldType } from '@awell-health/extensions-core';
|
|
3
|
+
export declare const fields: {
|
|
4
|
+
workingHoursStart: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: FieldType.STRING;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
workingHoursEnd: {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
description: string;
|
|
15
|
+
type: FieldType.STRING;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
timezone: {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description: string;
|
|
22
|
+
type: FieldType.STRING;
|
|
23
|
+
required: false;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
27
|
+
workingHoursStart: z.ZodString;
|
|
28
|
+
workingHoursEnd: z.ZodString;
|
|
29
|
+
timezone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
timezone: string;
|
|
32
|
+
workingHoursStart: string;
|
|
33
|
+
workingHoursEnd: string;
|
|
34
|
+
}, {
|
|
35
|
+
workingHoursStart: string;
|
|
36
|
+
workingHoursEnd: string;
|
|
37
|
+
timezone?: string | undefined;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
6
|
+
exports.fields = {
|
|
7
|
+
workingHoursStart: {
|
|
8
|
+
id: 'workingHoursStart',
|
|
9
|
+
label: 'Working hours start',
|
|
10
|
+
description: 'The start time of working hours in HH:MM format (e.g., "09:00"). Uses 24-hour format.',
|
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
workingHoursEnd: {
|
|
15
|
+
id: 'workingHoursEnd',
|
|
16
|
+
label: 'Working hours end',
|
|
17
|
+
description: 'The end time of working hours in HH:MM format (e.g., "17:00"). Uses 24-hour format.',
|
|
18
|
+
type: extensions_core_1.FieldType.STRING,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
timezone: {
|
|
22
|
+
id: 'timezone',
|
|
23
|
+
label: 'Timezone',
|
|
24
|
+
description: 'The IANA timezone identifier to use for the working hours check (e.g., "America/New_York", "Europe/London", "Asia/Tokyo", "UTC"). If not specified, UTC will be used.',
|
|
25
|
+
type: extensions_core_1.FieldType.STRING,
|
|
26
|
+
required: false,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
|
30
|
+
workingHoursStart: zod_1.z.string().regex(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, {
|
|
31
|
+
message: 'Working hours start must be in HH:MM format (e.g., "09:00")',
|
|
32
|
+
}),
|
|
33
|
+
workingHoursEnd: zod_1.z.string().regex(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, {
|
|
34
|
+
message: 'Working hours end must be in HH:MM format (e.g., "17:00")',
|
|
35
|
+
}),
|
|
36
|
+
timezone: zod_1.z.string().optional().default('UTC'),
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/checkWorkingHours/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,uFAAuF;QACzF,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,qFAAqF;QACvF,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,uKAAuK;QACzK,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mCAAmC,EAAE;QACvE,OAAO,EAAE,6DAA6D;KACvE,CAAC;IACF,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mCAAmC,EAAE;QACrE,OAAO,EAAE,2DAA2D;KACrE,CAAC;IACF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACG,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
|
4
|
+
var fields_1 = require("./fields");
|
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
|
7
|
+
var dataPoints_1 = require("./dataPoints");
|
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/checkWorkingHours/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkWorkingHours';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./checkWorkingHours"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/dateHelpers/actions/checkWorkingHours/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAmC"}
|
|
@@ -15,4 +15,27 @@ export declare const actions: {
|
|
|
15
15
|
required: false;
|
|
16
16
|
};
|
|
17
17
|
}, {}, "nextWorkday" | "referenceDateIsWeekday">;
|
|
18
|
+
checkWorkingHours: import("@awell-health/extensions-core").Action<{
|
|
19
|
+
workingHoursStart: {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
workingHoursEnd: {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
description: string;
|
|
30
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
timezone: {
|
|
34
|
+
id: string;
|
|
35
|
+
label: string;
|
|
36
|
+
description: string;
|
|
37
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
|
38
|
+
required: false;
|
|
39
|
+
};
|
|
40
|
+
}, {}, "isWithinWorkingHours" | "minutesToNextWorkingHours">;
|
|
18
41
|
};
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.actions = void 0;
|
|
4
4
|
const getNextWorkday_1 = require("./getNextWorkday");
|
|
5
|
+
const checkWorkingHours_1 = require("./checkWorkingHours");
|
|
5
6
|
exports.actions = {
|
|
6
7
|
getNextWorkday: getNextWorkday_1.getNextWorkday,
|
|
8
|
+
checkWorkingHours: checkWorkingHours_1.checkWorkingHours,
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/dateHelpers/actions/index.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/dateHelpers/actions/index.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AACjD,2DAAuD;AAE1C,QAAA,OAAO,GAAG;IACrB,cAAc,EAAd,+BAAc;IACd,iBAAiB,EAAjB,qCAAiB;CAClB,CAAA"}
|
|
@@ -34,8 +34,8 @@ export declare const UpdateTicketInputSchema: z.ZodObject<{
|
|
|
34
34
|
priority?: 1 | 2 | 3 | 4 | undefined;
|
|
35
35
|
phone?: string | undefined;
|
|
36
36
|
name?: string | undefined;
|
|
37
|
-
subject?: string | null | undefined;
|
|
38
37
|
parent_id?: number | undefined;
|
|
38
|
+
subject?: string | null | undefined;
|
|
39
39
|
description?: string | undefined;
|
|
40
40
|
tags?: string[] | undefined;
|
|
41
41
|
group_id?: number | undefined;
|
|
@@ -62,8 +62,8 @@ export declare const UpdateTicketInputSchema: z.ZodObject<{
|
|
|
62
62
|
priority?: 1 | 2 | 3 | 4 | undefined;
|
|
63
63
|
phone?: string | undefined;
|
|
64
64
|
name?: string | undefined;
|
|
65
|
-
subject?: string | null | undefined;
|
|
66
65
|
parent_id?: number | undefined;
|
|
66
|
+
subject?: string | null | undefined;
|
|
67
67
|
description?: string | undefined;
|
|
68
68
|
tags?: string[] | undefined;
|
|
69
69
|
group_id?: number | undefined;
|