@awell-health/awell-extensions 2.0.194 → 2.0.196
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/braze/actions/actionHelpers.d.ts +1 -0
- package/dist/extensions/braze/actions/actionHelpers.js +9 -0
- package/dist/extensions/braze/actions/actionHelpers.js.map +1 -0
- package/dist/extensions/braze/actions/index.d.ts +933 -0
- package/dist/extensions/braze/actions/index.js +16 -0
- package/dist/extensions/braze/actions/index.js.map +1 -0
- package/dist/extensions/braze/actions/scheduleEmail/config.d.ts +145 -0
- package/dist/extensions/braze/actions/scheduleEmail/config.js +120 -0
- package/dist/extensions/braze/actions/scheduleEmail/config.js.map +1 -0
- package/dist/extensions/braze/actions/scheduleEmail/index.d.ts +1 -0
- package/dist/extensions/braze/actions/scheduleEmail/index.js +18 -0
- package/dist/extensions/braze/actions/scheduleEmail/index.js.map +1 -0
- package/dist/extensions/braze/actions/scheduleEmail/scheduleEmail.d.ts +220 -0
- package/dist/extensions/braze/actions/scheduleEmail/scheduleEmail.js +73 -0
- package/dist/extensions/braze/actions/scheduleEmail/scheduleEmail.js.map +1 -0
- package/dist/extensions/braze/actions/scheduleSMS/config.d.ts +129 -0
- package/dist/extensions/braze/actions/scheduleSMS/config.js +108 -0
- package/dist/extensions/braze/actions/scheduleSMS/config.js.map +1 -0
- package/dist/extensions/braze/actions/scheduleSMS/index.d.ts +1 -0
- package/dist/extensions/braze/actions/scheduleSMS/index.js +18 -0
- package/dist/extensions/braze/actions/scheduleSMS/index.js.map +1 -0
- package/dist/extensions/braze/actions/scheduleSMS/scheduleSMS.d.ts +196 -0
- package/dist/extensions/braze/actions/scheduleSMS/scheduleSMS.js +68 -0
- package/dist/extensions/braze/actions/scheduleSMS/scheduleSMS.js.map +1 -0
- package/dist/extensions/braze/actions/sendEmail/config.d.ts +115 -0
- package/dist/extensions/braze/actions/sendEmail/config.js +96 -0
- package/dist/extensions/braze/actions/sendEmail/config.js.map +1 -0
- package/dist/extensions/braze/actions/sendEmail/index.d.ts +1 -0
- package/dist/extensions/braze/actions/sendEmail/index.js +18 -0
- package/dist/extensions/braze/actions/sendEmail/index.js.map +1 -0
- package/dist/extensions/braze/actions/sendEmail/sendEmail.d.ts +178 -0
- package/dist/extensions/braze/actions/sendEmail/sendEmail.js +71 -0
- package/dist/extensions/braze/actions/sendEmail/sendEmail.js.map +1 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/config.d.ts +125 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/config.js +104 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/config.js.map +1 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/index.d.ts +1 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/index.js +18 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/index.js.map +1 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/sendEmailUsingTemplate.d.ts +192 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/sendEmailUsingTemplate.js +78 -0
- package/dist/extensions/braze/actions/sendEmailUsingTemplate/sendEmailUsingTemplate.js.map +1 -0
- package/dist/extensions/braze/actions/sendSMS/config.d.ts +95 -0
- package/dist/extensions/braze/actions/sendSMS/config.js +80 -0
- package/dist/extensions/braze/actions/sendSMS/config.js.map +1 -0
- package/dist/extensions/braze/actions/sendSMS/index.d.ts +1 -0
- package/dist/extensions/braze/actions/sendSMS/index.js +18 -0
- package/dist/extensions/braze/actions/sendSMS/index.js.map +1 -0
- package/dist/extensions/braze/actions/sendSMS/sendSMS.d.ts +150 -0
- package/dist/extensions/braze/actions/sendSMS/sendSMS.js +67 -0
- package/dist/extensions/braze/actions/sendSMS/sendSMS.js.map +1 -0
- package/dist/extensions/braze/client.d.ts +18 -0
- package/dist/extensions/braze/client.js +29 -0
- package/dist/extensions/braze/client.js.map +1 -0
- package/dist/extensions/braze/index.d.ts +2 -0
- package/dist/extensions/braze/index.js +20 -0
- package/dist/extensions/braze/index.js.map +1 -0
- package/dist/extensions/braze/settings.d.ts +27 -0
- package/dist/extensions/braze/settings.js +25 -0
- package/dist/extensions/braze/settings.js.map +1 -0
- package/dist/extensions/canvasMedical/v1/validation/questionnaireResponses.zod.d.ts +12 -12
- package/dist/extensions/docuSign/actions/createEmbeddedSignatureRequestWithTemplate/config/fields.d.ts +2 -2
- package/dist/extensions/dropboxSign/v1/actions/createEmbeddedSignatureRequestWithTemplate/config/fields.d.ts +2 -2
- package/dist/extensions/dropboxSign/v1/actions/sendSignatureRequestWithTemplate/config/fields.d.ts +2 -2
- package/dist/extensions/elation/actions/cancelAppointments/__testdata__/Findappointments.mock.d.ts +12 -0
- package/dist/extensions/elation/actions/cancelAppointments/__testdata__/Findappointments.mock.js +32 -0
- package/dist/extensions/elation/actions/cancelAppointments/__testdata__/Findappointments.mock.js.map +1 -0
- package/dist/extensions/elation/actions/cancelAppointments/cancelAppointments.d.ts +4 -0
- package/dist/extensions/elation/actions/cancelAppointments/cancelAppointments.js +125 -0
- package/dist/extensions/elation/actions/cancelAppointments/cancelAppointments.js.map +1 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/dataPoints.d.ts +10 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/dataPoints.js +14 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/dataPoints.js.map +1 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/fields.d.ts +28 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/fields.js +26 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/fields.js.map +1 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/index.d.ts +2 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/index.js +9 -0
- package/dist/extensions/elation/actions/cancelAppointments/config/index.js.map +1 -0
- package/dist/extensions/elation/actions/cancelAppointments/index.d.ts +1 -0
- package/dist/extensions/elation/actions/cancelAppointments/index.js +6 -0
- package/dist/extensions/elation/actions/cancelAppointments/index.js.map +1 -0
- package/dist/extensions/elation/actions/index.d.ts +66 -0
- package/dist/extensions/elation/actions/index.js +2 -0
- package/dist/extensions/elation/actions/index.js.map +1 -1
- package/dist/extensions/elation/client.d.ts +2 -0
- package/dist/extensions/elation/client.js +12 -0
- package/dist/extensions/elation/client.js.map +1 -1
- package/dist/extensions/elation/types/appointment.d.ts +1 -0
- package/dist/extensions/index.js +2 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/markdown.json +5 -1
- package/package.json +1 -1
@@ -0,0 +1,129 @@
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
2
|
+
import { z } from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
subscriptionGroupId: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
type: FieldType.STRING;
|
8
|
+
required: true;
|
9
|
+
description: string;
|
10
|
+
};
|
11
|
+
externalUserId: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
type: FieldType.STRING;
|
15
|
+
required: true;
|
16
|
+
description: string;
|
17
|
+
};
|
18
|
+
body: {
|
19
|
+
id: string;
|
20
|
+
label: string;
|
21
|
+
type: FieldType.TEXT;
|
22
|
+
required: true;
|
23
|
+
description: string;
|
24
|
+
};
|
25
|
+
appId: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
28
|
+
type: FieldType.STRING;
|
29
|
+
required: true;
|
30
|
+
description: string;
|
31
|
+
};
|
32
|
+
scheduleTime: {
|
33
|
+
id: string;
|
34
|
+
label: string;
|
35
|
+
type: FieldType.DATE;
|
36
|
+
required: true;
|
37
|
+
description: string;
|
38
|
+
};
|
39
|
+
inPatientLocalTime: {
|
40
|
+
id: string;
|
41
|
+
label: string;
|
42
|
+
type: FieldType.BOOLEAN;
|
43
|
+
required: false;
|
44
|
+
description: string;
|
45
|
+
};
|
46
|
+
atOptimalTime: {
|
47
|
+
id: string;
|
48
|
+
label: string;
|
49
|
+
type: FieldType.BOOLEAN;
|
50
|
+
required: false;
|
51
|
+
description: string;
|
52
|
+
};
|
53
|
+
linkShorteningEnabled: {
|
54
|
+
id: string;
|
55
|
+
label: string;
|
56
|
+
type: FieldType.BOOLEAN;
|
57
|
+
required: false;
|
58
|
+
description: string;
|
59
|
+
};
|
60
|
+
useClickTrackingEnabled: {
|
61
|
+
id: string;
|
62
|
+
label: string;
|
63
|
+
type: FieldType.BOOLEAN;
|
64
|
+
required: false;
|
65
|
+
description: string;
|
66
|
+
};
|
67
|
+
campaignId: {
|
68
|
+
id: string;
|
69
|
+
label: string;
|
70
|
+
type: FieldType.STRING;
|
71
|
+
required: false;
|
72
|
+
description: string;
|
73
|
+
};
|
74
|
+
messageVariantionId: {
|
75
|
+
id: string;
|
76
|
+
label: string;
|
77
|
+
type: FieldType.STRING;
|
78
|
+
required: false;
|
79
|
+
description: string;
|
80
|
+
};
|
81
|
+
};
|
82
|
+
export declare const dataPoints: {
|
83
|
+
SMSDispatchId: {
|
84
|
+
key: string;
|
85
|
+
valueType: "string";
|
86
|
+
};
|
87
|
+
SMSScheduleId: {
|
88
|
+
key: string;
|
89
|
+
valueType: "string";
|
90
|
+
};
|
91
|
+
};
|
92
|
+
export declare const FieldsSchema: z.ZodObject<{
|
93
|
+
subscriptionGroupId: z.ZodString;
|
94
|
+
externalUserId: z.ZodString;
|
95
|
+
body: z.ZodString;
|
96
|
+
appId: z.ZodString;
|
97
|
+
scheduleTime: z.ZodEffects<z.ZodDate, string, Date>;
|
98
|
+
inPatientLocalTime: z.ZodOptional<z.ZodBoolean>;
|
99
|
+
atOptimalTime: z.ZodOptional<z.ZodBoolean>;
|
100
|
+
linkShorteningEnabled: z.ZodOptional<z.ZodBoolean>;
|
101
|
+
useClickTrackingEnabled: z.ZodOptional<z.ZodBoolean>;
|
102
|
+
campaignId: z.ZodOptional<z.ZodString>;
|
103
|
+
messageVariantionId: z.ZodOptional<z.ZodString>;
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
105
|
+
body: string;
|
106
|
+
subscriptionGroupId: string;
|
107
|
+
externalUserId: string;
|
108
|
+
appId: string;
|
109
|
+
scheduleTime: string;
|
110
|
+
linkShorteningEnabled?: boolean | undefined;
|
111
|
+
useClickTrackingEnabled?: boolean | undefined;
|
112
|
+
campaignId?: string | undefined;
|
113
|
+
messageVariantionId?: string | undefined;
|
114
|
+
inPatientLocalTime?: boolean | undefined;
|
115
|
+
atOptimalTime?: boolean | undefined;
|
116
|
+
}, {
|
117
|
+
body: string;
|
118
|
+
subscriptionGroupId: string;
|
119
|
+
externalUserId: string;
|
120
|
+
appId: string;
|
121
|
+
scheduleTime: Date;
|
122
|
+
linkShorteningEnabled?: boolean | undefined;
|
123
|
+
useClickTrackingEnabled?: boolean | undefined;
|
124
|
+
campaignId?: string | undefined;
|
125
|
+
messageVariantionId?: string | undefined;
|
126
|
+
inPatientLocalTime?: boolean | undefined;
|
127
|
+
atOptimalTime?: boolean | undefined;
|
128
|
+
}>;
|
129
|
+
export type ActionFields = z.infer<typeof FieldsSchema>;
|
@@ -0,0 +1,108 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldsSchema = exports.dataPoints = exports.fields = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
exports.fields = {
|
7
|
+
subscriptionGroupId: {
|
8
|
+
id: 'subscriptionGroupId',
|
9
|
+
label: 'Subscription Group ID',
|
10
|
+
type: extensions_core_1.FieldType.STRING,
|
11
|
+
required: true,
|
12
|
+
description: 'The ID of your subscription group.',
|
13
|
+
},
|
14
|
+
externalUserId: {
|
15
|
+
id: 'externalUserId',
|
16
|
+
label: 'External User ID',
|
17
|
+
type: extensions_core_1.FieldType.STRING,
|
18
|
+
required: true,
|
19
|
+
description: 'The ID of the user in your system that this message is being sent to.',
|
20
|
+
},
|
21
|
+
body: {
|
22
|
+
id: 'body',
|
23
|
+
label: 'Body',
|
24
|
+
type: extensions_core_1.FieldType.TEXT,
|
25
|
+
required: true,
|
26
|
+
description: 'The body of the SMS.',
|
27
|
+
},
|
28
|
+
appId: {
|
29
|
+
id: 'appId',
|
30
|
+
label: 'App ID',
|
31
|
+
type: extensions_core_1.FieldType.STRING,
|
32
|
+
required: true,
|
33
|
+
description: 'App id is the reference of the specific app.',
|
34
|
+
},
|
35
|
+
scheduleTime: {
|
36
|
+
id: 'scheduleTime',
|
37
|
+
label: 'Schedule Time',
|
38
|
+
type: extensions_core_1.FieldType.DATE,
|
39
|
+
required: true,
|
40
|
+
description: 'The time to schedule the SMS to be sent. Must be a datetime as ISO 8601 string and time to send the message in UTC',
|
41
|
+
},
|
42
|
+
inPatientLocalTime: {
|
43
|
+
id: 'inPatientLocalTime',
|
44
|
+
label: 'In Patient Local Time',
|
45
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
46
|
+
required: false,
|
47
|
+
description: "If true, the schedule time will be in the patient's local time.",
|
48
|
+
},
|
49
|
+
atOptimalTime: {
|
50
|
+
id: 'atOptimalTime',
|
51
|
+
label: 'At Optimal Time',
|
52
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
53
|
+
required: false,
|
54
|
+
description: 'If true, the schedule time will be at the optimal time.',
|
55
|
+
},
|
56
|
+
linkShorteningEnabled: {
|
57
|
+
id: 'linkShorteningEnabled',
|
58
|
+
label: 'Link Shortening Enabled',
|
59
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
60
|
+
required: false,
|
61
|
+
description: 'Use this field to turn on link shortening and campaign-level click tracking',
|
62
|
+
},
|
63
|
+
useClickTrackingEnabled: {
|
64
|
+
id: 'useClickTrackingEnabled',
|
65
|
+
label: 'Use Click Tracking Enabled',
|
66
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
67
|
+
required: false,
|
68
|
+
description: 'If `Link Shortening Enabled` is true, use this field to turn on link shortening, and campaign-level and user-level click tracking',
|
69
|
+
},
|
70
|
+
campaignId: {
|
71
|
+
id: 'campaignId',
|
72
|
+
label: 'Campaign ID',
|
73
|
+
type: extensions_core_1.FieldType.STRING,
|
74
|
+
required: false,
|
75
|
+
description: 'Optional but required if you wish to track campaign stats',
|
76
|
+
},
|
77
|
+
messageVariantionId: {
|
78
|
+
id: 'messageVariantionId',
|
79
|
+
label: 'Message Variantion ID',
|
80
|
+
type: extensions_core_1.FieldType.STRING,
|
81
|
+
required: false,
|
82
|
+
description: 'Used when providing a campaign_id to specify which message variation this message should be tracked under',
|
83
|
+
},
|
84
|
+
};
|
85
|
+
exports.dataPoints = {
|
86
|
+
SMSDispatchId: {
|
87
|
+
key: 'SMSDispatchId',
|
88
|
+
valueType: 'string',
|
89
|
+
},
|
90
|
+
SMSScheduleId: {
|
91
|
+
key: 'SMSScheduleId',
|
92
|
+
valueType: 'string',
|
93
|
+
},
|
94
|
+
};
|
95
|
+
exports.FieldsSchema = zod_1.z.object({
|
96
|
+
subscriptionGroupId: zod_1.z.string().min(1),
|
97
|
+
externalUserId: zod_1.z.string().min(1),
|
98
|
+
body: zod_1.z.string().min(1),
|
99
|
+
appId: zod_1.z.string().min(1),
|
100
|
+
scheduleTime: extensions_core_1.DateTimeSchema,
|
101
|
+
inPatientLocalTime: zod_1.z.boolean().optional(),
|
102
|
+
atOptimalTime: zod_1.z.boolean().optional(),
|
103
|
+
linkShorteningEnabled: zod_1.z.boolean().optional(),
|
104
|
+
useClickTrackingEnabled: zod_1.z.boolean().optional(),
|
105
|
+
campaignId: zod_1.z.string().optional(),
|
106
|
+
messageVariantionId: zod_1.z.string().optional(),
|
107
|
+
});
|
108
|
+
//# sourceMappingURL=config.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../extensions/braze/actions/scheduleSMS/config.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AACtC,6BAAuB;AAEV,QAAA,MAAM,GAAG;IACpB,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EA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,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './scheduleSMS';
|
@@ -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("./scheduleSMS"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/braze/actions/scheduleSMS/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B"}
|
@@ -0,0 +1,196 @@
|
|
1
|
+
import { Category } from '@awell-health/extensions-core';
|
2
|
+
export declare const scheduleSMS: {
|
3
|
+
key: string;
|
4
|
+
title: string;
|
5
|
+
description: string;
|
6
|
+
category: Category.COMMUNICATION;
|
7
|
+
fields: {
|
8
|
+
subscriptionGroupId: {
|
9
|
+
id: string;
|
10
|
+
label: string;
|
11
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
12
|
+
required: true;
|
13
|
+
description: string;
|
14
|
+
};
|
15
|
+
externalUserId: {
|
16
|
+
id: string;
|
17
|
+
label: string;
|
18
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
19
|
+
required: true;
|
20
|
+
description: string;
|
21
|
+
};
|
22
|
+
body: {
|
23
|
+
id: string;
|
24
|
+
label: string;
|
25
|
+
type: import("@awell-health/extensions-core").FieldType.TEXT;
|
26
|
+
required: true;
|
27
|
+
description: string;
|
28
|
+
};
|
29
|
+
appId: {
|
30
|
+
id: string;
|
31
|
+
label: string;
|
32
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
33
|
+
required: true;
|
34
|
+
description: string;
|
35
|
+
};
|
36
|
+
scheduleTime: {
|
37
|
+
id: string;
|
38
|
+
label: string;
|
39
|
+
type: import("@awell-health/extensions-core").FieldType.DATE;
|
40
|
+
required: true;
|
41
|
+
description: string;
|
42
|
+
};
|
43
|
+
inPatientLocalTime: {
|
44
|
+
id: string;
|
45
|
+
label: string;
|
46
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
47
|
+
required: false;
|
48
|
+
description: string;
|
49
|
+
};
|
50
|
+
atOptimalTime: {
|
51
|
+
id: string;
|
52
|
+
label: string;
|
53
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
54
|
+
required: false;
|
55
|
+
description: string;
|
56
|
+
};
|
57
|
+
linkShorteningEnabled: {
|
58
|
+
id: string;
|
59
|
+
label: string;
|
60
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
61
|
+
required: false;
|
62
|
+
description: string;
|
63
|
+
};
|
64
|
+
useClickTrackingEnabled: {
|
65
|
+
id: string;
|
66
|
+
label: string;
|
67
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
68
|
+
required: false;
|
69
|
+
description: string;
|
70
|
+
};
|
71
|
+
campaignId: {
|
72
|
+
id: string;
|
73
|
+
label: string;
|
74
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
75
|
+
required: false;
|
76
|
+
description: string;
|
77
|
+
};
|
78
|
+
messageVariantionId: {
|
79
|
+
id: string;
|
80
|
+
label: string;
|
81
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
82
|
+
required: false;
|
83
|
+
description: string;
|
84
|
+
};
|
85
|
+
};
|
86
|
+
dataPoints: {
|
87
|
+
SMSDispatchId: {
|
88
|
+
key: string;
|
89
|
+
valueType: "string";
|
90
|
+
};
|
91
|
+
SMSScheduleId: {
|
92
|
+
key: string;
|
93
|
+
valueType: "string";
|
94
|
+
};
|
95
|
+
};
|
96
|
+
previewable: false;
|
97
|
+
onEvent: ({ payload, onComplete, onError, helpers }: {
|
98
|
+
payload: import("@awell-health/extensions-core").NewActivityPayload<{
|
99
|
+
subscriptionGroupId: {
|
100
|
+
id: string;
|
101
|
+
label: string;
|
102
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
103
|
+
required: true;
|
104
|
+
description: string;
|
105
|
+
};
|
106
|
+
externalUserId: {
|
107
|
+
id: string;
|
108
|
+
label: string;
|
109
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
110
|
+
required: true;
|
111
|
+
description: string;
|
112
|
+
};
|
113
|
+
body: {
|
114
|
+
id: string;
|
115
|
+
label: string;
|
116
|
+
type: import("@awell-health/extensions-core").FieldType.TEXT;
|
117
|
+
required: true;
|
118
|
+
description: string;
|
119
|
+
};
|
120
|
+
appId: {
|
121
|
+
id: string;
|
122
|
+
label: string;
|
123
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
124
|
+
required: true;
|
125
|
+
description: string;
|
126
|
+
};
|
127
|
+
scheduleTime: {
|
128
|
+
id: string;
|
129
|
+
label: string;
|
130
|
+
type: import("@awell-health/extensions-core").FieldType.DATE;
|
131
|
+
required: true;
|
132
|
+
description: string;
|
133
|
+
};
|
134
|
+
inPatientLocalTime: {
|
135
|
+
id: string;
|
136
|
+
label: string;
|
137
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
138
|
+
required: false;
|
139
|
+
description: string;
|
140
|
+
};
|
141
|
+
atOptimalTime: {
|
142
|
+
id: string;
|
143
|
+
label: string;
|
144
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
145
|
+
required: false;
|
146
|
+
description: string;
|
147
|
+
};
|
148
|
+
linkShorteningEnabled: {
|
149
|
+
id: string;
|
150
|
+
label: string;
|
151
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
152
|
+
required: false;
|
153
|
+
description: string;
|
154
|
+
};
|
155
|
+
useClickTrackingEnabled: {
|
156
|
+
id: string;
|
157
|
+
label: string;
|
158
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
159
|
+
required: false;
|
160
|
+
description: string;
|
161
|
+
};
|
162
|
+
campaignId: {
|
163
|
+
id: string;
|
164
|
+
label: string;
|
165
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
166
|
+
required: false;
|
167
|
+
description: string;
|
168
|
+
};
|
169
|
+
messageVariantionId: {
|
170
|
+
id: string;
|
171
|
+
label: string;
|
172
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
173
|
+
required: false;
|
174
|
+
description: string;
|
175
|
+
};
|
176
|
+
}, {
|
177
|
+
apiKey: {
|
178
|
+
key: string;
|
179
|
+
label: string;
|
180
|
+
obfuscated: true;
|
181
|
+
required: true;
|
182
|
+
description: string;
|
183
|
+
};
|
184
|
+
baseUrl: {
|
185
|
+
key: string;
|
186
|
+
label: string;
|
187
|
+
obfuscated: false;
|
188
|
+
required: true;
|
189
|
+
description: string;
|
190
|
+
};
|
191
|
+
}>;
|
192
|
+
onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
|
193
|
+
onError: import("@awell-health/extensions-core").OnErrorCallback;
|
194
|
+
helpers: import("@awell-health/extensions-core").Helpers;
|
195
|
+
}) => Promise<void>;
|
196
|
+
};
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.scheduleSMS = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const lodash_1 = require("lodash");
|
6
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
7
|
+
const settings_1 = require("../../settings");
|
8
|
+
const client_1 = require("../../client");
|
9
|
+
const config_1 = require("./config");
|
10
|
+
const actionHelpers_1 = require("../actionHelpers");
|
11
|
+
exports.scheduleSMS = {
|
12
|
+
key: 'scheduleSMS',
|
13
|
+
title: 'Schedule SMS',
|
14
|
+
description: 'Schedule an SMS to be sent immediateky to a patient.',
|
15
|
+
category: extensions_core_1.Category.COMMUNICATION,
|
16
|
+
fields: config_1.fields,
|
17
|
+
dataPoints: config_1.dataPoints,
|
18
|
+
previewable: false,
|
19
|
+
onEvent: async ({ payload, onComplete, onError, helpers }) => {
|
20
|
+
const { fields: { subscriptionGroupId: subscription_group_id, externalUserId, body, appId: app_id, scheduleTime: time, inPatientLocalTime: in_local_time, atOptimalTime: at_optimal_time, linkShorteningEnabled: link_shortening_enabled, useClickTrackingEnabled: use_click_tracking_enabled, campaignId: campaign_id, messageVariantionId: message_variation_id, }, settings: { apiKey, baseUrl }, } = (0, extensions_core_1.validate)({
|
21
|
+
schema: zod_1.z.object({
|
22
|
+
fields: config_1.FieldsSchema,
|
23
|
+
settings: settings_1.SettingsValidationSchema,
|
24
|
+
}),
|
25
|
+
payload,
|
26
|
+
});
|
27
|
+
const client = new client_1.BrazeClient({ apiKey, baseUrl });
|
28
|
+
const requestBody = {
|
29
|
+
external_user_ids: [externalUserId],
|
30
|
+
...(!(0, lodash_1.isNil)(campaign_id) && {
|
31
|
+
campaign_id,
|
32
|
+
}),
|
33
|
+
schedule: {
|
34
|
+
time,
|
35
|
+
...(0, actionHelpers_1.addBooleanFieldIfDefined)({ in_local_time }),
|
36
|
+
...(0, actionHelpers_1.addBooleanFieldIfDefined)({ at_optimal_time }),
|
37
|
+
},
|
38
|
+
messages: {
|
39
|
+
sms: {
|
40
|
+
subscription_group_id,
|
41
|
+
body,
|
42
|
+
app_id,
|
43
|
+
...(!(0, lodash_1.isNil)(message_variation_id) && {
|
44
|
+
message_variation_id,
|
45
|
+
}),
|
46
|
+
...(0, actionHelpers_1.addBooleanFieldIfDefined)({ link_shortening_enabled }),
|
47
|
+
...(0, actionHelpers_1.addBooleanFieldIfDefined)({
|
48
|
+
use_click_tracking_enabled,
|
49
|
+
}),
|
50
|
+
},
|
51
|
+
},
|
52
|
+
};
|
53
|
+
const resp = await client.scheduleMessage(requestBody);
|
54
|
+
await onComplete({
|
55
|
+
events: [
|
56
|
+
{
|
57
|
+
date: new Date().toISOString(),
|
58
|
+
text: { en: `SMS scheduled. Response: ${JSON.stringify(resp)}` },
|
59
|
+
},
|
60
|
+
],
|
61
|
+
data_points: {
|
62
|
+
SMSScheduleId: resp.schedule_id,
|
63
|
+
SMSDispatchId: resp.dispatch_id,
|
64
|
+
},
|
65
|
+
});
|
66
|
+
},
|
67
|
+
};
|
68
|
+
//# sourceMappingURL=scheduleSMS.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"scheduleSMS.js","sourceRoot":"","sources":["../../../../../extensions/braze/actions/scheduleSMS/scheduleSMS.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mCAA8B;AAC9B,mEAA+E;AAE/E,6CAAwE;AACxE,yCAA0C;AAC1C,qCAA2D;AAC3D,oDAA2D;AAE9C,QAAA,WAAW,GAAG;IACzB,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,sDAAsD;IACnE,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU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B,CAAC;iBACH;aACF;SACF,CAAA;QACD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,WAAW,CAAC,CAAA;QAEtD,MAAM,UAAU,CAAC;YACf,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,4BAA4B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE;iBACjE;aACF;YACD,WAAW,EAAE;gBACX,aAAa,EAAE,IAAI,CAAC,WAAW;gBAC/B,aAAa,EAAE,IAAI,CAAC,WAAW;aAChC;SACF,CAAC,CAAA;IACJ,CAAC;CAC+C,CAAA"}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
2
|
+
import { z } from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
externalUserId: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
type: FieldType.STRING;
|
8
|
+
required: true;
|
9
|
+
description: string;
|
10
|
+
};
|
11
|
+
appId: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
type: FieldType.STRING;
|
15
|
+
required: true;
|
16
|
+
description: string;
|
17
|
+
};
|
18
|
+
from: {
|
19
|
+
id: string;
|
20
|
+
label: string;
|
21
|
+
type: FieldType.STRING;
|
22
|
+
required: true;
|
23
|
+
description: string;
|
24
|
+
};
|
25
|
+
replyTo: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
28
|
+
type: FieldType.STRING;
|
29
|
+
required: false;
|
30
|
+
description: string;
|
31
|
+
};
|
32
|
+
subject: {
|
33
|
+
id: string;
|
34
|
+
label: string;
|
35
|
+
type: FieldType.STRING;
|
36
|
+
required: false;
|
37
|
+
description: string;
|
38
|
+
};
|
39
|
+
body: {
|
40
|
+
id: string;
|
41
|
+
label: string;
|
42
|
+
type: FieldType.HTML;
|
43
|
+
required: true;
|
44
|
+
description: string;
|
45
|
+
};
|
46
|
+
preheader: {
|
47
|
+
id: string;
|
48
|
+
label: string;
|
49
|
+
type: FieldType.STRING;
|
50
|
+
required: false;
|
51
|
+
description: string;
|
52
|
+
};
|
53
|
+
shouldInlineCss: {
|
54
|
+
id: string;
|
55
|
+
label: string;
|
56
|
+
type: FieldType.BOOLEAN;
|
57
|
+
required: false;
|
58
|
+
description: string;
|
59
|
+
};
|
60
|
+
campaignId: {
|
61
|
+
id: string;
|
62
|
+
label: string;
|
63
|
+
type: FieldType.STRING;
|
64
|
+
required: false;
|
65
|
+
description: string;
|
66
|
+
};
|
67
|
+
messageVariantionId: {
|
68
|
+
id: string;
|
69
|
+
label: string;
|
70
|
+
type: FieldType.STRING;
|
71
|
+
required: false;
|
72
|
+
description: string;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
export declare const dataPoints: {
|
76
|
+
EmailDispatchId: {
|
77
|
+
key: string;
|
78
|
+
valueType: "string";
|
79
|
+
};
|
80
|
+
};
|
81
|
+
export declare const FieldsSchema: z.ZodObject<{
|
82
|
+
externalUserId: z.ZodString;
|
83
|
+
appId: z.ZodString;
|
84
|
+
from: z.ZodString;
|
85
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
86
|
+
subject: z.ZodOptional<z.ZodString>;
|
87
|
+
body: z.ZodString;
|
88
|
+
preheader: z.ZodOptional<z.ZodString>;
|
89
|
+
shouldInlineCss: z.ZodOptional<z.ZodBoolean>;
|
90
|
+
campaignId: z.ZodOptional<z.ZodString>;
|
91
|
+
messageVariantionId: z.ZodOptional<z.ZodString>;
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
93
|
+
body: string;
|
94
|
+
from: string;
|
95
|
+
externalUserId: string;
|
96
|
+
appId: string;
|
97
|
+
campaignId?: string | undefined;
|
98
|
+
messageVariantionId?: string | undefined;
|
99
|
+
replyTo?: string | undefined;
|
100
|
+
subject?: string | undefined;
|
101
|
+
preheader?: string | undefined;
|
102
|
+
shouldInlineCss?: boolean | undefined;
|
103
|
+
}, {
|
104
|
+
body: string;
|
105
|
+
from: string;
|
106
|
+
externalUserId: string;
|
107
|
+
appId: string;
|
108
|
+
campaignId?: string | undefined;
|
109
|
+
messageVariantionId?: string | undefined;
|
110
|
+
replyTo?: string | undefined;
|
111
|
+
subject?: string | undefined;
|
112
|
+
preheader?: string | undefined;
|
113
|
+
shouldInlineCss?: boolean | undefined;
|
114
|
+
}>;
|
115
|
+
export type ActionFields = z.infer<typeof FieldsSchema>;
|