@awell-health/awell-extensions 1.0.90 → 1.0.92

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.
Files changed (53) hide show
  1. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/dataPoints.d.ts +6 -0
  2. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/dataPoints.js +10 -0
  3. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/dataPoints.js.map +1 -0
  4. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/fields.d.ts +118 -0
  5. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/fields.js +99 -0
  6. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/fields.js.map +1 -0
  7. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/index.d.ts +2 -0
  8. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/index.js +19 -0
  9. package/dist/extensions/canvasMedical/v1/actions/createCoverage/config/index.js.map +1 -0
  10. package/dist/extensions/canvasMedical/v1/actions/createCoverage/createCoverage.d.ts +4 -0
  11. package/dist/extensions/canvasMedical/v1/actions/createCoverage/createCoverage.js +70 -0
  12. package/dist/extensions/canvasMedical/v1/actions/createCoverage/createCoverage.js.map +1 -0
  13. package/dist/extensions/canvasMedical/v1/actions/createCoverage/createCoverage.test.d.ts +1 -0
  14. package/dist/extensions/canvasMedical/v1/actions/createCoverage/createCoverage.test.js +25 -0
  15. package/dist/extensions/canvasMedical/v1/actions/createCoverage/createCoverage.test.js.map +1 -0
  16. package/dist/extensions/canvasMedical/v1/actions/createCoverage/index.d.ts +1 -0
  17. package/dist/extensions/canvasMedical/v1/actions/createCoverage/index.js +6 -0
  18. package/dist/extensions/canvasMedical/v1/actions/createCoverage/index.js.map +1 -0
  19. package/dist/extensions/canvasMedical/v1/actions/index.d.ts +2 -0
  20. package/dist/extensions/canvasMedical/v1/actions/index.js +5 -1
  21. package/dist/extensions/canvasMedical/v1/actions/index.js.map +1 -1
  22. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/dataPoints.d.ts +6 -0
  23. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/dataPoints.js +10 -0
  24. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/dataPoints.js.map +1 -0
  25. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/fields.d.ts +128 -0
  26. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/fields.js +107 -0
  27. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/fields.js.map +1 -0
  28. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/index.d.ts +2 -0
  29. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/index.js +19 -0
  30. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/config/index.js.map +1 -0
  31. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/index.d.ts +1 -0
  32. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/index.js +6 -0
  33. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/index.js.map +1 -0
  34. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.d.ts +4 -0
  35. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.js +72 -0
  36. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.js.map +1 -0
  37. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.test.d.ts +1 -0
  38. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.test.js +25 -0
  39. package/dist/extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.test.js.map +1 -0
  40. package/dist/extensions/canvasMedical/v1/client/client.d.ts +5 -0
  41. package/dist/extensions/canvasMedical/v1/client/client.js +22 -0
  42. package/dist/extensions/canvasMedical/v1/client/client.js.map +1 -1
  43. package/dist/extensions/canvasMedical/v1/validation/coverage.zod.d.ts +150 -0
  44. package/dist/extensions/canvasMedical/v1/validation/coverage.zod.js +30 -0
  45. package/dist/extensions/canvasMedical/v1/validation/coverage.zod.js.map +1 -0
  46. package/dist/extensions/markdown.json +1 -1
  47. package/dist/extensions/sendbird/v1/actions/index.d.ts +1 -0
  48. package/dist/extensions/sendbird/v1/actions/index.js +3 -1
  49. package/dist/extensions/sendbird/v1/actions/index.js.map +1 -1
  50. package/dist/extensions/sendbird/v1/actions/updateTicket/index.d.ts +1 -0
  51. package/dist/extensions/sendbird/v1/actions/updateTicket/index.js +6 -0
  52. package/dist/extensions/sendbird/v1/actions/updateTicket/index.js.map +1 -0
  53. package/package.json +1 -1
