@awell-health/awell-extensions 2.0.294 → 2.0.296
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/index.js +2 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/landingAi/actions/documentExtraction/config/dataPoints.d.ts +18 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/dataPoints.js +22 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/dataPoints.js.map +1 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/fields.d.ts +44 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/fields.js +69 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/fields.js.map +1 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/index.d.ts +2 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/index.js +9 -0
- package/dist/extensions/landingAi/actions/documentExtraction/config/index.js.map +1 -0
- package/dist/extensions/landingAi/actions/documentExtraction/documentExtraction.d.ts +4 -0
- package/dist/extensions/landingAi/actions/documentExtraction/documentExtraction.js +67 -0
- package/dist/extensions/landingAi/actions/documentExtraction/documentExtraction.js.map +1 -0
- package/dist/extensions/landingAi/actions/documentExtraction/index.d.ts +1 -0
- package/dist/extensions/landingAi/actions/documentExtraction/index.js +18 -0
- package/dist/extensions/landingAi/actions/documentExtraction/index.js.map +1 -0
- package/dist/extensions/landingAi/actions/index.d.ts +39 -0
- package/dist/extensions/landingAi/actions/index.js +8 -0
- package/dist/extensions/landingAi/actions/index.js.map +1 -0
- package/dist/extensions/landingAi/index.d.ts +2 -0
- package/dist/extensions/landingAi/index.js +19 -0
- package/dist/extensions/landingAi/index.js.map +1 -0
- package/dist/extensions/landingAi/lib/api/client.d.ts +10 -0
- package/dist/extensions/landingAi/lib/api/client.js +65 -0
- package/dist/extensions/landingAi/lib/api/client.js.map +1 -0
- package/dist/extensions/landingAi/lib/api/schema/AgenticDocumentAnalysis.schema.d.ts +131 -0
- package/dist/extensions/landingAi/lib/api/schema/AgenticDocumentAnalysis.schema.js +36 -0
- package/dist/extensions/landingAi/lib/api/schema/AgenticDocumentAnalysis.schema.js.map +1 -0
- package/dist/extensions/landingAi/lib/api/schema/index.d.ts +1 -0
- package/dist/extensions/landingAi/lib/api/schema/index.js +18 -0
- package/dist/extensions/landingAi/lib/api/schema/index.js.map +1 -0
- package/dist/extensions/landingAi/lib/validatePayloadAndCreateSdk.d.ts +18 -0
- package/dist/extensions/landingAi/lib/validatePayloadAndCreateSdk.js +35 -0
- package/dist/extensions/landingAi/lib/validatePayloadAndCreateSdk.js.map +1 -0
- package/dist/extensions/landingAi/settings.d.ts +17 -0
- package/dist/extensions/landingAi/settings.js +17 -0
- package/dist/extensions/landingAi/settings.js.map +1 -0
- package/dist/extensions/markdown.json +5 -1
- package/dist/extensions/westFax/actions/getFaxDocument/config/dataPoints.d.ts +26 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/dataPoints.js +30 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/dataPoints.js.map +1 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/fields.d.ts +18 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/fields.js +18 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/fields.js.map +1 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/index.d.ts +1 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/index.js +6 -0
- package/dist/extensions/westFax/actions/getFaxDocument/config/index.js.map +1 -0
- package/dist/extensions/westFax/actions/getFaxDocument/getFaxDocument.d.ts +4 -0
- package/dist/extensions/westFax/actions/getFaxDocument/getFaxDocument.js +84 -0
- package/dist/extensions/westFax/actions/getFaxDocument/getFaxDocument.js.map +1 -0
- package/dist/extensions/westFax/actions/getFaxDocument/index.d.ts +1 -0
- package/dist/extensions/westFax/actions/getFaxDocument/index.js +6 -0
- package/dist/extensions/westFax/actions/getFaxDocument/index.js.map +1 -0
- package/dist/extensions/westFax/actions/index.d.ts +45 -0
- package/dist/extensions/westFax/actions/index.js +2 -0
- package/dist/extensions/westFax/actions/index.js.map +1 -1
- package/dist/extensions/westFax/index.js +2 -0
- package/dist/extensions/westFax/index.js.map +1 -1
- package/dist/extensions/westFax/lib/api/client.d.ts +14 -0
- package/dist/extensions/westFax/lib/api/client.js +52 -0
- package/dist/extensions/westFax/lib/api/client.js.map +1 -0
- package/dist/extensions/westFax/lib/api/schema/GetFaxDocument.schema.d.ts +150 -0
- package/dist/extensions/westFax/lib/api/schema/GetFaxDocument.schema.js +37 -0
- package/dist/extensions/westFax/lib/api/schema/GetFaxDocument.schema.js.map +1 -0
- package/dist/extensions/westFax/lib/api/schema/index.d.ts +1 -0
- package/dist/extensions/westFax/lib/api/schema/index.js +18 -0
- package/dist/extensions/westFax/lib/api/schema/index.js.map +1 -0
- package/dist/extensions/westFax/lib/validatePayloadAndCreateSdk.d.ts +18 -0
- package/dist/extensions/westFax/lib/validatePayloadAndCreateSdk.js +41 -0
- package/dist/extensions/westFax/lib/validatePayloadAndCreateSdk.js.map +1 -0
- package/dist/extensions/westFax/settings.d.ts +10 -0
- package/dist/extensions/westFax/settings.js +8 -0
- package/dist/extensions/westFax/settings.js.map +1 -1
- package/dist/extensions/westFax/webhooks/FaxReceived/__testdata__/faxReceived.mock.d.ts +5 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/__testdata__/faxReceived.mock.js +9 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/__testdata__/faxReceived.mock.js.map +1 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/faxReceived.d.ts +20 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/faxReceived.js +42 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/faxReceived.js.map +1 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/index.d.ts +1 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/index.js +18 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/index.js.map +1 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/types.d.ts +15 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/types.js +10 -0
- package/dist/extensions/westFax/webhooks/FaxReceived/types.js.map +1 -0
- package/dist/extensions/westFax/webhooks/index.d.ts +34 -0
- package/dist/extensions/westFax/webhooks/index.js +6 -0
- package/dist/extensions/westFax/webhooks/index.js.map +1 -0
- package/package.json +1 -1
@@ -0,0 +1,150 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const GetFaxDocumentInputSchema: z.ZodObject<{
|
3
|
+
Username: z.ZodString;
|
4
|
+
Password: z.ZodString;
|
5
|
+
Cookies: z.ZodBoolean;
|
6
|
+
ProductId: z.ZodString;
|
7
|
+
FaxIds1: z.ZodObject<{
|
8
|
+
Id: z.ZodString;
|
9
|
+
Direction: z.ZodOptional<z.ZodString>;
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
11
|
+
Id: string;
|
12
|
+
Direction?: string | undefined;
|
13
|
+
}, {
|
14
|
+
Id: string;
|
15
|
+
Direction?: string | undefined;
|
16
|
+
}>;
|
17
|
+
format: z.ZodEnum<["pdf", "tiff", "jpeg", "png", "gif"]>;
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
19
|
+
Username: string;
|
20
|
+
Password: string;
|
21
|
+
format: "pdf" | "tiff" | "jpeg" | "png" | "gif";
|
22
|
+
Cookies: boolean;
|
23
|
+
ProductId: string;
|
24
|
+
FaxIds1: {
|
25
|
+
Id: string;
|
26
|
+
Direction?: string | undefined;
|
27
|
+
};
|
28
|
+
}, {
|
29
|
+
Username: string;
|
30
|
+
Password: string;
|
31
|
+
format: "pdf" | "tiff" | "jpeg" | "png" | "gif";
|
32
|
+
Cookies: boolean;
|
33
|
+
ProductId: string;
|
34
|
+
FaxIds1: {
|
35
|
+
Id: string;
|
36
|
+
Direction?: string | undefined;
|
37
|
+
};
|
38
|
+
}>;
|
39
|
+
declare const GetFaxInputSchemaWithoutCredentials: z.ZodObject<Pick<{
|
40
|
+
Username: z.ZodString;
|
41
|
+
Password: z.ZodString;
|
42
|
+
Cookies: z.ZodBoolean;
|
43
|
+
ProductId: z.ZodString;
|
44
|
+
FaxIds1: z.ZodObject<{
|
45
|
+
Id: z.ZodString;
|
46
|
+
Direction: z.ZodOptional<z.ZodString>;
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
48
|
+
Id: string;
|
49
|
+
Direction?: string | undefined;
|
50
|
+
}, {
|
51
|
+
Id: string;
|
52
|
+
Direction?: string | undefined;
|
53
|
+
}>;
|
54
|
+
format: z.ZodEnum<["pdf", "tiff", "jpeg", "png", "gif"]>;
|
55
|
+
}, "format" | "Cookies" | "FaxIds1">, "strip", z.ZodTypeAny, {
|
56
|
+
format: "pdf" | "tiff" | "jpeg" | "png" | "gif";
|
57
|
+
Cookies: boolean;
|
58
|
+
FaxIds1: {
|
59
|
+
Id: string;
|
60
|
+
Direction?: string | undefined;
|
61
|
+
};
|
62
|
+
}, {
|
63
|
+
format: "pdf" | "tiff" | "jpeg" | "png" | "gif";
|
64
|
+
Cookies: boolean;
|
65
|
+
FaxIds1: {
|
66
|
+
Id: string;
|
67
|
+
Direction?: string | undefined;
|
68
|
+
};
|
69
|
+
}>;
|
70
|
+
export type GetFaxInputTypeWithoutCredentials = z.infer<typeof GetFaxInputSchemaWithoutCredentials>;
|
71
|
+
export declare const GetFaxDocumentResponseSchema: z.ZodObject<{
|
72
|
+
Success: z.ZodBoolean;
|
73
|
+
Result: z.ZodArray<z.ZodObject<{
|
74
|
+
Id: z.ZodString;
|
75
|
+
Direction: z.ZodString;
|
76
|
+
Date: z.ZodString;
|
77
|
+
Status: z.ZodString;
|
78
|
+
FaxFiles: z.ZodArray<z.ZodObject<{
|
79
|
+
ContentType: z.ZodString;
|
80
|
+
ContentLength: z.ZodNumber;
|
81
|
+
FileContents: z.ZodString;
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
83
|
+
ContentType: string;
|
84
|
+
ContentLength: number;
|
85
|
+
FileContents: string;
|
86
|
+
}, {
|
87
|
+
ContentType: string;
|
88
|
+
ContentLength: number;
|
89
|
+
FileContents: string;
|
90
|
+
}>, "many">;
|
91
|
+
Format: z.ZodString;
|
92
|
+
PageCount: z.ZodNumber;
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
94
|
+
Status: string;
|
95
|
+
Date: string;
|
96
|
+
Id: string;
|
97
|
+
Direction: string;
|
98
|
+
FaxFiles: {
|
99
|
+
ContentType: string;
|
100
|
+
ContentLength: number;
|
101
|
+
FileContents: string;
|
102
|
+
}[];
|
103
|
+
Format: string;
|
104
|
+
PageCount: number;
|
105
|
+
}, {
|
106
|
+
Status: string;
|
107
|
+
Date: string;
|
108
|
+
Id: string;
|
109
|
+
Direction: string;
|
110
|
+
FaxFiles: {
|
111
|
+
ContentType: string;
|
112
|
+
ContentLength: number;
|
113
|
+
FileContents: string;
|
114
|
+
}[];
|
115
|
+
Format: string;
|
116
|
+
PageCount: number;
|
117
|
+
}>, "many">;
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
119
|
+
Success: boolean;
|
120
|
+
Result: {
|
121
|
+
Status: string;
|
122
|
+
Date: string;
|
123
|
+
Id: string;
|
124
|
+
Direction: string;
|
125
|
+
FaxFiles: {
|
126
|
+
ContentType: string;
|
127
|
+
ContentLength: number;
|
128
|
+
FileContents: string;
|
129
|
+
}[];
|
130
|
+
Format: string;
|
131
|
+
PageCount: number;
|
132
|
+
}[];
|
133
|
+
}, {
|
134
|
+
Success: boolean;
|
135
|
+
Result: {
|
136
|
+
Status: string;
|
137
|
+
Date: string;
|
138
|
+
Id: string;
|
139
|
+
Direction: string;
|
140
|
+
FaxFiles: {
|
141
|
+
ContentType: string;
|
142
|
+
ContentLength: number;
|
143
|
+
FileContents: string;
|
144
|
+
}[];
|
145
|
+
Format: string;
|
146
|
+
PageCount: number;
|
147
|
+
}[];
|
148
|
+
}>;
|
149
|
+
export type GetFaxDocumentResponseType = z.infer<typeof GetFaxDocumentResponseSchema>;
|
150
|
+
export {};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetFaxDocumentResponseSchema = exports.GetFaxDocumentInputSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.GetFaxDocumentInputSchema = zod_1.z.object({
|
6
|
+
Username: zod_1.z.string().min(1),
|
7
|
+
Password: zod_1.z.string().min(1),
|
8
|
+
Cookies: zod_1.z.boolean(),
|
9
|
+
ProductId: zod_1.z.string().min(1),
|
10
|
+
FaxIds1: zod_1.z.object({
|
11
|
+
Id: zod_1.z.string(),
|
12
|
+
Direction: zod_1.z.string().optional(),
|
13
|
+
}),
|
14
|
+
format: zod_1.z.enum(['pdf', 'tiff', 'jpeg', 'png', 'gif']),
|
15
|
+
});
|
16
|
+
const GetFaxInputSchemaWithoutCredentials = exports.GetFaxDocumentInputSchema.pick({
|
17
|
+
Cookies: true,
|
18
|
+
FaxIds1: true,
|
19
|
+
format: true,
|
20
|
+
});
|
21
|
+
exports.GetFaxDocumentResponseSchema = zod_1.z.object({
|
22
|
+
Success: zod_1.z.boolean(),
|
23
|
+
Result: zod_1.z.array(zod_1.z.object({
|
24
|
+
Id: zod_1.z.string(),
|
25
|
+
Direction: zod_1.z.string(),
|
26
|
+
Date: zod_1.z.string(),
|
27
|
+
Status: zod_1.z.string(),
|
28
|
+
FaxFiles: zod_1.z.array(zod_1.z.object({
|
29
|
+
ContentType: zod_1.z.string(),
|
30
|
+
ContentLength: zod_1.z.number(),
|
31
|
+
FileContents: zod_1.z.string(),
|
32
|
+
})),
|
33
|
+
Format: zod_1.z.string(),
|
34
|
+
PageCount: zod_1.z.number(),
|
35
|
+
})),
|
36
|
+
});
|
37
|
+
//# sourceMappingURL=GetFaxDocument.schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GetFaxDocument.schema.js","sourceRoot":"","sources":["../../../../../../extensions/westFax/lib/api/schema/GetFaxDocument.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACjC,CAAC;IACF,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;CACtD,CAAC,CAAA;AAEF,MAAM,mCAAmC,GAAG,iCAAyB,CAAC,IAAI,CAAC;IACzE,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAC,CAAA;AAMW,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,MAAM,EAAE,OAAC,CAAC,KAAK,CACb,OAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;QACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,OAAC,CAAC,KAAK,CACf,OAAC,CAAC,MAAM,CAAC;YACP,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;YACvB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;YACzB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;SACzB,CAAC,CACH;QACD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;QAClB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CACH;CACF,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './GetFaxDocument.schema';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./GetFaxDocument.schema"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/westFax/lib/api/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { type NewActivityPayload, type Pathway, type Patient } from '@awell-health/extensions-core';
|
2
|
+
import z from 'zod';
|
3
|
+
import { SettingsValidationSchema } from '../settings';
|
4
|
+
import { type Activity } from '@awell-health/extensions-core/dist/types/Activity';
|
5
|
+
import { WestFaxApiClient } from './api/client';
|
6
|
+
type ValidatePayloadAndCreateSdk = <T extends z.ZodTypeAny, P extends NewActivityPayload<any, any>>(args: {
|
7
|
+
fieldsSchema: T;
|
8
|
+
payload: P;
|
9
|
+
}) => Promise<{
|
10
|
+
westFaxSdk: WestFaxApiClient;
|
11
|
+
fields: z.infer<(typeof args)['fieldsSchema']>;
|
12
|
+
settings: z.infer<typeof SettingsValidationSchema>;
|
13
|
+
pathway: Pathway;
|
14
|
+
patient: Patient;
|
15
|
+
activity: Activity;
|
16
|
+
}>;
|
17
|
+
export declare const validatePayloadAndCreateSdk: ValidatePayloadAndCreateSdk;
|
18
|
+
export {};
|
@@ -0,0 +1,41 @@
|
|
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.validatePayloadAndCreateSdk = void 0;
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
const settings_1 = require("../settings");
|
10
|
+
const client_1 = require("./api/client");
|
11
|
+
const validatePayloadAndCreateSdk = async ({ fieldsSchema, payload, }) => {
|
12
|
+
const { settings, fields } = (0, extensions_core_1.validate)({
|
13
|
+
schema: zod_1.default.object({
|
14
|
+
fields: fieldsSchema,
|
15
|
+
settings: settings_1.SettingsValidationSchema.extend({
|
16
|
+
productId: zod_1.default
|
17
|
+
.string()
|
18
|
+
.min(1, 'Product ID is required to use the WestFax API'),
|
19
|
+
}),
|
20
|
+
}),
|
21
|
+
payload,
|
22
|
+
});
|
23
|
+
const { patient, pathway, activity } = payload;
|
24
|
+
const baseUrl = `https://api2.westfax.com/REST`;
|
25
|
+
const westFaxSdk = new client_1.WestFaxApiClient({
|
26
|
+
baseUrl,
|
27
|
+
username: settings.username,
|
28
|
+
password: settings.password,
|
29
|
+
productId: settings.productId,
|
30
|
+
});
|
31
|
+
return {
|
32
|
+
westFaxSdk,
|
33
|
+
settings,
|
34
|
+
fields,
|
35
|
+
patient,
|
36
|
+
pathway,
|
37
|
+
activity,
|
38
|
+
};
|
39
|
+
};
|
40
|
+
exports.validatePayloadAndCreateSdk = validatePayloadAndCreateSdk;
|
41
|
+
//# sourceMappingURL=validatePayloadAndCreateSdk.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"validatePayloadAndCreateSdk.js","sourceRoot":"","sources":["../../../../extensions/westFax/lib/validatePayloadAndCreateSdk.ts"],"names":[],"mappings":";;;;;;AAAA,mEAKsC;AACtC,8CAAmB;AACnB,0CAAsD;AAEtD,yCAA+C;AAiBxC,MAAM,2BAA2B,GAAgC,KAAK,EAAE,EAC7E,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAA,0BAAQ,EAAC;QACpC,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,mCAAwB,CAAC,MAAM,CAAC;gBACxC,SAAS,EAAE,aAAC;qBACT,MAAM,EAAE;qBACR,GAAG,CAAC,CAAC,EAAE,+CAA+C,CAAC;aAC3D,CAAC;SACH,CAAC;QACF,OAAO;KACR,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAE9C,MAAM,OAAO,GAAG,+BAA+B,CAAA;IAE/C,MAAM,UAAU,GAAG,IAAI,yBAAgB,CAAC;QACtC,OAAO;QACP,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,SAAS,EAAE,QAAQ,CAAC,SAAS;KAC9B,CAAC,CAAA;IAEF,OAAO;QACL,UAAU;QACV,QAAQ;QACR,MAAM;QACN,OAAO;QACP,OAAO;QACP,QAAQ;KACT,CAAA;AACH,CAAC,CAAA;AAnCY,QAAA,2BAA2B,+BAmCvC"}
|
@@ -14,6 +14,13 @@ export declare const settings: {
|
|
14
14
|
required: true;
|
15
15
|
description: string;
|
16
16
|
};
|
17
|
+
productId: {
|
18
|
+
key: string;
|
19
|
+
label: string;
|
20
|
+
obfuscated: false;
|
21
|
+
required: false;
|
22
|
+
description: string;
|
23
|
+
};
|
17
24
|
faceSheetUrl: {
|
18
25
|
key: string;
|
19
26
|
label: string;
|
@@ -25,13 +32,16 @@ export declare const settings: {
|
|
25
32
|
export declare const SettingsValidationSchema: z.ZodObject<{
|
26
33
|
username: z.ZodString;
|
27
34
|
password: z.ZodString;
|
35
|
+
productId: z.ZodOptional<z.ZodString>;
|
28
36
|
faceSheetUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
29
37
|
}, "strip", z.ZodTypeAny, {
|
30
38
|
username: string;
|
31
39
|
password: string;
|
40
|
+
productId?: string | undefined;
|
32
41
|
faceSheetUrl?: string | undefined;
|
33
42
|
}, {
|
34
43
|
username: string;
|
35
44
|
password: string;
|
45
|
+
productId?: string | undefined;
|
36
46
|
faceSheetUrl?: string | undefined;
|
37
47
|
}>;
|
@@ -17,6 +17,13 @@ exports.settings = {
|
|
17
17
|
required: true,
|
18
18
|
description: 'Your WestFax password',
|
19
19
|
},
|
20
|
+
productId: {
|
21
|
+
key: 'productId',
|
22
|
+
label: 'Product ID',
|
23
|
+
obfuscated: false,
|
24
|
+
required: false,
|
25
|
+
description: 'Your WestFax product ID. Required for some functionality in the extension.',
|
26
|
+
},
|
20
27
|
faceSheetUrl: {
|
21
28
|
key: 'faceSheetUrl',
|
22
29
|
label: 'URL to facesheet (PDF)',
|
@@ -32,6 +39,7 @@ exports.SettingsValidationSchema = zod_1.z.object({
|
|
32
39
|
password: zod_1.z.string().min(1, {
|
33
40
|
message: 'Missing "Password in the extension settings."',
|
34
41
|
}),
|
42
|
+
productId: zod_1.z.string().optional(),
|
35
43
|
faceSheetUrl: zod_1.z.string().url().optional().or(zod_1.z.literal('')),
|
36
44
|
});
|
37
45
|
//# sourceMappingURL=settings.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/westFax/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uBAAuB;KACrC;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uBAAuB;KACrC;IACD,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,KAAK,EAAE,wBAAwB;QAC/B,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,mOAAmO;KACtO;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC1B,OAAO,EAAE,gDAAgD;KAC1D,CAAC;IACF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC1B,OAAO,EAAE,+CAA+C;KACzD,CAAC;IACF,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;CACR,CAAC,CAAA"}
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/westFax/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uBAAuB;KACrC;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uBAAuB;KACrC;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,YAAY;QACnB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,4EAA4E;KAC/E;IACD,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,KAAK,EAAE,wBAAwB;QAC/B,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,mOAAmO;KACtO;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC1B,OAAO,EAAE,gDAAgD;KAC1D,CAAC;IACF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC1B,OAAO,EAAE,+CAA+C;KACzD,CAAC;IACF,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;CACR,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"faxReceived.mock.js","sourceRoot":"","sources":["../../../../../../extensions/westFax/webhooks/FaxReceived/__testdata__/faxReceived.mock.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAG;IAChC,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,GAAG,EAAE,GAAG;CAC2B,CAAA"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { type Webhook } from '@awell-health/extensions-core';
|
2
|
+
import { type settings } from '../../settings';
|
3
|
+
import { type FaxReceivedWebhookPayload } from './types';
|
4
|
+
declare const dataPoints: {
|
5
|
+
jobId: {
|
6
|
+
key: string;
|
7
|
+
valueType: "string";
|
8
|
+
};
|
9
|
+
prod: {
|
10
|
+
key: string;
|
11
|
+
valueType: "string";
|
12
|
+
};
|
13
|
+
dir: {
|
14
|
+
key: string;
|
15
|
+
valueType: "string";
|
16
|
+
};
|
17
|
+
};
|
18
|
+
export declare const faxReceived: Webhook<keyof typeof dataPoints, FaxReceivedWebhookPayload, typeof settings>;
|
19
|
+
export type FaxReceived = typeof faxReceived;
|
20
|
+
export {};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.faxReceived = void 0;
|
4
|
+
const types_1 = require("./types");
|
5
|
+
const dataPoints = {
|
6
|
+
jobId: {
|
7
|
+
key: 'jobId',
|
8
|
+
valueType: 'string',
|
9
|
+
},
|
10
|
+
prod: {
|
11
|
+
key: 'prod',
|
12
|
+
valueType: 'string',
|
13
|
+
},
|
14
|
+
dir: {
|
15
|
+
key: 'dir',
|
16
|
+
valueType: 'string',
|
17
|
+
},
|
18
|
+
};
|
19
|
+
exports.faxReceived = {
|
20
|
+
key: 'faxReceived',
|
21
|
+
dataPoints,
|
22
|
+
onEvent: async ({ payload: { payload, rawBody, headers, settings }, onSuccess, onError, }) => {
|
23
|
+
const parsedPayload = types_1.zFaxReceivedWebhookPayload.safeParse(payload);
|
24
|
+
if (!parsedPayload.success) {
|
25
|
+
await onError({
|
26
|
+
response: {
|
27
|
+
statusCode: 400,
|
28
|
+
message: JSON.stringify(parsedPayload.error, null, 2),
|
29
|
+
},
|
30
|
+
});
|
31
|
+
return;
|
32
|
+
}
|
33
|
+
await onSuccess({
|
34
|
+
data_points: {
|
35
|
+
jobId: parsedPayload.data.jobId,
|
36
|
+
prod: parsedPayload.data.prod,
|
37
|
+
dir: parsedPayload.data.dir,
|
38
|
+
},
|
39
|
+
});
|
40
|
+
},
|
41
|
+
};
|
42
|
+
//# sourceMappingURL=faxReceived.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"faxReceived.js","sourceRoot":"","sources":["../../../../../extensions/westFax/webhooks/FaxReceived/faxReceived.ts"],"names":[],"mappings":";;;AAMA,mCAAoD;AAEpD,MAAM,UAAU,GAAG;IACjB,KAAK,EAAE;QACL,GAAG,EAAE,OAAO;QACZ,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,SAAS,EAAE,QAAQ;KACpB;IACD,GAAG,EAAE;QACH,GAAG,EAAE,KAAK;QACV,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,WAAW,GAIpB;IACF,GAAG,EAAE,aAAa;IAClB,UAAU;IACV,OAAO,EAAE,KAAK,EAAE,EACd,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAChD,SAAS,EACT,OAAO,GACR,EAAE,EAAE;QACH,MAAM,aAAa,GAAG,kCAA0B,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QAEnE,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;YAC3B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtD;aACF,CAAC,CAAA;YACF,OAAM;QACR,CAAC;QAED,MAAM,SAAS,CAAC;YACd,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK;gBAC/B,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI;gBAC7B,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG;aAC5B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './faxReceived';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./faxReceived"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/westFax/webhooks/FaxReceived/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const zFaxReceivedWebhookPayload: z.ZodObject<{
|
3
|
+
jobId: z.ZodString;
|
4
|
+
prod: z.ZodString;
|
5
|
+
dir: z.ZodString;
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
7
|
+
jobId: string;
|
8
|
+
prod: string;
|
9
|
+
dir: string;
|
10
|
+
}, {
|
11
|
+
jobId: string;
|
12
|
+
prod: string;
|
13
|
+
dir: string;
|
14
|
+
}>;
|
15
|
+
export type FaxReceivedWebhookPayload = z.infer<typeof zFaxReceivedWebhookPayload>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.zFaxReceivedWebhookPayload = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.zFaxReceivedWebhookPayload = zod_1.z.object({
|
6
|
+
jobId: zod_1.z.string().min(1),
|
7
|
+
prod: zod_1.z.string().min(1),
|
8
|
+
dir: zod_1.z.string().min(1),
|
9
|
+
});
|
10
|
+
//# sourceMappingURL=types.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../extensions/westFax/webhooks/FaxReceived/types.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACvB,CAAC,CAAA"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
export declare const webhooks: import("@awell-health/extensions-core").Webhook<"jobId" | "prod" | "dir", {
|
2
|
+
jobId: string;
|
3
|
+
prod: string;
|
4
|
+
dir: string;
|
5
|
+
}, {
|
6
|
+
username: {
|
7
|
+
key: string;
|
8
|
+
label: string;
|
9
|
+
obfuscated: false;
|
10
|
+
required: true;
|
11
|
+
description: string;
|
12
|
+
};
|
13
|
+
password: {
|
14
|
+
key: string;
|
15
|
+
label: string;
|
16
|
+
obfuscated: true;
|
17
|
+
required: true;
|
18
|
+
description: string;
|
19
|
+
};
|
20
|
+
productId: {
|
21
|
+
key: string;
|
22
|
+
label: string;
|
23
|
+
obfuscated: false;
|
24
|
+
required: false;
|
25
|
+
description: string;
|
26
|
+
};
|
27
|
+
faceSheetUrl: {
|
28
|
+
key: string;
|
29
|
+
label: string;
|
30
|
+
obfuscated: true;
|
31
|
+
required: false;
|
32
|
+
description: string;
|
33
|
+
};
|
34
|
+
}>[];
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/westFax/webhooks/index.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAE1C,QAAA,QAAQ,GAAG,CAAC,yBAAW,CAAC,CAAA"}
|