@awell-health/awell-extensions 2.1.33 → 2.1.34

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.
@@ -153,6 +153,7 @@ export declare const actions: {
153
153
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
154
154
  onError: import("@awell-health/extensions-core").OnErrorCallback;
155
155
  helpers: import("@awell-health/extensions-core").Helpers;
156
+ attempt: number;
156
157
  }) => Promise<void>;
157
158
  };
158
159
  scheduleSMS: {
@@ -355,6 +356,7 @@ export declare const actions: {
355
356
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
356
357
  onError: import("@awell-health/extensions-core").OnErrorCallback;
357
358
  helpers: import("@awell-health/extensions-core").Helpers;
359
+ attempt: number;
358
360
  }) => Promise<void>;
359
361
  };
360
362
  sendEmail: {
@@ -539,6 +541,7 @@ export declare const actions: {
539
541
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
540
542
  onError: import("@awell-health/extensions-core").OnErrorCallback;
541
543
  helpers: import("@awell-health/extensions-core").Helpers;
544
+ attempt: number;
542
545
  }) => Promise<void>;
543
546
  };
544
547
  scheduleEmail: {
@@ -765,6 +768,7 @@ export declare const actions: {
765
768
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
766
769
  onError: import("@awell-health/extensions-core").OnErrorCallback;
767
770
  helpers: import("@awell-health/extensions-core").Helpers;
771
+ attempt: number;
768
772
  }) => Promise<void>;
769
773
  };
770
774
  sendEmailUsingTemplate: {
@@ -963,6 +967,7 @@ export declare const actions: {
963
967
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
964
968
  onError: import("@awell-health/extensions-core").OnErrorCallback;
965
969
  helpers: import("@awell-health/extensions-core").Helpers;
970
+ attempt: number;
966
971
  }) => Promise<void>;
967
972
  };
968
973
  sendCampaign: {
@@ -1091,6 +1096,7 @@ export declare const actions: {
1091
1096
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
1092
1097
  onError: import("@awell-health/extensions-core").OnErrorCallback;
1093
1098
  helpers: import("@awell-health/extensions-core").Helpers;
1099
+ attempt: number;
1094
1100
  }) => Promise<void>;
1095
1101
  };
1096
1102
  };
@@ -223,5 +223,6 @@ export declare const scheduleEmail: {
223
223
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
224
224
  onError: import("@awell-health/extensions-core").OnErrorCallback;
225
225
  helpers: import("@awell-health/extensions-core").Helpers;
226
+ attempt: number;
226
227
  }) => Promise<void>;
227
228
  };
@@ -199,5 +199,6 @@ export declare const scheduleSMS: {
199
199
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
200
200
  onError: import("@awell-health/extensions-core").OnErrorCallback;
201
201
  helpers: import("@awell-health/extensions-core").Helpers;
202
+ attempt: number;
202
203
  }) => Promise<void>;
203
204
  };
@@ -125,5 +125,6 @@ export declare const sendCampaign: {
125
125
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
126
126
  onError: import("@awell-health/extensions-core").OnErrorCallback;
127
127
  helpers: import("@awell-health/extensions-core").Helpers;
128
+ attempt: number;
128
129
  }) => Promise<void>;
129
130
  };
@@ -181,5 +181,6 @@ export declare const sendEmail: {
181
181
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
182
182
  onError: import("@awell-health/extensions-core").OnErrorCallback;
183
183
  helpers: import("@awell-health/extensions-core").Helpers;
184
+ attempt: number;
184
185
  }) => Promise<void>;
185
186
  };
@@ -195,5 +195,6 @@ export declare const sendEmailUsingTemplate: {
195
195
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
196
196
  onError: import("@awell-health/extensions-core").OnErrorCallback;
197
197
  helpers: import("@awell-health/extensions-core").Helpers;
198
+ attempt: number;
198
199
  }) => Promise<void>;
199
200
  };
@@ -153,5 +153,6 @@ export declare const sendSMS: {
153
153
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
154
154
  onError: import("@awell-health/extensions-core").OnErrorCallback;
155
155
  helpers: import("@awell-health/extensions-core").Helpers;
156
+ attempt: number;
156
157
  }) => Promise<void>;
157
158
  };
@@ -73,5 +73,6 @@ export declare const callWithGrace: {
73
73
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
74
74
  onError: import("@awell-health/extensions-core").OnErrorCallback;
75
75
  helpers: import("@awell-health/extensions-core").Helpers;
76
+ attempt: number;
76
77
  }) => Promise<void>;
77
78
  };
@@ -73,6 +73,7 @@ export declare const actions: {
73
73
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
74
74
  onError: import("@awell-health/extensions-core").OnErrorCallback;
75
75
  helpers: import("@awell-health/extensions-core").Helpers;
76
+ attempt: number;
76
77
  }) => Promise<void>;
77
78
  };
78
79
  uploadContactToCampaign: {
@@ -158,6 +159,7 @@ export declare const actions: {
158
159
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
159
160
  onError: import("@awell-health/extensions-core").OnErrorCallback;
160
161
  helpers: import("@awell-health/extensions-core").Helpers;
162
+ attempt: number;
161
163
  }) => Promise<void>;
162
164
  };
163
165
  };
