diff --git a/public/hyperswitch/wasm/euclid.d.ts b/public/hyperswitch/wasm/euclid.d.ts index 7ac33a8363..012b1461b0 100644 --- a/public/hyperswitch/wasm/euclid.d.ts +++ b/public/hyperswitch/wasm/euclid.d.ts @@ -6,12 +6,32 @@ * to all different currencies present. */ export function setForexData(forex: any): any; +export function getPayoutVariantValues(key: string): any; /** * This function can be used to perform currency_conversion on the input amount, from_currency, * to_currency which are all expected to be one of currencies we already have in our Currency * enum. */ export function convertCurrency(amount: bigint, from_currency: any, to_currency: any): any; +/** + * This function allows the frontend to get all the merchant's configured + * connectors that are valid for a rule based on the conditions specified in + * the rule + */ +export function getValidConnectorsForRule(rule: any): any; +export function getThreeDsDecisionRuleKeys(): any; +export function getTaxProcessorConfig(key: string): any; +export function getAuthenticationConnectorConfig(key: string): any; +export function getAllConnectors(): any; +export function getPayoutConnectorConfig(key: string): any; +export function getAllKeys(): any; +export function getValidWebhookStatus(key: string): any; +export function getResponsePayload(input: any): any; +export function getBillingConnectorConfig(key: string): any; +export function getDescriptionCategory(): any; +export function getPayoutDescriptionCategory(): any; +export function getVariantValues(key: string): any; +export function parseToString(val: string): string; /** * This function can be used by the frontend to get all the two letter country codes * along with their country names. @@ -22,42 +42,24 @@ export function getTwoLetterCountryCode(): any; * along with their names. */ export function getMerchantCategoryCodeWithName(): any; +export function getConnectorConfig(key: string): any; +export function runProgram(program: any, input: any): any; +export function analyzeProgram(js_program: any): any; +export function getPMAuthenticationProcessorConfig(key: string): any; +export function getKeyType(key: string): string; +export function getAllPayoutKeys(): any; +export function getRequestPayload(input: any, response: any): any; +export function getCardTypeValues(): any; /** * This function can be used by the frontend to provide the WASM with information about * all the merchant's connector accounts. The input argument is a vector of all the merchant's * connector accounts from the API. */ export function seedKnowledgeGraph(mcas: any): any; -/** - * This function allows the frontend to get all the merchant's configured - * connectors that are valid for a rule based on the conditions specified in - * the rule - */ -export function getValidConnectorsForRule(rule: any): any; -export function analyzeProgram(js_program: any): any; -export function runProgram(program: any, input: any): any; -export function getAllConnectors(): any; -export function getAllKeys(): any; -export function getKeyType(key: string): string; +export function getCardSubtypeValues(): any; +export function addTwo(n1: bigint, n2: bigint): bigint; export function getThreeDsKeys(): any; export function getSurchargeKeys(): any; -export function getThreeDsDecisionRuleKeys(): any; -export function parseToString(val: string): string; -export function getVariantValues(key: string): any; -export function addTwo(n1: bigint, n2: bigint): bigint; -export function getDescriptionCategory(): any; -export function getConnectorConfig(key: string): any; -export function getBillingConnectorConfig(key: string): any; -export function getPayoutConnectorConfig(key: string): any; -export function getAuthenticationConnectorConfig(key: string): any; -export function getTaxProcessorConfig(key: string): any; -export function getPMAuthenticationProcessorConfig(key: string): any; -export function getRequestPayload(input: any, response: any): any; -export function getResponsePayload(input: any): any; -export function getAllPayoutKeys(): any; -export function getPayoutVariantValues(key: string): any; -export function getPayoutDescriptionCategory(): any; -export function getValidWebhookStatus(key: string): any; /** * * Function exposed as `wasm` function in js `parse`. Allowing use to extend the functionality and @@ -69,38 +71,97 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl export interface InitOutput { readonly memory: WebAssembly.Memory; - readonly setForexData: (a: number, b: number) => void; - readonly convertCurrency: (a: number, b: bigint, c: number, d: number) => void; - readonly getTwoLetterCountryCode: (a: number) => void; - readonly getMerchantCategoryCodeWithName: (a: number) => void; - readonly seedKnowledgeGraph: (a: number, b: number) => void; - readonly getValidConnectorsForRule: (a: number, b: number) => void; + readonly addTwo: (a: bigint, b: bigint) => bigint; readonly analyzeProgram: (a: number, b: number) => void; - readonly runProgram: (a: number, b: number, c: number) => void; + readonly convertCurrency: (a: number, b: bigint, c: number, d: number) => void; readonly getAllConnectors: (a: number) => void; readonly getAllKeys: (a: number) => void; - readonly getKeyType: (a: number, b: number, c: number) => void; - readonly getThreeDsKeys: (a: number) => void; - readonly getSurchargeKeys: (a: number) => void; - readonly getThreeDsDecisionRuleKeys: (a: number) => void; - readonly parseToString: (a: number, b: number, c: number) => void; - readonly getVariantValues: (a: number, b: number, c: number) => void; - readonly addTwo: (a: bigint, b: bigint) => bigint; - readonly getDescriptionCategory: (a: number) => void; - readonly getConnectorConfig: (a: number, b: number, c: number) => void; - readonly getBillingConnectorConfig: (a: number, b: number, c: number) => void; - readonly getPayoutConnectorConfig: (a: number, b: number, c: number) => void; + readonly getAllPayoutKeys: (a: number) => void; readonly getAuthenticationConnectorConfig: (a: number, b: number, c: number) => void; - readonly getTaxProcessorConfig: (a: number, b: number, c: number) => void; + readonly getBillingConnectorConfig: (a: number, b: number, c: number) => void; + readonly getCardSubtypeValues: (a: number) => void; + readonly getCardTypeValues: (a: number) => void; + readonly getConnectorConfig: (a: number, b: number, c: number) => void; + readonly getDescriptionCategory: (a: number) => void; + readonly getKeyType: (a: number, b: number, c: number) => void; + readonly getMerchantCategoryCodeWithName: (a: number) => void; readonly getPMAuthenticationProcessorConfig: (a: number, b: number, c: number) => void; + readonly getPayoutConnectorConfig: (a: number, b: number, c: number) => void; + readonly getPayoutDescriptionCategory: (a: number) => void; + readonly getPayoutVariantValues: (a: number, b: number, c: number) => void; readonly getRequestPayload: (a: number, b: number, c: number) => void; readonly getResponsePayload: (a: number, b: number) => void; - readonly getAllPayoutKeys: (a: number) => void; - readonly getPayoutVariantValues: (a: number, b: number, c: number) => void; - readonly getPayoutDescriptionCategory: (a: number) => void; + readonly getSurchargeKeys: (a: number) => void; + readonly getTaxProcessorConfig: (a: number, b: number, c: number) => void; + readonly getThreeDsDecisionRuleKeys: (a: number) => void; + readonly getThreeDsKeys: (a: number) => void; + readonly getTwoLetterCountryCode: (a: number) => void; + readonly getValidConnectorsForRule: (a: number, b: number) => void; readonly getValidWebhookStatus: (a: number, b: number, c: number) => void; + readonly getVariantValues: (a: number, b: number, c: number) => void; + readonly runProgram: (a: number, b: number, c: number) => void; + readonly seedKnowledgeGraph: (a: number, b: number) => void; + readonly setForexData: (a: number, b: number) => void; readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void; readonly parse: (a: number, b: number, c: number) => void; + readonly ffi_superposition_types_rust_future_cancel_f32: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_complete_f32: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_complete_f64: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_complete_i16: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_complete_i32: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_complete_i64: (a: bigint, b: number) => bigint; + readonly ffi_superposition_types_rust_future_complete_i8: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_complete_rust_buffer: (a: number, b: bigint, c: number) => void; + readonly ffi_superposition_types_rust_future_complete_u16: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_complete_u8: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_complete_void: (a: bigint, b: number) => void; + readonly ffi_superposition_types_rust_future_free_f32: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_f32: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rustbuffer_alloc: (a: number, b: bigint, c: number) => void; + readonly ffi_superposition_types_rustbuffer_free: (a: number, b: number) => void; + readonly ffi_superposition_types_rustbuffer_from_bytes: (a: number, b: number, c: number) => void; + readonly ffi_superposition_types_rustbuffer_reserve: (a: number, b: number, c: bigint, d: number) => void; + readonly ffi_superposition_types_uniffi_contract_version: () => number; + readonly parseToString: (a: number, b: number, c: number) => void; + readonly ffi_superposition_types_rust_future_cancel_u32: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_i64: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_i16: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_void: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_u64: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_complete_u64: (a: bigint, b: number) => bigint; + readonly ffi_superposition_types_rust_future_cancel_i8: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_i32: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_complete_u32: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_cancel_u8: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_u16: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_pointer: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_complete_pointer: (a: bigint, b: number) => number; + readonly ffi_superposition_types_rust_future_cancel_f64: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_free_u32: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_u32: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_i64: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_i64: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_i16: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_i16: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_u64: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_u64: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_u8: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_u8: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_i32: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_i32: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_u16: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_u16: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_cancel_rust_buffer: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_free_rust_buffer: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_rust_buffer: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_pointer: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_pointer: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_void: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_void: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_f64: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_f64: (a: bigint, b: number, c: bigint) => void; + readonly ffi_superposition_types_rust_future_free_i8: (a: bigint) => void; + readonly ffi_superposition_types_rust_future_poll_i8: (a: bigint, b: number, c: bigint) => void; readonly __wbindgen_export_0: (a: number, b: number) => number; readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_export_2: (a: number) => void; diff --git a/public/hyperswitch/wasm/euclid.js b/public/hyperswitch/wasm/euclid.js index 2463c3f7c8..27ac02a7fc 100644 --- a/public/hyperswitch/wasm/euclid.js +++ b/public/hyperswitch/wasm/euclid.js @@ -211,6 +211,28 @@ export function setForexData(forex) { } } +/** + * @param {string} key + * @returns {any} + */ +export function getPayoutVariantValues(key) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.getPayoutVariantValues(retptr, ptr0, len0); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + /** * This function can be used to perform currency_conversion on the input amount, from_currency, * to_currency which are all expected to be one of currencies we already have in our Currency @@ -237,14 +259,16 @@ export function convertCurrency(amount, from_currency, to_currency) { } /** - * This function can be used by the frontend to get all the two letter country codes - * along with their country names. + * This function allows the frontend to get all the merchant's configured + * connectors that are valid for a rule based on the conditions specified in + * the rule + * @param {any} rule * @returns {any} */ -export function getTwoLetterCountryCode() { +export function getValidConnectorsForRule(rule) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getTwoLetterCountryCode(retptr); + wasm.getValidConnectorsForRule(retptr, addHeapObject(rule)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -258,14 +282,12 @@ export function getTwoLetterCountryCode() { } /** - * This function can be used by the frontend to get all the merchant category codes - * along with their names. * @returns {any} */ -export function getMerchantCategoryCodeWithName() { +export function getThreeDsDecisionRuleKeys() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getMerchantCategoryCodeWithName(retptr); + wasm.getThreeDsDecisionRuleKeys(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -279,16 +301,15 @@ export function getMerchantCategoryCodeWithName() { } /** - * This function can be used by the frontend to provide the WASM with information about - * all the merchant's connector accounts. The input argument is a vector of all the merchant's - * connector accounts from the API. - * @param {any} mcas + * @param {string} key * @returns {any} */ -export function seedKnowledgeGraph(mcas) { +export function getTaxProcessorConfig(key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.seedKnowledgeGraph(retptr, addHeapObject(mcas)); + const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.getTaxProcessorConfig(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -302,16 +323,15 @@ export function seedKnowledgeGraph(mcas) { } /** - * This function allows the frontend to get all the merchant's configured - * connectors that are valid for a rule based on the conditions specified in - * the rule - * @param {any} rule + * @param {string} key * @returns {any} */ -export function getValidConnectorsForRule(rule) { +export function getAuthenticationConnectorConfig(key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getValidConnectorsForRule(retptr, addHeapObject(rule)); + const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.getAuthenticationConnectorConfig(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -325,13 +345,12 @@ export function getValidConnectorsForRule(rule) { } /** - * @param {any} js_program * @returns {any} */ -export function analyzeProgram(js_program) { +export function getAllConnectors() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.analyzeProgram(retptr, addHeapObject(js_program)); + wasm.getAllConnectors(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -345,14 +364,15 @@ export function analyzeProgram(js_program) { } /** - * @param {any} program - * @param {any} input + * @param {string} key * @returns {any} */ -export function runProgram(program, input) { +export function getPayoutConnectorConfig(key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.runProgram(retptr, addHeapObject(program), addHeapObject(input)); + const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.getPayoutConnectorConfig(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -368,10 +388,10 @@ export function runProgram(program, input) { /** * @returns {any} */ -export function getAllConnectors() { +export function getAllKeys() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getAllConnectors(retptr); + wasm.getAllKeys(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -385,12 +405,35 @@ export function getAllConnectors() { } /** + * @param {string} key * @returns {any} */ -export function getAllKeys() { +export function getValidWebhookStatus(key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getAllKeys(retptr); + const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.getValidWebhookStatus(retptr, ptr0, len0); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +/** + * @param {any} input + * @returns {any} + */ +export function getResponsePayload(input) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.getResponsePayload(retptr, addHeapObject(input)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -405,42 +448,33 @@ export function getAllKeys() { /** * @param {string} key - * @returns {string} + * @returns {any} */ -export function getKeyType(key) { - let deferred3_0; - let deferred3_1; +export function getBillingConnectorConfig(key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); const len0 = WASM_VECTOR_LEN; - wasm.getKeyType(retptr, ptr0, len0); + wasm.getBillingConnectorConfig(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); - var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); - var ptr2 = r0; - var len2 = r1; - if (r3) { - ptr2 = 0; len2 = 0; - throw takeObject(r2); + if (r2) { + throw takeObject(r1); } - deferred3_0 = ptr2; - deferred3_1 = len2; - return getStringFromWasm0(ptr2, len2); + return takeObject(r0); } finally { wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_export_3(deferred3_0, deferred3_1, 1); } } /** * @returns {any} */ -export function getThreeDsKeys() { +export function getDescriptionCategory() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getThreeDsKeys(retptr); + wasm.getDescriptionCategory(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -456,10 +490,10 @@ export function getThreeDsKeys() { /** * @returns {any} */ -export function getSurchargeKeys() { +export function getPayoutDescriptionCategory() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getSurchargeKeys(retptr); + wasm.getPayoutDescriptionCategory(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -473,12 +507,15 @@ export function getSurchargeKeys() { } /** + * @param {string} key * @returns {any} */ -export function getThreeDsDecisionRuleKeys() { +export function getVariantValues(key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getThreeDsDecisionRuleKeys(retptr); + const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.getVariantValues(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -502,7 +539,7 @@ export function parseToString(val) { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); const ptr0 = passStringToWasm0(val, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); const len0 = WASM_VECTOR_LEN; - wasm.parseToString(retptr, ptr0, len0); + wasm.parse(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); deferred2_0 = r0; @@ -515,15 +552,14 @@ export function parseToString(val) { } /** - * @param {string} key + * This function can be used by the frontend to get all the two letter country codes + * along with their country names. * @returns {any} */ -export function getVariantValues(key) { +export function getTwoLetterCountryCode() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); - const len0 = WASM_VECTOR_LEN; - wasm.getVariantValues(retptr, ptr0, len0); + wasm.getTwoLetterCountryCode(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -537,22 +573,14 @@ export function getVariantValues(key) { } /** - * @param {bigint} n1 - * @param {bigint} n2 - * @returns {bigint} - */ -export function addTwo(n1, n2) { - const ret = wasm.addTwo(n1, n2); - return ret; -} - -/** + * This function can be used by the frontend to get all the merchant category codes + * along with their names. * @returns {any} */ -export function getDescriptionCategory() { +export function getMerchantCategoryCodeWithName() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getDescriptionCategory(retptr); + wasm.getMerchantCategoryCodeWithName(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -588,15 +616,14 @@ export function getConnectorConfig(key) { } /** - * @param {string} key + * @param {any} program + * @param {any} input * @returns {any} */ -export function getBillingConnectorConfig(key) { +export function runProgram(program, input) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); - const len0 = WASM_VECTOR_LEN; - wasm.getBillingConnectorConfig(retptr, ptr0, len0); + wasm.runProgram(retptr, addHeapObject(program), addHeapObject(input)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -610,15 +637,13 @@ export function getBillingConnectorConfig(key) { } /** - * @param {string} key + * @param {any} js_program * @returns {any} */ -export function getPayoutConnectorConfig(key) { +export function analyzeProgram(js_program) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); - const len0 = WASM_VECTOR_LEN; - wasm.getPayoutConnectorConfig(retptr, ptr0, len0); + wasm.analyzeProgram(retptr, addHeapObject(js_program)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -635,12 +660,12 @@ export function getPayoutConnectorConfig(key) { * @param {string} key * @returns {any} */ -export function getAuthenticationConnectorConfig(key) { +export function getPMAuthenticationProcessorConfig(key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); const len0 = WASM_VECTOR_LEN; - wasm.getAuthenticationConnectorConfig(retptr, ptr0, len0); + wasm.getPMAuthenticationProcessorConfig(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -655,36 +680,42 @@ export function getAuthenticationConnectorConfig(key) { /** * @param {string} key - * @returns {any} + * @returns {string} */ -export function getTaxProcessorConfig(key) { +export function getKeyType(key) { + let deferred3_0; + let deferred3_1; try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); const len0 = WASM_VECTOR_LEN; - wasm.getTaxProcessorConfig(retptr, ptr0, len0); + wasm.getKeyType(retptr, ptr0, len0); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); - if (r2) { - throw takeObject(r1); + var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); + var ptr2 = r0; + var len2 = r1; + if (r3) { + ptr2 = 0; len2 = 0; + throw takeObject(r2); } - return takeObject(r0); + deferred3_0 = ptr2; + deferred3_1 = len2; + return getStringFromWasm0(ptr2, len2); } finally { wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_export_3(deferred3_0, deferred3_1, 1); } } /** - * @param {string} key * @returns {any} */ -export function getPMAuthenticationProcessorConfig(key) { +export function getAllPayoutKeys() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); - const len0 = WASM_VECTOR_LEN; - wasm.getPMAuthenticationProcessorConfig(retptr, ptr0, len0); + wasm.getAllPayoutKeys(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -719,13 +750,12 @@ export function getRequestPayload(input, response) { } /** - * @param {any} input * @returns {any} */ -export function getResponsePayload(input) { +export function getCardTypeValues() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getResponsePayload(retptr, addHeapObject(input)); + wasm.getCardTypeValues(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -739,12 +769,16 @@ export function getResponsePayload(input) { } /** + * This function can be used by the frontend to provide the WASM with information about + * all the merchant's connector accounts. The input argument is a vector of all the merchant's + * connector accounts from the API. + * @param {any} mcas * @returns {any} */ -export function getAllPayoutKeys() { +export function seedKnowledgeGraph(mcas) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getAllPayoutKeys(retptr); + wasm.seedKnowledgeGraph(retptr, addHeapObject(mcas)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -758,15 +792,12 @@ export function getAllPayoutKeys() { } /** - * @param {string} key * @returns {any} */ -export function getPayoutVariantValues(key) { +export function getCardSubtypeValues() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); - const len0 = WASM_VECTOR_LEN; - wasm.getPayoutVariantValues(retptr, ptr0, len0); + wasm.getCardSubtypeValues(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -779,13 +810,23 @@ export function getPayoutVariantValues(key) { } } +/** + * @param {bigint} n1 + * @param {bigint} n2 + * @returns {bigint} + */ +export function addTwo(n1, n2) { + const ret = wasm.addTwo(n1, n2); + return ret; +} + /** * @returns {any} */ -export function getPayoutDescriptionCategory() { +export function getThreeDsKeys() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.getPayoutDescriptionCategory(retptr); + wasm.getThreeDsKeys(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); @@ -799,15 +840,12 @@ export function getPayoutDescriptionCategory() { } /** - * @param {string} key * @returns {any} */ -export function getValidWebhookStatus(key) { +export function getSurchargeKeys() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); - const len0 = WASM_VECTOR_LEN; - wasm.getValidWebhookStatus(retptr, ptr0, len0); + wasm.getSurchargeKeys(retptr); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); diff --git a/public/hyperswitch/wasm/euclid_bg.wasm b/public/hyperswitch/wasm/euclid_bg.wasm index 8ed44a85f5..2ac3313a3c 100644 Binary files a/public/hyperswitch/wasm/euclid_bg.wasm and b/public/hyperswitch/wasm/euclid_bg.wasm differ diff --git a/public/hyperswitch/wasm/euclid_bg.wasm.d.ts b/public/hyperswitch/wasm/euclid_bg.wasm.d.ts index 380c6bb1bc..d05c6c3f57 100644 --- a/public/hyperswitch/wasm/euclid_bg.wasm.d.ts +++ b/public/hyperswitch/wasm/euclid_bg.wasm.d.ts @@ -1,38 +1,97 @@ /* tslint:disable */ /* eslint-disable */ export const memory: WebAssembly.Memory; -export const setForexData: (a: number, b: number) => void; -export const convertCurrency: (a: number, b: bigint, c: number, d: number) => void; -export const getTwoLetterCountryCode: (a: number) => void; -export const getMerchantCategoryCodeWithName: (a: number) => void; -export const seedKnowledgeGraph: (a: number, b: number) => void; -export const getValidConnectorsForRule: (a: number, b: number) => void; +export const addTwo: (a: bigint, b: bigint) => bigint; export const analyzeProgram: (a: number, b: number) => void; -export const runProgram: (a: number, b: number, c: number) => void; +export const convertCurrency: (a: number, b: bigint, c: number, d: number) => void; export const getAllConnectors: (a: number) => void; export const getAllKeys: (a: number) => void; -export const getKeyType: (a: number, b: number, c: number) => void; -export const getThreeDsKeys: (a: number) => void; -export const getSurchargeKeys: (a: number) => void; -export const getThreeDsDecisionRuleKeys: (a: number) => void; -export const parseToString: (a: number, b: number, c: number) => void; -export const getVariantValues: (a: number, b: number, c: number) => void; -export const addTwo: (a: bigint, b: bigint) => bigint; -export const getDescriptionCategory: (a: number) => void; -export const getConnectorConfig: (a: number, b: number, c: number) => void; -export const getBillingConnectorConfig: (a: number, b: number, c: number) => void; -export const getPayoutConnectorConfig: (a: number, b: number, c: number) => void; +export const getAllPayoutKeys: (a: number) => void; export const getAuthenticationConnectorConfig: (a: number, b: number, c: number) => void; -export const getTaxProcessorConfig: (a: number, b: number, c: number) => void; +export const getBillingConnectorConfig: (a: number, b: number, c: number) => void; +export const getCardSubtypeValues: (a: number) => void; +export const getCardTypeValues: (a: number) => void; +export const getConnectorConfig: (a: number, b: number, c: number) => void; +export const getDescriptionCategory: (a: number) => void; +export const getKeyType: (a: number, b: number, c: number) => void; +export const getMerchantCategoryCodeWithName: (a: number) => void; export const getPMAuthenticationProcessorConfig: (a: number, b: number, c: number) => void; +export const getPayoutConnectorConfig: (a: number, b: number, c: number) => void; +export const getPayoutDescriptionCategory: (a: number) => void; +export const getPayoutVariantValues: (a: number, b: number, c: number) => void; export const getRequestPayload: (a: number, b: number, c: number) => void; export const getResponsePayload: (a: number, b: number) => void; -export const getAllPayoutKeys: (a: number) => void; -export const getPayoutVariantValues: (a: number, b: number, c: number) => void; -export const getPayoutDescriptionCategory: (a: number) => void; +export const getSurchargeKeys: (a: number) => void; +export const getTaxProcessorConfig: (a: number, b: number, c: number) => void; +export const getThreeDsDecisionRuleKeys: (a: number) => void; +export const getThreeDsKeys: (a: number) => void; +export const getTwoLetterCountryCode: (a: number) => void; +export const getValidConnectorsForRule: (a: number, b: number) => void; export const getValidWebhookStatus: (a: number, b: number, c: number) => void; +export const getVariantValues: (a: number, b: number, c: number) => void; +export const runProgram: (a: number, b: number, c: number) => void; +export const seedKnowledgeGraph: (a: number, b: number) => void; +export const setForexData: (a: number, b: number) => void; export const ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void; export const parse: (a: number, b: number, c: number) => void; +export const ffi_superposition_types_rust_future_cancel_f32: (a: bigint) => void; +export const ffi_superposition_types_rust_future_complete_f32: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_complete_f64: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_complete_i16: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_complete_i32: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_complete_i64: (a: bigint, b: number) => bigint; +export const ffi_superposition_types_rust_future_complete_i8: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_complete_rust_buffer: (a: number, b: bigint, c: number) => void; +export const ffi_superposition_types_rust_future_complete_u16: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_complete_u8: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_complete_void: (a: bigint, b: number) => void; +export const ffi_superposition_types_rust_future_free_f32: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_f32: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rustbuffer_alloc: (a: number, b: bigint, c: number) => void; +export const ffi_superposition_types_rustbuffer_free: (a: number, b: number) => void; +export const ffi_superposition_types_rustbuffer_from_bytes: (a: number, b: number, c: number) => void; +export const ffi_superposition_types_rustbuffer_reserve: (a: number, b: number, c: bigint, d: number) => void; +export const ffi_superposition_types_uniffi_contract_version: () => number; +export const parseToString: (a: number, b: number, c: number) => void; +export const ffi_superposition_types_rust_future_cancel_u32: (a: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_i64: (a: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_i16: (a: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_void: (a: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_u64: (a: bigint) => void; +export const ffi_superposition_types_rust_future_complete_u64: (a: bigint, b: number) => bigint; +export const ffi_superposition_types_rust_future_cancel_i8: (a: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_i32: (a: bigint) => void; +export const ffi_superposition_types_rust_future_complete_u32: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_cancel_u8: (a: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_u16: (a: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_pointer: (a: bigint) => void; +export const ffi_superposition_types_rust_future_complete_pointer: (a: bigint, b: number) => number; +export const ffi_superposition_types_rust_future_cancel_f64: (a: bigint) => void; +export const ffi_superposition_types_rust_future_free_u32: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_u32: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_i64: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_i64: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_i16: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_i16: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_u64: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_u64: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_u8: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_u8: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_i32: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_i32: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_u16: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_u16: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_cancel_rust_buffer: (a: bigint) => void; +export const ffi_superposition_types_rust_future_free_rust_buffer: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_rust_buffer: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_pointer: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_pointer: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_void: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_void: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_f64: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_f64: (a: bigint, b: number, c: bigint) => void; +export const ffi_superposition_types_rust_future_free_i8: (a: bigint) => void; +export const ffi_superposition_types_rust_future_poll_i8: (a: bigint, b: number, c: bigint) => void; export const __wbindgen_export_0: (a: number, b: number) => number; export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number; export const __wbindgen_export_2: (a: number) => void;