flowrakis-taler 0.19.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +6 -0
  3. package/docs/jsdoc/flowrakis_taler.js.html +355 -0
  4. package/docs/jsdoc/fonts/OpenSans-Bold-webfont.eot +0 -0
  5. package/docs/jsdoc/fonts/OpenSans-Bold-webfont.svg +1830 -0
  6. package/docs/jsdoc/fonts/OpenSans-Bold-webfont.woff +0 -0
  7. package/docs/jsdoc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  8. package/docs/jsdoc/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  9. package/docs/jsdoc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  10. package/docs/jsdoc/fonts/OpenSans-Italic-webfont.eot +0 -0
  11. package/docs/jsdoc/fonts/OpenSans-Italic-webfont.svg +1830 -0
  12. package/docs/jsdoc/fonts/OpenSans-Italic-webfont.woff +0 -0
  13. package/docs/jsdoc/fonts/OpenSans-Light-webfont.eot +0 -0
  14. package/docs/jsdoc/fonts/OpenSans-Light-webfont.svg +1831 -0
  15. package/docs/jsdoc/fonts/OpenSans-Light-webfont.woff +0 -0
  16. package/docs/jsdoc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  17. package/docs/jsdoc/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  18. package/docs/jsdoc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  19. package/docs/jsdoc/fonts/OpenSans-Regular-webfont.eot +0 -0
  20. package/docs/jsdoc/fonts/OpenSans-Regular-webfont.svg +1831 -0
  21. package/docs/jsdoc/fonts/OpenSans-Regular-webfont.woff +0 -0
  22. package/docs/jsdoc/generic-api_admin_taler_merchant_index.js.html +86 -0
  23. package/docs/jsdoc/generic-api_flowrakis_order_flowrakisOrder.get.js.html +117 -0
  24. package/docs/jsdoc/generic-api_flowrakis_order_flowrakisOrder.post.js.html +148 -0
  25. package/docs/jsdoc/generic-api_flowrakis_refund_index.js.html +111 -0
  26. package/docs/jsdoc/generic-api_taler_merchant_private_orders__talerOrders_flowrakis.get.js.html +85 -0
  27. package/docs/jsdoc/generic-api_taler_merchant_private_orders__talerOrders_flowrakis.post.js.html +103 -0
  28. package/docs/jsdoc/generic-api_taler_merchant_private_orders_{talerOrderId}_refund_index.js.html +107 -0
  29. package/docs/jsdoc/global.html +3037 -0
  30. package/docs/jsdoc/index.html +71 -0
  31. package/docs/jsdoc/module-_shared_flowrakis.html +3407 -0
  32. package/docs/jsdoc/scripts/linenumber.js +25 -0
  33. package/docs/jsdoc/scripts/prettify/Apache-License-2.0.txt +202 -0
  34. package/docs/jsdoc/scripts/prettify/lang-css.js +2 -0
  35. package/docs/jsdoc/scripts/prettify/prettify.js +28 -0
  36. package/docs/jsdoc/styles/jsdoc-default.css +358 -0
  37. package/docs/jsdoc/styles/prettify-jsdoc.css +111 -0
  38. package/docs/jsdoc/styles/prettify-tomorrow.css +132 -0
  39. package/jsdoc.json +23 -0
  40. package/package.json +72 -0
  41. package/scripts/tsconfig.json.let.allowJs.js +21 -0
  42. package/src/flowrakis_taler.js +305 -0
  43. package/src/generic-api/admin/taler/merchant/index.js +36 -0
  44. package/src/generic-api/flowrakis/order/flowrakisOrder.get.js +66 -0
  45. package/src/generic-api/flowrakis/order/flowrakisOrder.post.js +97 -0
  46. package/src/generic-api/flowrakis/refund/index.js +60 -0
  47. package/src/generic-api/taler/merchant/private/orders/_talerOrders_flowrakis.get.js +34 -0
  48. package/src/generic-api/taler/merchant/private/orders/_talerOrders_flowrakis.post.js +53 -0
  49. package/src/generic-api/taler/merchant/private/orders/{talerOrderId}/refund/index.js +57 -0
  50. package/tsconfig.json +26 -0
  51. package/types/index.d.ts +7 -0
  52. package/types/types.js +105 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,102 @@
