@natch-the-storage/heathershaw-platform-types 1.22.0 → 1.22.1
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 +24 -0
- package/build/validators.js +6 -0
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -327,6 +327,24 @@ type chargeUpdateFields = {
|
|
|
327
327
|
};
|
|
328
328
|
/** Links to chargeOrderBodySchema in the API */
|
|
329
329
|
export type ScaSessionBodySchema = PaymentCardDetails;
|
|
330
|
+
/** Used for new ScaSession API endpoint, is the expected request body */
|
|
331
|
+
export type ScaSessionBody = {
|
|
332
|
+
amount: number;
|
|
333
|
+
patientRecordId: number;
|
|
334
|
+
cardNumber: string;
|
|
335
|
+
cardHolder: string;
|
|
336
|
+
cardExpiry: string;
|
|
337
|
+
cvv: string;
|
|
338
|
+
customerIp?: string;
|
|
339
|
+
};
|
|
340
|
+
/** Used for ChargeAndCreateOrder endpoint, for new payment flow */
|
|
341
|
+
export type ChargeAndCreateOrderBody = {
|
|
342
|
+
order: OrderCreate;
|
|
343
|
+
cardToken: string;
|
|
344
|
+
sca: ScaResult;
|
|
345
|
+
cardType?: string;
|
|
346
|
+
customerIp?: string;
|
|
347
|
+
};
|
|
330
348
|
/** Links to scaResultSchema in the API */
|
|
331
349
|
export type ScaResult = {
|
|
332
350
|
xid?: string | null;
|
|
@@ -1269,10 +1287,16 @@ export declare const ApiRoutes: {
|
|
|
1269
1287
|
createPaymentLinkToken: string;
|
|
1270
1288
|
getByPaymentLinkToken: (token: string) => string;
|
|
1271
1289
|
chargePaymentLink: (token: string) => string;
|
|
1290
|
+
/** Old chargeOrder flow */
|
|
1272
1291
|
chargeOrder: (id: string) => string;
|
|
1273
1292
|
paymentLinkScaSession: (token: string) => string;
|
|
1293
|
+
/** DEPRECATED Sca Session route for old payment flow */
|
|
1274
1294
|
internalScaSession: (id: number) => string;
|
|
1275
1295
|
adminMoto: (id: number) => string;
|
|
1296
|
+
/** New Sca Session route for updated payment flow */
|
|
1297
|
+
scaSession: string;
|
|
1298
|
+
/** New charge and create route for updated payment flow */
|
|
1299
|
+
chargeAndCreateOrder: string;
|
|
1276
1300
|
};
|
|
1277
1301
|
paperScriptReminders: {
|
|
1278
1302
|
list: string;
|
package/build/validators.js
CHANGED
|
@@ -504,10 +504,16 @@ export const ApiRoutes = {
|
|
|
504
504
|
createPaymentLinkToken: '/api/orders/payment-links',
|
|
505
505
|
getByPaymentLinkToken: (token) => `/api/orders/payment-links/${token}`,
|
|
506
506
|
chargePaymentLink: (token) => `/api/orders/payment-links/${token}/charge`,
|
|
507
|
+
/** Old chargeOrder flow */
|
|
507
508
|
chargeOrder: (id) => `/api/orders/${id}/charge`,
|
|
508
509
|
paymentLinkScaSession: (token) => `/api/orders/payment-links/${token}/sca-session`,
|
|
510
|
+
/** DEPRECATED Sca Session route for old payment flow */
|
|
509
511
|
internalScaSession: (id) => `/api/orders/${id}/sca-session`,
|
|
510
512
|
adminMoto: (id) => `/api/orders/${id}/charge/moto`,
|
|
513
|
+
/** New Sca Session route for updated payment flow */
|
|
514
|
+
scaSession: `/api/orders/sca-session`,
|
|
515
|
+
/** New charge and create route for updated payment flow */
|
|
516
|
+
chargeAndCreateOrder: `/api/orders/charge-and-create`,
|
|
511
517
|
},
|
|
512
518
|
paperScriptReminders: {
|
|
513
519
|
list: '/api/paper-script-reminders',
|