@natch-the-storage/heathershaw-platform-types 1.20.3 → 1.20.5
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 +32 -4
- package/build/validators.js +3 -0
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -309,16 +309,41 @@ export interface OrderAddress {
|
|
|
309
309
|
address: Address;
|
|
310
310
|
deliveryInstructions?: string;
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
/** Mimics the cardFields in the API, this is what the card field names should look like on the frontend */
|
|
313
|
+
export interface PaymentCardDetails {
|
|
313
314
|
cardNumber: string;
|
|
314
315
|
cardHolder: string;
|
|
315
316
|
cardExpiry: string;
|
|
316
317
|
cvv: string;
|
|
317
318
|
customerIp?: string;
|
|
318
|
-
orderUpdate?: Omit<OrderUpdate, 'id' | 'directUserProfileId' | 'partnerPharmacyProfileId' | 'patientRecordId'>;
|
|
319
|
-
patientRecordUpdate?: Omit<PatientRecordUpdate, 'id'>;
|
|
320
|
-
isStaff?: boolean;
|
|
321
319
|
}
|
|
320
|
+
/** Links to chargeUpdateFields in the API */
|
|
321
|
+
type chargeUpdateFields = {
|
|
322
|
+
orderUpdate?: Omit<OrderUpdate, 'directUserProfileId' | 'partnerPharmacyProfileId' | 'patientRecordId' | 'paymentStatus' | 'paymentLinkToken' | 'paymentReferenceId'>;
|
|
323
|
+
patientRecordUpdate?: Pick<PatientRecordUpdate, 'addresses' | 'healthInfo'>;
|
|
324
|
+
};
|
|
325
|
+
/** Links to chargeOrderBodySchema in the API, used for already tokenised cards */
|
|
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;
|
|
322
347
|
export interface PaperScriptReminder {
|
|
323
348
|
id: number;
|
|
324
349
|
orderId?: number;
|
|
@@ -1213,6 +1238,9 @@ export declare const ApiRoutes: {
|
|
|
1213
1238
|
getByPaymentLinkToken: (token: string) => string;
|
|
1214
1239
|
chargePaymentLink: (token: string) => string;
|
|
1215
1240
|
chargeOrder: (id: string) => string;
|
|
1241
|
+
paymentLinkScaSession: (token: string) => string;
|
|
1242
|
+
internalScaSession: (id: number) => string;
|
|
1243
|
+
adminMoto: (id: number) => string;
|
|
1216
1244
|
};
|
|
1217
1245
|
paperScriptReminders: {
|
|
1218
1246
|
list: string;
|
package/build/validators.js
CHANGED
|
@@ -502,6 +502,9 @@ 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`,
|
|
505
508
|
},
|
|
506
509
|
paperScriptReminders: {
|
|
507
510
|
list: '/api/paper-script-reminders',
|