1
+
2
+ ## !0.1.0
3
+ ^^2026.07.19 -
4
+ !0.1.0
5
+ ## !0.2.0
6
+ ^^2026.07.19 -
7
+ !0.1.0
8
+ ## !0.3.0
9
+ ^^2026.07.19 -
10
+ !0.1.0
11
+ ## !0.4.0
12
+ ^^2026.07.19 -
13
+ !0.1.0
14
+ ## !0.5.0
15
+ ^^2026.07.19 -
16
+ #milestone-1.a.1! Plugin and test use scaffolded!
17
+ ## !0.1.1
18
+ ^^2026.07.20 -
19
+ !0.1.0
20
+ ## !0.2.0
21
+ ^^2026.07.22 -
22
+ #migrate-2.1.1.1! types:check!
23
+ ## !0.3.0
24
+ ^^2026.07.22 -
25
+ #migrate-2.1.1.1! types:check!
26
+ ## !0.4.0
27
+ ^^2026.07.22 -
28
+ #migrate-2.2!
29
+ ## !0.5.0
30
+ ^^2026.07.25 -
31
+ #migrate-1.5!
32
+ ## !0.6.0
33
+ ^^2026.07.26 -
34
+ #migrate-1.6++7!
35
+ ## !0.6.1
36
+ ^^2026.07.26 -
37
+ #migrate-1.8!
38
+ ## !0.6.2
39
+ ^^2026.07.27 -
40
+ +typecheckfixes
41
+ ## !0.7.0
42
+ ^^2026.07.28 -
43
+ flowrakis-taler_fastify-plugin.#milestone-1.b.4!
44
+ ## !0.8.0
45
+ ^^2026.07.28 -
46
+ #devop-1! Full dependencies update!
47
+ ## !0.9.0
48
+ ^^2026.07.28 -
49
+ #fix-1! flowrakisOrder.get.js/ flowrakisCallGenericApiHandler216957$ now returns a flowrakisOrder, not the talerOrder, but retrived from the merchant database!
50
+ ## !0.9.1
51
+ ^^2026.07.30 -
52
+ =flowrakis-taler_fastify-plugin.#milesto
53
+ ne-1.b.8.1! flowrakisCallGenericApiHandler_talerMerchantBackendConnection_Get112532
54
+ ## !0.9.2
55
+ ^^2026.07.30 -
56
+ =flowrakis-taler_fastify-plugin.#milesto
57
+ ne-1.b.8.2! flowrakisCallGenericApiHandler_talerMerchantBackendConnection_Patch112532
58
+ ## !0.10.0
59
+ ^^2026.07.30 -
60
+ =flowrakis-taler_fastify-plugin.#milestone-1.b.8.4++5!
61
+ ## !0.11.0
62
+ ^^2026.07.30 -
63
+ =flowrakis-taler_fastify-plugin.#milestone-1.b.8.6!
64
+ ## !0.12.0
65
+ ^^2026.08.08 -
66
+ =flowrakis-taler_fastify-plugin.#milestone-1.a.8!
67
+ ## !0.13.0
68
+ ^^2026.08.08 -
69
+ =flowrakis-taler_fastify-plugin.#milestone-1.a.9.1.1+5+!
70
+ ## !0.14.0
71
+ ^^2026.08.09 -
72
+ =flowrakis-taler_fastify-plugin.#milestone-1.a.9++8!
73
+ ## !0.15.0
74
+ ^^2026.08.09 -
75
+ =flowrakis-taler_fastify-plugin.#milestone-1.c.1! Retermed flowrakisFigure -> flowrakisAmount for more natural readability!
76
+ ## !0.15.1
77
+ ^^2026.08.09 -
78
+ =flowrakis-taler_fastify-plugin.#milestone-1.c.1.1!
79
+ ## !0.16.0
80
+ ^^2026.08.09 -
81
+ =flowrakis-taler_fastify-plugin.#milestone-1.c.2! Simplified and purified POST order on flw-tier!
82
+ ## !0.16.1
83
+ ^^2026.08.10 -
84
+ =flowrakis-taler_fastify-plugin.#milestone-1.c.3.1.2.2! Purified _talerMerchantBackendConnection schema and type from flowrakisCurrency, replaced by talerCurrency
85
+ ## !0.16.2
86
+ ^^2026.08.10 -
87
+ =flowrakis-taler_fastify-plugin.#milestone-1.c.3.2! flowrakisOrderType.flowrakisCurrency removed as deprecated!
88
+ ## !0.16.3
89
+ ^^2026.08.10 -
90
+ =flowrakis-taler_fastify-plugin.#milestone-1.c.9!
91
+ ## !0.17.0
92
+ ^^2026.08.10 -
93
+ =flowrakis-taler_fastify-plugin.#milestone-1.c.11! Retermed flowrakisGoodsPath to flowrakisGoods!
94
+ ## !0.17.1
95
+ ^^2026.08.10 -
96
+ flowrakis-taler_fastify-plugin.#milestone-1.d.4++6!
97
+ ## !0.18.0
98
+ ^^2026.09.22 -
99
+ =flowrakis-taler_fastify-plugin.#milestone-2exit
100
+ ## !0.19.0
101
+ ^^2026.09.23 -
102
+ =flowrakis-taler_fastify-plugin.#milestone-2.dnpm run check:types:and:generate:docs README.md addednpm run check:types:and:generate:docs
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+
2
+ <h1>flowrakis-taler</h1>
3
+
4
+ <p>This is the core module shared by <a href="https://www.npmjs.com/package/flowrakis-taler_nuxt-module">flowrakis-taler_nuxt-module</a> and <a href="https://www.npmjs.com/package/flowrakis-taler_fastify-plugin">flowrakis-taler_fastify-plugin</a></p>
5
+
6
+ <p>It is server agnostic and provides generic api as well as common library functions. All sharable flowrakis-taler code should eventually be shared here, as development continues.</p>
@@ -0,0 +1,355 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: flowrakis_taler.js</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Source: flowrakis_taler.js</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+ <article>
29
+ <pre class="prettyprint source linenums"><code>// @ts-check
30
+ /**
31
+ * Module with global types and shared utility functions.
32
+ * @module /shared/flowrakis
33
+ */
34
+
35
+
36
+ // eslint-disable-next-line no-unused-vars
37
+ import * as Types from "../types/types.js"
38
+ /** @param {Types.talerRequestErrorType} x */
39
+ export function talerRequestErrorType_test(x ) { return x }
40
+ /** @type {{ talerMerchantBackendConnection: Types.talerMerchantBackendConnection | undefined, flowrakisOrderIdSpace: string, flowrakisOrderIdCounter: number }} */
41
+ export const flowrakisStorage = {
42
+ talerMerchantBackendConnection: undefined
43
+ , flowrakisOrderIdSpace: `$order-${Number(new Date())}-number-`
44
+ , flowrakisOrderIdCounter: 0 }
45
+ /** @param {{ jsException: Types.jsException | any, talerError: Types.talerRequestErrorType | undefined, flowrakisMessageAttributeKey: string }} flowrakisInput */
46
+ export function flowrakisMessageGetFrom_talerError_AndWrapAs_jsError$$$({
47
+ jsException /*** ^^2026.07.22.+14:32:58 Deprecate an rename to {{ jsError }}???* */
48
+ , talerError = Types.flowrakisAs_talerRequestErrorType$$$( jsException )
49
+ , flowrakisMessageAttributeKey = 'data' /*** default for #nuxt */ }){
50
+ if ( talerError instanceof Error !== true ) return
51
+ /** @type any */
52
+ var flowrakisMidput
53
+ flowrakisMidput = flowrakisMessageGetFrom_talerError$$$({talerError})
54
+ if ( flowrakisMessageAttributeKey != null )
55
+ flowrakisMidput = { [flowrakisMessageAttributeKey]: flowrakisMidput }
56
+ flowrakisMidput =
57
+ Object.assign(
58
+ new Error(
59
+ flowrakisMessageAttributeKey == null
60
+ ? flowrakisMidput.flowrakisText
61
+ : flowrakisMidput[ flowrakisMessageAttributeKey ]?.flowrakisText )
62
+ , {
63
+ statusCode: talerError.statusCode ?? '0'
64
+ , status: talerError.status
65
+ , statusText: talerError.statusText
66
+ , flowrakisType: 'flowrakisError'
67
+ , statusMessage: talerError.statusMessage }
68
+ , flowrakisMidput )
69
+ delete flowrakisMidput.stack /// ^^2025.10.28.+12:25:26 Just making probably redundantly sure we leak no stack.
70
+ const flowrakisOutput = flowrakisMidput
71
+ return flowrakisOutput }
72
+ /** @description Utility class to convert a talerError to a flowrakisMessage
73
+ * @param {object} flowrakisInput - The main object
74
+ * @param {Types.talerRequestErrorType} flowrakisInput.talerError */
75
+ export function flowrakisMessageGetFrom_talerError$$$({
76
+ talerError }){
77
+ if ( talerError == null ) return
78
+ var flowrakisMidput
79
+ let flowrakisError_Text =
80
+ talerError?.data != null
81
+ ? `#taler-merchant-error-${talerError.data?.code} hint: ${talerError.data?.hint} detail: ${talerError.data?.detail} field: ${talerError.data?.field??'-'}`
82
+ : talerError.message
83
+ flowrakisMidput = {
84
+ flowrakisType: 'flowrakisMessage'
85
+ , flowrakisText: flowrakisError_Text
86
+ , flowrakisMessageLevel: 'flowrakisMessageLevel5Error'
87
+ , flowrakisKind: 'talerMerchantRequestError'
88
+ , talerRequestMessage: {
89
+ asString: talerError.toString()
90
+ , data: talerError.data }
91
+ , httpStatusMessage: {
92
+ code: talerError.statusCode
93
+ , text: talerError.statusText ?? talerError.statusMessage }}
94
+ const flowrakisOutput = flowrakisMidput
95
+ return flowrakisOutput }
96
+ /** @description Utility class to convert a talerError to a flowrakisMessage
97
+ * @param {object} flowrakisInput - The main object
98
+ * @param {Error} flowrakisInput.jsError */
99
+ export function flowrakisMessageGetFrom_jsError$$$({
100
+ jsError }){
101
+ if ( jsError == null ) return
102
+ var flowrakisMidput
103
+ flowrakisMidput = {
104
+ flowrakisType: 'flowrakisMessage'
105
+ , flowrakisText: jsError.message
106
+ , flowrakisMessageLevel: 'flowrakisMessageLevel5Error' }
107
+ const flowrakisOutput = flowrakisMidput
108
+ return flowrakisOutput }
109
+ export const flowrakisAtomicJs = {
110
+ /** @param {{flowrakisInput : any}} param0 */
111
+ flowrakisNonCircularObjectMakeDeepCopy$$$({
112
+ flowrakisInput } ){
113
+ if ( flowrakisInput == null ) return
114
+ var flowrakisMidput
115
+ flowrakisMidput = flowrakisInput
116
+ try {
117
+ flowrakisMidput = JSON.stringify( flowrakisMidput )
118
+ flowrakisMidput = JSON.parse( flowrakisMidput )
119
+ } catch ( /** @type {any} */ jsJsonStringifyError ) {
120
+ flowrakisMidput = undefined }
121
+ const flowrakisOutput = flowrakisMidput
122
+ return flowrakisOutput }}
123
+ /*** ^^2025.10.28.+12:44:17 Find a way to type this better than 'any' without getting linting type errors. */
124
+ /** @param {{flowrakisError: Error | any }} flowrakisInput */
125
+ export function flowrakisErrorUnwrapOrWrapAsMessage$$$({ flowrakisError } ){ /*** ^^2026.07.26.+13:11:03 Recode, two XOR related functions???* */
126
+ if ( flowrakisError == null ) return
127
+ var flowrakisMidput
128
+ if ( flowrakisError.flowrakisType != null )
129
+ flowrakisMidput = flowrakisError
130
+ else if ( flowrakisError.data?.flowrakisType != null )
131
+ flowrakisMidput = flowrakisError.data
132
+ else if ( flowrakisError.data?.data?.flowrakisType != null )
133
+ flowrakisMidput = flowrakisError.data.data
134
+ else
135
+ flowrakisMidput = flowrakisError
136
+
137
+ if ( flowrakisMidput.flowrakisType == 'flowrakisMessage' )
138
+ flowrakisMidput = { ...flowrakisMidput, flowrakisError }
139
+ else if ( flowrakisMidput.flowrakisType != null )
140
+ flowrakisMidput = {
141
+ flowrakisType: 'flowrakisMessage'
142
+ , flowrakisMessageLevel: 'flowrakisMessageLevel4Warning'
143
+ , flowrakisText: 'Got Data thrown as Error.'
144
+ , flowrakisMatter: flowrakisMidput
145
+ , flowrakisError }
146
+ else
147
+ flowrakisMidput = {
148
+ flowrakisType: 'flowrakisMessage'
149
+ , flowrakisMessageLevel: 'flowrakisMessageLevel5Error'
150
+ , flowrakisText: flowrakisError.data?.message ?? flowrakisError.toString()
151
+ , flowrakisError }
152
+ const flowrakisOutput = flowrakisMidput
153
+ return flowrakisOutput }
154
+ /** @param {number} x - just a number */
155
+ export function foo( x ) { return x + 1 }
156
+ /**
157
+ * @param {object} flowrakisInput
158
+ * @param {string|undefined} flowrakisInput.talerMerchantId
159
+ * @param {Types.talerMerchantBackendConnection[]} flowrakisInput.talerMerchantBackendConnectionArray
160
+ * @returns {Types.talerMerchantBackendConnection|undefined} - Returns the matched connection, or {{undefined}} if none found.
161
+ */
162
+ export function talerMerchantBackendConnectionArrayFindConnectionById$$$({
163
+ talerMerchantBackendConnectionArray
164
+ , talerMerchantId }){
165
+ if ( talerMerchantBackendConnectionArray == null ) return
166
+ if ( talerMerchantId == null ) return
167
+ const talerMerchantBackendConnection =
168
+ talerMerchantBackendConnectionArray.find(
169
+ /** @param {Types.talerMerchantBackendConnection} talerMerchantBackendConnection_i*/
170
+ talerMerchantBackendConnection_i => talerMerchantBackendConnection_i.talerMerchantId === talerMerchantId )
171
+ return talerMerchantBackendConnection
172
+ }
173
+
174
+ export const flowrakisMessagePattern = /(?&lt;flowrakisMessageLevelOperator>[!]+)(?&lt;flowrakisTextBegin>`)(?&lt;flowrakisText>[^`]+)(?&lt;flowrakisTextEnd>)/
175
+
176
+ /**
177
+ * @param {Types.flowrakisMessageHandle} flowrakisMessageHandle
178
+ */
179
+ export function flowrakisMessageHandleParse_$$$( flowrakisMessageHandle ) {
180
+ return flowrakisMessageHandleParse$$$({flowrakisMessageHandle})
181
+ }
182
+ /** @type {Object.&lt;string, string>} */
183
+ export const flowrakisMessageLevelToIcon = {
184
+ flowrakisMessageLevel3Success: '✅'
185
+ , flowrakisMessageLevel4Warning: '⚠️'
186
+ , flowrakisMessageLevel5Error: '❌'
187
+ , flowrakisMessageLevel2Information: 'ℹ️'
188
+ , flowrakisMessageLevel1Detail: '🕵🏻‍♀️'}
189
+ /** @type {Object.&lt;string, string>} */
190
+ export const flowrakisMessageLevelOperatorToLevel = {
191
+ '!___': 'flowrakisMessageLevel0None'
192
+ , '!__': 'flowrakisMessageLevel1Detail'
193
+ , '!_': 'flowrakisMessageLevel2Information'
194
+ , '!': 'flowrakisMessageLevel3Success'
195
+ ,'!!': 'flowrakisMessageLevel4Warning'
196
+ ,'!!!': 'flowrakisMessageLevel5Error' }
197
+ /**
198
+ * @param {object} flowrakisInput
199
+ * @param {Types.flowrakisMessageHandle} flowrakisInput.flowrakisMessageHandle
200
+ */
201
+ export function flowrakisMessageHandleParse$$$({ flowrakisMessageHandle }){
202
+ if ( typeof flowrakisMessageHandle !== 'string' ) return
203
+ var flowrakisMidput
204
+ flowrakisMidput = flowrakisMessageHandle
205
+ flowrakisMidput = flowrakisMidput.match( flowrakisMessagePattern )?.groups
206
+ if ( flowrakisMidput?.flowrakisMessageLevelOperator != null )
207
+ flowrakisMidput = {
208
+ flowrakisIcon: flowrakisMessageLevelToIcon[
209
+ flowrakisMessageLevelOperatorToLevel[ flowrakisMidput.flowrakisMessageLevelOperator ?? '' ] ?? '' ]
210
+ , flowrakisText: flowrakisMidput.flowrakisText
211
+ , flowrakisType: 'flowrakisMessage'
212
+ , flowrakisMessageLevel: flowrakisMessageLevelOperatorToLevel[ flowrakisMidput.flowrakisMessageLevelOperator ]
213
+ //// , flowrakiMoniker: 'expressionMessage'
214
+ , flowrakisUserLevel: 'flowrakisUserLevel1Reader' }
215
+ const flowrakisOutput = flowrakisMidput
216
+ return flowrakisOutput }
217
+
218
+ /** Essentially a wrapper around `new URL( flowrakisInput )` returning `undefined` on erroneous urls rather than throwing an error, thereby following the #flowrakisErrorInNullOutPrinciple.
219
+ * @param {{flowrakisUrl: string}} flowrakisInput - a canonical URL.
220
+ */
221
+
222
+ export function flowrakisUrlGetToObject$$$( {flowrakisUrl} ){
223
+ if ( flowrakisUrl == null ) return
224
+ var flowrakisMidput
225
+ try {
226
+ flowrakisMidput = new URL( flowrakisUrl )
227
+ } catch( e ) {
228
+ flowrakisMidput = e
229
+ flowrakisMidput = undefined
230
+ }
231
+ /** @type {URL|undefined} */
232
+ const flowrakisOutput = flowrakisMidput
233
+ return flowrakisOutput }
234
+ /**
235
+ * @description Drops the urlPath from a url, but keeps the urlQuery part.
236
+ * @param {object} flowrakisInput - The main object
237
+ * @param {string} flowrakisInput.flowrakisInput - the main input
238
+ * @param {Types.flowrakisAnyMidputType} flowrakisInput.flowrakisMidput - the main input
239
+ * @param {boolean} flowrakisInput._flowrakisIsValid - Is the signature valid, if not, return with `undefined`
240
+ */
241
+ export function flowrakisUrlGetToHostUrlWithQueryAdapted$$$({
242
+ flowrakisInput
243
+ , flowrakisMidput = flowrakisUrlGetToObject$$$( {flowrakisUrl: flowrakisInput} )
244
+ , _flowrakisIsValid = flowrakisMidput instanceof URL }){
245
+ if ( _flowrakisIsValid !== true ) return
246
+ flowrakisMidput = flowrakisInput
247
+ try {
248
+ flowrakisMidput = new URL( flowrakisMidput )
249
+ flowrakisMidput.pathname = ''
250
+ flowrakisMidput = flowrakisMidput.toString()
251
+ } catch ( jsException ){
252
+ flowrakisMidput = jsException
253
+ flowrakisMidput = undefined }
254
+ const flowrakisOutput = flowrakisMidput
255
+ return flowrakisOutput }
256
+ /**
257
+ * @param {Types.talerMerchantBackendConnection[]} talerMerchantBackendConnectionArray
258
+ */
259
+ export function flowrakisCompattributeDefaults_talerMerchantBackendConnectionArray_$$(talerMerchantBackendConnectionArray) {
260
+ for (let talerMerchantBackendConnection_i of talerMerchantBackendConnectionArray) {
261
+ talerMerchantBackendConnection_i.talerMerchantInstanceBackendUrl =
262
+ `${talerMerchantBackendConnection_i.talerMerchantInstanceHostUrl}/instances/${talerMerchantBackendConnection_i.talerMerchantId}`
263
+ talerMerchantBackendConnection_i.talerMerchantRequestHeaders = { Authorization: `Bearer secret-token:${talerMerchantBackendConnection_i.talerMerchantToken}` }}
264
+ return talerMerchantBackendConnectionArray }
265
+ /**
266
+ * @description Because {{fastifyRequest.params}} is of tpye 'unkonwn' you cannot simpyl access dynamic properties in in a funciton signature like {{; function ( fastifyRequest, talerOrderId = fastifyRequest.params?.talerOrderId ;}}} it without jsdoc/typescript complaining - since that however is vital for readability, this is a workaround accessing function. +wot
267
+ * @param {object} flowrakisInput - The flowrakisInputObject
268
+ * @param {any} flowrakisInput.fastifyRequest
269
+ * @param {string} flowrakisInput.flowrakisKey
270
+ * @returns {string}
271
+ */
272
+ export function fastifyRequestParamsGetter_TypesafetyWrapper_jsdoc$$$({fastifyRequest, flowrakisKey}) {
273
+ return fastifyRequest.params?.[flowrakisKey]
274
+ }
275
+
276
+ /** Workaround Warapper for unsolvable typecheck errors
277
+ * @param {any} flowrakisMatter
278
+ * @returns {object}
279
+ *
280
+ */
281
+ export function jsdocAsObjectType_$$$( flowrakisMatter ){
282
+ return flowrakisMatter
283
+ }
284
+
285
+ /** Workaround Warapper for unsolvable typecheck errors
286
+ * @param {any} flowrakisMatter
287
+ * @returns {Types.flowrakisOrderType}
288
+ *
289
+ */
290
+ export function flowrakisAsOrderType_$$$( flowrakisMatter ){
291
+ return flowrakisMatter
292
+ }
293
+ /** Workaround Warapper for unsolvable typecheck errors
294
+ * @param {any} flowrakisMatter
295
+ * @returns {Types.flowrakisRefundType}
296
+ *
297
+ */
298
+ export function flowrakisAsRefundType_$$$( flowrakisMatter ){
299
+ return flowrakisMatter
300
+ }
301
+ /** Workaround Warapper for unsolvable typecheck errors
302
+ * @param {any} flowrakisMatter
303
+ * @returns {Record&lt;string, string>}
304
+ *
305
+ */
306
+ export function jsdocAsStringToStringRecordType_$$$( flowrakisMatter ){
307
+ return flowrakisMatter }
308
+ /**
309
+ * @param {object} flowrakisInput
310
+ * @param {import("../types/types.js").flowrakisMessage=} flowrakisInput.flowrakisMessage
311
+ * @param {string=} flowrakisInput.flowrakisOnConfirmUrl
312
+ */
313
+ export function flowrakisMessageRenderAsHtml$$$({
314
+ flowrakisMessage
315
+ , flowrakisOnConfirmUrl = undefined } ){
316
+ if ( flowrakisMessage == null ) return
317
+ let flowrakisMidput
318
+ flowrakisMidput = [
319
+ `&lt;dialog open style="margin: 1rem;border-color:red;background:lightcoral;border-radius:15px;">
320
+ &lt;p>___flowrakisErrorMessageText___&lt;/p>
321
+ &lt;form method="dialog">`
322
+ , flowrakisOnConfirmUrl == null
323
+ ? ` &lt;button style="margin: 1rem;border-color:red;background:lightcoral;border-radius:15px;">OK&lt;/button>`
324
+ : ` &lt;button formmethod="get" formaction="___flowrakisOnConfirmUrl____" style="margin: 1rem;border-color:red;background:lightcoral;">OK&lt;/button>`
325
+ ,` &lt;/form>&lt;/dialog>`
326
+ ]
327
+ flowrakisMidput = flowrakisMidput.flat()
328
+ flowrakisMidput = flowrakisMidput.join('\n')
329
+ flowrakisMidput = flowrakisMidput
330
+ .replace( '___flowrakisErrorMessageText___', flowrakisMessage.flowrakisText ?? '' )
331
+ .replace( '___flowrakisOnConfirmUrl____', flowrakisOnConfirmUrl ?? '' )
332
+ const flowrakisOutput = flowrakisMidput
333
+ return flowrakisOutput }</code></pre>
334
+ </article>
335
+ </section>
336
+
337
+
338
+
339
+
340
+ </div>
341
+
342
+ <nav>
343
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-_shared_flowrakis.html">/shared/flowrakis</a></li></ul><h3>Global</h3><ul><li><a href="global.html#flowrakisCallGenericApiHandler$$$">flowrakisCallGenericApiHandler$$$</a></li><li><a href="global.html#flowrakisCallGenericApiHandler_Refund_Post$$">flowrakisCallGenericApiHandler_Refund_Post$$</a></li><li><a href="global.html#flowrakisCallGenericApiHandler_talerMerchantBackendConnection_Patch$$$">flowrakisCallGenericApiHandler_talerMerchantBackendConnection_Patch$$$</a></li></ul>
344
+ </nav>
345
+
346
+ <br class="clear">
347
+
348
+ <footer>
349
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Wed Sep 23 2026 13:18:17 GMT+0200 (Central European Summer Time)
350
+ </footer>
351
+
352
+ <script> prettyPrint(); </script>
353
+ <script src="scripts/linenumber.js"> </script>
354
+ </body>
355
+ </html>