@natch-the-storage/heathershaw-platform-types 1.21.4 → 1.22.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 +54 -4
- package/build/validators.js +4 -0
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -312,15 +312,61 @@ export interface OrderAddress {
|
|
|
312
312
|
address: Address;
|
|
313
313
|
deliveryInstructions?: string;
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
/** Mimics the cardFields in the API, this is what the card field names should look like on the frontend */
|
|
316
|
+
export interface PaymentCardDetails {
|
|
316
317
|
cardNumber: string;
|
|
317
318
|
cardHolder: string;
|
|
318
319
|
cardExpiry: string;
|
|
319
320
|
cvv: string;
|
|
320
321
|
customerIp?: string;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
322
|
+
}
|
|
323
|
+
/** Links to chargeUpdateFields in the API */
|
|
324
|
+
type chargeUpdateFields = {
|
|
325
|
+
orderUpdate?: Omit<OrderUpdate, 'id' | 'directUserProfileId' | 'partnerPharmacyProfileId' | 'patientRecordId' | 'paymentStatus' | 'paymentLinkToken' | 'paymentReferenceId'>;
|
|
326
|
+
patientRecordUpdate?: Pick<PatientRecordUpdate, 'addresses' | 'healthInfo'>;
|
|
327
|
+
};
|
|
328
|
+
/** Links to chargeOrderBodySchema in the API */
|
|
329
|
+
export type ScaSessionBodySchema = PaymentCardDetails;
|
|
330
|
+
/** Links to scaResultSchema in the API */
|
|
331
|
+
export type ScaResult = {
|
|
332
|
+
xid?: string | null;
|
|
333
|
+
cavv?: string | null;
|
|
334
|
+
par?: string | null;
|
|
335
|
+
ver?: string | null;
|
|
336
|
+
aav?: string | null;
|
|
337
|
+
ucaf?: string | null;
|
|
338
|
+
directoryServerTxnId?: string | null;
|
|
339
|
+
threedsVersion?: string | null;
|
|
340
|
+
};
|
|
341
|
+
export interface ChargeOrderLegacy {
|
|
342
|
+
cardNumber: string;
|
|
343
|
+
cardHolder: string;
|
|
344
|
+
cardExpiry: string;
|
|
345
|
+
cvv: string;
|
|
346
|
+
customerIp?: string;
|
|
347
|
+
}
|
|
348
|
+
/** Links to chargeOrderBodySchema in the API */
|
|
349
|
+
export type ChargeOrder = chargeUpdateFields & {
|
|
350
|
+
cardToken: string;
|
|
351
|
+
sca: ScaResult;
|
|
352
|
+
cardType?: string;
|
|
353
|
+
customerIp?: string;
|
|
354
|
+
};
|
|
355
|
+
/** Links to chargeOrderMotoBodySchema in the API */
|
|
356
|
+
export type ChargeOrderMotoBody = chargeUpdateFields & PaymentCardDetails;
|
|
357
|
+
/** Links to the openScaSession function in the API
|
|
358
|
+
* Is the shape of the response
|
|
359
|
+
*/
|
|
360
|
+
export interface ScaSessionResponse {
|
|
361
|
+
accessToken: string;
|
|
362
|
+
verification: string;
|
|
363
|
+
cardToken: string;
|
|
364
|
+
cardType?: string;
|
|
365
|
+
reference: string;
|
|
366
|
+
amount: number;
|
|
367
|
+
currency: string;
|
|
368
|
+
username: string;
|
|
369
|
+
environment: string;
|
|
324
370
|
}
|
|
325
371
|
export interface PaperScriptReminder {
|
|
326
372
|
id: number;
|
|
@@ -1163,6 +1209,7 @@ interface ListParams {
|
|
|
1163
1209
|
export declare const ApiRoutes: {
|
|
1164
1210
|
admin: {
|
|
1165
1211
|
getDashboardData: string;
|
|
1212
|
+
importPatientsCsv: string;
|
|
1166
1213
|
};
|
|
1167
1214
|
cart: {
|
|
1168
1215
|
getByDirectUser: (id: number) => string;
|
|
@@ -1223,6 +1270,9 @@ export declare const ApiRoutes: {
|
|
|
1223
1270
|
getByPaymentLinkToken: (token: string) => string;
|
|
1224
1271
|
chargePaymentLink: (token: string) => string;
|
|
1225
1272
|
chargeOrder: (id: string) => string;
|
|
1273
|
+
paymentLinkScaSession: (token: string) => string;
|
|
1274
|
+
internalScaSession: (id: number) => string;
|
|
1275
|
+
adminMoto: (id: number) => string;
|
|
1226
1276
|
};
|
|
1227
1277
|
paperScriptReminders: {
|
|
1228
1278
|
list: string;
|
package/build/validators.js
CHANGED
|
@@ -449,6 +449,7 @@ function handleParams(filters) {
|
|
|
449
449
|
export const ApiRoutes = {
|
|
450
450
|
admin: {
|
|
451
451
|
getDashboardData: '/api/admin/dashboard-data',
|
|
452
|
+
importPatientsCsv: '/api/admin/import-patients',
|
|
452
453
|
},
|
|
453
454
|
cart: {
|
|
454
455
|
getByDirectUser: (id) => `/api/carts/direct-users/${id}`,
|
|
@@ -504,6 +505,9 @@ export const ApiRoutes = {
|
|
|
504
505
|
getByPaymentLinkToken: (token) => `/api/orders/payment-links/${token}`,
|
|
505
506
|
chargePaymentLink: (token) => `/api/orders/payment-links/${token}/charge`,
|
|
506
507
|
chargeOrder: (id) => `/api/orders/${id}/charge`,
|
|
508
|
+
paymentLinkScaSession: (token) => `/api/orders/payment-links/${token}/sca-session`,
|
|
509
|
+
internalScaSession: (id) => `/api/orders/${id}/sca-session`,
|
|
510
|
+
adminMoto: (id) => `/api/orders/${id}/charge/moto`,
|
|
507
511
|
},
|
|
508
512
|
paperScriptReminders: {
|
|
509
513
|
list: '/api/paper-script-reminders',
|