@openfn/language-flutterwave 1.0.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.
@@ -0,0 +1,65 @@
1
+ /**
2
+ * State object
3
+ * @typedef {Object} HttpState
4
+ * @property data - the parsed response body
5
+ * @property response - the response from the HTTP server, including headers, statusCode, body, etc
6
+ * @property references - an array of all previous data objects used in the Job
7
+ **/
8
+ /**
9
+ * Options provided to the HTTP request
10
+ * @typedef {Object} RequestOptions
11
+ * @public
12
+ * @property {object|string} body - body data to append to the request. JSON will be converted to a string (but a content-type header will not be attached to the request).
13
+ * @property {object} errors - Map of errorCodes -> error messages, ie, `{ 404: 'Resource not found;' }`. Pass `false` to suppress errors for this code.
14
+ * @property {object} form - Pass a JSON object to be serialised into a multipart HTML form (as FormData) in the body.
15
+ * @property {object} query - An object of query parameters to be encoded into the URL.
16
+ * @property {object} headers - An object of headers to append to the request.
17
+ * @property {string} parseAs - Parse the response body as json, text or stream. By default will use the response headers.
18
+ * @property {number} timeout - Request timeout in ms. Default: 300 seconds.
19
+ * @property {object} tls - TLS/SSL authentication options. See https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions
20
+ */
21
+ /**
22
+ * Create a new customer in Flutterwave.
23
+ * @function
24
+ * @public
25
+ * @param {Object} customerData
26
+ * @returns {Function}
27
+ */
28
+ export function createCustomer(customerData: any, options?: {}): Function;
29
+ /**
30
+ * Initiate a payment request to the Flutterwave API.
31
+ * @function
32
+ * @public
33
+ * @param {Object} paymentData - The payment details to send to Flutterwave.
34
+ * @returns {Function} - A function that takes the state and performs the operation.
35
+ */
36
+ export function initiatePayment(paymentData: any, options?: {}): Function;
37
+ /**
38
+ * Create a new payment method in Flutterwave.
39
+ * @function
40
+ * @public
41
+ * @param {Object} paymentMethodData - The payment method details to send to Flutterwave.
42
+ * @returns {Function} - A function that takes the state and performs the operation.
43
+ */
44
+ export function createPaymentMethod(paymentMethodData: any, options?: {}): Function;
45
+ /**
46
+ * State object
47
+ */
48
+ export type HttpState = {
49
+ /**
50
+ * - the parsed response body
51
+ */
52
+ data: any;
53
+ /**
54
+ * - the response from the HTTP server, including headers, statusCode, body, etc
55
+ */
56
+ response: any;
57
+ /**
58
+ * - an array of all previous data objects used in the Job
59
+ */
60
+ references: any;
61
+ };
62
+ /**
63
+ * Options provided to the HTTP request
64
+ */
65
+ export type RequestOptions = any;
@@ -0,0 +1,2 @@
1
+ export function prepareNextState(state: any, response: any): any;
2
+ export function request(configuration: {}, method: any, path: any, options: any): any;
@@ -0,0 +1,3 @@
1
+ export default Adaptor;
2
+ export * from "./Adaptor";
3
+ import * as Adaptor from "./Adaptor";