@natch-the-storage/heathershaw-platform-types 1.20.8 → 1.21.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/build/validators.d.ts +19 -55
- package/build/validators.js +1 -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;
|
|
@@ -310,53 +313,15 @@ export interface OrderAddress {
|
|
|
310
313
|
deliveryInstructions?: string;
|
|
311
314
|
}
|
|
312
315
|
/** Mimics the cardFields in the API, this is what the card field names should look like on the frontend */
|
|
313
|
-
export interface
|
|
316
|
+
export interface ChargeOrder {
|
|
314
317
|
cardNumber: string;
|
|
315
318
|
cardHolder: string;
|
|
316
319
|
cardExpiry: string;
|
|
317
320
|
cvv: string;
|
|
318
321
|
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;
|
|
322
|
+
orderUpdate?: Omit<OrderUpdate, 'id' | 'directUserProfileId' | 'partnerPharmacyProfileId' | 'patientRecordId'>;
|
|
323
|
+
patientRecordUpdate?: Omit<PatientRecordUpdate, 'id'>;
|
|
324
|
+
isStaff?: boolean;
|
|
360
325
|
}
|
|
361
326
|
export interface PaperScriptReminder {
|
|
362
327
|
id: number;
|
|
@@ -771,6 +736,7 @@ export interface CDScript {
|
|
|
771
736
|
supplyNumber: number;
|
|
772
737
|
ePrescription?: CDEPrescription;
|
|
773
738
|
};
|
|
739
|
+
compound: CDCompound;
|
|
774
740
|
formulation: {
|
|
775
741
|
formulationId: number;
|
|
776
742
|
unit: string;
|
|
@@ -795,7 +761,7 @@ export interface CDDispensedScript {
|
|
|
795
761
|
comment?: string;
|
|
796
762
|
notes?: string;
|
|
797
763
|
draftScriptId?: number;
|
|
798
|
-
compound: Pick<CDFormulation, 'formulationId' | 'isCapsule' | 'unit' | 'dosageFormName'> & {
|
|
764
|
+
compound: Pick<CDFormulation, 'formulationId' | 'isCapsule' | 'unit' | 'dosageFormName' | 'compound'> & {
|
|
799
765
|
/** Expiry date of compounded product - ISO timestamp */
|
|
800
766
|
productExpiryDate: string;
|
|
801
767
|
expiryDays: number;
|
|
@@ -1046,13 +1012,7 @@ export interface CDFormulation {
|
|
|
1046
1012
|
enableRiskAssessment: boolean;
|
|
1047
1013
|
standardInstructions: string;
|
|
1048
1014
|
infoUrl: string;
|
|
1049
|
-
compound:
|
|
1050
|
-
isCapsule: boolean;
|
|
1051
|
-
capsuleSize: string;
|
|
1052
|
-
expiryDays: number;
|
|
1053
|
-
dosageFormId: number;
|
|
1054
|
-
dosageFormName: string;
|
|
1055
|
-
};
|
|
1015
|
+
compound: CDCompound;
|
|
1056
1016
|
pricing: CDScriptPriceOption[];
|
|
1057
1017
|
properties: CDScriptProperties[];
|
|
1058
1018
|
}
|
|
@@ -1097,6 +1057,13 @@ export interface CDPriceOptionUpdate {
|
|
|
1097
1057
|
quantity: number;
|
|
1098
1058
|
price: number;
|
|
1099
1059
|
}
|
|
1060
|
+
export interface CDCompound {
|
|
1061
|
+
isCapsule: boolean;
|
|
1062
|
+
capsuleSize: string;
|
|
1063
|
+
expiryDays: number;
|
|
1064
|
+
dosageFormId: number;
|
|
1065
|
+
dosageFormName: string;
|
|
1066
|
+
}
|
|
1100
1067
|
export interface CDBulkUpdateResultList {
|
|
1101
1068
|
invalidFormulationPrices: CDPriceOptionUpdate[];
|
|
1102
1069
|
successfulUpdates: CDPriceOptionUpdate[];
|
|
@@ -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
|
|
@@ -502,9 +502,6 @@ export const ApiRoutes = {
|
|
|
502
502
|
getByPaymentLinkToken: (token) => `/api/orders/payment-links/${token}`,
|
|
503
503
|
chargePaymentLink: (token) => `/api/orders/payment-links/${token}/charge`,
|
|
504
504
|
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
505
|
},
|
|
509
506
|
paperScriptReminders: {
|
|
510
507
|
list: '/api/paper-script-reminders',
|