@getopenpay/openpay-js 0.5.2 → 0.5.4-alpha.745f12a

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.
@@ -1,4 +1,4 @@
1
- import { R as Le } from "./index-BVbeGNGK.js";
1
+ import { R as Le } from "./index-mGG-qR9i.js";
2
2
  function Et(e) {
3
3
  return e === void 0 && (e = {}), typeof e.addEventListener == "function" && typeof e.removeEventListener == "function";
4
4
  }
package/dist/index.d.ts CHANGED
@@ -5,6 +5,34 @@ import { PaymentRequest as PaymentRequest_2 } from '@stripe/stripe-js';
5
5
  import { Subject } from 'rxjs';
6
6
  import { z } from 'zod';
7
7
 
8
+ declare type AirwallexACHFlowParams = {
9
+ verificationMethod?: 'plaid' /*| 'micro_deposit'*/;
10
+ defaultFieldValues?: DefaultFieldValues;
11
+ isBusinessAccount?: boolean;
12
+ };
13
+
14
+ declare type AirwallexBACSFlowParams = {
15
+ verificationMethod?: 'truelayer' /*| 'micro_deposit'*/;
16
+ defaultFieldValues?: DefaultFieldValues;
17
+ // sortCode?: string;
18
+ // accountNumber?: string;
19
+ };
20
+
21
+ declare type AirwallexEFTFlowParams = {
22
+ verificationMethod?: 'plaid' /*| 'micro_deposit'*/;
23
+ defaultFieldValues?: DefaultFieldValues;
24
+ isBusinessAccount?: boolean;
25
+ // institutionNumber?: string;
26
+ // transitNumber?: string;
27
+ // accountNumber?: string;
28
+ };
29
+
30
+ declare type AirwallexSEPAFlowParams = {
31
+ verificationMethod?: 'truelayer' /*| 'micro_deposit'*/;
32
+ defaultFieldValues?: DefaultFieldValues;
33
+ // iban?: string;
34
+ };
35
+
8
36
  declare type AllCallbacks = {
9
37
  onFocus?: (elementId: string, field: AllFieldNames) => void;
10
38
  onBlur?: (
@@ -550,13 +578,8 @@ declare interface LoopConnectConfig {
550
578
  declare type LoopCryptoFlowCustomParams =
551
579
  | {
552
580
  customer: Omit<CustomerResponse, 'paymentMethods' | 'merchants' | 'dateCreated'>;
553
- payin: PayInCompleteEvent;
554
- mode: 'checkout';
555
- success: true;
556
- }
557
- | {
558
- customer: Omit<CustomerResponse, 'paymentMethods' | 'merchants' | 'dateCreated'>;
559
- mode: 'setup';
581
+ paymentMethod: Omit<PaymentMethodResponse, 'customer' | 'dateCreated'>;
582
+ mode: 'setup' | 'payment' | 'subscription';
560
583
  success: true;
561
584
  }
562
585
  | {
@@ -705,6 +728,26 @@ declare const OjsFlows = {
705
728
  run: runAirwallexApplePayFlow,
706
729
  },
707
730
 
731
+ airwallexACH: {
732
+ init: async () => {},
733
+ run: runAirwallexACHFlow,
734
+ },
735
+
736
+ airwallexEFT: {
737
+ init: async () => {},
738
+ run: runAirwallexEFTFlow,
739
+ },
740
+
741
+ airwallexBACS: {
742
+ init: async () => {},
743
+ run: runAirwallexBACSFlow,
744
+ },
745
+
746
+ airwallexSEPA: {
747
+ init: async () => {},
748
+ run: runAirwallexSEPAFlow,
749
+ },
750
+
708
751
  // Loop
709
752
  loopCrypto: {
710
753
  init: initLoopFlow,
@@ -875,11 +918,6 @@ export declare class OpenPayForm {
875
918
  updateCallbacks: (newCallbacks: AllCallbacks) => void;
876
919
  }
877
920
 
878
- /**
879
- * @deprecated Use interface PayInCreatedEvent for data returned from the creation of a PayIn
880
- */
881
- declare interface PayInCompleteEvent extends PayinResponse {}
882
-
883
921
  declare enum PayInFailed {
884
922
  // Create payment method
885
923
  METHOD_CREATION_FAILED = 'methodCreationFailed',
@@ -903,109 +941,6 @@ declare interface PayInFailedEvent {
903
941
  data: PayInFailedData;
904
942
  }
905
943
 
906
- declare interface PayinPaymentMethodResponse
907
- extends Omit<PaymentMethodResponse, 'merchantId' | 'entityId' | 'dateCreated'> {
908
- /**
909
- * The status of the payment method
910
- */
911
- status: 'ok' | 'insufficient_balance' | 'insufficient_authorization' | 'insufficient_balance_authorization';
912
- }
913
-
914
- declare interface PayinPayoutDestinationResponse
915
- extends Omit<PayoutDestinationResponse, 'merchantId' | 'entityId' | 'isDefault' | 'dateCreated'> {}
916
-
917
- declare interface PayinResponse {
918
- /**
919
- * The unique identifier for the payin
920
- * @example "8f47c6e9-2b3a-4d5c-9f8e-1a2b3c4d5e6f"
921
- */
922
- payinId: string;
923
- /**
924
- * The unique identifier of the merchant this payin is associated with
925
- * @example "67e55044-10b1-426f-9247-bb680e5fe0c8"
926
- */
927
- merchantId: string;
928
- /**
929
- * The amount to be paid, specified in either fiat or crypto based on amountType
930
- * @example "100.00"
931
- */
932
- amount: string;
933
- /**
934
- * The type of the amount, either "fiat" or "token"
935
- * @example "fiat"
936
- */
937
- amountType: 'fiat' | 'token';
938
- /**
939
- * The date the payment will take place, represented as a Unix timestamp
940
- * @example 1716211200
941
- */
942
- billDate: number;
943
- /**
944
- * The unique invoice identifier representing this payin transaction
945
- * @example "1234567890abcdef"
946
- */
947
- invoiceId: string;
948
- /**
949
- * (Optional) A description or note that provides additional context about this payin. This can be used to help identify or provide details about the payment for internal reference or customer communications.
950
- * @example "Payment for Developer plan"
951
- */
952
- description: string | null;
953
- /**
954
- * (Optional) The external invoice ID used to tie this payin to an invoice in an external system
955
- * @example "1234567890abcdef"
956
- */
957
- externalInvoiceRef: string | null;
958
- /**
959
- * The type of the payin, either "subscription" or "invoice"
960
- * @example "subscription"
961
- */
962
- payinType: 'subscription' | 'invoice';
963
- /**
964
- * The status of the payin, can be "scheduled", "pending", "completed", or "failed"
965
- * @example "scheduled"
966
- */
967
- payinStatus: 'scheduled' | 'pending' | 'completed' | 'failed' | 'canceled' | 'uncollectible' | 'draft';
968
- /**
969
- * The transaction details for the payin
970
- */
971
- transaction: PayinTransactionResponse | null;
972
- /**
973
- * The payment method used for this payin
974
- */
975
- paymentMethod: PayinPaymentMethodResponse;
976
- /**
977
- * The payout destination used for this payin
978
- */
979
- payoutDestination: PayinPayoutDestinationResponse;
980
- /**
981
- * The date the payin record was created, represented as a Unix timestamp in seconds.
982
- * @example 1716211200
983
- */
984
- dateCreated: number;
985
- }
986
-
987
- declare interface PayinTransactionResponse {
988
- /**
989
- * The transaction id generated by the blockchain network when the transaction is processed
990
- * @example "0xcfdfbb523c079e47e9a17ba236fa978257d4331e96ec43997e974b97522047fe"
991
- */
992
- transactionId: string;
993
- /**
994
- * The URL to view this transaction in a blockchain explorer. The specific explorer URL depends on the blockchain network the transaction was processed on
995
- * @example "https://etherscan.io/tx/0xcfdfbb523c079e47e9a17ba236fa978257d4331e96ec43997e974b97522047fe"
996
- */
997
- transactionUrl: string;
998
- /**
999
- * The actual token amount that was transferred including all decimal places. For example - an amount of 1.99 USDC will result in a `amountTransferred` of "1990000"
1000
- * @example "1990000"
1001
- */
1002
- amountTransferred: string | null;
1003
- /**
1004
- * The exchange rate that was applied when the payment was processed on the blockchain
1005
- */
1006
- exchangeRate: PaymentMethodTokenExchangeRate | null;
1007
- }
1008
-
1009
944
  declare type PaymentDataRequest = google.payments.api.PaymentDataRequest;
1010
945
 
1011
946
  declare interface PaymentMethodPreAuthorization {
@@ -1119,39 +1054,6 @@ declare type PaymentRequestStatus = {
1119
1054
  startFlow: (params?: PaymentRequestStartParams) => Promise<void>;
1120
1055
  };
1121
1056
 
1122
- declare interface PayoutDestinationResponse {
1123
- /**
1124
- * The unique identifier for the payout destination
1125
- * @example "1234567890abcdef"
1126
- */
1127
- payoutDestinationId: string;
1128
- /**
1129
- * The merchant ID associated with this payout destination
1130
- * @example "1234567890abcdef"
1131
- */
1132
- merchantId: string;
1133
- /**
1134
- * The blockchain network ID the payout destination is associated with
1135
- * @example 1
1136
- */
1137
- networkId: number;
1138
- /**
1139
- * The blockchain wallet address where payments will be sent. Must be a valid address for the specified network.
1140
- * @example "0x1234567890abcdef"
1141
- */
1142
- walletAddress: string;
1143
- /**
1144
- * Whether the payout destination is the default payout destination for the merchant.
1145
- * @example true
1146
- */
1147
- isDefault: boolean;
1148
- /**
1149
- * The date the payout destination record was created, represented as a Unix timestamp in seconds.
1150
- * @example 1716211200
1151
- */
1152
- dateCreated: number;
1153
- }
1154
-
1155
1057
  declare type PaypalFlowCustomParams = {
1156
1058
  isAnonymous?: boolean;
1157
1059
  useRedirectFlow?: boolean;
@@ -1171,6 +1073,11 @@ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMeth
1171
1073
  [SubmitMethods.authorizenetApplePay]: ApplePayFlowCustomParams;
1172
1074
  [SubmitMethods.adyenGooglePay]: GooglePayFlowCustomParams;
1173
1075
  [SubmitMethods.adyenApplePay]: ApplePayFlowCustomParams;
1076
+
1077
+ [SubmitMethods.airwallexACH]: AirwallexACHFlowParams;
1078
+ [SubmitMethods.airwallexEFT]: AirwallexEFTFlowParams;
1079
+ [SubmitMethods.airwallexBACS]: AirwallexBACSFlowParams;
1080
+ [SubmitMethods.airwallexSEPA]: AirwallexSEPAFlowParams;
1174
1081
  }[T];
1175
1082
 
1176
1083
  declare type PRStatuses = Record<PaymentRequestProvider, PaymentRequestStatus>;
@@ -1226,6 +1133,12 @@ export declare enum SubmitMethods {
1226
1133
  * @deprecated Use applePay instead
1227
1134
  */
1228
1135
  adyenApplePay = 'adyen-apple-pay',
1136
+
1137
+ // DD
1138
+ airwallexACH = 'airwallex-ach',
1139
+ airwallexEFT = 'airwallex-eft',
1140
+ airwallexBACS = 'airwallex-bacs',
1141
+ airwallexSEPA = 'airwallex-sepa',
1229
1142
  }
1230
1143
 
1231
1144
  export declare type SubmitSettings<T extends SubmitMethod = SubmitMethod> = ProcessorSpecificSubmitSettings<T> &
package/dist/index.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import { F as e, O as i, l as p } from "./index-BVbeGNGK.js";
1
+ import { F as e, O as i, l as p } from "./index-mGG-qR9i.js";
2
2
  import "penpal";
3
- import "zod";
4
3
  import "uuid";
4
+ import "zod";
5
5
  export {
6
6
  e as FieldName,
7
7
  i as OpenPayForm,
8
8
  p as SubmitMethods
9
9
  };
10
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaW5kZXguZXMuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImV4cG9ydCB7IEYgYXMgRmllbGROYW1lLCBPIGFzIE9wZW5QYXlGb3JtLCBsIGFzIFN1Ym1pdE1ldGhvZHMgfSBmcm9tICcuL2luZGV4LSF+ezAwNX1+LmpzJztcbmltcG9ydCAncGVucGFsJztcbmltcG9ydCAnem9kJztcbmltcG9ydCAndXVpZCc7Il0sCiAgIm1hcHBpbmdzIjogIkFBQUEsU0FBYyxLQUFMQSxHQUFxQixLQUFMQyxHQUF1QixLQUFMQyxTQUEwQjtBQUNyRSxPQUFPO0FBQ1AsT0FBTztBQUNQLE9BQU87IiwKICAibmFtZXMiOiBbIkYiLCAiTyIsICJsIl0KfQo=
10
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaW5kZXguZXMuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImV4cG9ydCB7IEYgYXMgRmllbGROYW1lLCBPIGFzIE9wZW5QYXlGb3JtLCBsIGFzIFN1Ym1pdE1ldGhvZHMgfSBmcm9tICcuL2luZGV4LSF+ezAwNX1+LmpzJztcbmltcG9ydCAncGVucGFsJztcbmltcG9ydCAndXVpZCc7XG5pbXBvcnQgJ3pvZCc7Il0sCiAgIm1hcHBpbmdzIjogIkFBQUEsU0FBYyxLQUFMQSxHQUFxQixLQUFMQyxHQUF1QixLQUFMQyxTQUEwQjtBQUNyRSxPQUFPO0FBQ1AsT0FBTztBQUNQLE9BQU87IiwKICAibmFtZXMiOiBbIkYiLCAiTyIsICJsIl0KfQo=