@awell-health/awell-extensions 2.0.245 → 2.0.247

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 (43) hide show
  1. package/dist/extensions/index.js +2 -0
  2. package/dist/extensions/index.js.map +1 -1
  3. package/dist/extensions/markdown.json +4 -0
  4. package/dist/extensions/zoom/actions/index.d.ts +49 -0
  5. package/dist/extensions/zoom/actions/index.js +8 -0
  6. package/dist/extensions/zoom/actions/index.js.map +1 -0
  7. package/dist/extensions/zoom/actions/sendSms/config/dataPoints.d.ts +10 -0
  8. package/dist/extensions/zoom/actions/sendSms/config/dataPoints.js +14 -0
  9. package/dist/extensions/zoom/actions/sendSms/config/dataPoints.js.map +1 -0
  10. package/dist/extensions/zoom/actions/sendSms/config/fields.d.ts +40 -0
  11. package/dist/extensions/zoom/actions/sendSms/config/fields.js +39 -0
  12. package/dist/extensions/zoom/actions/sendSms/config/fields.js.map +1 -0
  13. package/dist/extensions/zoom/actions/sendSms/config/index.d.ts +2 -0
  14. package/dist/extensions/zoom/actions/sendSms/config/index.js +9 -0
  15. package/dist/extensions/zoom/actions/sendSms/config/index.js.map +1 -0
  16. package/dist/extensions/zoom/actions/sendSms/index.d.ts +1 -0
  17. package/dist/extensions/zoom/actions/sendSms/index.js +18 -0
  18. package/dist/extensions/zoom/actions/sendSms/index.js.map +1 -0
  19. package/dist/extensions/zoom/actions/sendSms/sendSms.d.ts +4 -0
  20. package/dist/extensions/zoom/actions/sendSms/sendSms.js +56 -0
  21. package/dist/extensions/zoom/actions/sendSms/sendSms.js.map +1 -0
  22. package/dist/extensions/zoom/index.d.ts +2 -0
  23. package/dist/extensions/zoom/index.js +19 -0
  24. package/dist/extensions/zoom/index.js.map +1 -0
  25. package/dist/extensions/zoom/lib/api/client.d.ts +21 -0
  26. package/dist/extensions/zoom/lib/api/client.js +104 -0
  27. package/dist/extensions/zoom/lib/api/client.js.map +1 -0
  28. package/dist/extensions/zoom/lib/api/constants.d.ts +2 -0
  29. package/dist/extensions/zoom/lib/api/constants.js +6 -0
  30. package/dist/extensions/zoom/lib/api/constants.js.map +1 -0
  31. package/dist/extensions/zoom/lib/api/schema/SendSms.schema.d.ts +35 -0
  32. package/dist/extensions/zoom/lib/api/schema/SendSms.schema.js +17 -0
  33. package/dist/extensions/zoom/lib/api/schema/SendSms.schema.js.map +1 -0
  34. package/dist/extensions/zoom/lib/api/schema/index.d.ts +1 -0
  35. package/dist/extensions/zoom/lib/api/schema/index.js +18 -0
  36. package/dist/extensions/zoom/lib/api/schema/index.js.map +1 -0
  37. package/dist/extensions/zoom/lib/validatePayloadAndCreateSdk.d.ts +18 -0
  38. package/dist/extensions/zoom/lib/validatePayloadAndCreateSdk.js +38 -0
  39. package/dist/extensions/zoom/lib/validatePayloadAndCreateSdk.js.map +1 -0
  40. package/dist/extensions/zoom/settings.d.ts +37 -0
  41. package/dist/extensions/zoom/settings.js +33 -0
  42. package/dist/extensions/zoom/settings.js.map +1 -0
  43. package/package.json +1 -1
@@ -84,6 +84,7 @@ const twilio_1 = require("./twilio");
84
84
  const westFax_1 = require("./westFax");
85
85
  const workramp_1 = require("./workramp");
86
86
  const zendesk_1 = require("./zendesk");
87
+ const zoom_1 = require("./zoom");
87
88
  const json = __importStar(require("./markdown.json"));
