@apextelemed/partner-core 0.18.0-dev.60 → 0.18.0
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/api/index.d.ts +23 -2
- package/dist/api/index.js +4 -4
- package/dist/api/index.jsx +8 -4
- package/dist/chunk/{CDRUVUTJ.js → 22EFLJGO.js} +18 -8
- package/dist/chunk/22EFLJGO.js.map +1 -0
- package/dist/chunk/{EED3KNR7.jsx → 2Q4GK4WD.jsx} +41 -3
- package/dist/chunk/{GJSE37VN.js → BPF2SSKF.js} +3 -3
- package/dist/chunk/{GJSE37VN.js.map → BPF2SSKF.js.map} +1 -1
- package/dist/chunk/{OOMMZESR.js → CED3IYWX.js} +40 -4
- package/dist/chunk/CED3IYWX.js.map +1 -0
- package/dist/chunk/ESNAWOHG.jsx +1 -0
- package/dist/chunk/{OZHJ5IGL.jsx → FL3DS5WN.jsx} +370 -131
- package/dist/chunk/{UZ2K7HBG.js → GSYL4J57.js} +1828 -800
- package/dist/chunk/GSYL4J57.js.map +1 -0
- package/dist/chunk/{33BDC6MT.jsx → GULO22W6.jsx} +2 -2
- package/dist/chunk/{HEQLEGHI.js → GYAT2X65.js} +43 -3
- package/dist/chunk/GYAT2X65.js.map +1 -0
- package/dist/chunk/{LA6F37YV.jsx → I7L5WVA2.jsx} +20 -7
- package/dist/chunk/{X6WJQ47H.jsx → PWEK34Q4.jsx} +42 -2
- package/dist/chunk/{TFJKTKZ3.jsx → U5DE7VZP.jsx} +2350 -1670
- package/dist/chunk/{WTHAR2P2.js → UM5K75Y4.js} +3 -3
- package/dist/chunk/{WTHAR2P2.js.map → UM5K75Y4.js.map} +1 -1
- package/dist/chunk/{ZWAZNB4Y.jsx → W5QWCMTE.jsx} +2 -2
- package/dist/chunk/{VGF2LLAD.js → XPYBZU45.js} +240 -14
- package/dist/chunk/XPYBZU45.js.map +1 -0
- package/dist/chunk/XZVVZIRZ.js +3 -0
- package/dist/chunk/XZVVZIRZ.js.map +1 -0
- package/dist/{client-CMbSYUam.d.ts → client-BQ8AEx5S.d.ts} +155 -2
- package/dist/flows/index.d.ts +113 -2
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +14 -6
- package/dist/index/index.d.ts +26 -5
- package/dist/index/index.js +8 -8
- package/dist/index/index.jsx +22 -8
- package/dist/pages/index.d.ts +2 -2
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +5 -5
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/dist/theme/member-portal.css +43 -0
- package/package.json +1 -1
- package/dist/chunk/ACE7M2YA.jsx +0 -1
- package/dist/chunk/CDRUVUTJ.js.map +0 -1
- package/dist/chunk/HEQLEGHI.js.map +0 -1
- package/dist/chunk/JSHO46VZ.js +0 -3
- package/dist/chunk/JSHO46VZ.js.map +0 -1
- package/dist/chunk/OOMMZESR.js.map +0 -1
- package/dist/chunk/UZ2K7HBG.js.map +0 -1
- package/dist/chunk/VGF2LLAD.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
captureAuthHeader,
|
|
3
3
|
peekFunnelSessionId
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./2Q4GK4WD.jsx";
|
|
5
5
|
import {
|
|
6
6
|
getConfig
|
|
7
7
|
} from "./QVZ7BRNO.jsx";
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
readCartToken,
|
|
175
175
|
stripCartToken
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=
|
|
177
|
+
//# sourceMappingURL=GULO22W6.jsx.map
|
|
@@ -290,6 +290,9 @@ var ApiError = class extends Error {
|
|
|
290
290
|
/** The response body's `details`, untouched, for the few refusals whose
|
|
291
291
|
* specifics a caller acts on (e.g. which prices are missing). Never shown as prose. */
|
|
292
292
|
details;
|
|
293
|
+
/** The response body's `reason`, when the endpoint names why it refused (e.g.
|
|
294
|
+
* `stale_text` on a text-message consent). Branch on this, never on message. */
|
|
295
|
+
reason;
|
|
293
296
|
constructor(message, opts = {}) {
|
|
294
297
|
super(message);
|
|
295
298
|
this.name = "ApiError";
|
|
@@ -297,6 +300,7 @@ var ApiError = class extends Error {
|
|
|
297
300
|
this.ambiguous = opts.ambiguous ?? false;
|
|
298
301
|
this.code = opts.code;
|
|
299
302
|
this.details = opts.details;
|
|
303
|
+
this.reason = opts.reason;
|
|
300
304
|
if (opts.cause !== void 0) this.cause = opts.cause;
|
|
301
305
|
}
|
|
302
306
|
};
|
|
@@ -374,11 +378,13 @@ async function coreFetch(endpoint, fetchOpts, track, call = {}) {
|
|
|
374
378
|
let errorMsg = `Request failed: ${res.status}`;
|
|
375
379
|
let errorCode;
|
|
376
380
|
let errorDetails;
|
|
381
|
+
let errorReason;
|
|
377
382
|
try {
|
|
378
383
|
const body = await res.json();
|
|
379
384
|
errorMsg = body.error || body.message || errorMsg;
|
|
380
385
|
errorCode = typeof body.code === "string" ? body.code : void 0;
|
|
381
386
|
errorDetails = body.details;
|
|
387
|
+
errorReason = typeof body.reason === "string" ? body.reason : void 0;
|
|
382
388
|
if (track.enrichErrorDetails && Array.isArray(body.details) && body.details.length > 0) {
|
|
383
389
|
const lines = body.details.map(
|
|
384
390
|
(d) => typeof d === "string" ? d : d?.message
|
|
@@ -394,7 +400,8 @@ async function coreFetch(endpoint, fetchOpts, track, call = {}) {
|
|
|
394
400
|
status: res.status,
|
|
395
401
|
ambiguous: res.status >= 500,
|
|
396
402
|
code: errorCode,
|
|
397
|
-
...errorDetails !== void 0 ? { details: errorDetails } : {}
|
|
403
|
+
...errorDetails !== void 0 ? { details: errorDetails } : {},
|
|
404
|
+
...errorReason !== void 0 ? { reason: errorReason } : {}
|
|
398
405
|
});
|
|
399
406
|
}
|
|
400
407
|
if (res.status === 204) return void 0;
|
|
@@ -833,6 +840,13 @@ var usersApi = {
|
|
|
833
840
|
},
|
|
834
841
|
updateProfile(payload) {
|
|
835
842
|
return patch("/users/me", payload);
|
|
843
|
+
},
|
|
844
|
+
getSmsState() {
|
|
845
|
+
return apiFetch("/users/me/sms");
|
|
846
|
+
},
|
|
847
|
+
/** Only the named events change; the reply is the full state again. */
|
|
848
|
+
setSmsEvents(events) {
|
|
849
|
+
return put("/users/me/sms/preferences", { events });
|
|
836
850
|
}
|
|
837
851
|
};
|
|
838
852
|
var membersApi = {
|
|
@@ -1138,6 +1152,32 @@ var adminApi = {
|
|
|
1138
1152
|
note ? { note } : {}
|
|
1139
1153
|
);
|
|
1140
1154
|
},
|
|
1155
|
+
// ── Text messages (settings.write / emailTemplates.write / patient.support) ──
|
|
1156
|
+
/** Is this site set up to text customers, and from what number. Needs `settings.write`. */
|
|
1157
|
+
getSmsSettings() {
|
|
1158
|
+
return apiFetch("/admin/sms/settings");
|
|
1159
|
+
},
|
|
1160
|
+
/** Every event's text, as saved. Needs `emailTemplates.write`. */
|
|
1161
|
+
getSmsTemplates() {
|
|
1162
|
+
return apiFetch("/admin/sms/templates");
|
|
1163
|
+
},
|
|
1164
|
+
/**
|
|
1165
|
+
* Change some events' texts. Send ONLY what changed: a missing event or field
|
|
1166
|
+
* is kept, `null` resets to the default. Rejects (400) with the server's
|
|
1167
|
+
* reason when a body doesn't start with `{{siteName}}`, runs past 300
|
|
1168
|
+
* characters, or uses a token the event doesn't have. Returns the full list.
|
|
1169
|
+
*/
|
|
1170
|
+
saveSmsTemplates(templates) {
|
|
1171
|
+
return put("/admin/sms/templates", { templates });
|
|
1172
|
+
},
|
|
1173
|
+
/** Text the SAVED version of an event to the signed-in admin's own phone. */
|
|
1174
|
+
sendSmsTemplateTest(key) {
|
|
1175
|
+
return post(`/admin/sms/templates/${encodeURIComponent(key)}/test`);
|
|
1176
|
+
},
|
|
1177
|
+
/** The send log, newest first. Needs `patient.support`. Page with `nextBefore`. */
|
|
1178
|
+
listSmsMessages(params) {
|
|
1179
|
+
return apiFetch(`/admin/sms/messages${qs(params)}`);
|
|
1180
|
+
},
|
|
1141
1181
|
getEmailNotifications() {
|
|
1142
1182
|
return apiFetch("/admin/settings/email-notifications");
|
|
1143
1183
|
},
|
|
@@ -1564,5 +1604,5 @@ var affiliatePortalApi = {
|
|
|
1564
1604
|
};
|
|
1565
1605
|
|
|
1566
1606
|
export { ADMIN_ROLES, ApiError, SUPPORT_ATTACHMENT_MAX_BYTES, SUPPORT_ATTACHMENT_MIME_TYPES, addressesApi, adminAffiliatesApi, adminApi, adminCatalogApi, adminCatalogConversionApi, adminProductPharmaciesApi, affiliateAuthStorageKey, affiliatePortalApi, apexApi, apiFetch, authApi, authStorageKey, captureAffiliateRef, catalogApi, clearAffiliateRef, clearAffiliateTokens, clearTokens, getAffiliateTokens, getTokens, membersApi, messagesApi, newIdempotencyKey, offersApi, onTokensCleared, ordersApi, paymentsApi, productsApi, promoCodesApi, readAffiliateRef, setAffiliateTokens, setTokens, subscriptionsApi, supportApi, usersApi };
|
|
1567
|
-
//# sourceMappingURL=
|
|
1568
|
-
//# sourceMappingURL=
|
|
1607
|
+
//# sourceMappingURL=GYAT2X65.js.map
|
|
1608
|
+
//# sourceMappingURL=GYAT2X65.js.map
|