@awell-health/awell-extensions 2.1.65 → 2.1.67
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 +1 -0
- package/dist/extensions/awell/index.js.map +1 -1
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/dataPoints.d.ts +10 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/dataPoints.js +14 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/dataPoints.js.map +1 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/fields.d.ts +3 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/fields.js +7 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/fields.js.map +1 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/index.d.ts +3 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/index.js +11 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/pathway.d.ts +11 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/pathway.js +9 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/config/pathway.js.map +1 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/getCurrentCareflowId.d.ts +4 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/getCurrentCareflowId.js +30 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/getCurrentCareflowId.js.map +1 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/index.d.ts +1 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/index.js +6 -0
- package/dist/extensions/awell/v1/actions/getCurrentCareflowId/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/index.d.ts +1 -0
- package/dist/extensions/awell/v1/actions/index.js +3 -1
- package/dist/extensions/awell/v1/actions/index.js.map +1 -1
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/fields.d.ts +10 -0
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/fields.js +9 -1
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/fields.js.map +1 -1
- package/dist/extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.js +93 -12
- package/dist/extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.js.map +1 -1
- package/dist/extensions/dateHelpers/actions/index.d.ts +7 -0
- package/dist/extensions/freshdesk/lib/api/schema/GetTicket.schema.d.ts +2 -2
- package/dist/extensions/freshdesk/lib/api/schema/UpdateTicket.schema.d.ts +4 -4
- package/dist/extensions/freshdesk/lib/api/schema/atoms/Ticket.Schema.d.ts +2 -2
- package/dist/extensions/healthie/lib/validation/sendFormCompletionRequest.zod.d.ts +8 -8
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ exports.Awell = {
|
|
|
32
32
|
getDataPointValue: actions_1.getDataPointValue,
|
|
33
33
|
listFormAnswers: actions_1.listFormAnswers,
|
|
34
34
|
createNaviSession: actions_1.createNaviSession,
|
|
35
|
+
getCurrentCareflowId: actions_1.getCurrentCareflowId,
|
|
35
36
|
},
|
|
36
37
|
webhooks: webhooks_1.webhooks,
|
|
37
38
|
};
|
|
@@ -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,0CAkBqB;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,wBAAwB,EAAxB,kCAAwB;QACxB,kBAAkB,EAAlB,4BAAkB;QAClB,uBAAuB,EAAvB,iCAAuB;QACvB,uBAAuB,EAAvB,iCAAuB;QACvB,iBAAiB,EAAjB,2BAAiB;QACjB,eAAe,EAAf,yBAAe;QACf,iBAAiB,EAAjB,2BAAiB;QACjB,oBAAoB,EAApB,8BAAoB;KACrB;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dataPoints = void 0;
|
|
4
|
+
exports.dataPoints = {
|
|
5
|
+
careFlowId: {
|
|
6
|
+
key: 'careFlowId',
|
|
7
|
+
valueType: 'string',
|
|
8
|
+
},
|
|
9
|
+
careFlowDefinitionId: {
|
|
10
|
+
key: 'careFlowDefinitionId',
|
|
11
|
+
valueType: 'string',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=dataPoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/getCurrentCareflowId/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,oBAAoB,EAAE;QACpB,GAAG,EAAE,sBAAsB;QAC3B,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.fields = {};
|
|
6
|
+
exports.FieldsValidationSchema = zod_1.z.object({});
|
|
7
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/getCurrentCareflowId/config/fields.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,MAAM,GAAG,EAAkC,CAAA;AAE3C,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAoD,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dataPoints = 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
|
+
var dataPoints_1 = require("./dataPoints");
|
|
10
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/getCurrentCareflowId/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,qCAAmD;AAA1C,kHAAA,uBAAuB,OAAA;AAChC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
definition_id: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=pathway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathway.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/getCurrentCareflowId/config/pathway.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCurrentCareflowId = 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
|
+
exports.getCurrentCareflowId = {
|
|
8
|
+
key: 'getCurrentCareflowId',
|
|
9
|
+
category: extensions_core_1.Category.WORKFLOW,
|
|
10
|
+
title: 'Get current care flow ID',
|
|
11
|
+
description: 'Get the current care flow ID',
|
|
12
|
+
fields: config_1.fields,
|
|
13
|
+
dataPoints: config_1.dataPoints,
|
|
14
|
+
previewable: false, // We don't have pathways in Preview, only cases.
|
|
15
|
+
onEvent: async ({ payload, onComplete, helpers }) => {
|
|
16
|
+
const { pathway: { id: currentCareflowId, definition_id: currentCareflowDefinitionId }, } = (0, extensions_core_1.validate)({
|
|
17
|
+
schema: zod_1.z.object({
|
|
18
|
+
pathway: config_1.PathwayValidationSchema,
|
|
19
|
+
}),
|
|
20
|
+
payload,
|
|
21
|
+
});
|
|
22
|
+
await onComplete({
|
|
23
|
+
data_points: {
|
|
24
|
+
careFlowId: currentCareflowId,
|
|
25
|
+
careFlowDefinitionId: currentCareflowDefinitionId,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=getCurrentCareflowId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCurrentCareflowId.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/getCurrentCareflowId/getCurrentCareflowId.ts"],"names":[],"mappings":";;;AAEA,mEAAkE;AAClE,qCAIiB;AACjB,6BAAuB;AAEV,QAAA,oBAAoB,GAA2C;IAC1E,GAAG,EAAE,sBAAsB;IAC3B,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,8BAA8B;IAChC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,KAAK,EAAE,iDAAiD;IACrE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAiB,EAAE;QACjE,MAAM,EACJ,OAAO,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,aAAa,EAAE,2BAA2B,EAAE,GAC/E,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,OAAO,EAAE,gCAAuB;aACjC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,UAAU,EAAE,iBAAiB;gBAC7B,oBAAoB,EAAE,2BAA2B;aAClD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getCurrentCareflowId } from './getCurrentCareflowId';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCurrentCareflowId = void 0;
|
|
4
|
+
var getCurrentCareflowId_1 = require("./getCurrentCareflowId");
|
|
5
|
+
Object.defineProperty(exports, "getCurrentCareflowId", { enumerable: true, get: function () { return getCurrentCareflowId_1.getCurrentCareflowId; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/getCurrentCareflowId/index.ts"],"names":[],"mappings":";;;AAAA,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA"}
|
|
@@ -14,3 +14,4 @@ export { startCareFlowAndSession } from './startCareFlowAndSession';
|
|
|
14
14
|
export { getDataPointValue } from './getDataPointValue';
|
|
15
15
|
export { listFormAnswers } from './listFormAnswers';
|
|
16
16
|
export { createNaviSession } from './createNaviSession';
|
|
17
|
+
export { getCurrentCareflowId } from './getCurrentCareflowId';
|
|
@@ -1,6 +1,6 @@
|
|
|
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.isPatientEnrolledInTrack = exports.isPatientEnrolledInCareFlow = exports.searchPatientsByPatientCode = exports.stopTrack = exports.stopCareFlow = exports.updatePatient = exports.startCareFlow = exports.addAdhocTrack = void 0;
|
|
3
|
+
exports.getCurrentCareflowId = exports.createNaviSession = exports.listFormAnswers = exports.getDataPointValue = exports.startCareFlowAndSession = exports.startHostedPagesSession = exports.addIdentifierToPatient = exports.getPatientByIdentifier = exports.updateBaselineInfo = exports.isPatientEnrolledInTrack = exports.isPatientEnrolledInCareFlow = exports.searchPatientsByPatientCode = exports.stopTrack = exports.stopCareFlow = exports.updatePatient = exports.startCareFlow = exports.addAdhocTrack = void 0;
|
|
4
4
|
var addAdhocTrack_1 = require("./addAdhocTrack");
|
|
5
5
|
Object.defineProperty(exports, "addAdhocTrack", { enumerable: true, get: function () { return addAdhocTrack_1.addAdhocTrack; } });
|
|
6
6
|
var startCareFlow_1 = require("./startCareFlow");
|
|
@@ -33,4 +33,6 @@ var listFormAnswers_1 = require("./listFormAnswers");
|
|
|
33
33
|
Object.defineProperty(exports, "listFormAnswers", { enumerable: true, get: function () { return listFormAnswers_1.listFormAnswers; } });
|
|
34
34
|
var createNaviSession_1 = require("./createNaviSession");
|
|
35
35
|
Object.defineProperty(exports, "createNaviSession", { enumerable: true, get: function () { return createNaviSession_1.createNaviSession; } });
|
|
36
|
+
var getCurrentCareflowId_1 = require("./getCurrentCareflowId");
|
|
37
|
+
Object.defineProperty(exports, "getCurrentCareflowId", { enumerable: true, get: function () { return getCurrentCareflowId_1.getCurrentCareflowId; } });
|
|
36
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -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,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,yCAAuC;AAA9B,sGAAA,SAAS,OAAA;AAClB,6EA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AiB,OAAA;AAC1B,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA"}
|
|
@@ -15,14 +15,24 @@ export declare const fields: {
|
|
|
15
15
|
type: FieldType.BOOLEAN;
|
|
16
16
|
required: false;
|
|
17
17
|
};
|
|
18
|
+
timezone: {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description: string;
|
|
22
|
+
type: FieldType.STRING;
|
|
23
|
+
required: false;
|
|
24
|
+
};
|
|
18
25
|
};
|
|
19
26
|
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
20
27
|
referenceDate: z.ZodOptional<z.ZodDate>;
|
|
21
28
|
includeReferenceDate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
29
|
+
timezone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
22
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
timezone: string;
|
|
23
32
|
includeReferenceDate: boolean;
|
|
24
33
|
referenceDate?: Date | undefined;
|
|
25
34
|
}, {
|
|
35
|
+
timezone?: string | undefined;
|
|
26
36
|
referenceDate?: Date | undefined;
|
|
27
37
|
includeReferenceDate?: boolean | undefined;
|
|
28
38
|
}>;
|
|
@@ -14,13 +14,21 @@ exports.fields = {
|
|
|
14
14
|
includeReferenceDate: {
|
|
15
15
|
id: 'includeReferenceDate',
|
|
16
16
|
label: 'Include reference date',
|
|
17
|
-
description: 'If this option is enabled and the reference date is a
|
|
17
|
+
description: 'If this option is enabled and the reference date is a work day, that date will be returned. If it is disabled, the next work day after the reference date will be returned.',
|
|
18
18
|
type: extensions_core_1.FieldType.BOOLEAN,
|
|
19
19
|
required: false,
|
|
20
20
|
},
|
|
21
|
+
timezone: {
|
|
22
|
+
id: 'timezone',
|
|
23
|
+
label: 'Timezone',
|
|
24
|
+
description: 'The IANA timezone identifier to use for the next workday calculation (e.g., "America/New_York", "Europe/London", "America/Chicago", "UTC"). If not specified, America/Chicago will be used.',
|
|
25
|
+
type: extensions_core_1.FieldType.STRING,
|
|
26
|
+
required: false,
|
|
27
|
+
},
|
|
21
28
|
};
|
|
22
29
|
exports.FieldsValidationSchema = zod_1.z.object({
|
|
23
30
|
referenceDate: zod_1.z.optional(zod_1.z.coerce.date()),
|
|
24
31
|
includeReferenceDate: zod_1.z.boolean().optional().default(true),
|
|
32
|
+
timezone: zod_1.z.string().optional().default('America/Chicago'),
|
|
25
33
|
});
|
|
26
34
|
//# sourceMappingURL=fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/getNextWorkday/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,qHAAqH;QACvH,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,sBAAsB;QAC1B,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/getNextWorkday/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,qHAAqH;QACvH,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,sBAAsB;QAC1B,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,6KAA6K;QAC/K,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,6LAA6L;QAC/L,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC1C,oBAAoB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1D,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;CACT,CAAC,CAAA"}
|
|
@@ -6,33 +6,114 @@ const config_1 = require("./config");
|
|
|
6
6
|
exports.getNextWorkday = {
|
|
7
7
|
key: 'getNextWorkday',
|
|
8
8
|
title: 'Get Next Workday',
|
|
9
|
-
description: 'Get the next workday',
|
|
9
|
+
description: 'Get the next US Federal workday (Defaults to America/Chicago time zone)',
|
|
10
10
|
category: extensions_core_1.Category.WORKFLOW,
|
|
11
11
|
fields: config_1.fields,
|
|
12
12
|
dataPoints: config_1.dataPoints,
|
|
13
13
|
previewable: true,
|
|
14
14
|
onActivityCreated: async (payload, onComplete, onError) => {
|
|
15
15
|
const { referenceDate: referenceDateInput, includeReferenceDate } = config_1.FieldsValidationSchema.parse(payload.fields);
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const toZonedStartOfDay = (date, tz) => {
|
|
17
|
+
const parts = new Intl.DateTimeFormat('en-US', {
|
|
18
|
+
timeZone: tz,
|
|
19
|
+
year: 'numeric',
|
|
20
|
+
month: 'numeric',
|
|
21
|
+
day: 'numeric',
|
|
22
|
+
})
|
|
23
|
+
.formatToParts(date)
|
|
24
|
+
.reduce((acc, part) => {
|
|
25
|
+
if (part.type === 'year')
|
|
26
|
+
acc.year = parseInt(part.value, 10);
|
|
27
|
+
if (part.type === 'month')
|
|
28
|
+
acc.month = parseInt(part.value, 10);
|
|
29
|
+
if (part.type === 'day')
|
|
30
|
+
acc.day = parseInt(part.value, 10);
|
|
31
|
+
return acc;
|
|
32
|
+
}, { year: 0, month: 0, day: 0 });
|
|
33
|
+
return new Date(Date.UTC(parts.year, parts.month - 1, parts.day, 0, 0, 0));
|
|
34
|
+
};
|
|
35
|
+
// Use provided timezone if present, default from validation schema is America/Chicago
|
|
36
|
+
const { timezone } = config_1.FieldsValidationSchema.parse(payload.fields);
|
|
37
|
+
let referenceDate = toZonedStartOfDay(referenceDateInput !== null && referenceDateInput !== void 0 ? referenceDateInput : new Date(), timezone);
|
|
19
38
|
const SUNDAY = 0;
|
|
20
39
|
const SATURDAY = 6;
|
|
21
|
-
const isWeekend = (date) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
40
|
+
const isWeekend = (date) => {
|
|
41
|
+
return date.getUTCDay() === SUNDAY || date.getUTCDay() === SATURDAY;
|
|
42
|
+
};
|
|
43
|
+
const isHoliday = (date) => {
|
|
44
|
+
const year = date.getUTCFullYear();
|
|
45
|
+
const makeDateUTC = (y, mZero, d) => new Date(Date.UTC(y, mZero, d, 0, 0, 0, 0));
|
|
46
|
+
const isSameUTCDate = (a, b) => a.getUTCFullYear() === b.getUTCFullYear() &&
|
|
47
|
+
a.getUTCMonth() === b.getUTCMonth() &&
|
|
48
|
+
a.getUTCDate() === b.getUTCDate();
|
|
49
|
+
const observedFixed = (y, mZero, d) => {
|
|
50
|
+
const actual = makeDateUTC(y, mZero, d);
|
|
51
|
+
const dow = actual.getUTCDay();
|
|
52
|
+
if (dow === 0) {
|
|
53
|
+
// Sunday -> observed Monday
|
|
54
|
+
return makeDateUTC(y, mZero, d + 1);
|
|
55
|
+
}
|
|
56
|
+
if (dow === 6) {
|
|
57
|
+
// Saturday -> observed Friday
|
|
58
|
+
return makeDateUTC(y, mZero, d - 1);
|
|
59
|
+
}
|
|
60
|
+
return actual;
|
|
61
|
+
};
|
|
62
|
+
const nthWeekdayOfMonth = (y, mZero, weekday, n) => {
|
|
63
|
+
const firstOfMonth = makeDateUTC(y, mZero, 1);
|
|
64
|
+
const firstDow = firstOfMonth.getUTCDay();
|
|
65
|
+
const day = 1 + ((7 + weekday - firstDow) % 7) + (n - 1) * 7;
|
|
66
|
+
return makeDateUTC(y, mZero, day);
|
|
67
|
+
};
|
|
68
|
+
const lastWeekdayOfMonth = (y, mZero, weekday) => {
|
|
69
|
+
const lastOfMonth = new Date(Date.UTC(y, mZero + 1, 0));
|
|
70
|
+
const lastDow = lastOfMonth.getUTCDay();
|
|
71
|
+
const day = lastOfMonth.getUTCDate() - ((7 + (lastDow - weekday)) % 7);
|
|
72
|
+
return makeDateUTC(y, mZero, day);
|
|
73
|
+
};
|
|
74
|
+
// US Federal holidays (observed):
|
|
75
|
+
const holidays = [];
|
|
76
|
+
// New Year's Day (may be observed on Dec 31 of previous year)
|
|
77
|
+
holidays.push(observedFixed(year, 0, 1));
|
|
78
|
+
// Also include observed date for next year's New Year in case it falls on Dec 31 of this year
|
|
79
|
+
holidays.push(observedFixed(year + 1, 0, 1));
|
|
80
|
+
// Martin Luther King Jr. Day (3rd Monday of January)
|
|
81
|
+
holidays.push(nthWeekdayOfMonth(year, 0, 1, 3));
|
|
82
|
+
// Presidents' Day (3rd Monday of February)
|
|
83
|
+
holidays.push(nthWeekdayOfMonth(year, 1, 1, 3));
|
|
84
|
+
// Memorial Day (last Monday of May)
|
|
85
|
+
holidays.push(lastWeekdayOfMonth(year, 4, 1));
|
|
86
|
+
// Juneteenth (June 19, observed)
|
|
87
|
+
holidays.push(observedFixed(year, 5, 19));
|
|
88
|
+
// Independence Day (July 4, observed)
|
|
89
|
+
holidays.push(observedFixed(year, 6, 4));
|
|
90
|
+
// Labor Day (1st Monday of September)
|
|
91
|
+
holidays.push(nthWeekdayOfMonth(year, 8, 1, 1));
|
|
92
|
+
// Columbus Day / Indigenous Peoples' Day (2nd Monday of October)
|
|
93
|
+
holidays.push(nthWeekdayOfMonth(year, 9, 1, 2));
|
|
94
|
+
// Veterans Day (Nov 11, observed)
|
|
95
|
+
holidays.push(observedFixed(year, 10, 11));
|
|
96
|
+
// Thanksgiving (4th Thursday of November)
|
|
97
|
+
holidays.push(nthWeekdayOfMonth(year, 10, 4, 4));
|
|
98
|
+
// Christmas Day (Dec 25, observed)
|
|
99
|
+
holidays.push(observedFixed(year, 11, 25));
|
|
100
|
+
return holidays.some((h) => isSameUTCDate(date, h));
|
|
101
|
+
};
|
|
102
|
+
const referenceDateIsWeekday = (referenceDate) => !isWeekend(referenceDate) && !isHoliday(referenceDate);
|
|
103
|
+
// If reference date is a weekday and we should *not* include it, move forward by one day (in timezone)
|
|
104
|
+
const refIsWeekday = referenceDateIsWeekday(referenceDate);
|
|
105
|
+
if (!includeReferenceDate && refIsWeekday) {
|
|
106
|
+
referenceDate.setUTCDate(referenceDate.getUTCDate() + 1);
|
|
26
107
|
}
|
|
27
108
|
// If resultDate is a weekend, keep moving forward to the next weekday
|
|
28
|
-
while (
|
|
29
|
-
referenceDate.
|
|
109
|
+
while (!referenceDateIsWeekday(referenceDate)) {
|
|
110
|
+
referenceDate.setUTCDate(referenceDate.getUTCDate() + 1);
|
|
30
111
|
}
|
|
31
112
|
const nextWorkday = referenceDate.toISOString();
|
|
32
113
|
await onComplete({
|
|
33
114
|
data_points: {
|
|
34
115
|
nextWorkday,
|
|
35
|
-
referenceDateIsWeekday: String(
|
|
116
|
+
referenceDateIsWeekday: String(refIsWeekday),
|
|
36
117
|
},
|
|
37
118
|
});
|
|
38
119
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNextWorkday.js","sourceRoot":"","sources":["../../../../../extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,qCAAqE;AAExD,QAAA,cAAc,GAIvB;IACF,GAAG,EAAE,gBAAgB;IACrB,KAAK,EAAE,kBAAkB;IACzB,WAAW,
|
|
1
|
+
{"version":3,"file":"getNextWorkday.js","sourceRoot":"","sources":["../../../../../extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,qCAAqE;AAExD,QAAA,cAAc,GAIvB;IACF,GAAG,EAAE,gBAAgB;IACrB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,yEAAyE;IAC3E,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,aAAa,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,GAC/D,+BAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAE9C,MAAM,iBAAiB,GAAG,CAAC,IAAU,EAAE,EAAU,EAAQ,EAAE;YACzD,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;gBAC7C,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,GAAG,EAAE,SAAS;aACf,CAAC;iBACC,aAAa,CAAC,IAAI,CAAC;iBACnB,MAAM,CACL,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBACZ,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;oBAAE,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;gBAC7D,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;oBAAE,GAAG,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;gBAC/D,IAAI,IAAI,CAAC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CAAC,EAAE,CAAC;YAC9C,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAA;QAC1D,CAAC;QAED,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,EAAE,CAAA;QAE/C,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,WAAW;gBACX,sBAAsB,EAAE,MAAM,CAAC,YAAY,CAAC;aAC7C;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -14,6 +14,13 @@ export declare const actions: {
|
|
|
14
14
|
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
|
15
15
|
required: false;
|
|
16
16
|
};
|
|
17
|
+
timezone: {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
description: string;
|
|
21
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
|
22
|
+
required: false;
|
|
23
|
+
};
|
|
17
24
|
}, {}, "nextWorkday" | "referenceDateIsWeekday">;
|
|
18
25
|
checkWorkingHours: import("@awell-health/extensions-core").Action<{
|
|
19
26
|
workingHoursStart: {
|
|
@@ -47,7 +47,7 @@ export declare const GetTicketResponseSchema: z.ZodObject<{
|
|
|
47
47
|
fr_escalated: boolean;
|
|
48
48
|
requester_id: number;
|
|
49
49
|
responder_id: number | null;
|
|
50
|
-
source: 1 | 2 | 3 | 7 |
|
|
50
|
+
source: 1 | 2 | 3 | 7 | 9 | 10;
|
|
51
51
|
spam: boolean;
|
|
52
52
|
to_emails: string[] | null;
|
|
53
53
|
product_id: number | null;
|
|
@@ -77,7 +77,7 @@ export declare const GetTicketResponseSchema: z.ZodObject<{
|
|
|
77
77
|
fr_escalated: boolean;
|
|
78
78
|
requester_id: number;
|
|
79
79
|
responder_id: number | null;
|
|
80
|
-
source: 1 | 2 | 3 | 7 |
|
|
80
|
+
source: 1 | 2 | 3 | 7 | 9 | 10;
|
|
81
81
|
spam: boolean;
|
|
82
82
|
to_emails: string[] | null;
|
|
83
83
|
product_id: number | null;
|
|
@@ -42,7 +42,7 @@ export declare const UpdateTicketInputSchema: z.ZodObject<{
|
|
|
42
42
|
email_config_id?: number | undefined;
|
|
43
43
|
requester_id?: number | undefined;
|
|
44
44
|
responder_id?: number | undefined;
|
|
45
|
-
source?: 1 | 2 | 3 | 7 |
|
|
45
|
+
source?: 1 | 2 | 3 | 7 | 9 | 10 | undefined;
|
|
46
46
|
company_id?: number | undefined;
|
|
47
47
|
product_id?: number | undefined;
|
|
48
48
|
due_by?: string | undefined;
|
|
@@ -70,7 +70,7 @@ export declare const UpdateTicketInputSchema: z.ZodObject<{
|
|
|
70
70
|
email_config_id?: number | undefined;
|
|
71
71
|
requester_id?: number | undefined;
|
|
72
72
|
responder_id?: number | undefined;
|
|
73
|
-
source?: 1 | 2 | 3 | 7 |
|
|
73
|
+
source?: 1 | 2 | 3 | 7 | 9 | 10 | undefined;
|
|
74
74
|
company_id?: number | undefined;
|
|
75
75
|
product_id?: number | undefined;
|
|
76
76
|
due_by?: string | undefined;
|
|
@@ -133,7 +133,7 @@ export declare const UpdateTicketResponseSchema: z.ZodObject<{
|
|
|
133
133
|
fr_escalated: boolean;
|
|
134
134
|
requester_id: number;
|
|
135
135
|
responder_id: number | null;
|
|
136
|
-
source: 1 | 2 | 3 | 7 |
|
|
136
|
+
source: 1 | 2 | 3 | 7 | 9 | 10;
|
|
137
137
|
spam: boolean;
|
|
138
138
|
to_emails: string[] | null;
|
|
139
139
|
product_id: number | null;
|
|
@@ -163,7 +163,7 @@ export declare const UpdateTicketResponseSchema: z.ZodObject<{
|
|
|
163
163
|
fr_escalated: boolean;
|
|
164
164
|
requester_id: number;
|
|
165
165
|
responder_id: number | null;
|
|
166
|
-
source: 1 | 2 | 3 | 7 |
|
|
166
|
+
source: 1 | 2 | 3 | 7 | 9 | 10;
|
|
167
167
|
spam: boolean;
|
|
168
168
|
to_emails: string[] | null;
|
|
169
169
|
product_id: number | null;
|
|
@@ -47,7 +47,7 @@ export declare const TicketSchema: z.ZodObject<{
|
|
|
47
47
|
fr_escalated: boolean;
|
|
48
48
|
requester_id: number;
|
|
49
49
|
responder_id: number | null;
|
|
50
|
-
source: 1 | 2 | 3 | 7 |
|
|
50
|
+
source: 1 | 2 | 3 | 7 | 9 | 10;
|
|
51
51
|
spam: boolean;
|
|
52
52
|
to_emails: string[] | null;
|
|
53
53
|
product_id: number | null;
|
|
@@ -77,7 +77,7 @@ export declare const TicketSchema: z.ZodObject<{
|
|
|
77
77
|
fr_escalated: boolean;
|
|
78
78
|
requester_id: number;
|
|
79
79
|
responder_id: number | null;
|
|
80
|
-
source: 1 | 2 | 3 | 7 |
|
|
80
|
+
source: 1 | 2 | 3 | 7 | 9 | 10;
|
|
81
81
|
spam: boolean;
|
|
82
82
|
to_emails: string[] | null;
|
|
83
83
|
product_id: number | null;
|
|
@@ -14,10 +14,10 @@ export declare const FieldsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14
14
|
healthie_patient_id: string;
|
|
15
15
|
form_id: string;
|
|
16
16
|
period?: string | undefined;
|
|
17
|
-
minute?: string | undefined;
|
|
18
17
|
hour?: string | undefined;
|
|
19
|
-
|
|
18
|
+
minute?: string | undefined;
|
|
20
19
|
weekday?: string | undefined;
|
|
20
|
+
frequency?: string | undefined;
|
|
21
21
|
monthday?: string | undefined;
|
|
22
22
|
is_recurring?: boolean | undefined;
|
|
23
23
|
ends_on?: string | undefined;
|
|
@@ -25,10 +25,10 @@ export declare const FieldsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
25
25
|
healthie_patient_id: string;
|
|
26
26
|
form_id: string;
|
|
27
27
|
period?: string | undefined;
|
|
28
|
-
minute?: string | undefined;
|
|
29
28
|
hour?: string | undefined;
|
|
30
|
-
|
|
29
|
+
minute?: string | undefined;
|
|
31
30
|
weekday?: string | undefined;
|
|
31
|
+
frequency?: string | undefined;
|
|
32
32
|
monthday?: string | undefined;
|
|
33
33
|
is_recurring?: boolean | undefined;
|
|
34
34
|
ends_on?: "" | Date | undefined;
|
|
@@ -36,10 +36,10 @@ export declare const FieldsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
36
36
|
healthie_patient_id: string;
|
|
37
37
|
form_id: string;
|
|
38
38
|
period?: string | undefined;
|
|
39
|
-
minute?: string | undefined;
|
|
40
39
|
hour?: string | undefined;
|
|
41
|
-
|
|
40
|
+
minute?: string | undefined;
|
|
42
41
|
weekday?: string | undefined;
|
|
42
|
+
frequency?: string | undefined;
|
|
43
43
|
monthday?: string | undefined;
|
|
44
44
|
is_recurring?: boolean | undefined;
|
|
45
45
|
ends_on?: string | undefined;
|
|
@@ -47,10 +47,10 @@ export declare const FieldsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
47
47
|
healthie_patient_id: string;
|
|
48
48
|
form_id: string;
|
|
49
49
|
period?: string | undefined;
|
|
50
|
-
minute?: string | undefined;
|
|
51
50
|
hour?: string | undefined;
|
|
52
|
-
|
|
51
|
+
minute?: string | undefined;
|
|
53
52
|
weekday?: string | undefined;
|
|
53
|
+
frequency?: string | undefined;
|
|
54
54
|
monthday?: string | undefined;
|
|
55
55
|
is_recurring?: boolean | undefined;
|
|
56
56
|
ends_on?: "" | Date | undefined;
|