88
89
  exports.markdown = json;
89
90
  exports.extensions = [
@@ -137,5 +138,6 @@ exports.extensions = [
137
138
  westFax_1.WestFax,
138
139
  workramp_1.Workramp,
139
140
  zendesk_1.Zendesk,
141
+ zoom_1.zoom,
140
142
  ];
141
143
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA6C;AAC7C,mCAA+B;AAC/B,6CAAyC;AACzC,mCAA+B;AAC/B,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,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;IACR,uBAAS;IACT,qBAAS;IACT,eAAM;IACN,iBAAO;IACP,mBAAQ;IACR,iBAAO;CACR,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA6C;AAC7C,mCAA+B;AAC/B,6CAAyC;AACzC,mCAA+B;AAC/B,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,qCAAiC;AACjC,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,6CAAyC;AACzC,+CAA2C;AAC3C,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,uCAAmC;AACnC,iCAA6B;AAC7B,iDAA6C;AAC7C,uDAAkD;AAClD,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,+CAA0C;AAC1C,uCAAmC;AACnC,iEAA6D;AAC7D,uCAAmC;AACnC,yCAAqC;AACrC,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,uCAAmC;AACnC,+CAA2C;AAC3C,0CAA0C;AAC1C,+CAA2C;AAC3C,iCAA6B;AAC7B,yCAAqC;AACrC,6DAA+C;AAC/C,iCAA6B;AAC7B,qCAAiC;AACjC,qCAAiC;AACjC,yCAAqC;AACrC,yCAAqC;AACrC,+CAAyC;AACzC,2CAAuC;AACvC,qCAAiC;AACjC,uCAAmC;AACnC,yCAAqC;AACrC,uCAAmC;AACnC,iCAA6B;AAE7B,sDAAuC;AAG1B,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,aAAK;IACL,aAAK;IACL,2BAAY;IACZ,aAAK;IACL,uBAAU;IACV,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,eAAM;IACN,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,uBAAU;IACV,yBAAW;IACX,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,WAAI;IACJ,2BAAY;IACZ,gCAAc;IACd,mBAAQ;IACR,qBAAS;IACT,mBAAQ;IACR,wBAAU;IACV,iBAAO;IACP,2CAAoB;IACpB,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,iBAAO;IACP,aAAa;IACb,yBAAW;IACX,WAAI;IACJ,mBAAQ;IACR,6BAAQ;IACR,WAAI;IACJ,eAAM;IACN,eAAM;IACN,mBAAQ;IACR,mBAAQ;IACR,uBAAS;IACT,qBAAS;IACT,eAAM;IACN,iBAAO;IACP,mBAAQ;IACR,iBAAO;IACP,WAAI;CACL,CAAA"}
@@ -199,6 +199,10 @@
199
199
  "readme": "---\ntitle: Zendesk\ndescription: Zendesk is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions.\n---\n\n# Zendesk\n\nZendesk is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions. It offers a range of customer service solutions, including help desk ticketing systems, customer support and engagement, and self-service options. Zendesk is designed to help companies streamline their customer support processes, improve communication with their customers, and resolve issues more efficiently.\n\n## Extension settings\n\nIn order to set up this extension, you will to authenticate with the Sell API and need an API token. You can visit Zendesk Sales CRM dashboard and go to **Settings > Integration > OAuth** to enable and create an API token. Read more about how to get an access token for the Sell API [here](https://developer.zendesk.com/documentation/sales-crm/first-call/).\n\n## Custom Actions\n\n### Create task\n\nCreates a new task. You can create either a floating task or create a related task and associate it with one of the resource types: Leads, Contacts, Deals.\n\n### Complete task\n\nMarks a task as completed.\n",
200
200
  "changelog": "# Zendesk changelog\n"
201
201
  },
