@fileverse-dev/formulajs 4.4.11-mod-89-patch-2 → 4.4.11-mod-89-patch-3

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.
package/lib/cjs/index.cjs CHANGED
@@ -18489,15 +18489,7 @@ async function GNOSISPAY() {
18489
18489
  if(!GNOSIS_PAY_ACCESS){
18490
18490
  throw new MissingApiKeyError('GNOSIS_PAY_ACCESS')
18491
18491
  }
18492
-
18493
-
18494
-
18495
- console.log({GNOSIS_PAY_ACCESS});
18496
-
18497
18492
  const access = JSON.parse(GNOSIS_PAY_ACCESS);
18498
-
18499
- console.log({access});
18500
-
18501
18493
  if(!access?.token || isExpired(access?.createdAt)){
18502
18494
  throw new ValidationError('Expired or invalid access token')
18503
18495
  }
@@ -18510,10 +18502,30 @@ async function GNOSISPAY() {
18510
18502
  },
18511
18503
  });
18512
18504
 
18513
- if (!res.ok) throw new NetworkError('GNOSIS_PAY_ACCESS', res.status);
18505
+ if (!res.ok) throw new NetworkError('GNOSIS_PAY', res.status);
18514
18506
 
18515
18507
  const json = await res.json();
18516
- return json
18508
+ if(!Array.isArray(json)){
18509
+ return [{message: 'Unexpected response'}]
18510
+ }
18511
+ const result = json.map((transactions) => {
18512
+ return {
18513
+ createdAt: transactions.createdAt,
18514
+ clearedAt: transactions.clearedAt,
18515
+ country: transactions.country?.name || '',
18516
+ isPending: transactions.isPending,
18517
+ mcc: transactions.mcc,
18518
+ merchant: transactions.merchant?.name || '',
18519
+ billingAmount: transactions.billingAmount,
18520
+ billingCurrency: transactions.billingCurrency,
18521
+ transactionAmount: transactions.transactionAmount,
18522
+ transactionCurrency: transactions.transactionCurrency,
18523
+ transactionType: transactions.transactionType,
18524
+ kind: transactions.kind,
18525
+ status: transactions.status
18526
+ }
18527
+ });
18528
+ return result
18517
18529
  } catch (err) {
18518
18530
  return errorMessageHandler(err, 'GNOSISPAY')
18519
18531
  }
package/lib/esm/index.mjs CHANGED
@@ -18487,15 +18487,7 @@ async function GNOSISPAY() {
18487
18487
  if(!GNOSIS_PAY_ACCESS){
18488
18488
  throw new MissingApiKeyError('GNOSIS_PAY_ACCESS')
18489
18489
  }
18490
-
18491
-
18492
-
18493
- console.log({GNOSIS_PAY_ACCESS});
18494
-
18495
18490
  const access = JSON.parse(GNOSIS_PAY_ACCESS);
18496
-
18497
- console.log({access});
18498
-
18499
18491
  if(!access?.token || isExpired(access?.createdAt)){
18500
18492
  throw new ValidationError('Expired or invalid access token')
18501
18493
  }
@@ -18508,10 +18500,30 @@ async function GNOSISPAY() {
18508
18500
  },
18509
18501
  });
18510
18502
 
18511
- if (!res.ok) throw new NetworkError('GNOSIS_PAY_ACCESS', res.status);
18503
+ if (!res.ok) throw new NetworkError('GNOSIS_PAY', res.status);
18512
18504
 
18513
18505
  const json = await res.json();
