@natch-the-storage/heathershaw-platform-types 1.20.4 → 1.20.6
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 +43 -4
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -309,15 +309,54 @@ 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
|
-
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
}
|
|
320
|
+
/** Links to chargeUpdateFields in the API */
|
|
321
|
+
type chargeUpdateFields = {
|
|
322
|
+
orderUpdate?: Omit<OrderUpdate, 'id' | 'directUserProfileId' | 'partnerPharmacyProfileId' | 'patientRecordId' | 'paymentStatus' | 'paymentLinkToken' | 'paymentReferenceId'>;
|
|
323
|
+
patientRecordUpdate?: Pick<PatientRecordUpdate, 'addresses' | 'healthInfo'>;
|
|
324
|
+
};
|
|
325
|
+
/** Links to chargeOrderBodySchema 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
360
|
}
|
|
322
361
|
export interface PaperScriptReminder {
|
|
323
362
|
id: number;
|