202
+ "zoom": {
203
+ "readme": "---\ntitle: Zoom\ndescription: Zoom is a communications platform that allows users to connect with video, audio, phone, and chat.\n---\n\n# Zoom\n\nZoom is a communications platform that allows users to connect with video, audio, phone, and chat.\n\n## Extension settings\n\nTo set up this extension, you will need to provide the following:\n\n1. **Account ID:** your Zoom account ID, found on the Server to Server app build page.\n2. **Client ID:** the client ID of the OAuth app you created in Zoom\n3. **Client secret:** the client secret of the OAuth app you created in Zoom\n\nYou'll have to set up a [Server-to-Server OAuth app](https://developers.zoom.us/docs/internal-apps/create/) in Zoom to provision a client ID and secret.\n\n## Actions\n\n### Send SMS\n\nSend an SMS to a recipient.\n\nEnsure your Server-to-Server OAuth app has the following scopes set:\n\n- Scopes: `contact_center_sms:write:admin`\n- Granular Scopes: `contact_center:write:sms:admin`\n",
204
+ "changelog": "# CHANGELOG"
205
+ },
202
206
  "zusHealth": {
203
207
  "readme": "---\ntitle: Zus Health\ndescription: Zus is the only shared health data platform designed to accelerate healthcare data interoperability by providing easy-to-use patient data at the point of care via API, embedded components, and direct EHR integrations.\n---\n\n# Zus Health\n\n[Zus Health](https://zushealth.com/) is the only shared health data platform designed to accelerate healthcare data interoperability by providing easy-to-use patient data at the point of care via API, embedded components, and direct EHR integrations.\n\n## Zus Health x Awell\n\nThis extension allows you to fetch resource via webhooks\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 Zus Health platform.\n`base_url`: This determines the base URL for your FHIR endpoint, for example, https://api.sandbox.zusapi.com/fhir.\n`auth_url`: This determines the base URL for your authorization endpoint, for example, https://zus-sandbox.us.auth0.com/oauth/token.\n`audience`: This determines the API hostname, for example, https://api.sandbox.zusapi.com.\n\n## Webhooks\n\nWebhooks offer a great way to listen to updates to resources in Zus and trigger Awell care flows. These updates include ADT feed events for your patient population, and the relevant Encounter data can then be incorporated in the new flow.\n",
204
208
  "changelog": "# Zus Health changelog\n"
@@ -0,0 +1,49 @@
1
+ export declare const actions: {
2
+ sendSms: import("@awell-health/extensions-core").Action<{
3
+ contactCenterNumber: {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ type: import("@awell-health/extensions-core").FieldType.STRING;
8
+ stringType: import("@awell-health/extensions-core").StringType.PHONE;
9
+ required: true;
10
+ };
11
+ to: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: import("@awell-health/extensions-core").FieldType.STRING;
16
+ stringType: import("@awell-health/extensions-core").StringType.PHONE;
17
+ required: true;
18
+ };
19
+ body: {
20
+ id: string;
21
+ label: string;
22
+ description: string;
23
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
24
+ required: true;
25
+ };
26
+ }, {
27
+ accountId: {
28
+ key: string;
29
+ label: string;
30
+ obfuscated: false;
31
+ description: string;
32
+ required: true;
33
+ };
34
+ clientId: {
35
+ key: string;
36
+ label: string;
37
+ obfuscated: false;
38
+ description: string;
39
+ required: true;
40
+ };
41
+ clientSecret: {
42
+ key: string;
43
+ label: string;
44
+ obfuscated: true;
45
+ description: string;
46
+ required: true;
47
+ };
48
+ }, "success" | "messageId">;
49
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.actions = void 0;
4
+ const sendSms_1 = require("./sendSms");
5
+ exports.actions = {
6
+ sendSms: sendSms_1.sendSms,
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/zoom/actions/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEtB,QAAA,OAAO,GAAG;IACrB,OAAO,EAAP,iBAAO;CACR,CAAA"}
@@ -0,0 +1,10 @@
1
+ export declare const dataPoints: {
2
+ messageId: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ success: {
7
+ key: string;
8
+ valueType: "boolean";
9
+ };
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ messageId: {
6
+ key: 'messageId',
7
+ valueType: 'string',
8
+ },
9
+ success: {
10
+ key: 'success',
11
+ valueType: 'boolean',
12
+ },
13
+ };
14
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/zoom/actions/sendSms/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,SAAS;KACrB;CAC4C,CAAA"}
@@ -0,0 +1,40 @@
1
+ import { FieldType, StringType } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ export declare const fields: {
4
+ contactCenterNumber: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ stringType: StringType.PHONE;
10
+ required: true;
11
+ };
12
+ to: {
13
+ id: string;
14
+ label: string;
15
+ description: string;
16
+ type: FieldType.STRING;
17
+ stringType: StringType.PHONE;
18
+ required: true;
19
+ };
20
+ body: {
21
+ id: string;
22
+ label: string;
23
+ description: string;
24
+ type: FieldType.TEXT;
25
+ required: true;
26
+ };
27
+ };
28
+ export declare const FieldsValidationSchema: z.ZodObject<{
29
+ contactCenterNumber: z.ZodString;
30
+ to: z.ZodString;
31
+ body: z.ZodString;
32
+ }, "strip", z.ZodTypeAny, {
33
+ body: string;
34
+ to: string;
35
+ contactCenterNumber: string;
36
+ }, {
37
+ body: string;
38
+ to: string;
39
+ contactCenterNumber: string;
40
+ }>;
@@ -0,0 +1,39 @@
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.FieldsValidationSchema = exports.fields = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ exports.fields = {
10
+ contactCenterNumber: {
11
+ id: 'contactCenterNumber',
12
+ label: 'Contact center number',
13
+ description: 'This must be an SMS capable phone number allocated to Zoom Contact Center within your account.',
14
+ type: extensions_core_1.FieldType.STRING,
15
+ stringType: extensions_core_1.StringType.PHONE,
16
+ required: true,
17
+ },
18
+ to: {
19
+ id: 'to',
20
+ label: 'To',
21
+ description: 'The phone number of the person receiving the SMS.',
22
+ type: extensions_core_1.FieldType.STRING,
23
+ stringType: extensions_core_1.StringType.PHONE,
24
+ required: true,
25
+ },
26
+ body: {
27
+ id: 'body',
28
+ label: 'Body',
29
+ description: 'The content that needs to be sent as an SMS. Maximum length is 500 characters.',
30
+ type: extensions_core_1.FieldType.TEXT,
31
+ required: true,
32
+ },
33
+ };
34
+ exports.FieldsValidationSchema = zod_1.default.object({
35
+ contactCenterNumber: zod_1.default.string().min(1),
36
+ to: zod_1.default.string().min(1),
37
+ body: zod_1.default.string().min(1).max(500),
38
+ });
39
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/zoom/actions/sendSms/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,gGAAgG;QAClG,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,IAAI;KACf;IACD,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EACT,gFAAgF;QAClF,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,mBAAmB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,EAAE,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACiB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { fields, FieldsValidationSchema } from './fields';
2
+ export { dataPoints } from './dataPoints';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
4
+ var fields_1 = require("./fields");
5
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
6
+ Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
7
+ var dataPoints_1 = require("./dataPoints");
8
+ Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/zoom/actions/sendSms/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1 @@
1
+ export * from './sendSms';
@@ -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("./sendSms"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/zoom/actions/sendSms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const sendSms: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendSms = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const validatePayloadAndCreateSdk_1 = require("../../lib/validatePayloadAndCreateSdk");
6
+ const config_1 = require("./config");
7
+ const addEventLog_1 = require("../../../../src/lib/awell/addEventLog");
8
+ exports.sendSms = {
9
+ key: 'sendSms',
10
+ category: extensions_core_1.Category.COMMUNICATION,
11
+ title: 'Send SMS',
12
+ description: 'Send an SMS',
13
+ fields: config_1.fields,
14
+ previewable: false,
15
+ dataPoints: config_1.dataPoints,
16
+ onEvent: async ({ payload, onComplete, onError }) => {
17
+ var _a;
18
+ const { fields, zoomSdk } = await (0, validatePayloadAndCreateSdk_1.validatePayloadAndCreateSdk)({
19
+ fieldsSchema: config_1.FieldsValidationSchema,
20
+ payload,
21
+ });
22
+ const { data } = await zoomSdk.sendSms({
23
+ contact_center_number: fields.contactCenterNumber,
24
+ consumer_numbers: [fields.to],
25
+ body: fields.body,
26
+ });
27
+ /**
28
+ * Custom error handling for Zoom API
29
+ * For some errors, Zoom returns a 200 with success: false
30
+ *
31
+ * All other errors are handled with AxiosError and caught in Extensions Core
32
+ */
33
+ if (!data[0].success) {
34
+ await onError({
35
+ events: [
36
+ (0, addEventLog_1.addActivityEventLog)({
37
+ message: (_a = data[0].description) !== null && _a !== void 0 ? _a : 'Unknown error',
38
+ }),
39
+ ],
40
+ });
41
+ return;
42
+ }
43
+ await onComplete({
44
+ data_points: {
45
+ messageId: data[0].message_id,
46
+ success: String(data[0].success),
47
+ },
48
+ events: [
49
+ (0, addEventLog_1.addActivityEventLog)({
50
+ message: `Success: ${String(data[0].success)}\nMessage ID: ${String(data[0].message_id)}\nDescription: ${String(data[0].description)}`,
51
+ }),
52
+ ],
53
+ });
54
+ },
55
+ };
56
+ //# sourceMappingURL=sendSms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendSms.js","sourceRoot":"","sources":["../../../../../extensions/zoom/actions/sendSms/sendSms.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AACxD,uFAAmF;AAEnF,qCAAqE;AACrE,uEAA2E;AAE9D,QAAA,OAAO,GAIhB;IACF,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAiB,EAAE;;QACjE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAA,yDAA2B,EAAC;YAC5D,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;YACrC,qBAAqB,EAAE,MAAM,CAAC,mBAAmB;YACjD,gBAAgB,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7B,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC,CAAA;QAEF;;;;;WAKG;QACH,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YACrB,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN,IAAA,iCAAmB,EAAC;wBAClB,OAAO,EAAE,MAAA,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,mCAAI,eAAe;qBAChD,CAAC;iBACH;aACF,CAAC,CAAA;YACF,OAAM;QACR,CAAC;QAED,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU;gBAC7B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;aACjC;YACD,MAAM,EAAE;gBACN,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,YAAY,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE;iBACvI,CAAC;aACH;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { type Extension } from '@awell-health/extensions-core';
2
+ export declare const zoom: Extension;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zoom = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const actions_1 = require("./actions");
6
+ const settings_1 = require("./settings");
7
+ exports.zoom = {
8
+ key: 'zoom',
9
+ title: 'Zoom',
10
+ icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/v1746027815/Awell%20Extensions/zoom.svg',
11
+ description: 'Zoom is a communications platform that allows users to connect with video, audio, phone, and chat.',
12
+ category: extensions_core_1.Category.COMMUNICATION,
13
+ author: {
14
+ authorType: extensions_core_1.AuthorType.AWELL,
15
+ },
16
+ actions: actions_1.actions,
17
+ settings: settings_1.settings,
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/zoom/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,uCAAmC;AACnC,yCAAqC;AAExB,QAAA,IAAI,GAAc;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;IACb,QAAQ,EACN,2FAA2F;IAC7F,WAAW,EACT,oGAAoG;IACtG,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAP,iBAAO;IACP,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { type AxiosResponse } from 'axios';
2
+ import { type SendSmsInputType, type SendSmsResponseType } from './schema';
3
+ export declare class ZoomApiClient {
4
+ private readonly client;
5
+ private readonly authUrl;
6
+ private readonly accountId;
7
+ private readonly clientId;
8
+ private readonly clientSecret;
9
+ private accessToken;
10
+ private tokenExpiry;
11
+ constructor({ baseUrl, authUrl, accountId, clientId, clientSecret, }: {
12
+ baseUrl: string;
13
+ authUrl: string;
14
+ accountId: string;
15
+ clientId: string;
16
+ clientSecret: string;
17
+ });
18
+ private refreshAccessToken;
19
+ private isTokenExpired;
20
+ sendSms(input: SendSmsInputType): Promise<AxiosResponse<SendSmsResponseType>>;
21
+ }
@@ -0,0 +1,104 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.ZoomApiClient = void 0;
37
+ const axios_1 = __importStar(require("axios"));
38
+ const lodash_1 = require("lodash");
39
+ class ZoomApiClient {
40
+ constructor({ baseUrl, authUrl, accountId, clientId, clientSecret, }) {
41
+ this.accessToken = null;
42
+ this.tokenExpiry = null; // Store token expiry time in UNIX timestamp
43
+ this.authUrl = authUrl;
44
+ this.accountId = accountId;
45
+ this.clientId = clientId;
46
+ this.clientSecret = clientSecret;
47
+ this.client = axios_1.default.create({
48
+ baseURL: (0, lodash_1.endsWith)(baseUrl, '/') ? baseUrl : `${baseUrl}/`,
49
+ headers: new axios_1.AxiosHeaders({
50
+ 'Content-Type': 'application/json',
51
+ }),
52
+ });
53
+ this.client.interceptors.request.use(async (config) => {
54
+ var _a;
55
+ if ((0, lodash_1.isNil)(this.accessToken) || this.isTokenExpired()) {
56
+ await this.refreshAccessToken();
57
+ }
58
+ if (!(0, lodash_1.isNil)(this.accessToken)) {
59
+ config.headers = axios_1.AxiosHeaders.from((_a = config === null || config === void 0 ? void 0 : config.headers) !== null && _a !== void 0 ? _a : {});
60
+ config.headers.set('Authorization', `Bearer ${this.accessToken}`);
61
+ }
62
+ return config;
63
+ });
64
+ }
65
+ async refreshAccessToken() {
66
+ const authUrl = new URL(this.authUrl);
67
+ /**
68
+ * Zoom deviates from the OAuth2 spec in that the grant_type is account_credentials :)))
69
+ * and not client_credentials. Hence why we have this custom class instead of using OAuth helpers from
70
+ * Extensions core.
71
+ *
72
+ * https://developers.zoom.us/docs/integrations/oauth/#request-an-access-token
73
+ */
74
+ authUrl.searchParams.set('grant_type', 'account_credentials');
75
+ authUrl.searchParams.set('account_id', this.accountId);
76
+ const authorizationToken = Buffer.from(`${this.clientId}:${this.clientSecret}`).toString('base64');
77
+ try {
78
+ const tokenResponse = await axios_1.default.post(authUrl.toString(), {}, {
79
+ headers: {
80
+ Authorization: `Basic ${authorizationToken}`,
81
+ },
82
+ });
83
+ this.accessToken = tokenResponse.data.access_token;
84
+ this.tokenExpiry =
85
+ Math.floor(Date.now() / 1000) + tokenResponse.data.expires_in; // Current time + expiry
86
+ }
87
+ catch (error) {
88
+ console.error('Failed to refresh access token:', error);
89
+ throw new Error('Unable to refresh access token');
90
+ }
91
+ }
92
+ isTokenExpired() {
93
+ const now = Math.floor(Date.now() / 1000); // Current time in seconds
94
+ return ((0, lodash_1.isNil)(this.tokenExpiry) || now >= this.tokenExpiry - 60 // Refresh 1 minute before expiry
95
+ );
96
+ }
97
+ async sendSms(input) {
98
+ const url = new URL(`contact_center/sms`, this.client.defaults.baseURL);
99
+ const response = await this.client.post(url.toString(), input);
100
+ return response;
101
+ }
102
+ }
103
+ exports.ZoomApiClient = ZoomApiClient;
104
+ //# sourceMappingURL=client.js.map
@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AC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA,CAAC,0BAA0B;QACpE,OAAO,CACL,IAAA,cAAK,EAAC,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,iCAAiC;SAC1F,CAAA;IACH,CAAC;IAED,KAAK,CAAC,OAAO,CACX,KAAuB;QAEvB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAEvE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACrC,GAAG,CAAC,QAAQ,EAAE,EACd,KAAK,CACN,CAAA;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAnHD,sCAmHC"}
@@ -0,0 +1,2 @@
1
+ export declare const ZOOM_API_URL = "https://api.zoom.us/v2";
2
+ export declare const ZOOM_AUTH_URL = "https://zoom.us/oauth/token";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZOOM_AUTH_URL = exports.ZOOM_API_URL = void 0;
4
+ exports.ZOOM_API_URL = 'https://api.zoom.us/v2';
5
+ exports.ZOOM_AUTH_URL = 'https://zoom.us/oauth/token';
6
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../extensions/zoom/lib/api/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,wBAAwB,CAAA;AACvC,QAAA,aAAa,GAAG,6BAA6B,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export declare const SendSmsInputSchema: z.ZodObject<{
3
+ contact_center_number: z.ZodString;
4
+ consumer_numbers: z.ZodArray<z.ZodString, "many">;
5
+ body: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ body: string;
8
+ contact_center_number: string;
9
+ consumer_numbers: string[];
10
+ }, {
11
+ body: string;
12
+ contact_center_number: string;
13
+ consumer_numbers: string[];
14
+ }>;
15
+ export type SendSmsInputType = z.infer<typeof SendSmsInputSchema>;
16
+ export declare const SendSmsResponseSchema: z.ZodArray<z.ZodObject<{
17
+ contact_center_number: z.ZodString;
18
+ consumer_number: z.ZodString;
19
+ message_id: z.ZodOptional<z.ZodString>;
20
+ success: z.ZodBoolean;
21
+ description: z.ZodOptional<z.ZodString>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ success: boolean;
24
+ contact_center_number: string;
25
+ consumer_number: string;
26
+ description?: string | undefined;
27
+ message_id?: string | undefined;
28
+ }, {
29
+ success: boolean;
30
+ contact_center_number: string;
31
+ consumer_number: string;
32
+ description?: string | undefined;
33
+ message_id?: string | undefined;
34
+ }>, "many">;
35
+ export type SendSmsResponseType = z.infer<typeof SendSmsResponseSchema>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendSmsResponseSchema = exports.SendSmsInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SendSmsInputSchema = zod_1.z.object({
6
+ contact_center_number: zod_1.z.string(),
7
+ consumer_numbers: zod_1.z.array(zod_1.z.string()),
8
+ body: zod_1.z.string(),
9
+ });
10
+ exports.SendSmsResponseSchema = zod_1.z.array(zod_1.z.object({
11
+ contact_center_number: zod_1.z.string(),
12
+ consumer_number: zod_1.z.string(),
13
+ message_id: zod_1.z.string().optional(),
14
+ success: zod_1.z.boolean(),
15
+ description: zod_1.z.string().optional(),
16
+ }));
17
+ //# sourceMappingURL=SendSms.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendSms.schema.js","sourceRoot":"","sources":["../../../../../../extensions/zoom/lib/api/schema/SendSms.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,qBAAqB,EAAE,OAAC,CAAC,MAAM,EAAE;IACjC,gBAAgB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IACrC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA;AAIW,QAAA,qBAAqB,GAAG,OAAC,CAAC,KAAK,CAC1C,OAAC,CAAC,MAAM,CAAC;IACP,qBAAqB,EAAE,OAAC,CAAC,MAAM,EAAE;IACjC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CACH,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './SendSms.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("./SendSms.schema"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/zoom/lib/api/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC"}
@@ -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 { ZoomApiClient } 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
+ zoomSdk: ZoomApiClient;
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,38 @@
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 constants_1 = require("./api/constants");
12
+ const validatePayloadAndCreateSdk = async ({ fieldsSchema, payload, }) => {
13
+ const { settings, fields } = (0, extensions_core_1.validate)({
14
+ schema: zod_1.default.object({
15
+ fields: fieldsSchema,
16
+ settings: settings_1.SettingsValidationSchema,
17
+ }),
18
+ payload,
19
+ });
20
+ const { patient, pathway, activity } = payload;
21
+ const zoomSdk = new client_1.ZoomApiClient({
22
+ baseUrl: constants_1.ZOOM_API_URL,
23
+ authUrl: constants_1.ZOOM_AUTH_URL,
24
+ accountId: settings.accountId,
25
+ clientId: settings.clientId,
26
+ clientSecret: settings.clientSecret,
27
+ });
28
+ return {
29
+ zoomSdk,
30
+ settings,
31
+ fields,
32
+ patient,
33
+ pathway,
34
+ activity,
35
+ };
36
+ };
37
+ exports.validatePayloadAndCreateSdk = validatePayloadAndCreateSdk;
38
+ //# sourceMappingURL=validatePayloadAndCreateSdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePayloadAndCreateSdk.js","sourceRoot":"","sources":["../../../../extensions/zoom/lib/validatePayloadAndCreateSdk.ts"],"names":[],"mappings":";;;;;;AAAA,mEAKsC;AACtC,8CAAmB;AACnB,0CAAsD;AAEtD,yCAA4C;AAC5C,+CAA6D;AAiBtD,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;SACnC,CAAC;QACF,OAAO;KACR,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAE9C,MAAM,OAAO,GAAG,IAAI,sBAAa,CAAC;QAChC,OAAO,EAAE,wBAAY;QACrB,OAAO,EAAE,yBAAa;QACtB,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,YAAY,EAAE,QAAQ,CAAC,YAAY;KACpC,CAAC,CAAA;IAEF,OAAO;QACL,OAAO;QACP,QAAQ;QACR,MAAM;QACN,OAAO;QACP,OAAO;QACP,QAAQ;KACT,CAAA;AACH,CAAC,CAAA;AA9BY,QAAA,2BAA2B,+BA8BvC"}
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ export declare const settings: {
3
+ accountId: {
4
+ key: string;
5
+ label: string;
6
+ obfuscated: false;
7
+ description: string;
8
+ required: true;
9
+ };
10
+ clientId: {
11
+ key: string;
12
+ label: string;
13
+ obfuscated: false;
14
+ description: string;
15
+ required: true;
16
+ };
17
+ clientSecret: {
18
+ key: string;
19
+ label: string;
20
+ obfuscated: true;
21
+ description: string;
22
+ required: true;
23
+ };
24
+ };
25
+ export declare const SettingsValidationSchema: z.ZodObject<{
26
+ accountId: z.ZodString;
27
+ clientId: z.ZodString;
28
+ clientSecret: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ clientId: string;
31
+ clientSecret: string;
32
+ accountId: string;
33
+ }, {
34
+ clientId: string;
35
+ clientSecret: string;
36
+ accountId: string;
37
+ }>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsValidationSchema = exports.settings = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.settings = {
6
+ accountId: {
7
+ key: 'accountId',
8
+ label: 'Account ID',
9
+ obfuscated: false,
10
+ description: 'The account ID of your Zoom account.',
11
+ required: true,
12
+ },
13
+ clientId: {
14
+ key: 'clientId',
15
+ label: 'Client ID',
16
+ obfuscated: false,
17
+ description: 'The client ID issued by the Server-to-Server OAuth app.',
18
+ required: true,
19
+ },
20
+ clientSecret: {
21
+ key: 'clientSecret',
22
+ label: 'Client Secret',
23
+ obfuscated: true,
24
+ description: 'The client secret issued by the Server-to-Server OAuth app.',
25
+ required: true,
26
+ },
27
+ };
28
+ exports.SettingsValidationSchema = zod_1.z.object({
29
+ accountId: zod_1.z.string().min(1),
30
+ clientId: zod_1.z.string().min(1),
31
+ clientSecret: zod_1.z.string().min(1),
32
+ });
33
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/zoom/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,YAAY;QACnB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,sCAAsC;QACnD,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,WAAW;QAClB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,yDAAyD;QACtE,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,KAAK,EAAE,eAAe;QACtB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,6DAA6D;QAC1E,QAAQ,EAAE,IAAI;KACf;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACoB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.245",
3
+ "version": "2.0.247",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {