@natch-the-storage/heathershaw-platform-types 1.20.4 → 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.
@@ -309,16 +309,41 @@ export interface OrderAddress {
309
309
  address: Address;
310
310
  deliveryInstructions?: string;
311
311
  }
312
- export interface ChargeOrder {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.20.4",
3
+ "version": "1.20.5",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",