18514
- return json
18506
+ if(!Array.isArray(json)){
18507
+ return [{message: 'Unexpected response'}]
18508
+ }
18509
+ const result = json.map((transactions) => {
18510
+ return {
18511
+ createdAt: transactions.createdAt,
18512
+ clearedAt: transactions.clearedAt,
18513
+ country: transactions.country?.name || '',
18514
+ isPending: transactions.isPending,
18515
+ mcc: transactions.mcc,
18516
+ merchant: transactions.merchant?.name || '',
18517
+ billingAmount: transactions.billingAmount,
18518
+ billingCurrency: transactions.billingCurrency,
18519
+ transactionAmount: transactions.transactionAmount,
18520
+ transactionCurrency: transactions.transactionCurrency,
18521
+ transactionType: transactions.transactionType,
18522
+ kind: transactions.kind,
18523
+ status: transactions.status
18524
+ }
18525
+ });
18526
+ return result
18515
18527
  } catch (err) {
18516
18528
  return errorMessageHandler(err, 'GNOSISPAY')
18517
18529
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formulajs",
3
- "version": "4.4.11-mod-89-patch-2",
3
+ "version": "4.4.11-mod-89-patch-3",
4
4
  "description": "JavaScript implementation of most Microsoft Excel formula functions",
5
5
  "author": "Formulajs",
6
6
  "publishConfig": {
@@ -1871,7 +1871,41 @@ export function GEOMEAN(...args: any[]): any;
1871
1871
  */
1872
1872
  export function GESTEP(number: any, step: any): any;
1873
1873
  export function GNOSIS(...args: any[]): Promise<any>;
1874
- export function GNOSISPAY(): Promise<any>;
1874
+ export function GNOSISPAY(): Promise<{
1875
+ message: string;
1876
+ functionName: any;
1877
+ type: string;
1878
+ apiKeyName?: undefined;
1879
+ reason?: undefined;
1880
+ } | {
1881
+ message: string;
1882
+ functionName: any;
1883
+ type: string;
1884
+ apiKeyName: any;
1885
+ reason?: undefined;
1886
+ } | {
1887
+ message: string;
1888
+ functionName: any;
1889
+ type: string;
1890
+ reason: any;
1891
+ apiKeyName?: undefined;
1892
+ } | {
1893
+ createdAt: any;
1894
+ clearedAt: any;
1895
+ country: any;
1896
+ isPending: any;
1897
+ mcc: any;
1898
+ merchant: any;
1899
+ billingAmount: any;
1900
+ billingCurrency: any;
1901
+ transactionAmount: any;
1902
+ transactionCurrency: any;
1903
+ transactionType: any;
1904
+ kind: any;
1905
+ status: any;
1906
+ }[] | {
1907
+ message: string;
1908
+ }[]>;
1875
1909
  /**
1876
1910
  * Returns values along an exponential trend.
1877
1911
  *
@@ -1871,7 +1871,41 @@ export function GEOMEAN(...args: any[]): any;
1871
1871
  */
1872
1872
  export function GESTEP(number: any, step: any): any;
1873
1873
  export function GNOSIS(...args: any[]): Promise<any>;
1874
- export function GNOSISPAY(): Promise<any>;
1874
+ export function GNOSISPAY(): Promise<{
1875
+ message: string;
1876
+ functionName: any;
1877
+ type: string;
1878
+ apiKeyName?: undefined;
1879
+ reason?: undefined;
1880
+ } | {
1881
+ message: string;
1882
+ functionName: any;
1883
+ type: string;
1884
+ apiKeyName: any;
1885
+ reason?: undefined;
1886
+ } | {
1887
+ message: string;
1888
+ functionName: any;
1889
+ type: string;
1890
+ reason: any;
1891
+ apiKeyName?: undefined;
1892
+ } | {
1893
+ createdAt: any;
1894
+ clearedAt: any;
1895
+ country: any;
1896
+ isPending: any;
1897
+ mcc: any;
1898
+ merchant: any;
1899
+ billingAmount: any;
1900
+ billingCurrency: any;
1901
+ transactionAmount: any;
1902
+ transactionCurrency: any;
1903
+ transactionType: any;
1904
+ kind: any;
1905
+ status: any;
1906
+ }[] | {
1907
+ message: string;
1908
+ }[]>;
1875
1909
  /**
1876
1910
  * Returns values along an exponential trend.
1877
1911
  *