@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.
@@ -309,15 +309,54 @@ 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;
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;
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.6",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",