@natch-the-storage/heathershaw-platform-types 1.20.8 → 1.21.1
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/build/validators.d.ts +25 -61
- package/build/validators.js +2 -4
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const cDProductCategoryIdValues: readonly ["schedule_1", "schedul
|
|
|
3
3
|
export declare const cloudflareR2FolderValues: readonly ["products", "invoices", "documents", "scripts", "price-matches"];
|
|
4
4
|
export declare const logItemTypeValues: readonly ["CREATED", "CREATED_PAID", "UPDATED", "UPDATED_DRAFT", "MARKED_FOR_PICKUP", "CANCELLED", "PAYMENT_LINK_PHONE", "PAYMENT_LINK_EMAIL", "PAYMENT_LINK_BOTH", "PARTNER_ORDERED_INVOICE", "PARTNER_ORDERED_POS", "PAID", "MARKED_PAID", "PAYMENT_LINK_PAID"];
|
|
5
5
|
export declare const orderFulfillmentValues: readonly ["PICKUP", "POST", "COURIER", "DELIVER"];
|
|
6
|
-
export declare const orderStatusValues: readonly ["
|
|
6
|
+
export declare const orderStatusValues: readonly ["SUBMITTED", "AWAITING_PICKUP", "POSTED", "IN_TRANSIT", "DELIVERED", "COLLECTED", "CANCELLED"];
|
|
7
7
|
export declare const orderTypeValues: readonly ["CG", "MC", "HS"];
|
|
8
8
|
export declare const patientRecordSubAccountRelationshipValues: readonly ["Child", "Spouse", "Parent", "Pet", "Other"];
|
|
9
9
|
export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECEIVED", "ESCALATED"];
|
|
@@ -170,7 +170,10 @@ export interface LineItem {
|
|
|
170
170
|
patientLastName: string;
|
|
171
171
|
};
|
|
172
172
|
formulationId: number;
|
|
173
|
-
|
|
173
|
+
/** Rx Expiry date */
|
|
174
|
+
expiryDate?: string;
|
|
175
|
+
/** BUD/best before expiry date */
|
|
176
|
+
expiryDays: number;
|
|
174
177
|
repeatsLeft: number;
|
|
175
178
|
supplyNumber: number;
|
|
176
179
|
unit?: string;
|
|
@@ -309,54 +312,15 @@ export interface OrderAddress {
|
|
|
309
312
|
address: Address;
|
|
310
313
|
deliveryInstructions?: string;
|
|
311
314
|
}
|
|
312
|
-
|
|
313
|
-
export interface PaymentCardDetails {
|
|
315
|
+
export interface ChargeOrder {
|
|
314
316
|
cardNumber: string;
|
|
315
317
|
cardHolder: string;
|
|
316
318
|
cardExpiry: string;
|
|
317
319
|
cvv: string;
|
|
318
320
|
customerIp?: string;
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
orderUpdate?: Omit<OrderUpdate, 'id' | 'directUserProfileId' | 'partnerPharmacyProfileId' | 'patientRecordId' | 'paymentStatus' | 'paymentLinkToken' | 'paymentReferenceId'>;
|
|
323
|
-
patientRecordUpdate?: Pick<PatientRecordUpdate, 'addresses' | 'healthInfo'>;
|
|
324
|
-
};
|
|
325
|
-
/** Links to scaSessionBodySchema in the API */
|
|
326
|
-
export type ScaSessionBodySchema = PaymentCardDetails;
|
|
327
|
-
/** Links to scaResultSchema in the API */
|
|
328
|
-
export type ScaResult = {
|
|
329
|
-
xid: string;
|
|
330
|
-
cavv?: string;
|
|
331
|
-
par?: string;
|
|
332
|
-
ver?: string;
|
|
333
|
-
aav?: string;
|
|
334
|
-
ucaf?: string;
|
|
335
|
-
directoryServerTxnId?: string;
|
|
336
|
-
threedsVersion?: string;
|
|
337
|
-
};
|
|
338
|
-
/** Links to chargeOrderBodySchema in the API */
|
|
339
|
-
export type ChargeOrder = chargeUpdateFields & {
|
|
340
|
-
cardToken: string;
|
|
341
|
-
sca: ScaResult;
|
|
342
|
-
cardType?: string;
|
|
343
|
-
customerIp?: string;
|
|
344
|
-
};
|
|
345
|
-
/** Links to chargeOrderMotoBodySchema in the API */
|
|
346
|
-
export type ChargeOrderMotoBody = chargeUpdateFields & PaymentCardDetails;
|
|
347
|
-
/** Links to the openScaSession function in the API
|
|
348
|
-
* Is the shape of the response
|
|
349
|
-
*/
|
|
350
|
-
export interface ScaSessionResponse {
|
|
351
|
-
accessToken: string;
|
|
352
|
-
verification: string;
|
|
353
|
-
cardToken: string;
|
|
354
|
-
cardType?: string;
|
|
355
|
-
reference: string;
|
|
356
|
-
amount: number;
|
|
357
|
-
currency: string;
|
|
358
|
-
username: string;
|
|
359
|
-
environment: string;
|
|
321
|
+
orderUpdate?: Omit<OrderUpdate, 'id' | 'directUserProfileId' | 'partnerPharmacyProfileId' | 'patientRecordId'>;
|
|
322
|
+
patientRecordUpdate?: Omit<PatientRecordUpdate, 'id'>;
|
|
323
|
+
isStaff?: boolean;
|
|
360
324
|
}
|
|
361
325
|
export interface PaperScriptReminder {
|
|
362
326
|
id: number;
|
|
@@ -771,6 +735,7 @@ export interface CDScript {
|
|
|
771
735
|
supplyNumber: number;
|
|
772
736
|
ePrescription?: CDEPrescription;
|
|
773
737
|
};
|
|
738
|
+
compound: CDCompound;
|
|
774
739
|
formulation: {
|
|
775
740
|
formulationId: number;
|
|
776
741
|
unit: string;
|
|
@@ -795,7 +760,7 @@ export interface CDDispensedScript {
|
|
|
795
760
|
comment?: string;
|
|
796
761
|
notes?: string;
|
|
797
762
|
draftScriptId?: number;
|
|
798
|
-
compound: Pick<CDFormulation, 'formulationId' | 'isCapsule' | 'unit' | 'dosageFormName'> & {
|
|
763
|
+
compound: Pick<CDFormulation, 'formulationId' | 'isCapsule' | 'unit' | 'dosageFormName' | 'compound'> & {
|
|
799
764
|
/** Expiry date of compounded product - ISO timestamp */
|
|
800
765
|
productExpiryDate: string;
|
|
801
766
|
expiryDays: number;
|
|
@@ -863,11 +828,11 @@ export type CDDispensedScriptList = Pick<CDDispensedScript, 'scriptId' | 'script
|
|
|
863
828
|
retailProductQuantity?: string;
|
|
864
829
|
retailProductBrand?: string;
|
|
865
830
|
retailProductGroupId?: string;
|
|
866
|
-
quantity:
|
|
867
|
-
itemCount:
|
|
831
|
+
quantity: number;
|
|
832
|
+
itemCount: number;
|
|
868
833
|
/** ISO timestamp yyyy-mm-ddThh:mm:ss.000Z */
|
|
869
834
|
modifiedDate?: string;
|
|
870
|
-
schedule?:
|
|
835
|
+
schedule?: string;
|
|
871
836
|
refillReminderEnabled?: boolean;
|
|
872
837
|
/** ISO date yyyy-mm-dd */
|
|
873
838
|
defaultNextRefillReminderDate?: string;
|
|
@@ -906,7 +871,7 @@ export interface CDSearchScripts {
|
|
|
906
871
|
isEPrescription?: boolean;
|
|
907
872
|
unit?: string;
|
|
908
873
|
/** ISO timestamp yyyy-mm-ddThh:mm:ss.000Z */
|
|
909
|
-
dateDispensed?:
|
|
874
|
+
dateDispensed?: string;
|
|
910
875
|
/** ISO date - yyyy-mm-dd */
|
|
911
876
|
datePrescribed?: string;
|
|
912
877
|
supplyNumber?: number;
|
|
@@ -920,7 +885,7 @@ export interface CDSearchScripts {
|
|
|
920
885
|
/** ISO date - yyyy-mm-dd */
|
|
921
886
|
expiryDate?: string;
|
|
922
887
|
/** Number of days the supply covers */
|
|
923
|
-
daysSupply?:
|
|
888
|
+
daysSupply?: number;
|
|
924
889
|
refillReminderEnabled?: boolean;
|
|
925
890
|
/** Default next refill reminder date
|
|
926
891
|
* ISO date - yyyy-mm-dd */
|
|
@@ -1046,13 +1011,7 @@ export interface CDFormulation {
|
|
|
1046
1011
|
enableRiskAssessment: boolean;
|
|
1047
1012
|
standardInstructions: string;
|
|
1048
1013
|
infoUrl: string;
|
|
1049
|
-
compound:
|
|
1050
|
-
isCapsule: boolean;
|
|
1051
|
-
capsuleSize: string;
|
|
1052
|
-
expiryDays: number;
|
|
1053
|
-
dosageFormId: number;
|
|
1054
|
-
dosageFormName: string;
|
|
1055
|
-
};
|
|
1014
|
+
compound: CDCompound;
|
|
1056
1015
|
pricing: CDScriptPriceOption[];
|
|
1057
1016
|
properties: CDScriptProperties[];
|
|
1058
1017
|
}
|
|
@@ -1097,6 +1056,13 @@ export interface CDPriceOptionUpdate {
|
|
|
1097
1056
|
quantity: number;
|
|
1098
1057
|
price: number;
|
|
1099
1058
|
}
|
|
1059
|
+
export interface CDCompound {
|
|
1060
|
+
isCapsule: boolean;
|
|
1061
|
+
capsuleSize: string;
|
|
1062
|
+
expiryDays: number;
|
|
1063
|
+
dosageFormId: number;
|
|
1064
|
+
dosageFormName: string;
|
|
1065
|
+
}
|
|
1100
1066
|
export interface CDBulkUpdateResultList {
|
|
1101
1067
|
invalidFormulationPrices: CDPriceOptionUpdate[];
|
|
1102
1068
|
successfulUpdates: CDPriceOptionUpdate[];
|
|
@@ -1214,6 +1180,7 @@ export declare const ApiRoutes: {
|
|
|
1214
1180
|
getDraftScriptById: (id: number) => string;
|
|
1215
1181
|
getDraftScriptsByHousehold: string;
|
|
1216
1182
|
getCustomerScripts: string;
|
|
1183
|
+
getHouseholdScripts: string;
|
|
1217
1184
|
searchDispensedScripts: string;
|
|
1218
1185
|
getDispensedScriptById: (id: number) => string;
|
|
1219
1186
|
updateDispensedScriptById: (id: number) => string;
|
|
@@ -1255,9 +1222,6 @@ export declare const ApiRoutes: {
|
|
|
1255
1222
|
getByPaymentLinkToken: (token: string) => string;
|
|
1256
1223
|
chargePaymentLink: (token: string) => string;
|
|
1257
1224
|
chargeOrder: (id: string) => string;
|
|
1258
|
-
paymentLinkScaSession: (token: string) => string;
|
|
1259
|
-
internalScaSession: (id: number) => string;
|
|
1260
|
-
adminMoto: (id: number) => string;
|
|
1261
1225
|
};
|
|
1262
1226
|
paperScriptReminders: {
|
|
1263
1227
|
list: string;
|
package/build/validators.js
CHANGED
|
@@ -42,7 +42,7 @@ export const orderFulfillmentValues = [
|
|
|
42
42
|
'DELIVER',
|
|
43
43
|
];
|
|
44
44
|
export const orderStatusValues = [
|
|
45
|
-
'
|
|
45
|
+
'SUBMITTED',
|
|
46
46
|
'AWAITING_PICKUP',
|
|
47
47
|
'POSTED', // in flight
|
|
48
48
|
'IN_TRANSIT', // in flight
|
|
@@ -466,6 +466,7 @@ export const ApiRoutes = {
|
|
|
466
466
|
getDraftScriptById: (id) => `/api/compound-direct/draft-scripts/${id}`,
|
|
467
467
|
getDraftScriptsByHousehold: '/api/compound-direct/scripts/households',
|
|
468
468
|
getCustomerScripts: '/api/compound-direct/customer-scripts',
|
|
469
|
+
getHouseholdScripts: '/api/compound-direct/customer-scripts/households',
|
|
469
470
|
searchDispensedScripts: '/api/compound-direct/dispensed-scripts',
|
|
470
471
|
getDispensedScriptById: (id) => `/api/compound-direct/script/${id}`,
|
|
471
472
|
updateDispensedScriptById: (id) => `/api/compound-direct/script/${id}`,
|
|
@@ -502,9 +503,6 @@ export const ApiRoutes = {
|
|
|
502
503
|
getByPaymentLinkToken: (token) => `/api/orders/payment-links/${token}`,
|
|
503
504
|
chargePaymentLink: (token) => `/api/orders/payment-links/${token}/charge`,
|
|
504
505
|
chargeOrder: (id) => `/api/orders/${id}/charge`,
|
|
505
|
-
paymentLinkScaSession: (token) => `/api/orders/payment-links/${token}/sca-session`,
|
|
506
|
-
internalScaSession: (id) => `/api/orders/${id}/sca-session`,
|
|
507
|
-
adminMoto: (id) => `/api/orders/${id}/charge/moto`,
|
|
508
506
|
},
|
|
509
507
|
paperScriptReminders: {
|
|
510
508
|
list: '/api/paper-script-reminders',
|