Skip to content

Commit

Permalink
Release v0.3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Feb 23, 2024
1 parent 6236bae commit c1301d2
Show file tree
Hide file tree
Showing 76 changed files with 3,052 additions and 274 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,21 @@ jobs:
- name: Compile
run: yarn && yarn build

test:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3

- name: Compile
run: yarn && yarn test

publish:
needs: [ compile ]
needs: [ compile, test ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
};
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
{
"name": "@mercoa/javascript",
"version": "v0.3.17",
"version": "v0.3.19",
"private": false,
"repository": "https://github.com/mercoa-finance/javascript",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"format": "prettier --write 'src/**/*.ts'",
"build": "tsc",
"prepack": "cp -rv dist/. ."
"prepack": "cp -rv dist/. .",
"test": "jest"
},
"dependencies": {
"url-join": "4.0.1",
"@types/url-join": "4.0.1",
"axios": "0.27.2",
"form-data": "4.0.0",
"node-fetch": "2.7.0",
"qs": "6.11.2",
"@types/qs": "6.9.8",
"js-base64": "3.7.2"
},
"devDependencies": {
"@types/url-join": "4.0.1",
"@types/qs": "6.9.8",
"@types/node-fetch": "2.6.9",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1",
"@types/node": "17.0.33",
"prettier": "2.7.1",
"typescript": "4.6.4"
Expand Down
7 changes: 7 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Invoice } from "./api/resources/invoice/client/Client";
import { Organization } from "./api/resources/organization/client/Client";
import { BankLookup } from "./api/resources/bankLookup/client/Client";
import { CustomPaymentMethodSchema } from "./api/resources/customPaymentMethodSchema/client/Client";
import { Fees } from "./api/resources/fees/client/Client";
import { Ocr } from "./api/resources/ocr/client/Client";

export declare namespace MercoaClient {
Expand Down Expand Up @@ -56,6 +57,12 @@ export class MercoaClient {
return (this._customPaymentMethodSchema ??= new CustomPaymentMethodSchema(this._options));
}

protected _fees: Fees | undefined;

public get fees(): Fees {
return (this._fees ??= new Fees(this._options));
}

protected _ocr: Ocr | undefined;

public get ocr(): Ocr {
Expand Down
4 changes: 3 additions & 1 deletion src/api/resources/bankLookup/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export class BankLookup {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
20 changes: 15 additions & 5 deletions src/api/resources/customPaymentMethodSchema/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export class CustomPaymentMethodSchema {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -156,7 +158,9 @@ export class CustomPaymentMethodSchema {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.CustomPaymentMethodSchemaRequest.jsonOrThrow(request, {
Expand Down Expand Up @@ -270,7 +274,9 @@ export class CustomPaymentMethodSchema {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.CustomPaymentMethodSchemaRequest.jsonOrThrow(request, {
Expand Down Expand Up @@ -383,7 +389,9 @@ export class CustomPaymentMethodSchema {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -493,7 +501,9 @@ export class CustomPaymentMethodSchema {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down
44 changes: 33 additions & 11 deletions src/api/resources/entity/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -249,7 +251,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.EntityRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -404,7 +408,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -519,7 +525,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.EntityUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -671,7 +679,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -777,7 +787,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -891,7 +903,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -1012,7 +1026,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.TokenGenerationOptions.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -1130,7 +1146,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -1261,7 +1279,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -1384,7 +1404,9 @@ export class Entity {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
20 changes: 15 additions & 5 deletions src/api/resources/entity/resources/approvalPolicy/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export class ApprovalPolicy {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -160,7 +162,9 @@ export class ApprovalPolicy {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.ApprovalPolicyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -292,7 +296,9 @@ export class ApprovalPolicy {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -408,7 +414,9 @@ export class ApprovalPolicy {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.ApprovalPolicyUpdateRequest.jsonOrThrow(request, {
Expand Down Expand Up @@ -542,7 +550,9 @@ export class ApprovalPolicy {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down
24 changes: 18 additions & 6 deletions src/api/resources/entity/resources/counterparty/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ export class Counterparty {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -228,7 +230,9 @@ export class Counterparty {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -340,7 +344,9 @@ export class Counterparty {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.EntityAddPayeesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -447,7 +453,9 @@ export class Counterparty {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.EntityHidePayeesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -554,7 +562,9 @@ export class Counterparty {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.EntityAddPayorsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -661,7 +671,9 @@ export class Counterparty {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@mercoa/javascript",
"X-Fern-SDK-Version": "v0.3.17",
"X-Fern-SDK-Version": "v0.3.19",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.EntityHidePayorsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down
Loading

0 comments on commit c1301d2

Please sign in to comment.