Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/monnify/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @openfn/language-monnify

## 1.0.3 - 05 March 2026

### Patch Changes

- update docs to include the startDate and endDate for list examples

## 1.0.2 - 24 February 2026

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/monnify/ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"tags": [
{
"title": "example",
"description": "list('/api/v2/disbursements/search-transactions', {\n sourceAccountNumber: 4864192954\n});",
"caption": "Get all transactions"
"description": "list('/api/v2/disbursements/search-transactions', {\n sourceAccountNumber: 4864192954,\n startDate: new Date('2025-11-15'),\n endDate: Date.now()\n});",
"caption": "Get transactions within a date range. (Default range is the current date)"
},
{
"title": "example",
Expand Down
2 changes: 1 addition & 1 deletion packages/monnify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openfn/language-monnify",
"version": "1.0.2",
"version": "1.0.3",
"description": "OpenFn monnify adaptor",
"type": "module",
"exports": {
Expand Down
12 changes: 8 additions & 4 deletions packages/monnify/src/Adaptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import * as util from './Utils.js';
* @typedef {Object} ListQueryOptions
* @property {Number} pageNo - The page number. Please note that Monnify pagination starts at 0 not 1. (Default: 0)
* @property {Number} pageSize - The page size. (Default: 100)
* @property {Date} startDate - The lower date range
* @property {Date} endDate - The higher date range
* @property {Record<string, any>} [otherOptions] - Additional options.
**/

Expand Down Expand Up @@ -56,9 +58,11 @@ export function get(path, options = {}) {

/**
* Fetch a list of items.
* @example <caption>Get all transactions</caption>
* @example <caption>Get transactions within a date range. (Default range is the current date)</caption>
* list('/api/v2/disbursements/search-transactions', {
* sourceAccountNumber: 4864192954
* sourceAccountNumber: 4864192954,
* startDate: new Date('2025-11-15'),
* endDate: Date.now()
* });
*
* @example <caption>Get all transactions for a specific page and page number.</caption>
Expand Down Expand Up @@ -108,9 +112,9 @@ export function list(path, query = {}) {
* @returns {Operation}
* @state {HttpState}
*/
export function post(path, body,options = {}) {
export function post(path, body, options = {}) {
return async state => {
const [resolvedPath,resolvedBody, resolvedOptions] = expandReferences(state, path,body, options);
const [resolvedPath, resolvedBody, resolvedOptions] = expandReferences(state, path, body, options);

const response = await util.request(
state.configuration,
Expand Down