@awell-health/awell-extensions 2.1.207 → 2.1.209
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/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/isPatientEnrolledInCareFlow/config/fields.d.ts +5 -0
- package/dist/extensions/awell/v1/actions/isPatientEnrolledInCareFlow/config/fields.js +11 -4
- package/dist/extensions/awell/v1/actions/isPatientEnrolledInCareFlow/config/fields.js.map +1 -1
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/fields.d.ts +22 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/fields.js +40 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/fields.js.map +1 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/index.d.ts +2 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/index.js +9 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/pathway.d.ts +4 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/pathway.js +6 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/config/pathway.js.map +1 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/index.d.ts +1 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/index.js +6 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/pauseCareFlow.d.ts +4 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/pauseCareFlow.js +66 -0
- package/dist/extensions/awell/v1/actions/pauseCareFlow/pauseCareFlow.js.map +1 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/config/fields.d.ts +14 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/config/fields.js +22 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/config/fields.js.map +1 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/config/index.d.ts +1 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/config/index.js +7 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/config/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/index.d.ts +1 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/index.js +6 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/index.js.map +1 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/unpauseCareFlow.d.ts +4 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/unpauseCareFlow.js +64 -0
- package/dist/extensions/awell/v1/actions/unpauseCareFlow/unpauseCareFlow.js.map +1 -0
- package/dist/extensions/awell/v1/gql/graphql.d.ts +16 -0
- package/dist/extensions/awell/v1/gql/graphql.js +1 -0
- package/dist/extensions/awell/v1/gql/graphql.js.map +1 -1
- package/dist/extensions/awell/v1/sdk/awellSdk.d.ts +3 -1
- package/dist/extensions/awell/v1/sdk/awellSdk.js +14 -0
- package/dist/extensions/awell/v1/sdk/awellSdk.js.map +1 -1
- package/dist/extensions/awell/v1/sdk/graphql/index.d.ts +2 -0
- package/dist/extensions/awell/v1/sdk/graphql/index.js +5 -1
- package/dist/extensions/awell/v1/sdk/graphql/index.js.map +1 -1
- package/dist/extensions/awell/v1/sdk/graphql/pauseCareFlow.mutation.d.ts +1 -0
- package/dist/extensions/awell/v1/sdk/graphql/pauseCareFlow.mutation.js +12 -0
- package/dist/extensions/awell/v1/sdk/graphql/pauseCareFlow.mutation.js.map +1 -0
- package/dist/extensions/awell/v1/sdk/graphql/unpauseCareFlow.mutation.d.ts +1 -0
- package/dist/extensions/awell/v1/sdk/graphql/unpauseCareFlow.mutation.js +12 -0
- package/dist/extensions/awell/v1/sdk/graphql/unpauseCareFlow.mutation.js.map +1 -0
- package/dist/extensions/markdown.json +3 -3
- package/dist/extensions/zendesk/v1/actions/updateTicket/config/fields.d.ts +1 -1
- package/dist/extensions/zendesk/v1/actions/updateTicket/config/fields.js +1 -1
- package/dist/extensions/zendesk/v1/actions/updateTicket/config/fields.js.map +1 -1
- package/package.json +1 -1
|
@@ -24,6 +24,8 @@ exports.Awell = {
|
|
|
24
24
|
updatePatient: actions_1.updatePatient,
|
|
25
25
|
stopCareFlow: actions_1.stopCareFlow,
|
|
26
26
|
stopTrack: actions_1.stopTrack,
|
|
27
|
+
pauseCareFlow: actions_1.pauseCareFlow,
|
|
28
|
+
unpauseCareFlow: actions_1.unpauseCareFlow,
|
|
27
29
|
searchPatientsByPatientCode: actions_1.searchPatientsByPatientCode,
|
|
28
30
|
isPatientEnrolledInCareFlow: actions_1.isPatientEnrolledInCareFlow,
|
|
29
31
|
isPatientEnrolledInTrack: actions_1.isPatientEnrolledInTrack,
|
|
@@ -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,0CAqBqB;AAErB,yCAAqC;AACrC,4CAAwC;AACxC,8CAA0C;AAC1C,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,aAAa,EAAb,uBAAa;QACb,eAAe,EAAf,yBAAe;QACf,2BAA2B,EAA3B,qCAA2B;QAC3B,2BAA2B,EAA3B,qCAA2B;QAC3B,wBAAwB,EAAxB,kCAAwB;QACxB,kBAAkB,EAAlB,4BAAkB;QAClB,uBAAuB,EAAvB,iCAAuB;QACvB,kBAAkB,EAAlB,4BAAkB;QAClB,uBAAuB,EAAvB,iCAAuB;QACvB,iBAAiB,EAAjB,2BAAiB;QACjB,eAAe,EAAf,yBAAe;QACf,iBAAiB,EAAjB,2BAAiB;QACjB,oBAAoB,EAApB,8BAAoB;KACrB;IACD,QAAQ,EAAR,mBAAQ;IACR,UAAU,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE;IACjD,SAAS,EAAT,qBAAS;CACV,CAAA"}
|
|
@@ -3,6 +3,8 @@ export { startCareFlow } from './startCareFlow';
|
|
|
3
3
|
export { updatePatient } from './updatePatient';
|
|
4
4
|
export { stopCareFlow } from './stopCareFlow';
|
|
5
5
|
export { stopTrack } from './stopTrack';
|
|
6
|
+
export { pauseCareFlow } from './pauseCareFlow';
|
|
7
|
+
export { unpauseCareFlow } from './unpauseCareFlow';
|
|
6
8
|
export { searchPatientsByPatientCode } from './searchPatientsByPatientCode';
|
|
7
9
|
export { isPatientEnrolledInCareFlow } from './isPatientEnrolledInCareFlow';
|
|
8
10
|
export { isPatientEnrolledInTrack } from './isPatientEnrolledInTrack';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCurrentCareflowId = exports.createNaviSession = exports.listFormAnswers = exports.getDataPointValue = exports.startCareFlowAndSession = exports.getHostedPagesLink = 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.getHostedPagesLink = exports.startHostedPagesSession = exports.addIdentifierToPatient = exports.getPatientByIdentifier = exports.updateBaselineInfo = exports.isPatientEnrolledInTrack = exports.isPatientEnrolledInCareFlow = exports.searchPatientsByPatientCode = exports.unpauseCareFlow = exports.pauseCareFlow = 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");
|
|
@@ -11,6 +11,10 @@ var stopCareFlow_1 = require("./stopCareFlow");
|
|
|
11
11
|
Object.defineProperty(exports, "stopCareFlow", { enumerable: true, get: function () { return stopCareFlow_1.stopCareFlow; } });
|
|
12
12
|
var stopTrack_1 = require("./stopTrack");
|
|
13
13
|
Object.defineProperty(exports, "stopTrack", { enumerable: true, get: function () { return stopTrack_1.stopTrack; } });
|
|
14
|
+
var pauseCareFlow_1 = require("./pauseCareFlow");
|
|
15
|
+
Object.defineProperty(exports, "pauseCareFlow", { enumerable: true, get: function () { return pauseCareFlow_1.pauseCareFlow; } });
|
|
16
|
+
var unpauseCareFlow_1 = require("./unpauseCareFlow");
|
|
17
|
+
Object.defineProperty(exports, "unpauseCareFlow", { enumerable: true, get: function () { return unpauseCareFlow_1.unpauseCareFlow; } });
|
|
14
18
|
var searchPatientsByPatientCode_1 = require("./searchPatientsByPatientCode");
|
|
15
19
|
Object.defineProperty(exports, "searchPatientsByPatientCode", { enumerable: true, get: function () { return searchPatientsByPatientCode_1.searchPatientsByPatientCode; } });
|
|
16
20
|
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,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,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA;AACjC,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,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,+DAA6D;AAApD,4HAAA,oBAAoB,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,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA;AACjC,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,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { FieldType } from '@awell-health/extensions-core';
|
|
3
3
|
import { type PathwayStatus } from '@awell-health/awell-sdk';
|
|
4
|
+
/**
|
|
5
|
+
* The published SDK enum predates the `paused` care flow status, so it is added here
|
|
6
|
+
* explicitly. Drop the manual addition once the SDK enum includes it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const possiblePathwayStatuses: string[];
|
|
4
9
|
export declare const fields: {
|
|
5
10
|
pathwayStatus: {
|
|
6
11
|
id: string;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldsValidationSchema = exports.fields = void 0;
|
|
3
|
+
exports.FieldsValidationSchema = exports.fields = exports.possiblePathwayStatuses = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
7
7
|
const awell_sdk_1 = require("@awell-health/awell-sdk");
|
|
8
|
+
/**
|
|
9
|
+
* The published SDK enum predates the `paused` care flow status, so it is added here
|
|
10
|
+
* explicitly. Drop the manual addition once the SDK enum includes it.
|
|
11
|
+
*/
|
|
12
|
+
exports.possiblePathwayStatuses = [
|
|
13
|
+
...Object.values(awell_sdk_1.enumPathwayStatus),
|
|
14
|
+
'paused',
|
|
15
|
+
];
|
|
8
16
|
exports.fields = {
|
|
9
17
|
pathwayStatus: {
|
|
10
18
|
id: 'pathwayStatus',
|
|
11
19
|
label: 'Pathway status',
|
|
12
|
-
description: `A comma-separated string of care flow statuses that will be used when looking for care flows the patient is already enrolled in. By default, we only look at active care flows. Possible values are: ${
|
|
20
|
+
description: `A comma-separated string of care flow statuses that will be used when looking for care flows the patient is already enrolled in. By default, we only look at active care flows. Possible values are: ${exports.possiblePathwayStatuses.join(', ')}.`,
|
|
13
21
|
type: extensions_core_1.FieldType.STRING,
|
|
14
22
|
required: false,
|
|
15
23
|
/**
|
|
@@ -46,8 +54,7 @@ exports.FieldsValidationSchema = zod_1.z.object({
|
|
|
46
54
|
.transform((chars) => chars.replace(/[\s"]/g, '')) // Strip whitespace and quotation marks
|
|
47
55
|
.transform((chars) => chars.split(','))
|
|
48
56
|
.transform((strArray) => {
|
|
49
|
-
|
|
50
|
-
return strArray.filter((str) => possibleStatuses.includes(str));
|
|
57
|
+
return strArray.filter((str) => exports.possiblePathwayStatuses.includes(str));
|
|
51
58
|
})),
|
|
52
59
|
careFlowDefinitionIds: zod_1.z.optional(zod_1.z
|
|
53
60
|
.string()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/isPatientEnrolledInCareFlow/config/fields.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AACvC,6BAAqC;AACrC,mEAAqE;AACrE,uDAA+E;
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/isPatientEnrolledInCareFlow/config/fields.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AACvC,6BAAqC;AACrC,mEAAqE;AACrE,uDAA+E;AAE/E;;;GAGG;AACU,QAAA,uBAAuB,GAAa;IAC/C,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAiB,CAAC;IACnC,QAAQ;CACT,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,wMAAwM,+BAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QAC1P,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf;;;;;WAKG;QACH,aAAa;QACb,qEAAqE;QACrE,mDAAmD;QACnD,qBAAqB;QACrB,SAAS;QACT,KAAK;KACN;IACD,qBAAqB,EAAE;QACrB,EAAE,EAAE,uBAAuB;QAC3B,KAAK,EAAE,0BAA0B;QACjC,WAAW,EACT,mSAAmS;QACrS,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,iGAAiG;QACnG,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,OAAC,CAAC,QAAQ,CACvB,OAAC;SACE,MAAM,EAAE;SACR,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,uCAAuC;SACzF,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACtC,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE;QACtB,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAC7B,+BAAuB,CAAC,QAAQ,CAAC,GAAG,CAAC,CACnB,CAAA;IACtB,CAAC,CAAC,CACL;IACD,qBAAqB,EAAE,OAAC,CAAC,QAAQ,CAC/B,OAAC;SACE,MAAM,EAAE;SACR,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,0CAA0C;SACzF,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACtC,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE,CACtB,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAA,cAAK,EAAC,GAAG,CAAC,IAAI,CAAC,IAAA,gBAAO,EAAC,GAAG,CAAC,CAAC,CACvD,CACJ;IACD,QAAQ,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;CACc,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const fields: {
|
|
4
|
+
careFlowIds: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: FieldType.STRING;
|
|
9
|
+
required: false;
|
|
10
|
+
};
|
|
11
|
+
reason: {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
description: string;
|
|
15
|
+
type: FieldType.STRING;
|
|
16
|
+
required: false;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
20
|
+
careFlowIds: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[], string | undefined>>;
|
|
21
|
+
reason: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 lodash_1 = require("lodash");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
exports.fields = {
|
|
8
|
+
careFlowIds: {
|
|
9
|
+
id: 'careFlowIds',
|
|
10
|
+
label: 'Care flow ID(s)',
|
|
11
|
+
description: 'The care flow ID(s) to pause. You can pause multiple care flows at once by separating the IDs with a comma. If not provided, the current care flow will be paused.',
|
|
12
|
+
type: extensions_core_1.FieldType.STRING,
|
|
13
|
+
required: false,
|
|
14
|
+
},
|
|
15
|
+
reason: {
|
|
16
|
+
id: 'reason',
|
|
17
|
+
label: 'Reason',
|
|
18
|
+
description: 'The reason why you want to pause the care flow.',
|
|
19
|
+
type: extensions_core_1.FieldType.STRING,
|
|
20
|
+
required: false,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
|
24
|
+
careFlowIds: zod_1.z
|
|
25
|
+
.string()
|
|
26
|
+
.optional()
|
|
27
|
+
.transform((str) => {
|
|
28
|
+
// Remove all whitespace from the string
|
|
29
|
+
const cleanedStr = str === null || str === void 0 ? void 0 : str.replace(/\s/g, '');
|
|
30
|
+
if ((0, lodash_1.isNil)(cleanedStr) || (0, lodash_1.isEmpty)(cleanedStr)) {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
return cleanedStr.split(',');
|
|
34
|
+
}),
|
|
35
|
+
reason: zod_1.z
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.default('Default message: Paused by extension.'),
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/pauseCareFlow/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,mCAAuC;AACvC,6BAAqC;AAExB,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,oKAAoK;QACtK,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,iDAAiD;QAC9D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,OAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;QACjB,wCAAwC;QACxC,MAAM,UAAU,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAC1C,IAAI,IAAA,cAAK,EAAC,UAAU,CAAC,IAAI,IAAA,gBAAO,EAAC,UAAU,CAAC,EAAE,CAAC;YAC7C,OAAO,EAAE,CAAA;QACX,CAAC;QACD,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC9B,CAAC,CAAC;IACJ,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,uCAAuC,CAAC;CACL,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/pauseCareFlow/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/pauseCareFlow/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 { pauseCareFlow } from './pauseCareFlow';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pauseCareFlow = void 0;
|
|
4
|
+
var pauseCareFlow_1 = require("./pauseCareFlow");
|
|
5
|
+
Object.defineProperty(exports, "pauseCareFlow", { enumerable: true, get: function () { return pauseCareFlow_1.pauseCareFlow; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/pauseCareFlow/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.pauseCareFlow = void 0;
|
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
8
|
+
const config_1 = require("./config");
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const awellSdk_1 = __importDefault(require("../../sdk/awellSdk"));
|
|
11
|
+
const addEventLog_1 = require("../../../../../src/lib/awell/addEventLog");
|
|
12
|
+
exports.pauseCareFlow = {
|
|
13
|
+
key: 'pauseCareFlow',
|
|
14
|
+
category: extensions_core_1.Category.WORKFLOW,
|
|
15
|
+
title: 'Pause care flow',
|
|
16
|
+
description: 'Pause a care flow. While paused, nothing in the care flow progresses: no new steps, messages, forms or actions are activated. Timers keep counting from their original start, so a timer that is due during the pause fires as soon as the care flow is resumed. Resume with the "Unpause care flow" action or the unpauseCareFlow API mutation.',
|
|
17
|
+
fields: config_1.fields,
|
|
18
|
+
previewable: false,
|
|
19
|
+
supports_automated_retries: true,
|
|
20
|
+
onEvent: async ({ payload, onComplete, onError, helpers }) => {
|
|
21
|
+
helpers.log({ fields: payload.fields }, 'Processing pauseCareFlow');
|
|
22
|
+
try {
|
|
23
|
+
const { fields: { careFlowIds, reason }, pathway: { id: currentCareFlowId }, } = (0, extensions_core_1.validate)({
|
|
24
|
+
schema: zod_1.z.object({
|
|
25
|
+
fields: config_1.FieldsValidationSchema,
|
|
26
|
+
pathway: config_1.PathwayValidationSchema,
|
|
27
|
+
}),
|
|
28
|
+
payload,
|
|
29
|
+
});
|
|
30
|
+
const { apiKey, apiUrl } = await helpers.awellSdk();
|
|
31
|
+
const sdk = new awellSdk_1.default({ apiKey, apiUrl: apiUrl });
|
|
32
|
+
const idsToPause = careFlowIds.length > 0 ? careFlowIds : [currentCareFlowId];
|
|
33
|
+
const events = [];
|
|
34
|
+
for (const [index, careFlowId] of idsToPause.entries()) {
|
|
35
|
+
await sdk.pauseCareFlow({ careflow_id: careFlowId, reason });
|
|
36
|
+
events.push((0, addEventLog_1.addActivityEventLog)({
|
|
37
|
+
message: `Care flow ${careFlowId} successfully paused.`,
|
|
38
|
+
}));
|
|
39
|
+
// wait 1 second between calls for rate limiting
|
|
40
|
+
if (index < idsToPause.length - 1) {
|
|
41
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
await onComplete({
|
|
45
|
+
events,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
helpers.log({ err }, 'error', err);
|
|
50
|
+
const error = err;
|
|
51
|
+
await onError({
|
|
52
|
+
events: [
|
|
53
|
+
{
|
|
54
|
+
date: new Date().toISOString(),
|
|
55
|
+
text: { en: error.message },
|
|
56
|
+
error: {
|
|
57
|
+
category: 'SERVER_ERROR',
|
|
58
|
+
message: error.message,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=pauseCareFlow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pauseCareFlow.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/pauseCareFlow/pauseCareFlow.ts"],"names":[],"mappings":";;;;;;AAEA,mEAAkE;AAClE,qCAIiB;AACjB,6BAAuB;AACvB,kEAAyC;AACzC,0EAA8E;AAEjE,QAAA,aAAa,GAA2C;IACnE,GAAG,EAAE,eAAe;IACpB,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,kVAAkV;IACpV,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,0BAA0B,EAAE,IAAI;IAChC,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAiB,EAAE;QAC1E,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,0BAA0B,CAAC,CAAA;QAEnE,IAAI,CAAC;YACH,MAAM,EACJ,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,EAC/B,OAAO,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,GACnC,GAAG,IAAA,0BAAQ,EAAC;gBACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;oBACf,MAAM,EAAE,+BAAsB;oBAC9B,OAAO,EAAE,gCAAuB;iBACjC,CAAC;gBACF,OAAO;aACR,CAAC,CAAA;YAEF,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;YACnD,MAAM,GAAG,GAAG,IAAI,kBAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAg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|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const fields: {
|
|
4
|
+
careFlowIds: {
|
|
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
|
+
careFlowIds: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>, z.ZodTransform<string[], string>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
careFlowIds: {
|
|
8
|
+
id: 'careFlowIds',
|
|
9
|
+
label: 'Care flow ID(s)',
|
|
10
|
+
description: 'The paused care flow ID(s) to resume. You can resume multiple care flows at once by separating the IDs with a comma. A paused care flow cannot run actions, so this must be a different care flow than the one this action runs in.',
|
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
|
16
|
+
careFlowIds: zod_1.z
|
|
17
|
+
.string()
|
|
18
|
+
.transform((str) => str.replace(/\s/g, ''))
|
|
19
|
+
.pipe(zod_1.z.string().min(1, 'At least one care flow ID is required'))
|
|
20
|
+
.transform((str) => str.split(',')),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/unpauseCareFlow/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAqC;AAExB,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,qOAAqO;QACvO,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,OAAC;SACX,MAAM,EAAE;SACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;SAC1C,IAAI,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uCAAuC,CAAC,CAAC;SAChE,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;CACS,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { fields, FieldsValidationSchema } from './fields';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
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
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/unpauseCareFlow/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { unpauseCareFlow } from './unpauseCareFlow';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unpauseCareFlow = void 0;
|
|
4
|
+
var unpauseCareFlow_1 = require("./unpauseCareFlow");
|
|
5
|
+
Object.defineProperty(exports, "unpauseCareFlow", { enumerable: true, get: function () { return unpauseCareFlow_1.unpauseCareFlow; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/unpauseCareFlow/index.ts"],"names":[],"mappings":";;;AAAA,qDAAmD;AAA1C,kHAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.unpauseCareFlow = void 0;
|
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
8
|
+
const config_1 = require("./config");
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const awellSdk_1 = __importDefault(require("../../sdk/awellSdk"));
|
|
11
|
+
const addEventLog_1 = require("../../../../../src/lib/awell/addEventLog");
|
|
12
|
+
exports.unpauseCareFlow = {
|
|
13
|
+
key: 'unpauseCareFlow',
|
|
14
|
+
category: extensions_core_1.Category.WORKFLOW,
|
|
15
|
+
title: 'Unpause care flow',
|
|
16
|
+
description: 'Resume one or more paused care flows. Anything that became due while paused (timers that ran out, steps waiting to activate) is processed immediately on resume. Timers are not extended by the pause.',
|
|
17
|
+
fields: config_1.fields,
|
|
18
|
+
previewable: false,
|
|
19
|
+
supports_automated_retries: true,
|
|
20
|
+
onEvent: async ({ payload, onComplete, onError, helpers }) => {
|
|
21
|
+
helpers.log({ fields: payload.fields }, 'Processing unpauseCareFlow');
|
|
22
|
+
try {
|
|
23
|
+
const { fields: { careFlowIds }, } = (0, extensions_core_1.validate)({
|
|
24
|
+
schema: zod_1.z.object({
|
|
25
|
+
fields: config_1.FieldsValidationSchema,
|
|
26
|
+
}),
|
|
27
|
+
payload,
|
|
28
|
+
});
|
|
29
|
+
const { apiKey, apiUrl } = await helpers.awellSdk();
|
|
30
|
+
const sdk = new awellSdk_1.default({ apiKey, apiUrl: apiUrl });
|
|
31
|
+
const events = [];
|
|
32
|
+
for (const [index, careFlowId] of careFlowIds.entries()) {
|
|
33
|
+
await sdk.unpauseCareFlow({ careflow_id: careFlowId });
|
|
34
|
+
events.push((0, addEventLog_1.addActivityEventLog)({
|
|
35
|
+
message: `Care flow ${careFlowId} successfully unpaused.`,
|
|
36
|
+
}));
|
|
37
|
+
// wait 1 second between calls for rate limiting
|
|
38
|
+
if (index < careFlowIds.length - 1) {
|
|
39
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
await onComplete({
|
|
43
|
+
events,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
helpers.log({ err }, 'error', err);
|
|
48
|
+
const error = err;
|
|
49
|
+
await onError({
|
|
50
|
+
events: [
|
|
51
|
+
{
|
|
52
|
+
date: new Date().toISOString(),
|
|
53
|
+
text: { en: error.message },
|
|
54
|
+
error: {
|
|
55
|
+
category: 'SERVER_ERROR',
|
|
56
|
+
message: error.message,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=unpauseCareFlow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpauseCareFlow.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/unpauseCareFlow/unpauseCareFlow.ts"],"names":[],"mappings":";;;;;;AAEA,mEAAkE;AAClE,qCAAyD;AACzD,6BAAuB;AACvB,kEAAyC;AACzC,0EAA8E;AAEjE,QAAA,eAAe,GAA2C;IACrE,GAAG,EAAE,iBAAiB;IACtB,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,wMAAwM;IAC1M,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,0BAA0B,EAAE,IAAI;IAChC,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAiB,EAAE;QAC1E,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,4BAA4B,CAAC,CAAA;QAErE,IAAI,CAAC;YACH,MAAM,EACJ,MAAM,EAAE,EAAE,WAAW,EAAE,GACxB,GAAG,IAAA,0BAAQ,EAAC;gBACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;oBACf,MAAM,EAAE,+BAAsB;iBAC/B,CAAC;gBACF,OAAO;aACR,CAAC,CAAA;YAEF,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;YACnD,MAAM,GAAG,GAAG,IAAI,kBAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAgB,EAAE,CAAC,CAAA;YAC9D,MAAM,MAAM,GAAG,EAAE,CAAA;YAEjB,KAAK,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC;gBACxD,MAAM,GAAG,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAA;gBACtD,MAAM,CAAC,IAAI,CACT,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,aAAa,UAAU,yBAAyB;iBAC1D,CAAC,CACH,CAAA;gBACD,gDAAgD;gBAChD,IAAI,KAAK,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACnC,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;gBAC3D,CAAC;YACH,CAAC;YAED,MAAM,UAAU,CAAC;gBACf,MAAM;aACP,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,GAAY,CAAC,CAAA;YAC3C,MAAM,KAAK,GAAG,GAAY,CAAA;YAC1B,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;wBAC3B,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -866,6 +866,7 @@ export type Mutation = {
|
|
|
866
866
|
deletePatient: EmptyPayload;
|
|
867
867
|
evaluateFormRules: EvaluateFormRulesPayload;
|
|
868
868
|
markMessageAsRead: MarkMessageAsReadPayload;
|
|
869
|
+
pauseCareFlow: EmptyPayload;
|
|
869
870
|
/** Retrieve patient demographics from an external system */
|
|
870
871
|
requestPatientDemographics: PatientDemographicsPayload;
|
|
871
872
|
retryActivity: EmptyPayload;
|
|
@@ -891,6 +892,7 @@ export type Mutation = {
|
|
|
891
892
|
stopTrack: StopTrackPayload;
|
|
892
893
|
submitChecklist: SubmitChecklistPayload;
|
|
893
894
|
submitFormResponse: SubmitFormResponsePayload;
|
|
895
|
+
unpauseCareFlow: EmptyPayload;
|
|
894
896
|
unscheduleTracks: CancelScheduledTracksPayload;
|
|
895
897
|
updateBaselineInfo: EmptyPayload;
|
|
896
898
|
updatePatient: UpdatePatientPayload;
|
|
@@ -977,6 +979,12 @@ export type MutationStartPathwayArgs = {
|
|
|
977
979
|
export type MutationStartPathwayWithPatientIdentifierArgs = {
|
|
978
980
|
input: StartPathwayWithPatientIdentifierInput;
|
|
979
981
|
};
|
|
982
|
+
export type MutationPauseCareFlowArgs = {
|
|
983
|
+
input: PauseCareFlowInput;
|
|
984
|
+
};
|
|
985
|
+
export type MutationUnpauseCareFlowArgs = {
|
|
986
|
+
input: UnpauseCareFlowInput;
|
|
987
|
+
};
|
|
980
988
|
export type MutationStopPathwayArgs = {
|
|
981
989
|
input: StopPathwayInput;
|
|
982
990
|
};
|
|
@@ -1131,6 +1139,7 @@ export declare enum PathwayStatus {
|
|
|
1131
1139
|
Active = "active",
|
|
1132
1140
|
Completed = "completed",
|
|
1133
1141
|
MissingBaselineInfo = "missing_baseline_info",
|
|
1142
|
+
Paused = "paused",
|
|
1134
1143
|
Starting = "starting",
|
|
1135
1144
|
Stopped = "stopped"
|
|
1136
1145
|
}
|
|
@@ -1762,6 +1771,13 @@ export type StartPathwayWithPatientIdentifierPayload = Payload & {
|
|
|
1762
1771
|
stakeholders: Array<Stakeholder>;
|
|
1763
1772
|
success: Scalars['Boolean']['output'];
|
|
1764
1773
|
};
|
|
1774
|
+
export type PauseCareFlowInput = {
|
|
1775
|
+
careflow_id: Scalars['String']['input'];
|
|
1776
|
+
reason?: InputMaybe<Scalars['String']['input']>;
|
|
1777
|
+
};
|
|
1778
|
+
export type UnpauseCareFlowInput = {
|
|
1779
|
+
careflow_id: Scalars['String']['input'];
|
|
1780
|
+
};
|
|
1765
1781
|
export type StopPathwayInput = {
|
|
1766
1782
|
pathway_id: Scalars['String']['input'];
|
|
1767
1783
|
reason?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -222,6 +222,7 @@ var PathwayStatus;
|
|
|
222
222
|
PathwayStatus["Active"] = "active";
|
|
223
223
|
PathwayStatus["Completed"] = "completed";
|
|
224
224
|
PathwayStatus["MissingBaselineInfo"] = "missing_baseline_info";
|
|
225
|
+
PathwayStatus["Paused"] = "paused";
|
|
225
226
|
PathwayStatus["Starting"] = "starting";
|
|
226
227
|
PathwayStatus["Stopped"] = "stopped";
|
|
227
228
|
})(PathwayStatus || (exports.PathwayStatus = PathwayStatus = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/gql/graphql.ts"],"names":[],"mappings":";;;AAsCA,IAAY,UAUX;AAVD,WAAY,UAAU;IACpB,kCAAoB,CAAA;IACpB,iDAAmC,CAAA;IACnC,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;IACvB,4CAA8B,CAAA;IAC9B,2BAAa,CAAA;IACb,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,uCAAyB,CAAA;AAC3B,CAAC,EAVW,UAAU,0BAAV,UAAU,QAUrB;AAwCD,IAAY,cAwBX;AAxBD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;IACf,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,iDAA+B,CAAA;IAC/B,yCAAuB,CAAA;IACvB,+CAA6B,CAAA;IAC7B,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,+BAAa,CAAA;IACb,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,+BAAa,CAAA;IACb,qCAAmB,CAA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IACtC,mDAAmB,CAAA;IACnB,2DAA2B,CAAA;AAC7B,CAAC,EAHW,4BAA4B,4CAA5B,4BAA4B,QAGvC;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,8CAAuB,CAAA;IACvB,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAoDD,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,sCAAa,CAAA;IACb,wCAAe,CAAA;AACjB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/gql/graphql.ts"],"names":[],"mappings":";;;AAsCA,IAAY,UAUX;AAVD,WAAY,UAAU;IACpB,kCAAoB,CAAA;IACpB,iDAAmC,CAAA;IACnC,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;IACvB,4CAA8B,CAAA;IAC9B,2BAAa,CAAA;IACb,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,uCAAyB,CAAA;AAC3B,CAAC,EAVW,UAAU,0BAAV,UAAU,QAUrB;AAwCD,IAAY,cAwBX;AAxBD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;IACf,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,iDAA+B,CAAA;IAC/B,yCAAuB,CAAA;IACvB,+CAA6B,CAAA;IAC7B,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,+BAAa,CA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A0B,QAIrC;AA2RD,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,yCAAiB,CAAA;IACjB,kDAA0B,CAAA;IAC1B,sDAA8B,CAAA;IAC9B,qCAAa,CAAA;IACb,uCAAe,CAAA;IACf,8CAAsB,CAAA;IACtB,kDAA0B,CAAA;AAC5B,CAAC,EARW,oBAAoB,oCAApB,oBAAoB,QAQ/B;AAED,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;AACvB,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAmID,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,+CAA2B,CAAA;IAC3B,0CAAsB,CAAA;IACtB,sDAAkC,CAAA;IAClC,+DAA2C,CAAA;IAC3C,sDAAkC,CAAA;IAClC,qCAAiB,CAAA;IACjB,4CAAwB,CAAA;IACxB,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;IACvB,oCAAgB,CAAA;AAClB,CAAC,EAbW,gBAAgB,gCAAhB,gBAAgB,QAa3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLClient } from 'graphql-request';
|
|
2
|
-
import { type DeletePatientInput, type StopPathwayInput, type StartPathwayInput, type UpdatePatientInput, type UpdateBaselineInfoInput, type QuerySearchPatientsByPatientCodeArgs, type UserProfile, type User, type AddIdentifierToPatientInput, type Maybe, type QueryCareflowActivitiesArgs, type Activity, type QueryFormArgs, type Form, type QueryFormResponseArgs, type FormResponse, type QueryCalculationResultsArgs, type SingleCalculationResult } from '../gql/graphql';
|
|
2
|
+
import { type DeletePatientInput, type StopPathwayInput, type PauseCareFlowInput, type UnpauseCareFlowInput, type StartPathwayInput, type UpdatePatientInput, type UpdateBaselineInfoInput, type QuerySearchPatientsByPatientCodeArgs, type UserProfile, type User, type AddIdentifierToPatientInput, type Maybe, type QueryCareflowActivitiesArgs, type Activity, type QueryFormArgs, type Form, type QueryFormResponseArgs, type FormResponse, type QueryCalculationResultsArgs, type SingleCalculationResult } from '../gql/graphql';
|
|
3
3
|
export default class AwellSdk {
|
|
4
4
|
readonly apiUrl: string;
|
|
5
5
|
readonly apiKey: string;
|
|
@@ -12,6 +12,8 @@ export default class AwellSdk {
|
|
|
12
12
|
updatePatient(input: UpdatePatientInput): Promise<string>;
|
|
13
13
|
deletePatient(input: DeletePatientInput): Promise<boolean>;
|
|
14
14
|
stopCareFlow(input: StopPathwayInput): Promise<boolean>;
|
|
15
|
+
pauseCareFlow(input: PauseCareFlowInput): Promise<boolean>;
|
|
16
|
+
unpauseCareFlow(input: UnpauseCareFlowInput): Promise<boolean>;
|
|
15
17
|
searchPatientsByPatientCode(input: QuerySearchPatientsByPatientCodeArgs): Promise<Array<Pick<User, 'id'> & {
|
|
16
18
|
profile: Pick<UserProfile, 'patient_code'>;
|
|
17
19
|
}>>;
|
|
@@ -42,6 +42,20 @@ class AwellSdk {
|
|
|
42
42
|
}
|
|
43
43
|
throw new Error('Stop pathway failed.');
|
|
44
44
|
}
|
|
45
|
+
async pauseCareFlow(input) {
|
|
46
|
+
const data = await this.client.request(graphql_1.pauseCareFlowMutation, { input });
|
|
47
|
+
if (data.pauseCareFlow.success) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
throw new Error('Pause care flow failed.');
|
|
51
|
+
}
|
|
52
|
+
async unpauseCareFlow(input) {
|
|
53
|
+
const data = await this.client.request(graphql_1.unpauseCareFlowMutation, { input });
|
|
54
|
+
if (data.unpauseCareFlow.success) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
throw new Error('Unpause care flow failed.');
|
|
58
|
+
}
|
|
45
59
|
async searchPatientsByPatientCode(input) {
|
|
46
60
|
const data = await this.client.request(graphql_1.searchPatientByPatientCodeQuery, input);
|
|
47
61
|
if (data.searchPatientsByPatientCode.success) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"awellSdk.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/sdk/awellSdk.ts"],"names":[],"mappings":";;AAAA,qDAA+C;
|
|
1
|
+
{"version":3,"file":"awellSdk.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/sdk/awellSdk.ts"],"names":[],"mappings":";;AAAA,qDAA+C;AAgC/C,mCAA8B;AAC9B,uCAekB;AAElB,MAAqB,QAAQ;IAK3B,YAAY,IAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QAEzB,MAAM,MAAM,GAAG,IAAI,+BAAa,CAAC,IAAI,CAAC,MAAM,EAAE;YAC5C,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;SACjC,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAAwB;QAC1C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAEnC,8BAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAEnC,IAAI,CAAC,IAAA,cAAK,EAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;YACzC,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAA;QACrC,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAAyB;QAC3C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAEnC,+BAAqB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAEpC,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,IAAA,cAAK,EAAC,IAAI,CAAC,aAAa,C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O,CAEnC,8BAAoB,EAAE,KAAK,CAAC,CAAA;QAE/B,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAA;QACnC,CAAC;QAED,MAAM,IAAI,KAAK,CACb,yCAAyC,KAAK,CAAC,WAAW,SAAS,CACpE,CAAA;IACH,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,KAAkC;QAElC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAEnC,oCAA0B,EAAE,KAAK,CAAC,CAAA;QAErC,IAAI,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAA;QACvC,CAAC;QAED,MAAM,IAAI,KAAK,CACb,+CAA+C,KAAK,CAAC,WAAW,SAAS,CAC1E,CAAA;IACH,CAAC;CACF;AA3ND,2BA2NC"}
|
|
@@ -5,6 +5,8 @@ export { deletePatientMutation } from './deletePatient.mutation';
|
|
|
5
5
|
export { updateBaselineInfoMutation } from './updateBaselineInfo.mutation';
|
|
6
6
|
export { deletePathwayMutation } from './deletePathway.mutation';
|
|
7
7
|
export { stopPathwayMutation } from './stopPathway.mutation';
|
|
8
|
+
export { pauseCareFlowMutation } from './pauseCareFlow.mutation';
|
|
9
|
+
export { unpauseCareFlowMutation } from './unpauseCareFlow.mutation';
|
|
8
10
|
export { searchPatientByPatientCodeQuery } from './searchPatientByPatientCode.query';
|
|
9
11
|
export { getPatientByIdentifierQuery } from './getPatientByIdentifier.query';
|
|
10
12
|
export { addIdentifierToPatientMutation } from './addIdentifier.mutation';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetCalculationResultsQuery = exports.GetFormQuery = exports.GetFormResponseQuery = exports.GetCareflowActivitiesQuery = exports.addIdentifierToPatientMutation = exports.getPatientByIdentifierQuery = exports.searchPatientByPatientCodeQuery = exports.stopPathwayMutation = exports.deletePathwayMutation = exports.updateBaselineInfoMutation = exports.deletePatientMutation = exports.updatePatientMutation = exports.startPathwayMutation = exports.createPatientMutation = void 0;
|
|
3
|
+
exports.GetCalculationResultsQuery = exports.GetFormQuery = exports.GetFormResponseQuery = exports.GetCareflowActivitiesQuery = exports.addIdentifierToPatientMutation = exports.getPatientByIdentifierQuery = exports.searchPatientByPatientCodeQuery = exports.unpauseCareFlowMutation = exports.pauseCareFlowMutation = exports.stopPathwayMutation = exports.deletePathwayMutation = exports.updateBaselineInfoMutation = exports.deletePatientMutation = exports.updatePatientMutation = exports.startPathwayMutation = exports.createPatientMutation = void 0;
|
|
4
4
|
var createPatient_mutation_1 = require("./createPatient.mutation");
|
|
5
5
|
Object.defineProperty(exports, "createPatientMutation", { enumerable: true, get: function () { return createPatient_mutation_1.createPatientMutation; } });
|
|
6
6
|
var startPathway_mutation_1 = require("./startPathway.mutation");
|
|
@@ -15,6 +15,10 @@ var deletePathway_mutation_1 = require("./deletePathway.mutation");
|
|
|
15
15
|
Object.defineProperty(exports, "deletePathwayMutation", { enumerable: true, get: function () { return deletePathway_mutation_1.deletePathwayMutation; } });
|
|
16
16
|
var stopPathway_mutation_1 = require("./stopPathway.mutation");
|
|
17
17
|
Object.defineProperty(exports, "stopPathwayMutation", { enumerable: true, get: function () { return stopPathway_mutation_1.stopPathwayMutation; } });
|
|
18
|
+
var pauseCareFlow_mutation_1 = require("./pauseCareFlow.mutation");
|
|
19
|
+
Object.defineProperty(exports, "pauseCareFlowMutation", { enumerable: true, get: function () { return pauseCareFlow_mutation_1.pauseCareFlowMutation; } });
|
|
20
|
+
var unpauseCareFlow_mutation_1 = require("./unpauseCareFlow.mutation");
|
|
21
|
+
Object.defineProperty(exports, "unpauseCareFlowMutation", { enumerable: true, get: function () { return unpauseCareFlow_mutation_1.unpauseCareFlowMutation; } });
|
|
18
22
|
var searchPatientByPatientCode_query_1 = require("./searchPatientByPatientCode.query");
|
|
19
23
|
Object.defineProperty(exports, "searchPatientByPatientCodeQuery", { enumerable: true, get: function () { return searchPatientByPatientCode_query_1.searchPatientByPatientCodeQuery; } });
|
|
20
24
|
var getPatientByIdentifier_query_1 = require("./getPatientByIdentifier.query");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/sdk/graphql/index.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,iEAA8D;AAArD,6HAAA,oBAAoB,OAAA;AAC7B,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,6EAA0E;AAAjE,yIAAA,0BAA0B,OAAA;AACnC,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,+DAA4D;AAAnD,2HAAA,mBAAmB,OAAA;AAC5B,uFAAoF;AAA3E,mJAAA,+BAA+B,OAAA;AACxC,+EAA4E;AAAnE,2IAAA,2BAA2B,OAAA;AACpC,mEAAyE;AAAhE,wIAAA,8BAA8B,OAAA;AACvC,uEAAuE;AAA9D,sIAAA,0BAA0B,OAAA;AACnC,2DAA2D;AAAlD,0HAAA,oBAAoB,OAAA;AAC7B,2CAA2C;AAAlC,0GAAA,YAAY,OAAA;AACrB,uEAAuE;AAA9D,sIAAA,0BAA0B,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/sdk/graphql/index.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,iEAA8D;AAArD,6HAAA,oBAAoB,OAAA;AAC7B,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,6EAA0E;AAAjE,yIAAA,0BAA0B,OAAA;AACnC,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,+DAA4D;AAAnD,2HAAA,mBAAmB,OAAA;AAC5B,mEAAgE;AAAvD,+HAAA,qBAAqB,OAAA;AAC9B,uEAAoE;AAA3D,mIAAA,uBAAuB,OAAA;AAChC,uFAAoF;AAA3E,mJAAA,+BAA+B,OAAA;AACxC,+EAA4E;AAAnE,2IAAA,2BAA2B,OAAA;AACpC,mEAAyE;AAAhE,wIAAA,8BAA8B,OAAA;AACvC,uEAAuE;AAA9D,sIAAA,0BAA0B,OAAA;AACnC,2DAA2D;AAAlD,0HAAA,oBAAoB,OAAA;AAC7B,2CAA2C;AAAlC,0GAAA,YAAY,OAAA;AACrB,uEAAuE;AAA9D,sIAAA,0BAA0B,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pauseCareFlowMutation = "\nmutation PauseCareFlow($input: PauseCareFlowInput!) {\n pauseCareFlow(input: $input) {\n code\n success\n }\n }\n";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pauseCareFlowMutation = void 0;
|
|
4
|
+
exports.pauseCareFlowMutation = `
|
|
5
|
+
mutation PauseCareFlow($input: PauseCareFlowInput!) {
|
|
6
|
+
pauseCareFlow(input: $input) {
|
|
7
|
+
code
|
|
8
|
+
success
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
//# sourceMappingURL=pauseCareFlow.mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pauseCareFlow.mutation.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/sdk/graphql/pauseCareFlow.mutation.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;;;;;;;CAOpC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const unpauseCareFlowMutation = "\nmutation UnpauseCareFlow($input: UnpauseCareFlowInput!) {\n unpauseCareFlow(input: $input) {\n code\n success\n }\n }\n";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unpauseCareFlowMutation = void 0;
|
|
4
|
+
exports.unpauseCareFlowMutation = `
|
|
5
|
+
mutation UnpauseCareFlow($input: UnpauseCareFlowInput!) {
|
|
6
|
+
unpauseCareFlow(input: $input) {
|
|
7
|
+
code
|
|
8
|
+
success
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
//# sourceMappingURL=unpauseCareFlow.mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpauseCareFlow.mutation.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/sdk/graphql/unpauseCareFlow.mutation.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;CAOtC,CAAA"}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"changelog": "# CHANGELOG"
|
|
13
13
|
},
|
|
14
14
|
"awell": {
|
|
15
|
-
"readme": "---\ntitle: Awell Workflow\ndescription: Enrich your care flows with powerful Awell actions.\n---\n\n# Awell API extension\n\n## Extension settings\n\nYou will need to provide the [API URL](https://developers.awellhealth.com/awell-orchestration/api-reference/overview/endpoints) and an [API key](https://developers.awellhealth.com/awell-orchestration/api-reference/overview/authorization).\n\n## Custom Actions\n\n### Start care flow\n\nStarts a new care flow for the patient enrolled in your current care flow.\n\n**Passing baseline info:**\nPlease read the documentation on [our developer hub](https://developers.awellhealth.com/awell-orchestration/api-reference/mutations/start-pathway) to learn more about how to pass baseline info.\n\n**Example of how to configure a value for the baseline info action field:**\n\n```json\n[\n {\n \"data_point_definition_id\": \"age\",\n \"value\": \"29\"\n },\n {\n \"data_point_definition_id\": \"dob\",\n \"value\": \"1993-11-30\"\n }\n]\n```\n\n### Stop care flow\n\nStops the care flow the patient is currently enrolled in. A reason is why you are stopping the care flow is mandatory.\n\n### Update patient\n\nAllows updating patient data for the patient currently enrolled in the care flow.\n\n### Is patient already enrolled in care flow\n\nChecks whether the patient is already enrolled in a care flow definition. The care flow the patient is currently enrolled in does not count and is excluded from the results.\n\n**Action fields:**\n\n- pathwayStatus: a comma-separated string of care flow statuses that will be used when looking for care flows the patient is already enrolled in. By default, we only look at active care flows. Options: \"active\", \"completed\", \"missing_baseline_info\", \"starting\", and \"stopped\".\n- careFlowDefinitionIds: a comma-separated string of care flow definition ids that will be used when looking for care flows the patient is already enrolled in. By default, we only search for care flows that match the current care flow definition id (i.e. is the patient already included in the current care flow?).\n\n**Data points:**\n\n- result: a boolean indicating whether the patient is already enrolled in another care flow that matches your criteria (status & care flow definition id)\n- nbrOfResults: the number of care flows found for the patient that match the criteria.\n- careFlowIds: a comma-separated string of care flow ids that matched your search criteria. It will be empty when the result is `false` because then there are no other care flow ids that match your criteria.\n\n### Search patients by patient code\n\nNote that this action is deprecated and we recommend using [identifiers](https://developers.awellhealth.com/awell-orchestration/docs/misc/patient-identifiers) instead.\n\nSearch whether, apart from the patient currently enrolled in the care flow, another patient with the same `patient_code` already exists.\n\n**Data points:**\n\n1. patientAlreadyExists: a boolean which will be true if minimum one patient with the patient code already exists.\n2. numberOfPatientsFound: the number of patients found with the same patient code.\n3. awellPatientIds: a comma-separated string of all Awell patient ids (except the current patient) that have the same patient code as the patient currently enrolled in the care flow. Will return an empty string when there are no other patients with the same patient code.\n\n### Get patient by identifier\n\nThis action lets you check if a patient with a specific identifier already exists in Awell. It's particularly useful when a patient's identity is initially anonymous during the start of the care flow, but later becomes identifiable through the identifiers collected during the care flow. This check ensures whether a patient with that identifier is already present or not.\n\n### Add identifier to patient\n\nThis action allows you to add a unique identifier to the current patient's profile. If the patient already has an identifier with the same system but a different value, this action will update the existing identifier with the new value provided
|
|
16
|
-
"changelog": "# Awell changelog\n\n## Unreleased\n\n- New action \"Get Hosted Pages Link\": fetches the static Hosted Pages link for a stakeholder in a care flow. The stakeholder field is optional and defaults to the patient when left empty.\n\n## April 2024\n\nTwo new action were added: \"Get patient by identifier\" and \"Add identifier to patient\".\n\n## October 26, 2023\n\nGeneric webhook to start a care flow added\n\n## April 19, 2023\n\nStop care flow action added.\nSearch patients by patient code action was added.\n\"Is patient enrolled in care flow\" action added.\n"
|
|
15
|
+
"readme": "---\ntitle: Awell Workflow\ndescription: Enrich your care flows with powerful Awell actions.\n---\n\n# Awell API extension\n\n## Extension settings\n\nYou will need to provide the [API URL](https://developers.awellhealth.com/awell-orchestration/api-reference/overview/endpoints) and an [API key](https://developers.awellhealth.com/awell-orchestration/api-reference/overview/authorization).\n\n## Custom Actions\n\n### Start care flow\n\nStarts a new care flow for the patient enrolled in your current care flow.\n\n**Passing baseline info:**\nPlease read the documentation on [our developer hub](https://developers.awellhealth.com/awell-orchestration/api-reference/mutations/start-pathway) to learn more about how to pass baseline info.\n\n**Example of how to configure a value for the baseline info action field:**\n\n```json\n[\n {\n \"data_point_definition_id\": \"age\",\n \"value\": \"29\"\n },\n {\n \"data_point_definition_id\": \"dob\",\n \"value\": \"1993-11-30\"\n }\n]\n```\n\n### Stop care flow\n\nStops the care flow the patient is currently enrolled in. A reason is why you are stopping the care flow is mandatory.\n\n### Pause care flow\n\nPauses one or more care flows. A paused care flow can be resumed later with the \"Unpause care flow\" action or the `unpauseCareFlow` API mutation, without starting over.\n\nWhat pausing does:\n\n- Nothing in the paused care flow progresses: no new steps, messages, forms, actions or tracks are activated. Tracks added while paused (ad hoc tracks, triggers) only activate on resume.\n- Timers keep counting from their original start and are not extended by the pause. A timer that runs out during the pause does not activate the next step until the care flow is resumed, at which point it fires immediately.\n- A paused care flow cannot run its own actions, so the resume signal has to come from outside: the API, or another care flow that runs \"Unpause care flow\".\n\n**Action fields:**\n\n- careFlowIds: a comma-separated string of care flow IDs to pause. When left empty, the care flow this action runs in is paused.\n- reason: an optional reason that is stored with the care flow.\n\n### Unpause care flow\n\nResumes one or more paused care flows.\n\n**Action fields:**\n\n- careFlowIds: a comma-separated string of paused care flow IDs to resume. This field is required because a paused care flow cannot run actions, so the care flow to resume is always a different one than the care flow this action runs in.\n\n### Update patient\n\nAllows updating patient data for the patient currently enrolled in the care flow.\n\n### Is patient already enrolled in care flow\n\nChecks whether the patient is already enrolled in a care flow definition. The care flow the patient is currently enrolled in does not count and is excluded from the results.\n\n**Action fields:**\n\n- pathwayStatus: a comma-separated string of care flow statuses that will be used when looking for care flows the patient is already enrolled in. By default, we only look at active care flows. Options: \"active\", \"completed\", \"missing_baseline_info\", \"paused\", \"starting\", and \"stopped\".\n- careFlowDefinitionIds: a comma-separated string of care flow definition ids that will be used when looking for care flows the patient is already enrolled in. By default, we only search for care flows that match the current care flow definition id (i.e. is the patient already included in the current care flow?).\n\n**Data points:**\n\n- result: a boolean indicating whether the patient is already enrolled in another care flow that matches your criteria (status & care flow definition id)\n- nbrOfResults: the number of care flows found for the patient that match the criteria.\n- careFlowIds: a comma-separated string of care flow ids that matched your search criteria. It will be empty when the result is `false` because then there are no other care flow ids that match your criteria.\n\n### Search patients by patient code\n\nNote that this action is deprecated and we recommend using [identifiers](https://developers.awellhealth.com/awell-orchestration/docs/misc/patient-identifiers) instead.\n\nSearch whether, apart from the patient currently enrolled in the care flow, another patient with the same `patient_code` already exists.\n\n**Data points:**\n\n1. patientAlreadyExists: a boolean which will be true if minimum one patient with the patient code already exists.\n2. numberOfPatientsFound: the number of patients found with the same patient code.\n3. awellPatientIds: a comma-separated string of all Awell patient ids (except the current patient) that have the same patient code as the patient currently enrolled in the care flow. Will return an empty string when there are no other patients with the same patient code.\n\n### Get patient by identifier\n\nThis action lets you check if a patient with a specific identifier already exists in Awell. It's particularly useful when a patient's identity is initially anonymous during the start of the care flow, but later becomes identifiable through the identifiers collected during the care flow. This check ensures whether a patient with that identifier is already present or not.\n\n### Add identifier to patient\n\nThis action allows you to add a unique identifier to the current patient's profile. If the patient already has an identifier with the same system but a different value, this action will update the existing identifier with the new value provided.\n\nFirst, it checks if this identifier (system and value) is already associated with another patient. If it's safe to proceed, it will add or update the identifier as needed. However, if another patient already has this identifier, the action will stop and notify you, preventing duplicates. To avoid conflicts, we recommend first running the \"Get patient by identifier\" action to check for any existing matches.\n\n### Get data point value\n\nThis action allows you to read the most recent data point value of a given data point definition id from a care flow different from the current one. The action returns multiple data points, each with a different value type. Pick the one you need from the returned data points based on the value type of the data point you want to read the value from.\n\n**Example:**\nIf the data point you want to read the value from is of type `number`, then you should use the `valueNumber` data point.\n\n### Get Hosted Pages Link\n\nFetches the static Hosted Pages link for a stakeholder in a care flow. Unlike \"Start Hosted Pages Session\", this does not start a session - it returns the persistent link that can be shared with (or re-used by) the stakeholder, e.g. to send it in a reminder message.\n\n**Action fields:**\n\n- careFlowId (required): the instance ID of the care flow to fetch the link for.\n- stakeholder (optional): the name of the stakeholder to fetch the link for. Defaults to the patient when left empty. There must be activity for the stakeholder in the care flow, otherwise no link exists yet and the action will error.\n\n**Data points:**\n\n- linkUrl: the static Hosted Pages link for the stakeholder.\n\n## Webhooks\n\nWebhooks in the Awell extension offer ways to trigger a care flow based on the end of another care flow, or from any event that happens in your system (via the pathwayStart webhook).\n",
|
|
16
|
+
"changelog": "# Awell changelog\n\n## Unreleased\n\n- New actions \"Pause care flow\" and \"Unpause care flow\": pause one or more care flows (defaults to the current care flow) and resume them later via the `pauseCareFlow` and `unpauseCareFlow` orchestration mutations.\n- \"Is patient already enrolled in care flow\" now accepts \"paused\" in the pathway status field, so a support care flow can find a paused care flow and resume it.\n- New action \"Get Hosted Pages Link\": fetches the static Hosted Pages link for a stakeholder in a care flow. The stakeholder field is optional and defaults to the patient when left empty.\n\n## April 2024\n\nTwo new action were added: \"Get patient by identifier\" and \"Add identifier to patient\".\n\n## October 26, 2023\n\nGeneric webhook to start a care flow added\n\n## April 19, 2023\n\nStop care flow action added.\nSearch patients by patient code action was added.\n\"Is patient enrolled in care flow\" action added.\n"
|
|
17
17
|
},
|
|
18
18
|
"awellTasks": {
|
|
19
19
|
"readme": "---\ntitle: Awell Tasks\ndescription: Awell Tasks is an extension that allows communication with the Task Service module.\n---\n\n# Awell Tasks\n\nAwell Tasks is an extension that allows communication with the Task Service module.\n",
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
},
|
|
234
234
|
"zendesk": {
|
|
235
235
|
"readme": "---\ntitle: Zendesk Support\ndescription: Zendesk Support is a customer service platform that provides ticketing, knowledge base, and customer communication tools.\n---\n\n# Zendesk Support\n\nZendesk Support is a customer service platform that provides ticketing, knowledge base, and customer communication tools.\n\n## Extension settings\n\nTo set up this extension, you will need to provide the following:\n\n1. **Zendesk Subdomain:** your Zendesk subdomain only (e.g., \"company\" for company.zendesk.com)\n2. Credentials, using **one** of the two methods below.\n\n### Authentication with an OAuth client (recommended)\n\nZendesk is [removing API tokens](https://support.zendesk.com/hc/en-us/articles/10840968198042). Accounts created on or after July 28, 2026 cannot create them, no account can create new ones from October 27, 2026, and all API tokens stop working on April 30, 2027. New installs should use an OAuth client:\n\n1. In Zendesk Admin Center, go to **Apps and integrations > APIs > OAuth clients** and click **Add client**.\n2. Give it a name (e.g. \"Awell\"), set **Client kind** to **Confidential**, and leave Redirect URLs empty. Note the **Unique identifier**.\n3. Save and copy the **Secret**. Zendesk shows it only once.\n4. In Awell, fill in **OAuth Client Identifier** and **OAuth Client Secret**.\n\nThe extension exchanges these for short-lived access tokens using the client credentials grant (via the shared extensions-core OAuth client, which caches and refreshes them automatically). API calls are attributed to the Zendesk user who created the OAuth client.\n\n### Authentication with a user email and API token (legacy)\n\nExisting installs can keep using a **User Email** and **API Token** (created under Apps and integrations > APIs > API tokens) until Zendesk deactivates API tokens. Note that Zendesk also deactivates tokens that have not been used for 30 days. When the OAuth settings are filled in, the email and API token are ignored.\n\n## Actions\n\n### Create Ticket\n\nCreates a new support ticket in Zendesk with the specified details.\n\n**Required fields:**\n- Subject: The subject line of the ticket\n- Comment: The initial comment/description for the ticket\n\n**Optional fields:**\n- Group ID: The ID of the group to assign the ticket to\n- Priority: The priority level (urgent, high, normal, or low)\n- External ID: An external identifier to link this ticket to your system\n- Tag: A tag to add to the ticket\n\n**Returns:**\n- Ticket ID: The unique identifier of the created ticket\n- Ticket URL: Direct link to the ticket in Zendesk agent interface\n\n**Note:** a failed request is retried once. If Zendesk created the ticket but the response was lost (for example a timeout), the retry can create a duplicate ticket.\n\n### Get Ticket\n\nRetrieves a support ticket from Zendesk, including the requester's name and email.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to retrieve\n\n**Returns:**\n- Ticket ID, Ticket URL, Subject, Description (first comment), Status, Priority, Type, Channel\n- Tags (array), External ID\n- Requester ID, Requester Name, Requester Email\n- Assignee ID, Group ID, Organization ID\n- Created At, Updated At\n- Custom Fields (JSON array of `{ id, value }`)\n- Ticket (the full ticket object as JSON)\n\n### Update Ticket\n\nUpdates an existing support ticket in Zendesk.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to update\n\n**Optional fields:**\n- Comment: A comment to add to the ticket\n- Priority: The priority level (urgent, high, normal, or low)\n- Status: The new status (new, open, pending, hold, solved, or closed)\n\n### Delete Ticket\n\nDeletes a support ticket in Zendesk. This action permanently removes the ticket from your Zendesk instance.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to delete\n\n**Note:** This action cannot be undone. Deleted tickets are permanently removed from Zendesk.\n\n## Webhooks\n\n### Ticket event\n\nStarts a care flow when Zendesk sends a webhook about a ticket. The webhook only needs the ticket ID: the extension fetches the full ticket from the Zendesk API (using the extension settings) so the data points do not depend on what is included in the request body.\n\nIf the ticket cannot be fetched (credentials missing or invalid, Zendesk API unavailable), the care flow still starts. The data points are then populated from the request body instead, the `ticketFetched` data point is `false`, and an activity event explains why. Including the optional fields in the body below therefore makes the integration resilient.\n\nZendesk lets you connect a webhook in one of two ways. The Ticket event webhook supports both.\n\n#### Option 1: connect the webhook to a trigger or automation (recommended for ticket activity)\n\n1. In Awell, create an incoming webhook of type \"Extension webhook\", select the Zendesk extension and the \"Ticket event\" event. Copy the generated URL.\n2. In Zendesk Admin Center, go to **Apps and integrations > Webhooks > Actions > Create webhook** and choose **Trigger or automation**.\n3. Set the endpoint URL to the Awell webhook URL, request method `POST` and request format `JSON`.\n4. Create (or edit) a trigger under **Objects and rules > Business rules > Triggers**. Set the conditions that should start the care flow (for example, a tag is added or a status changes) and add the action **Notify active webhook**, selecting the webhook created above.\n5. Use the following JSON body. `ticket_id` is required; `event_type` is an optional label that is exposed on the `eventType` data point. The other keys are optional and are used to fill the data points when the ticket cannot be fetched from the API (`tags` may be the space-separated string that `{{ticket.tags}}` renders to). Any additional properties are passed through on the `payload` data point. Avoid `{{ticket.description}}` and comment placeholders in the body: free text with quotes or line breaks produces invalid JSON.\n\n```json\n{\n \"ticket_id\": \"{{ticket.id}}\",\n \"event_type\": \"kit_retrieval_requested\",\n \"subject\": \"{{ticket.title}}\",\n \"status\": \"{{ticket.status}}\",\n \"priority\": \"{{ticket.priority}}\",\n \"tags\": \"{{ticket.tags}}\",\n \"external_id\": \"{{ticket.external_id}}\",\n \"requester_name\": \"{{ticket.requester.name}}\",\n \"requester_email\": \"{{ticket.requester.email}}\",\n \"channel\": \"{{ticket.via}}\",\n \"created_at\": \"{{ticket.created_at_with_timestamp}}\",\n \"updated_at\": \"{{ticket.updated_at_with_timestamp}}\",\n \"ticket_url\": \"{{ticket.url}}\"\n}\n```\n\nTo fire once per ticket, add the condition `Ticket > Ticket` `Is` `Created` to the trigger. Triggers otherwise run on every ticket update.\n\n#### Option 2: subscribe the webhook to Zendesk ticket events\n\nWhen creating the webhook in Zendesk Admin Center, choose **Zendesk events** and subscribe to one or more ticket events (for example `Ticket created` or `Ticket status changed`). Zendesk sends its standard event envelope (`type` starting with `zen:event-type:ticket.`) and the extension reads the ticket ID from `detail.id`. The Zendesk event type is exposed on the `eventType` data point.\n\nNote: a webhook's connection method cannot be changed after it is created, and Zendesk's documentation is not consistent about which accounts can subscribe to ticket events. If ticket events are not available in your account, use option 1.\n\n**Data points:**\n- Event Type: the `event_type` from the trigger body (defaults to `trigger`), or the Zendesk event type\n- Ticket Fetched: `true` when the data points come from the Zendesk API, `false` when they were populated from the request body only\n- Payload: the raw request body as JSON\n- All data points returned by the Get Ticket action (Ticket ID, Ticket URL, Subject, Description, Status, Priority, Type, Channel, Tags, External ID, Requester ID/Name/Email, Assignee ID, Group ID, Organization ID, Created At, Updated At, Custom Fields, Ticket)\n\n**Responses:**\n- `400` when the body contains neither a `ticket_id` nor a Zendesk ticket event\n- `404` when Zendesk reports that the ticket does not exist in the configured account; no care flow is started, because a genuine webhook always refers to an existing ticket\n- `200` otherwise, including when the ticket could not be fetched for another reason (see `ticketFetched`)\n\nThe request body is not verified when the ticket cannot be fetched, so flows that act on requester details should branch on `ticketFetched`. A ticket URL from the body is only passed on when it points at a `*.zendesk.com` host.\n",
|
|
236
|
-
"changelog": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n## [1.2.0] - 2026-09-23\n\n### Added\n\n- OAuth client credentials authentication (new optional settings \"OAuth Client Identifier\" and \"OAuth Client Secret\"). Zendesk is removing API tokens: accounts created on or after 2026-07-28 cannot create them and all tokens stop working on 2027-04-30. Access tokens are fetched with the client credentials grant through the extensions-core `OAuthClientCredentials`/`APIClient` classes, which cache them until they expire.\n- Ticket event webhook now falls back to the request body when the ticket cannot be fetched from the Zendesk API (missing or invalid credentials, API unavailable). A ticket that Zendesk reports as not found still responds `404` without starting a care flow. New `ticketFetched` data point indicates which path was taken; the trigger body contract gained optional well-known keys (subject, status, priority, tags, external_id, requester_name, requester_email, ...).\n\n### Changed\n\n- \"User Email\" and \"API Token\" settings are now optional (legacy) and only required when the OAuth settings are empty.\n- The \"Zendesk Subdomain\" setting accepts a pasted host (`company.zendesk.com`, `https://company.zendesk.com/`) and is normalised to the subdomain. Values that are not a single DNS label are rejected, so credentials can only be sent to a `*.zendesk.com` host.\n- API calls now go through the extensions-core `APIClient`, which retries a failed call once after 250ms (and, on a 401, fetches a fresh OAuth token first). **Known limitation:** this also applies to \"Create Ticket\", so a request that Zendesk processed but whose response was lost (for example a timeout) can create a duplicate ticket. Sending a Zendesk `Idempotency-Key` would prevent this and is not done yet.\n\n## [1.1.0] - 2026-09-16\n\n### Added\n\n- Ticket event webhook. Accepts a webhook connected to a Zendesk trigger or automation (JSON body with `ticket_id`) as well as a webhook subscribed to Zendesk ticket events (`zen:event-type:ticket.*`). Fetches the full ticket, including the requester's name and email, and exposes it as data points.\n- Get Ticket action, returning the ticket fields, requester details, tags, custom fields and the full ticket as JSON.\n\n## [1.0.0] - 2025-01-10\n\n### Added\n\n- Initial release of Zendesk Support extension\n- Create Ticket action with OAuth authentication\n- Support for all major ticket fields: subject, comment, group_id, priority, external_id, tags\n"
|
|
236
|
+
"changelog": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n## [1.2.1] - 2026-10-07\n\n### Fixed\n\n- \"Update Ticket\" rejected the ticket ID with `expected string` when the field was bound to a number data point. The field is numeric in Studio, so it now uses the same `NumericIdSchema` as \"Get Ticket\" and \"Delete Ticket\" and accepts both numbers and numeric strings.\n\n## [1.2.0] - 2026-09-23\n\n### Added\n\n- OAuth client credentials authentication (new optional settings \"OAuth Client Identifier\" and \"OAuth Client Secret\"). Zendesk is removing API tokens: accounts created on or after 2026-07-28 cannot create them and all tokens stop working on 2027-04-30. Access tokens are fetched with the client credentials grant through the extensions-core `OAuthClientCredentials`/`APIClient` classes, which cache them until they expire.\n- Ticket event webhook now falls back to the request body when the ticket cannot be fetched from the Zendesk API (missing or invalid credentials, API unavailable). A ticket that Zendesk reports as not found still responds `404` without starting a care flow. New `ticketFetched` data point indicates which path was taken; the trigger body contract gained optional well-known keys (subject, status, priority, tags, external_id, requester_name, requester_email, ...).\n\n### Changed\n\n- \"User Email\" and \"API Token\" settings are now optional (legacy) and only required when the OAuth settings are empty.\n- The \"Zendesk Subdomain\" setting accepts a pasted host (`company.zendesk.com`, `https://company.zendesk.com/`) and is normalised to the subdomain. Values that are not a single DNS label are rejected, so credentials can only be sent to a `*.zendesk.com` host.\n- API calls now go through the extensions-core `APIClient`, which retries a failed call once after 250ms (and, on a 401, fetches a fresh OAuth token first). **Known limitation:** this also applies to \"Create Ticket\", so a request that Zendesk processed but whose response was lost (for example a timeout) can create a duplicate ticket. Sending a Zendesk `Idempotency-Key` would prevent this and is not done yet.\n\n## [1.1.0] - 2026-09-16\n\n### Added\n\n- Ticket event webhook. Accepts a webhook connected to a Zendesk trigger or automation (JSON body with `ticket_id`) as well as a webhook subscribed to Zendesk ticket events (`zen:event-type:ticket.*`). Fetches the full ticket, including the requester's name and email, and exposes it as data points.\n- Get Ticket action, returning the ticket fields, requester details, tags, custom fields and the full ticket as JSON.\n\n## [1.0.0] - 2025-01-10\n\n### Added\n\n- Initial release of Zendesk Support extension\n- Create Ticket action with OAuth authentication\n- Support for all major ticket fields: subject, comment, group_id, priority, external_id, tags\n"
|
|
237
237
|
},
|
|
238
238
|
"zendeskSell": {
|
|
239
239
|
"readme": "---\ntitle: Zendesk Sell\ndescription: Zendesk Sell is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions.\n---\n\n# Zendesk Sell\n\nZendesk Sell is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions. It offers a range of customer service solutions, including help desk ticketing systems, customer support and engagement, and self-service options. Zendesk is designed to help companies streamline their customer support processes, improve communication with their customers, and resolve issues more efficiently.\n\n## Extension settings\n\nIn order to set up this extension, you will to authenticate with the Sell API and need an API token. You can visit Zendesk Sales CRM dashboard and go to **Settings > Integration > OAuth** to enable and create an API token. Read more about how to get an access token for the Sell API [here](https://developer.zendesk.com/documentation/sales-crm/first-call/).\n\n## Custom Actions\n\n### Create task\n\nCreates a new task. You can create either a floating task or create a related task and associate it with one of the resource types: Leads, Contacts, Deals.\n\n### Complete task\n\nMarks a task as completed.\n",
|
|
@@ -44,7 +44,7 @@ export declare const fields: {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
47
|
-
ticket_id: z.
|
|
47
|
+
ticket_id: z.ZodCoercedNumber<unknown>;
|
|
48
48
|
comment: z.ZodOptional<z.ZodString>;
|
|
49
49
|
priority: z.ZodUnion<readonly [z.ZodOptional<z.ZodEnum<{
|
|
50
50
|
low: "low";
|
|
@@ -56,7 +56,7 @@ exports.fields = {
|
|
|
56
56
|
},
|
|
57
57
|
};
|
|
58
58
|
exports.FieldsValidationSchema = zod_1.z.object({
|
|
59
|
-
ticket_id:
|
|
59
|
+
ticket_id: extensions_core_1.NumericIdSchema,
|
|
60
60
|
comment: zod_1.z.string().optional(),
|
|
61
61
|
priority: (0, extensions_core_1.makeStringOptional)(priorityEnum),
|
|
62
62
|
status: (0, extensions_core_1.makeStringOptional)(statusEnum),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/zendesk/v1/actions/updateTicket/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/zendesk/v1/actions/updateTicket/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AACrC,mEAMsC;AAEtC,MAAM,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;AAChE,MAAM,UAAU,GAAG,OAAC,CAAC,IAAI,CAAC;IACxB,KAAK;IACL,MAAM;IACN,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;CACT,CAAC,CAAA;AAEW,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;KAC/C;IACD,OAAO,EAAE;QAC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