@@ -82,5 +82,6 @@ export declare const uploadContactToCampaign: {
82
82
  onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
83
83
  onError: import("@awell-health/extensions-core").OnErrorCallback;
84
84
  helpers: import("@awell-health/extensions-core").Helpers;
85
+ attempt: number;
85
86
  }) => Promise<void>;
86
87
  };
@@ -0,0 +1,23 @@
1
+ import { FieldType, type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../settings';
3
+ declare const fields: {
4
+ failureAttempts: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.NUMERIC;
9
+ required: true;
10
+ };
11
+ };
12
+ declare const dataPoints: {
13
+ currentAttempt: {
14
+ key: string;
15
+ valueType: "number";
16
+ };
17
+ result: {
18
+ key: string;
19
+ valueType: "string";
20
+ };
21
+ };
22
+ export declare const failoWorld: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
23
+ export {};
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.failoWorld = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const extensions_core_2 = require("@awell-health/extensions-core");
6
+ const fields = {
7
+ failureAttempts: {
8
+ id: 'failureAttempts',
9
+ label: 'Number of attempts that should fail',
10
+ description: 'Specify how many attempts should fail before the action succeeds',
11
+ type: extensions_core_1.FieldType.NUMERIC,
12
+ required: true,
13
+ },
14
+ };
15
+ const dataPoints = {
16
+ currentAttempt: {
17
+ key: 'currentAttempt',
18
+ valueType: 'number',
19
+ },
20
+ result: {
21
+ key: 'result',
22
+ valueType: 'string',
23
+ },
24
+ };
25
+ exports.failoWorld = {
26
+ key: 'test-retry',
27
+ category: extensions_core_2.Category.DEMO,
28
+ title: 'Fail-o World',
29
+ description: 'A test action that fails for a specified number of attempts to test the automated retry mechanism.',
30
+ fields,
31
+ previewable: false,
32
+ dataPoints,
33
+ onEvent: async ({ payload, onComplete, onError, attempt }) => {
34
+ const { fields } = payload;
35
+ const failureAttempts = Number(fields.failureAttempts);
36
+ if (attempt <= failureAttempts) {
37
+ // This attempt should fail
38
+ await onError({
39
+ events: [
40
+ {
41
+ date: new Date().toISOString(),
42
+ text: {
43
+ en: `Attempt ${attempt} of ${failureAttempts} - Intentionally failing for testing retry mechanism`,
44
+ },
45
+ error: {
46
+ category: 'SERVER_ERROR',
47
+ message: `This is intentional failure #${attempt}`,
48
+ },
49
+ },
50
+ ],
51
+ });
52
+ return;
53
+ }
54
+ // This attempt should succeed
55
+ await onComplete({
56
+ data_points: {
57
+ currentAttempt: String(attempt),
58
+ result: `Success on attempt ${attempt} after ${failureAttempts} failures`,
59
+ },
60
+ });
61
+ },
62
+ };
63
+ //# sourceMappingURL=failoWorld.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failoWorld.js","sourceRoot":"","sources":["../../../../extensions/hello-world/actions/failoWor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C9B,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC;gBAC/B,MAAM,EAAE,sBAAsB,OAAO,UAAU,eAAe,WAAW;aAC1E;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export * from './log';
2
2
  export * from './log_two';
3
3
  export * from './frontend';
4
+ export * from './failoWorld';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./log"), exports);
18
18
  __exportStar(require("./log_two"), exports);
19
19
  __exportStar(require("./frontend"), exports);
20
+ __exportStar(require("./failoWorld"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/hello-world/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,4CAAyB;AACzB,6CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/hello-world/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,4CAAyB;AACzB,6CAA0B;AAC1B,+CAA4B"}
@@ -19,6 +19,7 @@ exports.HelloWorld = {
19
19
  log: actions_1.log,
20
20
  logTwo: actions_1.logTwo,
21
21
  frontend: actions_1.frontend,
22
+ failoWorld: actions_1.failoWorld,
22
23
  },
23
24
  webhooks: webhooks_1.webhooks,
24
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/hello-world/index.ts"],"names":[],"mappings":";;;AAAA,uCAAiD;AAEjD,yCAAqC;AACrC,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,UAAU,GAAc;IACnC,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,iGAAiG;IACnG,QAAQ,EACN,iGAAiG;IACnG,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAE;QACP,GAAG,EAAH,aAAG;QACH,MAAM,EAAN,gBAAM;QACN,QAAQ,EAAR,kBAAQ;KACT;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/hello-world/index.ts"],"names":[],"mappings":";;;AAAA,uCAA6D;AAE7D,yCAAqC;AACrC,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,UAAU,GAAc;IACnC,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,iGAAiG;IACnG,QAAQ,EACN,iGAAiG;IACnG,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAE;QACP,GAAG,EAAH,aAAG;QACH,MAAM,EAAN,gBAAM;QACN,QAAQ,EAAR,kBAAQ;QACR,UAAU,EAAV,oBAAU;KACX;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.1.33",
3
+ "version": "2.1.34",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -100,7 +100,7 @@
100
100
  "dependencies": {
101
101
  "@airtop/sdk": "^0.1.44",
102
102
  "@awell-health/awell-sdk": "0.1.24",
103
- "@awell-health/extensions-core": "1.1.6",
103
+ "@awell-health/extensions-core": "1.1.9",
104
104
  "@awell-health/healthie-sdk": "^0.1.1",
105
105
  "@calcom/embed-react": "^1.5.3",
106
106
  "@dropbox/sign": "^1.8.0",