@@ -0,0 +1,107 @@
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
+ const validation_1 = require("../../../validation");
7
+ exports.fields = {
8
+ id: {
9
+ id: 'id',
10
+ label: 'Coverage ID',
11
+ description: `The coverage's unique ID.`,
12
+ type: extensions_core_1.FieldType.STRING,
13
+ required: true,
14
+ },
15
+ order: {
16
+ id: 'order',
17
+ label: 'Order',
18
+ description: 'A numerical value from 1 to 5, representing the order in which insurance coverages should be used when processing claims.',
19
+ type: extensions_core_1.FieldType.NUMERIC,
20
+ required: true,
21
+ },
22
+ status: {
23
+ id: 'status',
24
+ label: 'Status',
25
+ description: 'The status of the coverage.',
26
+ type: extensions_core_1.FieldType.STRING,
27
+ required: true,
28
+ },
29
+ type: {
30
+ id: 'type',
31
+ label: 'Type',
32
+ description: `The Insurance Coverage Code Category, such as medical or accident, using values from http://hl7.org/fhir/ValueSet/coverage-type.`,
33
+ type: extensions_core_1.FieldType.JSON,
34
+ required: false,
35
+ },
36
+ subscriber: {
37
+ id: 'subscriber',
38
+ label: 'Subscriber',
39
+ description: `The resource for the subscriber of the coverage, formatted as a standard identifier "Patient/5350cd20de8a470aa570a852859ac87e".`,
40
+ type: extensions_core_1.FieldType.STRING,
41
+ required: true,
42
+ },
43
+ subscriberId: {
44
+ id: 'subscriberId',
45
+ label: 'Subscriber ID',
46
+ description: `The patient's unique ID.`,
47
+ type: extensions_core_1.FieldType.STRING,
48
+ required: false,
49
+ },
50
+ beneficiary: {
51
+ id: 'beneficiary',
52
+ label: 'Beneficiary',
53
+ description: `The patient the coverage is intended for, formatted as a standard identifier "Patient/5350cd20de8a470aa570a852859ac87e".`,
54
+ type: extensions_core_1.FieldType.STRING,
55
+ required: true,
56
+ },
57
+ relationship: {
58
+ id: 'relationship',
59
+ label: 'Relationship',
60
+ description: `The beneficiary's relationship to the subscriber, as defined in http://hl7.org/fhir/ValueSet/subscriber-relationship.`,
61
+ type: extensions_core_1.FieldType.JSON,
62
+ required: true,
63
+ },
64
+ periodStart: {
65
+ id: 'periodStart',
66
+ label: 'periodStart',
67
+ description: `When the coverage became active for the patient, expressed in FHIR Date format (YYYY-MM-DD).`,
68
+ type: extensions_core_1.FieldType.STRING,
69
+ required: true,
70
+ },
71
+ periodEnd: {
72
+ id: 'periodEnd',
73
+ label: 'periodEnd',
74
+ description: `When the coverage was no longer active for the patient, expressed in FHIR Date format (YYYY-MM-DD).`,
75
+ type: extensions_core_1.FieldType.STRING,
76
+ required: false,
77
+ },
78
+ payor: {
79
+ id: 'payor',
80
+ label: 'Payor',
81
+ description: `Details of the payor, as definded in https://docs.canvasmedical.com/reference/coverage-create`,
82
+ type: extensions_core_1.FieldType.JSON,
83
+ required: true,
84
+ },
85
+ classCoverage: {
86
+ id: 'classCoverage',
87
+ label: 'Class',
88
+ description: `Definition of the plan, subplan, group, and subgroup, as definded in https://docs.canvasmedical.com/reference/coverage-create`,
89
+ type: extensions_core_1.FieldType.JSON,
90
+ required: false,
91
+ },
92
+ };
93
+ exports.fieldsValidationSchema = zod_1.z.object({
94
+ id: zod_1.z.string(),
95
+ order: zod_1.z.coerce.number().min(1).max(5),
96
+ status: zod_1.z.string(),
97
+ type: validation_1.JsonSchema.optional(),
98
+ subscriber: (0, validation_1.createReferenceSchema)('Patient'),
99
+ subscriberId: zod_1.z.string().optional(),
100
+ beneficiary: (0, validation_1.createReferenceSchema)('Patient'),
101
+ relationship: validation_1.JsonSchema,
102
+ periodStart: extensions_core_1.DateOnlySchema,
103
+ periodEnd: extensions_core_1.DateOnlySchema.optional(),
104
+ payor: validation_1.JsonArraySchema,
105
+ classCoverage: validation_1.JsonArraySchema.optional(),
106
+ });
107
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/canvasMedical/v1/actions/updateCoverage/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAIsC;AACtC,6BAAwC;AACxC,oDAI4B;AAEf,QAAA,MAAM,GAAG;IACpB,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,2BAA2B;QACxC,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EACT,2HAA2H;QAC7H,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,kIAAkI;QAC/I,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,iIAAiI;QAC9I,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,E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IACd,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,uBAAU,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,IAAA,kCAAqB,EAAC,SAAS,CAAC;IAC5C,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,IAAA,kCAAqB,EAAC,SAAS,CAAC;IAC7C,YAAY,EAAE,uBAAU;IACxB,WAAW,EAAE,gCAAc;IAC3B,SAAS,EAAE,gCAAc,CAAC,QAAQ,EAAE;IACpC,KAAK,EAAE,4BAAe;IACtB,aAAa,EAAE,4BAAe,CAAC,QAAQ,EAAE;CACQ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './dataPoints';
2
+ export * from './fields';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./dataPoints"), exports);
18
+ __exportStar(require("./fields"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/canvasMedical/v1/actions/updateCoverage/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,2CAAwB"}
@@ -0,0 +1 @@
1
+ export { updateCoverage } from './updateCoverage';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateCoverage = void 0;
4
+ var updateCoverage_1 = require("./updateCoverage");
5
+ Object.defineProperty(exports, "updateCoverage", { enumerable: true, get: function () { return updateCoverage_1.updateCoverage; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/canvasMedical/v1/actions/updateCoverage/index.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAAxC,gHAAA,cAAc,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../../settings';
3
+ import { fields } from './config';
4
+ export declare const updateCoverage: Action<typeof fields, typeof settings>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateCoverage = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const extensions_core_2 = require("@awell-health/extensions-core");
6
+ const config_1 = require("./config");
7
+ const utils_1 = require("../../utils");
8
+ const zod_1 = require("zod");
9
+ const client_1 = require("../../client");
10
+ exports.updateCoverage = {
11
+ key: 'updateCoverage',
12
+ category: extensions_core_2.Category.EHR_INTEGRATIONS,
13
+ title: 'Update coverage',
14
+ description: 'Update a coverage',
15
+ fields: config_1.fields,
16
+ dataPoints: config_1.dataPoints,
17
+ previewable: true,
18
+ onActivityCreated: async (payload, onComplete, onError) => {
19
+ try {
20
+ const { fields: { id, order, status, type, subscriberId, subscriber: subscriberValue, beneficiary: beneficiaryValue, relationship, periodStart, periodEnd, payor, classCoverage, }, } = (0, extensions_core_1.validate)({
21
+ schema: zod_1.z.object({
22
+ fields: config_1.fieldsValidationSchema,
23
+ }),
24
+ payload,
25
+ });
26
+ const api = (0, client_1.makeAPIClient)(payload.settings);
27
+ const coverageId = await api.updateCoverage({
28
+ id,
29
+ resourceType: 'Coverage',
30
+ order,
31
+ status,
32
+ type,
33
+ subscriber: {
34
+ reference: subscriberValue,
35
+ },
36
+ subscriberId,
37
+ beneficiary: {
38
+ reference: beneficiaryValue,
39
+ },
40
+ relationship,
41
+ period: {
42
+ start: periodStart,
43
+ end: periodEnd,
44
+ },
45
+ payor,
46
+ class: classCoverage,
47
+ });
48
+ await onComplete({
49
+ data_points: {
50
+ coverageId,
51
+ },
52
+ });
53
+ }
54
+ catch (error) {
55
+ console.log(error);
56
+ let parsedError;
57
+ if ((0, utils_1.isZodError)(error)) {
58
+ parsedError = (0, utils_1.parseZodError)(error);
59
+ }
60
+ else if ((0, utils_1.isAxiosError)(error)) {
61
+ parsedError = (0, utils_1.parseAxiosError)(error);
62
+ }
63
+ else {
64
+ parsedError = (0, utils_1.parseUnknowError)(error);
65
+ }
66
+ await onError({
67
+ events: [parsedError],
68
+ });
69
+ }
70
+ },
71
+ };
72
+ //# sourceMappingURL=updateCoverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateCoverage.js","sourceRoot":"","sources":["../../../../../../extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,mEAAwD;AACxD,qCAAqE;AACrE,uCAMoB;AACpB,6BAAuB;AAEvB,yCAA4C;AAE/B,QAAA,cAAc,GAA2C;IACpE,GAAG,EAAE,gBAAgB;IACrB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,mBAAmB;IAChC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OA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aACnD;iBAAM;gBACL,WAAW,GAAG,IAAA,wBAAgB,EAAC,KAAc,CAAC,CAAA;aAC/C;YACD,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE,CAAC,WAAW,CAAC;aACtB,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tests_1 = require("../../../../../src/tests");
4
+ const __mocks__1 = require("../../client/__mocks__");
5
+ const updateCoverage_1 = require("./updateCoverage");
6
+ jest.mock('../../client', () => ({
7
+ ...jest.requireActual('../../client'),
8
+ makeAPIClient: __mocks__1.mockedMakeAPIClient,
9
+ }));
10
+ describe('updateCoverage', () => {
11
+ const onComplete = jest.fn();
12
+ const onError = jest.fn();
13
+ const payload = {
14
+ settings: __mocks__1.mockedSettings,
15
+ fields: __mocks__1.mockedUpdateCoverageData,
16
+ };
17
+ it('should update coverage', async () => {
18
+ await updateCoverage_1.updateCoverage.onActivityCreated((0, tests_1.generateTestPayload)(payload), onComplete, onError);
19
+ expect(onComplete).toHaveBeenCalledTimes(1);
20
+ expect(onComplete).toHaveBeenCalledWith({
21
+ data_points: { coverageId: __mocks__1.mockedCoverageId },
22
+ });
23
+ });
24
+ });
25
+ //# sourceMappingURL=updateCoverage.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateCoverage.test.js","sourceRoot":"","sources":["../../../../../../extensions/canvasMedical/v1/actions/updateCoverage/updateCoverage.test.ts"],"names":[],"mappings":";;AAAA,oDAA8D;AAC9D,qDAK+B;AAC/B,qDAAiD;AAEjD,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/B,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC;IACrC,aAAa,EAAE,8BAAmB;CACnC,CAAC,CAAC,CAAA;AAEH,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IACzB,MAAM,OAAO,GAAG;QACd,QAAQ,EAAE,yBAAc;QACxB,MAAM,EAAE,mCAAwB;KACjC,CAAA;IAED,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,+BAAc,CAAC,iBAAiB,CACpC,IAAA,2BAAmB,EAAC,OAAO,CAAC,EAC5B,UAAU,EACV,OAAO,CACR,CAAA;QACD,MAAM,CAAC,UAAU,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAA;QAC3C,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE,EAAE,UAAU,EAAE,2BAAgB,EAAE;SAC9C,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { DataWrapper, APIClient, type DataWrapperCtor } from '@awell-health/extensions-core';
2
2
  import { type settings } from '../../settings';
3
3
  import { type AppointmentWithId, type Appointment, type Task, type TaskWithId, type Patient, type PatientWithId, type CreatingQuestionnaireResponses, type QuestionnaireResponse } from '../validation';
4
+ import { type CoverageWithId, type Coverage } from '../validation/coverage.zod';
4
5
  import { type Claim } from '../validation/claim';
5
6
  import type { AppointmentWithIdResponse, CanvasAPIClientConstrutorProps, Id, TaskWithIdResponse, PatientWithIdResponse } from './type';
6
7
  export declare class CanvasDataWrapper extends DataWrapper {
@@ -15,6 +16,8 @@ export declare class CanvasDataWrapper extends DataWrapper {
15
16
  getPatient(id: string): Promise<PatientWithIdResponse>;
16
17
  createQuestionnaireResponses(data: CreatingQuestionnaireResponses): Promise<Id>;
17
18
  getQuestionnaireResponse(id: string): Promise<QuestionnaireResponse>;
19
+ createCoverage(data: Coverage): Promise<Id>;
20
+ updateCoverage(data: CoverageWithId): Promise<Id>;
18
21
  createClaim(data: Claim): Promise<Id>;
19
22
  }
20
23
  export declare class CanvasAPIClient extends APIClient<CanvasDataWrapper> {
@@ -31,6 +34,8 @@ export declare class CanvasAPIClient extends APIClient<CanvasDataWrapper> {
31
34
  getPatient(id: string): Promise<PatientWithIdResponse>;
32
35
  createQuestionnaireResponses(obj: CreatingQuestionnaireResponses): Promise<Id>;
33
36
  getQuestionnaireResponse(id: string): Promise<QuestionnaireResponse>;
37
+ createCoverage(obj: Coverage): Promise<Id>;
38
+ updateCoverage(obj: CoverageWithId): Promise<Id>;
34
39
  createClaim(obj: Claim): Promise<Id>;
35
40
  }
36
41
  export declare const makeAPIClient: (payloadSettings: Record<keyof typeof settings, string | undefined>) => CanvasAPIClient;
@@ -88,6 +88,22 @@ class CanvasDataWrapper extends extensions_core_1.DataWrapper {
88
88
  url: `/QuestionnaireResponse/${id}`,
89
89
  });
90
90
  }
91
+ async createCoverage(data) {
92
+ const response = await this.RequestRaw({
93
+ method: 'POST',
94
+ url: `/Coverage`,
95
+ data,
96
+ });
97
+ return (0, utils_1.extractIdFromLocationHeader)(response);
98
+ }
99
+ async updateCoverage(data) {
100
+ const response = await this.RequestRaw({
101
+ method: 'PUT',
102
+ url: `/Coverage/${data.id}`,
103
+ data,
104
+ });
105
+ return (0, utils_1.extractIdFromLocationHeader)(response);
106
+ }
91
107
  async createClaim(data) {
92
108
  const response = await this.RequestRaw({
93
109
  method: 'POST',
@@ -142,6 +158,12 @@ class CanvasAPIClient extends extensions_core_1.APIClient {
142
158
  async getQuestionnaireResponse(id) {
143
159
  return await this.FetchData(async (dw) => await dw.getQuestionnaireResponse(id));
144
160
  }
161
+ async createCoverage(obj) {
162
+ return await this.FetchData(async (dw) => await dw.createCoverage(obj));
163
+ }
164
+ async updateCoverage(obj) {
165
+ return await this.FetchData(async (dw) => await dw.updateCoverage(obj));
166
+ }
145
167
  async createClaim(obj) {
146
168
  return await this.FetchData(async (dw) => await dw.createClaim(obj));
147
169
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceR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E,CAAC;CACF;AAnFD,0CAmFC;AAEM,MAAM,aAAa,GAAG,CAC3B,eAAkE,EACjD,EAAE;IACnB,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,qBAAqB,EAAE,GACpD,2BAAc,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;IAEvC,OAAO,IAAI,eAAe,CAAC;QACzB,OAAO,EAAE,QAAQ;QACjB,aAAa,EAAE,qBAAqB;QACpC,OAAO,EAAE,QAAQ;KAClB,CAAC,CAAA;AACJ,CAAC,CAAA;AAXY,QAAA,aAAa,iBAWzB"}
@@ -0,0 +1,150 @@
1
+ import { z } from 'zod';
2
+ export declare const coverageSchema: z.ZodObject<{
3
+ resourceType: z.ZodLiteral<"Coverage">;
4
+ order: z.ZodNumber;
5
+ status: z.ZodString;
6
+ type: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
7
+ subscriber: z.ZodObject<{
8
+ reference: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ reference: string;
11
+ }, {
12
+ reference: string;
13
+ }>;
14
+ subscriberId: z.ZodOptional<z.ZodString>;
15
+ beneficiary: z.ZodObject<{
16
+ reference: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ reference: string;
19
+ }, {
20
+ reference: string;
21
+ }>;
22
+ relationship: z.ZodRecord<z.ZodString, z.ZodAny>;
23
+ period: z.ZodObject<{
24
+ start: z.ZodEffects<z.ZodDate, string, Date>;
25
+ end: z.ZodOptional<z.ZodEffects<z.ZodDate, string, Date>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ start: string;
28
+ end?: string | undefined;
29
+ }, {
30
+ start: Date;
31
+ end?: Date | undefined;
32
+ }>;
33
+ payor: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
34
+ class: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ order: number;
37
+ status: string;
38
+ resourceType: "Coverage";
39
+ period: {
40
+ start: string;
41
+ end?: string | undefined;
42
+ };
43
+ relationship: Record<string, any>;
44
+ subscriber: {
45
+ reference: string;
46
+ };
47
+ beneficiary: {
48
+ reference: string;
49
+ };
50
+ payor: Record<string, any>[];
51
+ type?: Record<string, any> | undefined;
52
+ subscriberId?: string | undefined;
53
+ class?: Record<string, any>[] | undefined;
54
+ }, {
55
+ order: number;
56
+ status: string;
57
+ resourceType: "Coverage";
58
+ period: {
59
+ start: Date;
60
+ end?: Date | undefined;
61
+ };
62
+ relationship: Record<string, any>;
63
+ subscriber: {
64
+ reference: string;
65
+ };
66
+ beneficiary: {
67
+ reference: string;
68
+ };
69
+ payor: Record<string, any>[];
70
+ type?: Record<string, any> | undefined;
71
+ subscriberId?: string | undefined;
72
+ class?: Record<string, any>[] | undefined;
73
+ }>;
74
+ export declare const coverageWithIdSchema: z.ZodObject<{
75
+ type: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
76
+ order: z.ZodNumber;
77
+ status: z.ZodString;
78
+ resourceType: z.ZodLiteral<"Coverage">;
79
+ period: z.ZodObject<{
80
+ start: z.ZodEffects<z.ZodDate, string, Date>;
81
+ end: z.ZodOptional<z.ZodEffects<z.ZodDate, string, Date>>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ start: string;
84
+ end?: string | undefined;
85
+ }, {
86
+ start: Date;
87
+ end?: Date | undefined;
88
+ }>;
89
+ relationship: z.ZodRecord<z.ZodString, z.ZodAny>;
90
+ subscriber: z.ZodObject<{
91
+ reference: z.ZodString;
92
+ }, "strip", z.ZodTypeAny, {
93
+ reference: string;
94
+ }, {
95
+ reference: string;
96
+ }>;
97
+ subscriberId: z.ZodOptional<z.ZodString>;
98
+ beneficiary: z.ZodObject<{
99
+ reference: z.ZodString;
100
+ }, "strip", z.ZodTypeAny, {
101
+ reference: string;
102
+ }, {
103
+ reference: string;
104
+ }>;
105
+ payor: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
106
+ class: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>;
107
+ id: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
109
+ id: string;
110
+ order: number;
111
+ status: string;
112
+ resourceType: "Coverage";
113
+ period: {
114
+ start: string;
115
+ end?: string | undefined;
116
+ };
117
+ relationship: Record<string, any>;
118
+ subscriber: {
119
+ reference: string;
120
+ };
121
+ beneficiary: {
122
+ reference: string;
123
+ };
124
+ payor: Record<string, any>[];
125
+ type?: Record<string, any> | undefined;
126
+ subscriberId?: string | undefined;
127
+ class?: Record<string, any>[] | undefined;
128
+ }, {
129
+ id: string;
130
+ order: number;
131
+ status: string;
132
+ resourceType: "Coverage";
133
+ period: {
134
+ start: Date;
135
+ end?: Date | undefined;
136
+ };
137
+ relationship: Record<string, any>;
138
+ subscriber: {
139
+ reference: string;
140
+ };
141
+ beneficiary: {
142
+ reference: string;
143
+ };
144
+ payor: Record<string, any>[];
145
+ type?: Record<string, any> | undefined;
146
+ subscriberId?: string | undefined;
147
+ class?: Record<string, any>[] | undefined;
148
+ }>;
149
+ export type Coverage = z.infer<typeof coverageSchema>;
150
+ export type CoverageWithId = z.infer<typeof coverageWithIdSchema>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.coverageWithIdSchema = exports.coverageSchema = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ const reference_zod_1 = require("./reference.zod");
7
+ exports.coverageSchema = zod_1.z.object({
8
+ resourceType: zod_1.z.literal('Coverage'),
9
+ order: zod_1.z.number(),
10
+ status: zod_1.z.string(),
11
+ type: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
12
+ subscriber: zod_1.z.object({
13
+ reference: (0, reference_zod_1.createReferenceSchema)('Patient'),
14
+ }),
15
+ subscriberId: zod_1.z.string().optional(),
16
+ beneficiary: zod_1.z.object({
17
+ reference: (0, reference_zod_1.createReferenceSchema)('Patient'),
18
+ }),
19
+ relationship: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
20
+ period: zod_1.z.object({
21
+ start: extensions_core_1.DateOnlySchema,
22
+ end: extensions_core_1.DateOnlySchema.optional(),
23
+ }),
24
+ payor: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
25
+ class: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())).optional(),
26
+ });
27
+ exports.coverageWithIdSchema = exports.coverageSchema.extend({
28
+ id: zod_1.z.string(),
29
+ });
30
+ //# sourceMappingURL=coverage.zod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coverage.zod.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/validation/coverage.zod.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,6BAAuB;AACvB,mDAAuD;AAE1C,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,YAAY,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IACnC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;QACnB,SAAS,EAAE,IAAA,qCAAqB,EAAC,SAAS,CAAC;KAC5C,CAAC;IACF,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;QACpB,SAAS,EAAE,IAAA,qCAAqB,EAAC,SAAS,CAAC;KAC5C,CAAC;IACF,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,gCAAc;QACrB,GAAG,EAAE,gCAAc,CAAC,QAAQ,EAAE;KAC/B,CAAC;IACF,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7C,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAA;AAEW,QAAA,oBAAoB,GAAG,sBAAc,CAAC,MAAM,CAAC;IACxD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAA"}
@@ -12,7 +12,7 @@
12
12
  "changelog": "# Cal.com changelog\n\n## September 4, 2023\n\n- add updateBooking and deleteBooking actions\n- update and refactor structure of getBooking and bookAppointment actions\n\n## July 4, 2023\n\n- Get booking action: add validation that bookingId and apiKey are not empty\n- Get booking action: add validation of response data to make sure we have data points\n\n## April 27, 2023\n\n- Get booking action: `startTime` and `endTime` data points are now of value type `date` instead of `string`.\n"
13
13
  },
14
14
  "canvasMedical": {
15
- "readme": "---\ntitle: Canvas Medical\ndescription: Canvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users.\n---\n\n# Canvas Medical\n\nCanvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users. Leveraging certified EHR as a foundation, Canvas Medical offers a comprehensive suite of APIs, enabling customers to swiftly launch innovative patient experiences and cost-effective business models.\n\nCanvas Medical provides appointment management, patient data creation and updates, task management, questionnaire creation, and much more.\n\n## Extension settings\n\nFor the extension to function correctly, you must include the following elements in your settings:\n\n`client_id` and `client_secret`: These values are generated on the Canvas Medical platform.\n`base_url`: This determines the base URL for your FHIR endpoint.\n`auth_url`: This determines the base URL for your authorization endpoint.\n\n### Create appointment\n\nEasily schedule appointments with providers using the Canvas API. This action allows you to reserve a meeting with a healthcare provider by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the unique `appointmentId`, serving as the key within the Canvas API object.\n\n### Create patient\n\nEffortlessly create patients using the Canvas API. This action allows you to generate a new patient record by submitting `patientData` in JSON format. Upon successful execution, the data points returns the unique `patientId`, serving as the key within the Canvas API object.\n\n### Create task\n\nEfficiently create tasks associated with a specific patient using the Canvas API. This action allows you to generate a new task linked to a designated patient by submitting `taskData` in JSON format. Upon successful execution, the data points returns the unique `taskId`, serving as the key within the Canvas API object.\n\n### Create questionnaire responses\n\nCreate questionnaire responses using the Canvas API to effortlessly record answers within an existing questionnaire. This action requires several parameters:\n\n- `questionnaireId`: Reference to the Canvas Questionnaire using the questionnaire id.\n- `subjectId`: Reference to the Canvas Patient using the patient id.\n- `authored`: Timestamp when the Questionnaire response was filled out (If omitted, the current timestamp at data ingestion will be used).\n- `authorId`: Reference to the patient or practitioner filling out the questionnaire. If omitted, it defaults to Canvas Bot.\n- `item`: List of answers to questions in the questionnaire.\n\nUpon successful execution, the data points returns `questionnaireResponseId`, which serves as the key within the Canvas API object.\n\n### Update appointment\n\nEffortlessly cancel or modify a reserved appointment using the Canvas API. This action allows you to update appointment details by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the `appointmentId`, serving as the key within the Canvas API object.\n\n### Update patient\n\nEfficiently update existing patient information within the system using the Canvas API. This action allows you to modify data by submitting `patientData` in JSON format. Upon successful execution, the data points returns the `patientId`, which serves as the key within the Canvas API object\n\n### Update task\n\nEfficiently update existing task information within the system using the Canvas API. This action allows you to modify data by submitting `taskData` in JSON format. Upon successful execution, the action returns the `taskId`, which serves as the key within the Canvas API object.\n\n### Create claim\n\nCreate claim using the Canvas API. This action requires several parameters:\n\n- `status`: Status compliant with Canvas Medical.\n- `type`: Type compliant with Canvas Medical.\n- `patientId`: Reference to the Canvas Patient using the patient id.\n- `created`: The field indicating when this claim resource was created\n- `provider`: The field related to determining personnel resources for services in the statement\n- `supportingInfo`: Supporting info compliant with Canvas Medical.\n- `diagnosis`: The field represents the list will create the Assessments in Canvas for this claim.\n- `insurance`: The field represents the list of elements that defines what coverages are to be used when adjudicating the claim.\n- `item`: The field represents the list of service charges to be used in the claim.\n\nUpon successful execution, the data points returns `claimId`, which serves as the key within the Canvas API object.\n",
15
+ "readme": "---\ntitle: Canvas Medical\ndescription: Canvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users.\n---\n\n# Canvas Medical\n\nCanvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users. Leveraging certified EHR as a foundation, Canvas Medical offers a comprehensive suite of APIs, enabling customers to swiftly launch innovative patient experiences and cost-effective business models.\n\nCanvas Medical provides appointment management, patient data creation and updates, task management, questionnaire creation, and much more.\n\n## Extension settings\n\nFor the extension to function correctly, you must include the following elements in your settings:\n\n`client_id` and `client_secret`: These values are generated on the Canvas Medical platform.\n`base_url`: This determines the base URL for your FHIR endpoint.\n`auth_url`: This determines the base URL for your authorization endpoint.\n\n### Create appointment\n\nEasily schedule appointments with providers using the Canvas API. This action allows you to reserve a meeting with a healthcare provider by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the unique `appointmentId`, serving as the key within the Canvas API object.\n\n### Create patient\n\nEffortlessly create patients using the Canvas API. This action allows you to generate a new patient record by submitting `patientData` in JSON format. Upon successful execution, the data points returns the unique `patientId`, serving as the key within the Canvas API object.\n\n### Create task\n\nEfficiently create tasks associated with a specific patient using the Canvas API. This action allows you to generate a new task linked to a designated patient by submitting `taskData` in JSON format. Upon successful execution, the data points returns the unique `taskId`, serving as the key within the Canvas API object.\n\n### Create questionnaire responses\n\nCreate questionnaire responses using the Canvas API to effortlessly record answers within an existing questionnaire. This action requires several parameters:\n\n- `Questionnaire ID`: Reference to the Canvas Questionnaire using the questionnaire id.\n- `Subject ID`: Reference to the Canvas Patient using the patient id.\n- `Authored`: Timestamp when the Questionnaire response was filled out (If omitted, the current timestamp at data ingestion will be used).\n- `Author ID`: Reference to the patient or practitioner filling out the questionnaire. If omitted, it defaults to Canvas Bot.\n- `Item`: List of answers to questions in the questionnaire.\n\nUpon successful execution, the data points returns `questionnaireResponseId`, which serves as the key within the Canvas API object.\n\n### Update appointment\n\nEffortlessly cancel or modify a reserved appointment using the Canvas API. This action allows you to update appointment details by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the `appointmentId`, serving as the key within the Canvas API object.\n\n### Update patient\n\nEfficiently update existing patient information within the system using the Canvas API. This action allows you to modify data by submitting `patientData` in JSON format. Upon successful execution, the data points returns the `patientId`, which serves as the key within the Canvas API object\n\n### Update task\n\nEfficiently update existing task information within the system using the Canvas API. This action allows you to modify data by submitting `taskData` in JSON format. Upon successful execution, the action returns the `taskId`, which serves as the key within the Canvas API object.\n\n### Create coverage\n\nEfficiently create a coverage using the Canvas API. This action requires several parameters:\n\n- `Order`: Specifies the order in which insurance coverages should be utilized when processing claims.\n- `Status`: Refers to the statuses represented within the Canvas Medical system.\n- `Type`: Pertains to the Insurance Coverage Code Category, such as medical or accident, using values from http://hl7.org/fhir/ValueSet/coverage-type.\n- `Subscriber`: Refers to the Canvas Patient using the patient ID, serving as the resource for the coverage's subscriber.\n- `Subscriber ID`: Refers to the Canvas Patient using the patient ID.\n- `Beneficiary`: Specifies the intended patient for the coverage.\n- `Relationship`: Relates to the beneficiary's relationship to the subscriber, as defined in the http://hl7.org/fhir/ValueSet/.\n- `Period start`: Indicates when the coverage became active for the patient.\n- `Period end`: Indicates when the coverage ceased to be active for the patient.\n- `Payor`: Relates to the entity responsible for payment.\n- `Class`: Utilized to define the plan, subplan, group, and subgroup.\n\n### Update coverage\n\nEfficiently update existin coverage using the Canvas API. This action requires several parameters:\n\n- `Id`: Reference to the Canvas Coverage using the coverage id.\n- `Order`: Specifies the order in which insurance coverages should be utilized when processing claims.\n- `Status`: Refers to the statuses represented within the Canvas Medical system.\n- `Type`: Pertains to the Insurance Coverage Code Category, such as medical or accident, using values from http://hl7.org/fhir/ValueSet/coverage-type.\n- `Subscriber`: Refers to the Canvas Patient using the patient ID, serving as the resource for the coverage's subscriber.\n- `Subscriber ID`: Refers to the Canvas Patient using the patient ID.\n- `Beneficiary`: Specifies the intended patient for the coverage.\n- `Relationship`: Relates to the beneficiary's relationship to the subscriber, as defined in the http://hl7.org/fhir/ValueSet/.\n- `Period start`: Indicates when the coverage became active for the patient.\n- `Period end`: Indicates when the coverage ceased to be active for the patient.\n- `Payor`: Relates to the entity responsible for payment.\n- `Class`: Utilized to define the plan, subplan, group, and subgroup.\n\n### Create claim\n\nCreate claim using the Canvas API. This action requires several parameters:\n\n- `status`: Status compliant with Canvas Medical.\n- `type`: Type compliant with Canvas Medical.\n- `patientId`: Reference to the Canvas Patient using the patient id.\n- `created`: The field indicating when this claim resource was created\n- `provider`: The field related to determining personnel resources for services in the statement\n- `supportingInfo`: Supporting info compliant with Canvas Medical.\n- `diagnosis`: The field represents the list will create the Assessments in Canvas for this claim.\n- `insurance`: The field represents the list of elements that defines what coverages are to be used when adjudicating the claim.\n- `item`: The field represents the list of service charges to be used in the claim.\n\nUpon successful execution, the data points returns `claimId`, which serves as the key within the Canvas API object.\n\n",
16
16
  "changelog": "# Canvas Medical changelog\n\n## 2023-09-01\n\n- Add new actions: `createAppointment`, `createPatient`, `createQuestionnaireResponses`, `createTask`, `updateAppointment`, `updatePatient`, and `updateTask` for enhanced functionality.\n"
17
17
  },
18
18
  "cloudinary": {
@@ -10,3 +10,4 @@ export { createCustomer } from './createCustomer';
10
10
  export { getCustomer } from './getCustomer';
11
11
  export { updateCustomerCustomFields } from './updateCustomerCustomFields';
12
12
  export { createTicket } from './createTicket';
13
+ export { updateTicket } from './updateTicket';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTicket = exports.updateCustomerCustomFields = exports.getCustomer = exports.createCustomer = exports.activateUser = exports.deactivateUser = exports.deleteMetadata = exports.updateMetadata = exports.deleteUser = exports.updateUser = exports.getUser = exports.createUser = void 0;
3
+ exports.updateTicket = exports.createTicket = exports.updateCustomerCustomFields = exports.getCustomer = exports.createCustomer = exports.activateUser = exports.deactivateUser = exports.deleteMetadata = exports.updateMetadata = exports.deleteUser = exports.updateUser = exports.getUser = exports.createUser = void 0;
4
4
  var createUser_1 = require("./createUser");
5
5
  Object.defineProperty(exports, "createUser", { enumerable: true, get: function () { return createUser_1.createUser; } });
6
6
  var getUser_1 = require("./getUser");
@@ -25,4 +25,6 @@ var updateCustomerCustomFields_1 = require("./updateCustomerCustomFields");
25
25
  Object.defineProperty(exports, "updateCustomerCustomFields", { enumerable: true, get: function () { return updateCustomerCustomFields_1.updateCustomerCustomFields; } });
26
26
  var createTicket_1 = require("./createTicket");
27
27
  Object.defineProperty(exports, "createTicket", { enumerable: true, get: function () { return createTicket_1.createTicket; } });
28
+ var updateTicket_1 = require("./updateTicket");
29
+ Object.defineProperty(exports, "updateTicket", { enumerable: true, get: function () { return updateTicket_1.updateTicket; } });
28
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/sendbird/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2EAAyE;AAAhE,wIAAA,0BAA0B,OAAA;AACnC,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/sendbird/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2EAAyE;AAAhE,wIAAA,0BAA0B,OAAA;AACnC,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
@@ -0,0 +1 @@
1
+ export { updateTicket } from './updateTicket';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateTicket = void 0;
4
+ var updateTicket_1 = require("./updateTicket");
5
+ Object.defineProperty(exports, "updateTicket", { enumerable: true, get: function () { return updateTicket_1.updateTicket; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/sendbird/v1/actions/updateTicket/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.90",
3
+ "version": "1.0.92",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {