From 294b7cc576631d8eb43c651a7cbcc82eb6081ab2 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:10:07 +0000 Subject: [PATCH] SDK regeneration --- README.md | 14 +- package.json | 1 + reference.md | 1756 +++------------- src/Client.ts | 23 - src/api/errors/RangeNotSatisfiableError.ts | 17 + src/api/errors/index.ts | 3 +- .../resources/accessTokens/client/Client.ts | 8 +- src/api/resources/accounting/client/Client.ts | 2 - .../resources/connections/client/Client.ts | 23 +- .../resources/ledgerAccounts/client/Client.ts | 10 +- .../resources/payables/client/Client.ts | 10 +- .../resources/receivables/client/Client.ts | 10 +- .../resources/syncedRecords/client/Client.ts | 15 +- .../resources/taxRates/client/Client.ts | 10 +- src/api/resources/analytics/client/Client.ts | 354 ---- src/api/resources/analytics/client/index.ts | 1 - .../requests/GetAnalyticsPayablesRequest.ts | 187 -- .../analytics/client/requests/index.ts | 1 - src/api/resources/analytics/index.ts | 1 - .../approvalPolicies/client/Client.ts | 28 +- .../requests/ApprovalPoliciesGetRequest.ts | 1 - .../client/requests/ApprovalPolicyCreate.ts | 4 - .../client/requests/ApprovalPolicyUpdate.ts | 4 - .../resources/processes/client/Client.ts | 22 +- .../approvalRequests/client/Client.ts | 28 +- src/api/resources/auditLogs/client/Client.ts | 8 +- .../resources/batchPayments/client/Client.ts | 10 +- src/api/resources/comments/client/Client.ts | 17 +- .../resources/counterparts/client/Client.ts | 33 +- .../resources/addresses/client/Client.ts | 27 +- .../resources/bankAccounts/client/Client.ts | 32 +- .../resources/contacts/client/Client.ts | 32 +- .../resources/vatIds/client/Client.ts | 27 +- .../resources/creditNotes/client/Client.ts | 1770 ----------------- src/api/resources/creditNotes/client/index.ts | 1 - .../requests/CreditNoteCreateRequest.ts | 51 - .../CreditNoteLineItemReplaceRequest.ts | 16 - .../CreditNoteLineItemUpdateRequest.ts | 28 - .../requests/CreditNoteUpdateRequest.ts | 46 - ...GetPayableCreditNotesIdLineItemsRequest.ts | 70 - .../requests/GetPayableCreditNotesRequest.ts | 58 - .../creditNotes/client/requests/index.ts | 6 - src/api/resources/creditNotes/index.ts | 1 - .../resources/dataExports/client/Client.ts | 18 +- .../resources/extraData/client/Client.ts | 23 +- src/api/resources/entities/client/Client.ts | 52 +- .../client/requests/CreateEntityRequest.ts | 2 +- .../resources/bankAccounts/client/Client.ts | 67 +- .../CreateEntityBankAccountRequest.ts | 2 +- .../resources/onboardingData/client/Client.ts | 12 +- .../resources/paymentMethods/client/Client.ts | 12 +- .../resources/persons/client/Client.ts | 22 +- .../resources/vatIds/client/Client.ts | 25 +- .../resources/entityUsers/client/Client.ts | 45 +- .../requests/CreateEntityUserRequest.ts | 2 +- .../client/requests/EntityUsersGetRequest.ts | 11 +- src/api/resources/events/client/Client.ts | 18 +- .../client/requests/EventsGetRequest.ts | 10 +- src/api/resources/files/client/Client.ts | 18 +- .../files/client/requests/FilesGetRequest.ts | 4 +- src/api/resources/financing/client/Client.ts | 520 ----- src/api/resources/financing/client/index.ts | 1 - .../requests/FinancingPushInvoicesRequest.ts | 19 - .../requests/GetFinancingInvoicesRequest.ts | 128 -- .../financing/client/requests/index.ts | 2 - src/api/resources/financing/index.ts | 1 - src/api/resources/index.ts | 6 - .../resources/mailTemplates/client/Client.ts | 32 +- .../resources/mailboxDomains/client/Client.ts | 18 +- .../client/requests/DomainRequest.ts | 1 - src/api/resources/mailboxes/client/Client.ts | 14 +- .../resources/measureUnits/client/Client.ts | 17 +- .../onboardingLinks/client/Client.ts | 5 +- .../overdueReminders/client/Client.ts | 23 +- .../partnerSettings/client/Client.ts | 8 +- .../requests/PartnerProjectSettingsPayload.ts | 2 +- src/api/resources/payables/client/Client.ts | 107 +- .../client/requests/PayableUpdateSchema.ts | 2 - .../requests/PayableUploadWithDataSchema.ts | 2 - .../requests/PayablesGetAnalyticsRequest.ts | 122 +- .../client/requests/PayablesGetRequest.ts | 132 +- .../resources/lineItems/client/Client.ts | 36 +- .../client/requests/LineItemsGetRequest.ts | 10 +- .../resources/paymentIntents/client/Client.ts | 20 +- .../resources/paymentLinks/client/Client.ts | 15 +- .../requests/CreatePaymentLinkRequest.ts | 1 - .../resources/paymentRecords/client/Client.ts | 76 +- .../paymentReminders/client/Client.ts | 23 +- .../resources/paymentTerms/client/Client.ts | 23 +- .../resources/pdfTemplates/client/Client.ts | 23 +- src/api/resources/products/client/Client.ts | 17 +- .../client/requests/ProductsGetRequest.ts | 2 +- src/api/resources/projects/client/Client.ts | 17 +- .../client/requests/ProjectsGetRequest.ts | 10 +- .../resources/purchaseOrders/client/Client.ts | 38 +- .../requests/PurchaseOrdersGetRequest.ts | 10 +- .../resources/receivables/client/Client.ts | 187 +- .../requests/ReceivablesGetHistoryRequest.ts | 2 +- .../requests/ReceivablesGetMailsRequest.ts | 2 +- .../client/requests/ReceivablesGetRequest.ts | 4 +- .../resources/recurrences/client/Client.ts | 21 +- src/api/resources/roles/client/Client.ts | 14 +- src/api/resources/tags/client/Client.ts | 24 +- .../tags/client/requests/TagsGetRequest.ts | 10 +- .../resources/textTemplates/client/Client.ts | 28 +- src/api/resources/vatRates/client/Client.ts | 5 +- .../webhookDeliveries/client/Client.ts | 11 +- .../requests/WebhookDeliveriesGetRequest.ts | 10 +- .../webhookSubscriptions/client/Client.ts | 38 +- .../WebhookSubscriptionsGetRequest.ts | 10 +- src/api/types/AccountResponse.ts | 11 + ...ttings.ts => AccountingSettingsPayload.ts} | 2 +- src/api/types/AccountingSettingsResponse.ts | 9 + src/api/types/AggregationFunctionEnum.ts | 13 - src/api/types/AnalyticsDataPoint.ts | 8 - src/api/types/ApprovalPolicyResource.ts | 4 - src/api/types/BankAccount.ts | 15 +- src/api/types/ButtonThemeResponse.ts | 10 + ...eatedEventData.ts => CardThemeResponse.ts} | 4 +- .../CounterpartIndividualRootCreatePayload.ts | 2 +- .../CounterpartIndividualRootResponse.ts | 2 +- .../CounterpartIndividualRootUpdatePayload.ts | 2 +- ...ounterpartOrganizationRootCreatePayload.ts | 2 +- .../CounterpartOrganizationRootResponse.ts | 2 +- ...ounterpartOrganizationRootUpdatePayload.ts | 2 +- src/api/types/CreditNoteCursorFields.ts | 10 - .../types/CreditNoteLineItemCreateRequest.ts | 27 - .../types/CreditNoteLineItemCursorFields.ts | 14 - .../CreditNoteLineItemPaginationResponse.ts | 17 - src/api/types/CreditNoteLineItemResponse.ts | 37 - src/api/types/CreditNotePaginationResponse.ts | 17 - src/api/types/CreditNoteResponse.ts | 70 - src/api/types/CurrencyExchangeSchema2.ts | 9 - src/api/types/DateDimensionBreakdownEnum.ts | 13 - src/api/types/DomainResponse.ts | 1 - src/api/types/EInvoicingSettingsResponse.ts | 11 + src/api/types/EntityBankAccountResponse.ts | 2 +- src/api/types/FileSchema.ts | 2 +- src/api/types/FileSchema2.ts | 2 +- src/api/types/FileSchema4.ts | 2 +- src/api/types/FinancingInvoice.ts | 36 - src/api/types/FinancingInvoiceCursorFields.ts | 10 - src/api/types/FinancingInvoiceListResponse.ts | 14 - src/api/types/FinancingInvoiceType.ts | 10 - src/api/types/FinancingOffer.ts | 18 - src/api/types/FinancingOffersResponse.ts | 12 - .../FinancingPushInvoicesRequestInvoice.ts | 12 - .../types/FinancingPushInvoicesResponse.ts | 10 - src/api/types/FinancingTokenResponse.ts | 8 - src/api/types/InvoiceResponsePayload.ts | 5 +- src/api/types/MailSettingsResponse.ts | 9 + src/api/types/MergedSettingsResponse.ts | 12 +- src/api/types/OcrAddress.ts | 5 +- .../types/OcrResponseInvoiceReceiptData.ts | 2 - .../OcrResponseInvoiceReceiptLineItem.ts | 2 +- src/api/types/OrderEnum2.ts | 10 + src/api/types/OrderEnum3.ts | 10 + .../types/PartnerProjectSettingsResponse.ts | 12 +- src/api/types/PayableAnalyticsResponse.ts | 9 - src/api/types/PayableCreditNoteData.ts | 16 - src/api/types/PayableDimensionEnum.ts | 22 - src/api/types/PayableMetricEnum.ts | 10 - src/api/types/PayableResponseSchema.ts | 10 +- src/api/types/PayableSettingsPayload.ts | 1 - src/api/types/PayableSettingsResponse.ts | 13 + src/api/types/PayerAccountResponse.ts | 16 - src/api/types/PaymentAccountObject.ts | 2 - src/api/types/PaymentIntentResponse.ts | 2 +- src/api/types/PaymentPageThemeResponse.ts | 16 + src/api/types/PaymentsSettingsResponse.ts | 12 + src/api/types/Platform.ts | 3 +- src/api/types/PricingPlan.ts | 19 - src/api/types/PublicPaymentLinkResponse.ts | 3 +- ...eOrderCounterpartIndividualRootResponse.ts | 2 +- ...rderCounterpartOrganizationRootResponse.ts | 2 +- .../ReceivableFacadeCreateInvoicePayload.ts | 7 +- .../ReceivableFacadeCreateQuotePayload.ts | 2 - src/api/types/ReceivableFileSchema.ts | 2 +- .../types/ReceivableHistoryEventTypeEnum.ts | 8 +- .../ReceivableHistoryResponseEventData.ts | 4 +- src/api/types/ReceivableSettingsResponse.ts | 8 + src/api/types/ReceivablesStatusEnum.ts | 6 + src/api/types/RecipientAccountResponse.ts | 4 - src/api/types/ReminderMailSentEventData.ts | 12 - src/api/types/RepaymentSchedule.ts | 17 - src/api/types/RolePaginationResponse.ts | 4 +- src/api/types/RoleResponse.ts | 8 +- src/api/types/RootSchema.ts | 5 - src/api/types/UpdateEntityRequest.ts | 2 +- src/api/types/UpdateInvoice.ts | 8 +- src/api/types/UpdateIssuedInvoice.ts | 10 +- src/api/types/UpdateQuote.ts | 3 + src/api/types/VerifyResponse.ts | 1 - src/api/types/WcBusinessStatus.ts | 16 - src/api/types/WcInvoiceStatus.ts | 22 - src/api/types/WcOfferStatus.ts | 24 - src/api/types/WcRepaymentType.ts | 16 - src/api/types/WebhookObjectType.ts | 4 +- src/api/types/index.ts | 47 +- src/core/fetcher/Fetcher.ts | 2 +- src/core/fetcher/getResponseBody.ts | 2 - src/core/fetcher/requestWithRetries.ts | 20 +- src/errors/MoniteTimeoutError.ts | 4 +- tests/unit/fetcher/Fetcher.test.ts | 54 +- tests/unit/fetcher/getRequestBody.test.ts | 4 + tests/unit/fetcher/getResponseBody.test.ts | 4 + tests/unit/fetcher/makeRequest.test.ts | 4 + tests/unit/fetcher/requestWithRetries.test.ts | 150 +- tests/unit/fetcher/test-file.txt | 1 - yarn.lock | 501 +++-- 210 files changed, 1356 insertions(+), 7265 deletions(-) create mode 100644 src/api/errors/RangeNotSatisfiableError.ts delete mode 100644 src/api/resources/analytics/client/Client.ts delete mode 100644 src/api/resources/analytics/client/index.ts delete mode 100644 src/api/resources/analytics/client/requests/GetAnalyticsPayablesRequest.ts delete mode 100644 src/api/resources/analytics/client/requests/index.ts delete mode 100644 src/api/resources/analytics/index.ts delete mode 100644 src/api/resources/creditNotes/client/Client.ts delete mode 100644 src/api/resources/creditNotes/client/index.ts delete mode 100644 src/api/resources/creditNotes/client/requests/CreditNoteCreateRequest.ts delete mode 100644 src/api/resources/creditNotes/client/requests/CreditNoteLineItemReplaceRequest.ts delete mode 100644 src/api/resources/creditNotes/client/requests/CreditNoteLineItemUpdateRequest.ts delete mode 100644 src/api/resources/creditNotes/client/requests/CreditNoteUpdateRequest.ts delete mode 100644 src/api/resources/creditNotes/client/requests/GetPayableCreditNotesIdLineItemsRequest.ts delete mode 100644 src/api/resources/creditNotes/client/requests/GetPayableCreditNotesRequest.ts delete mode 100644 src/api/resources/creditNotes/client/requests/index.ts delete mode 100644 src/api/resources/creditNotes/index.ts delete mode 100644 src/api/resources/financing/client/Client.ts delete mode 100644 src/api/resources/financing/client/index.ts delete mode 100644 src/api/resources/financing/client/requests/FinancingPushInvoicesRequest.ts delete mode 100644 src/api/resources/financing/client/requests/GetFinancingInvoicesRequest.ts delete mode 100644 src/api/resources/financing/client/requests/index.ts delete mode 100644 src/api/resources/financing/index.ts create mode 100644 src/api/types/AccountResponse.ts rename src/api/types/{AccountingSettings.ts => AccountingSettingsPayload.ts} (79%) create mode 100644 src/api/types/AccountingSettingsResponse.ts delete mode 100644 src/api/types/AggregationFunctionEnum.ts delete mode 100644 src/api/types/AnalyticsDataPoint.ts create mode 100644 src/api/types/ButtonThemeResponse.ts rename src/api/types/{ReceivableCreatedEventData.ts => CardThemeResponse.ts} (51%) delete mode 100644 src/api/types/CreditNoteCursorFields.ts delete mode 100644 src/api/types/CreditNoteLineItemCreateRequest.ts delete mode 100644 src/api/types/CreditNoteLineItemCursorFields.ts delete mode 100644 src/api/types/CreditNoteLineItemPaginationResponse.ts delete mode 100644 src/api/types/CreditNoteLineItemResponse.ts delete mode 100644 src/api/types/CreditNotePaginationResponse.ts delete mode 100644 src/api/types/CreditNoteResponse.ts delete mode 100644 src/api/types/CurrencyExchangeSchema2.ts delete mode 100644 src/api/types/DateDimensionBreakdownEnum.ts create mode 100644 src/api/types/EInvoicingSettingsResponse.ts delete mode 100644 src/api/types/FinancingInvoice.ts delete mode 100644 src/api/types/FinancingInvoiceCursorFields.ts delete mode 100644 src/api/types/FinancingInvoiceListResponse.ts delete mode 100644 src/api/types/FinancingInvoiceType.ts delete mode 100644 src/api/types/FinancingOffer.ts delete mode 100644 src/api/types/FinancingOffersResponse.ts delete mode 100644 src/api/types/FinancingPushInvoicesRequestInvoice.ts delete mode 100644 src/api/types/FinancingPushInvoicesResponse.ts delete mode 100644 src/api/types/FinancingTokenResponse.ts create mode 100644 src/api/types/MailSettingsResponse.ts create mode 100644 src/api/types/OrderEnum2.ts create mode 100644 src/api/types/OrderEnum3.ts delete mode 100644 src/api/types/PayableAnalyticsResponse.ts delete mode 100644 src/api/types/PayableCreditNoteData.ts delete mode 100644 src/api/types/PayableDimensionEnum.ts delete mode 100644 src/api/types/PayableMetricEnum.ts create mode 100644 src/api/types/PayableSettingsResponse.ts delete mode 100644 src/api/types/PayerAccountResponse.ts create mode 100644 src/api/types/PaymentPageThemeResponse.ts create mode 100644 src/api/types/PaymentsSettingsResponse.ts delete mode 100644 src/api/types/PricingPlan.ts create mode 100644 src/api/types/ReceivableSettingsResponse.ts delete mode 100644 src/api/types/ReminderMailSentEventData.ts delete mode 100644 src/api/types/RepaymentSchedule.ts delete mode 100644 src/api/types/WcBusinessStatus.ts delete mode 100644 src/api/types/WcInvoiceStatus.ts delete mode 100644 src/api/types/WcOfferStatus.ts delete mode 100644 src/api/types/WcRepaymentType.ts delete mode 100644 tests/unit/fetcher/test-file.txt diff --git a/README.md b/README.md index 0459028..c81396d 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ following namespace: ```typescript import { Monite } from "monite"; -const request: Monite.GetAnalyticsPayablesRequest = { +const request: Monite.ApprovalPoliciesGetRequest = { ... }; ``` @@ -70,18 +70,6 @@ try { ## Advanced -### Additional Headers - -If you would like to send additional headers as part of the request, use the `headers` request option. - -```typescript -const response = await client.products.create(..., { - headers: { - 'X-Custom-Header': 'custom value' - } -}); -``` - ### Retries The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long diff --git a/package.json b/package.json index ea3adfc..80a8f54 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "@types/qs": "6.9.8", "@types/node-fetch": "2.6.9", "@types/readable-stream": "^4.0.15", + "fetch-mock-jest": "^1.5.1", "webpack": "^5.94.0", "ts-loader": "^9.3.1", "jest": "29.7.0", diff --git a/reference.md b/reference.md index 4802e20..7c253f1 100644 --- a/reference.md +++ b/reference.md @@ -1,73 +1,5 @@ # Reference -## Analytics - -
client.analytics.getAnalyticsPayables({ ...params }) -> Monite.PayableAnalyticsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve aggregated statistics for payables with different breakdowns. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.analytics.getAnalyticsPayables({ - metric: "id", - aggregation_function: "count", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.GetAnalyticsPayablesRequest` - -
-
- -
-
- -**requestOptions:** `Analytics.RequestOptions` - -
-
-
-
- -
-
-
- ## Approval policies
client.approvalPolicies.get({ ...params }) -> Monite.ApprovalPolicyResourceList @@ -2150,69 +2082,6 @@ await client.pdfTemplates.makeDefaultById("document_template_id");
-
client.pdfTemplates.previewById(documentTemplateId) -> stream.Readable -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a sample PDF invoice generated using the specified template. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.pdfTemplates.previewById("string"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**documentTemplateId:** `string` - -
-
- -
-
- -**requestOptions:** `PdfTemplates.RequestOptions` - -
-
-
-
- -
-
-
- ## Entities
client.entities.get({ ...params }) -> Monite.EntityPaginationResponse @@ -3205,7 +3074,7 @@ Create a new entity user from the specified values. ```typescript await client.entityUsers.create({ - first_name: "Casey", + first_name: "Andrey", login: "login", }); ``` @@ -3729,11 +3598,7 @@ await client.entityUsers.updateById("entity_user_id");
-Returns all webhook events that were triggered for the specified entity based on your enabled webhook subscriptions. These are the same events that were sent to your configured webhook listener endpoints, aggregated into a single list. Results can be filtered by the related object type or time period. - -You can use this to get the missed events for the time periods when your webhook listener was temporarily unavailable. - -We guarantee access to event data only from the last three months. Earlier events may be unavailable. +Get events for a given entity.
@@ -3796,7 +3661,7 @@ await client.events.get();
-Get a webhook event by its ID. The data is the same as you might have previously received in a webhook sent by Monite to your server. +Get event by ID.
@@ -3828,7 +3693,7 @@ await client.events.getById("event_id");
-**eventId:** `string` — ID of the webhook event. This is the `id` value you might have received in a webhook or retrieved from `GET /events`. +**eventId:** `string`
@@ -3862,9 +3727,7 @@ await client.events.getById("event_id");
```typescript -await client.files.get({ - id__in: "string", -}); +await client.files.get(); ```
@@ -4053,9 +3916,9 @@ await client.files.delete("file_id");
-## Financing +## Mail templates -
client.financing.getFinancingInvoices({ ...params }) -> Monite.FinancingInvoiceListResponse +
client.mailTemplates.get({ ...params }) -> Monite.CustomTemplatesPaginationResponse
@@ -4067,7 +3930,7 @@ await client.files.delete("file_id");
-Returns a list of invoices requested for financing +Get all custom templates
@@ -4083,7 +3946,7 @@ Returns a list of invoices requested for financing
```typescript -await client.financing.getFinancingInvoices(); +await client.mailTemplates.get(); ```
@@ -4099,7 +3962,7 @@ await client.financing.getFinancingInvoices();
-**request:** `Monite.GetFinancingInvoicesRequest` +**request:** `Monite.MailTemplatesGetRequest`
@@ -4107,7 +3970,7 @@ await client.financing.getFinancingInvoices();
-**requestOptions:** `Financing.RequestOptions` +**requestOptions:** `MailTemplates.RequestOptions`
@@ -4118,7 +3981,7 @@ await client.financing.getFinancingInvoices();
-
client.financing.postFinancingInvoices({ ...params }) -> Monite.FinancingPushInvoicesResponse +
client.mailTemplates.create({ ...params }) -> Monite.CustomTemplateDataSchema
@@ -4130,7 +3993,7 @@ await client.financing.getFinancingInvoices();
-Returns a session token and a connect token to open Kanmon SDK for confirming invoice details. +Create custom template
@@ -4146,13 +4009,11 @@ Returns a session token and a connect token to open Kanmon SDK for confirming in
```typescript -await client.financing.postFinancingInvoices({ - invoices: [ - { - id: "id", - type: "payable", - }, - ], +await client.mailTemplates.create({ + body_template: "body_template", + name: "name", + subject_template: "subject_template", + type: "receivables_quote", }); ``` @@ -4169,7 +4030,7 @@ await client.financing.postFinancingInvoices({
-**request:** `Monite.FinancingPushInvoicesRequest` +**request:** `Monite.AddCustomTemplateSchema`
@@ -4177,7 +4038,7 @@ await client.financing.postFinancingInvoices({
-**requestOptions:** `Financing.RequestOptions` +**requestOptions:** `MailTemplates.RequestOptions`
@@ -4188,7 +4049,7 @@ await client.financing.postFinancingInvoices({
-
client.financing.getFinancingOffers() -> Monite.FinancingOffersResponse +
client.mailTemplates.preview({ ...params }) -> Monite.PreviewTemplateResponse
@@ -4200,7 +4061,7 @@ await client.financing.postFinancingInvoices({
-Returns a list of financing offers and the business's onboarding status +Preview rendered template
@@ -4216,7 +4077,12 @@ Returns a list of financing offers and the business's onboarding status
```typescript -await client.financing.getFinancingOffers(); +await client.mailTemplates.preview({ + body: "body", + document_type: "receivables_quote", + language_code: "ab", + subject: "subject", +}); ```
@@ -4232,7 +4098,15 @@ await client.financing.getFinancingOffers();
-**requestOptions:** `Financing.RequestOptions` +**request:** `Monite.PreviewTemplateRequest` + +
+
+ +
+
+ +**requestOptions:** `MailTemplates.RequestOptions`
@@ -4243,7 +4117,7 @@ await client.financing.getFinancingOffers();
-
client.financing.postFinancingTokens() -> Monite.FinancingTokenResponse +
client.mailTemplates.getSystem() -> Monite.SystemTemplates
@@ -4255,7 +4129,7 @@ await client.financing.getFinancingOffers();
-Returns a token for Kanmon SDK. Creates a business and user on Kanmon if not already exist. +Get all system templates
@@ -4271,7 +4145,7 @@ Returns a token for Kanmon SDK. Creates a business and user on Kanmon if not alr
```typescript -await client.financing.postFinancingTokens(); +await client.mailTemplates.getSystem(); ```
@@ -4287,7 +4161,7 @@ await client.financing.postFinancingTokens();
-**requestOptions:** `Financing.RequestOptions` +**requestOptions:** `MailTemplates.RequestOptions`
@@ -4298,9 +4172,7 @@ await client.financing.postFinancingTokens();
-## Mail templates - -
client.mailTemplates.get({ ...params }) -> Monite.CustomTemplatesPaginationResponse +
client.mailTemplates.getById(templateId) -> Monite.CustomTemplateDataSchema
@@ -4312,7 +4184,7 @@ await client.financing.postFinancingTokens();
-Get all custom templates +Get custom template by ID
@@ -4328,7 +4200,7 @@ Get all custom templates
```typescript -await client.mailTemplates.get(); +await client.mailTemplates.getById("template_id"); ```
@@ -4344,7 +4216,7 @@ await client.mailTemplates.get();
-**request:** `Monite.MailTemplatesGetRequest` +**templateId:** `string`
@@ -4363,7 +4235,7 @@ await client.mailTemplates.get();
-
client.mailTemplates.create({ ...params }) -> Monite.CustomTemplateDataSchema +
client.mailTemplates.deleteById(templateId) -> void
@@ -4375,7 +4247,7 @@ await client.mailTemplates.get();
-Create custom template +Delete custom template bt ID
@@ -4391,12 +4263,7 @@ Create custom template
```typescript -await client.mailTemplates.create({ - body_template: "body_template", - name: "name", - subject_template: "subject_template", - type: "receivables_quote", -}); +await client.mailTemplates.deleteById("template_id"); ```
@@ -4412,7 +4279,7 @@ await client.mailTemplates.create({
-**request:** `Monite.AddCustomTemplateSchema` +**templateId:** `string`
@@ -4431,7 +4298,7 @@ await client.mailTemplates.create({
-
client.mailTemplates.preview({ ...params }) -> Monite.PreviewTemplateResponse +
client.mailTemplates.updateById(templateId, { ...params }) -> Monite.CustomTemplateDataSchema
@@ -4443,7 +4310,7 @@ await client.mailTemplates.create({
-Preview rendered template +Update custom template by ID
@@ -4459,12 +4326,7 @@ Preview rendered template
```typescript -await client.mailTemplates.preview({ - body: "body", - document_type: "receivables_quote", - language_code: "ab", - subject: "subject", -}); +await client.mailTemplates.updateById("template_id"); ```
@@ -4480,7 +4342,15 @@ await client.mailTemplates.preview({
-**request:** `Monite.PreviewTemplateRequest` +**templateId:** `string` + +
+
+ +
+
+ +**request:** `Monite.UpdateCustomTemplateSchemaRequest`
@@ -4499,7 +4369,7 @@ await client.mailTemplates.preview({
-
client.mailTemplates.getSystem() -> Monite.SystemTemplates +
client.mailTemplates.makeDefaultById(templateId) -> Monite.CustomTemplateDataSchema
@@ -4511,7 +4381,7 @@ await client.mailTemplates.preview({
-Get all system templates +Make template default
@@ -4527,7 +4397,7 @@ Get all system templates
```typescript -await client.mailTemplates.getSystem(); +await client.mailTemplates.makeDefaultById("template_id"); ```
@@ -4543,6 +4413,14 @@ await client.mailTemplates.getSystem();
+**templateId:** `string` + +
+
+ +
+
+ **requestOptions:** `MailTemplates.RequestOptions`
@@ -4554,7 +4432,9 @@ await client.mailTemplates.getSystem();
-
client.mailTemplates.getById(templateId) -> Monite.CustomTemplateDataSchema +## Mailbox domains + +
client.mailboxDomains.get() -> Monite.DomainListResponse
@@ -4566,7 +4446,7 @@ await client.mailTemplates.getSystem();
-Get custom template by ID +Get all domains owned by partner_id
@@ -4582,7 +4462,7 @@ Get custom template by ID
```typescript -await client.mailTemplates.getById("template_id"); +await client.mailboxDomains.get(); ```
@@ -4598,15 +4478,7 @@ await client.mailTemplates.getById("template_id");
-**templateId:** `string` - -
-
- -
-
- -**requestOptions:** `MailTemplates.RequestOptions` +**requestOptions:** `MailboxDomains.RequestOptions`
@@ -4617,7 +4489,7 @@ await client.mailTemplates.getById("template_id");
-
client.mailTemplates.deleteById(templateId) -> void +
client.mailboxDomains.create({ ...params }) -> Monite.DomainResponse
@@ -4629,7 +4501,7 @@ await client.mailTemplates.getById("template_id");
-Delete custom template bt ID +Create domain for the partner_id
@@ -4645,7 +4517,9 @@ Delete custom template bt ID
```typescript -await client.mailTemplates.deleteById("template_id"); +await client.mailboxDomains.create({ + domain: "domain", +}); ```
@@ -4661,7 +4535,7 @@ await client.mailTemplates.deleteById("template_id");
-**templateId:** `string` +**request:** `Monite.DomainRequest`
@@ -4669,7 +4543,7 @@ await client.mailTemplates.deleteById("template_id");
-**requestOptions:** `MailTemplates.RequestOptions` +**requestOptions:** `MailboxDomains.RequestOptions`
@@ -4680,7 +4554,7 @@ await client.mailTemplates.deleteById("template_id");
-
client.mailTemplates.updateById(templateId, { ...params }) -> Monite.CustomTemplateDataSchema +
client.mailboxDomains.deleteById(domainId) -> void
@@ -4692,263 +4566,7 @@ await client.mailTemplates.deleteById("template_id");
-Update custom template by ID - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailTemplates.updateById("template_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**templateId:** `string` - -
-
- -
-
- -**request:** `Monite.UpdateCustomTemplateSchemaRequest` - -
-
- -
-
- -**requestOptions:** `MailTemplates.RequestOptions` - -
-
-
-
- - - -
- -
client.mailTemplates.makeDefaultById(templateId) -> Monite.CustomTemplateDataSchema -
-
- -#### 📝 Description - -
-
- -
-
- -Make template default - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailTemplates.makeDefaultById("template_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**templateId:** `string` - -
-
- -
-
- -**requestOptions:** `MailTemplates.RequestOptions` - -
-
-
-
- -
-
-
- -## Mailbox domains - -
client.mailboxDomains.get() -> Monite.DomainListResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Get all domains owned by partner_id - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailboxDomains.get(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**requestOptions:** `MailboxDomains.RequestOptions` - -
-
-
-
- -
-
-
- -
client.mailboxDomains.create({ ...params }) -> Monite.DomainResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Create domain for the partner_id - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailboxDomains.create({ - domain: "domain", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.DomainRequest` - -
-
- -
-
- -**requestOptions:** `MailboxDomains.RequestOptions` - -
-
-
-
- -
-
-
- -
client.mailboxDomains.deleteById(domainId) -> void -
-
- -#### 📝 Description - -
-
- -
-
- -Delete domain for the partner_id +Delete domain for the partner_id
@@ -5070,899 +4688,19 @@ await client.mailboxDomains.verifyById("domain_id"); #### 📝 Description -
-
- -
-
- -Get all mailboxes owned by Entity - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailboxes.get(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**requestOptions:** `Mailboxes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.mailboxes.create({ ...params }) -> Monite.MailboxResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new mailbox - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailboxes.create({ - mailbox_domain_id: "mailbox_domain_id", - mailbox_name: "mailbox_name", - related_object_type: "payable", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.MailboxDomainRequest` - -
-
- -
-
- -**requestOptions:** `Mailboxes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.mailboxes.search({ ...params }) -> Monite.MailboxDataResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Get all mailboxes owned by Entity - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailboxes.search({ - entity_ids: ["entity_ids"], -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.MailboxMultipleEntitiesRequest` - -
-
- -
-
- -**requestOptions:** `Mailboxes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.mailboxes.deleteById(mailboxId) -> void -
-
- -#### 📝 Description - -
-
- -
-
- -Delete mailbox - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.mailboxes.deleteById("mailbox_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**mailboxId:** `string` - -
-
- -
-
- -**requestOptions:** `Mailboxes.RequestOptions` - -
-
-
-
- -
-
-
- -## Measure units - -
client.measureUnits.get() -> Monite.UnitListResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.measureUnits.get(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**requestOptions:** `MeasureUnits.RequestOptions` - -
-
-
-
- -
-
-
- -
client.measureUnits.create({ ...params }) -> Monite.UnitResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.measureUnits.create({ - name: "name", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.UnitRequest` - -
-
- -
-
- -**requestOptions:** `MeasureUnits.RequestOptions` - -
-
-
-
- -
-
-
- -
client.measureUnits.getById(unitId) -> Monite.UnitResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.measureUnits.getById("unit_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**unitId:** `string` - -
-
- -
-
- -**requestOptions:** `MeasureUnits.RequestOptions` - -
-
-
-
- -
-
-
- -
client.measureUnits.deleteById(unitId) -> void -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.measureUnits.deleteById("unit_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**unitId:** `string` - -
-
- -
-
- -**requestOptions:** `MeasureUnits.RequestOptions` - -
-
-
-
- -
-
-
- -
client.measureUnits.updateById(unitId, { ...params }) -> Monite.UnitResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.measureUnits.updateById("unit_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**unitId:** `string` - -
-
- -
-
- -**request:** `Monite.UnitUpdate` - -
-
- -
-
- -**requestOptions:** `MeasureUnits.RequestOptions` - -
-
-
-
- -
-
-
- -## Onboarding links - -
client.onboardingLinks.create({ ...params }) -> Monite.OnboardingLinkPublicResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.onboardingLinks.create({ - expires_at: "2024-01-15T09:30:00Z", - refresh_url: "refresh_url", - return_url: "return_url", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.OnboardingLinkRequest` - -
-
- -
-
- -**requestOptions:** `OnboardingLinks.RequestOptions` - -
-
-
-
- -
-
-
- -## Overdue reminders - -
client.overdueReminders.get() -> Monite.AllOverdueRemindersResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.overdueReminders.get(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**requestOptions:** `OverdueReminders.RequestOptions` - -
-
-
-
- -
-
-
- -
client.overdueReminders.create({ ...params }) -> Monite.OverdueReminderResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.overdueReminders.create({ - name: "name", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.OverdueReminderRequest` - -
-
- -
-
- -**requestOptions:** `OverdueReminders.RequestOptions` - -
-
-
-
- -
-
-
- -
client.overdueReminders.getById(overdueReminderId) -> Monite.OverdueReminderResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.overdueReminders.getById("overdue_reminder_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**overdueReminderId:** `string` - -
-
- -
-
- -**requestOptions:** `OverdueReminders.RequestOptions` - -
-
-
-
- -
-
-
- -
client.overdueReminders.deleteById(overdueReminderId) -> void -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.overdueReminders.deleteById("overdue_reminder_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**overdueReminderId:** `string` - -
-
- -
-
- -**requestOptions:** `OverdueReminders.RequestOptions` - -
-
-
-
- -
-
-
- -
client.overdueReminders.updateById(overdueReminderId, { ...params }) -> Monite.OverdueReminderResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.overdueReminders.updateById("overdue_reminder_id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**overdueReminderId:** `string` - -
-
- -
-
- -**request:** `Monite.OverdueReminderUpdateRequest` - -
-
- -
-
- -**requestOptions:** `OverdueReminders.RequestOptions` - -
-
-
-
- -
-
-
- -## Credit notes - -
client.creditNotes.getPayableCreditNotes({ ...params }) -> Monite.CreditNotePaginationResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.creditNotes.getPayableCreditNotes(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.GetPayableCreditNotesRequest` - -
-
- -
-
- -**requestOptions:** `CreditNotes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.creditNotes.postPayableCreditNotes({ ...params }) -> Monite.CreditNoteResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.creditNotes.postPayableCreditNotes({ - amount: 1200, - based_on: "123e4567-e89b-12d3-a456-426614174000", - document_id: "CN-2287", - issued_at: "2024-01-15", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Monite.CreditNoteCreateRequest` - -
-
+
+
-**requestOptions:** `CreditNotes.RequestOptions` +Get all mailboxes owned by Entity
-
-
-
- -
client.creditNotes.getPayableCreditNotesId(creditNoteId) -> Monite.CreditNoteResponse -
-
- #### 🔌 Usage
@@ -5972,7 +4710,7 @@ await client.creditNotes.postPayableCreditNotes({
```typescript -await client.creditNotes.getPayableCreditNotesId("credit_note_id"); +await client.mailboxes.get(); ```
@@ -5988,15 +4726,7 @@ await client.creditNotes.getPayableCreditNotesId("credit_note_id");
-**creditNoteId:** `string` - -
-
- -
-
- -**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `Mailboxes.RequestOptions`
@@ -6007,10 +4737,25 @@ await client.creditNotes.getPayableCreditNotesId("credit_note_id");
-
client.creditNotes.deletePayableCreditNotesId(creditNoteId) -> void +
client.mailboxes.create({ ...params }) -> Monite.MailboxResponse +
+
+ +#### 📝 Description + +
+
+
+Create a new mailbox + +
+
+
+
+ #### 🔌 Usage
@@ -6020,7 +4765,11 @@ await client.creditNotes.getPayableCreditNotesId("credit_note_id");
```typescript -await client.creditNotes.deletePayableCreditNotesId("credit_note_id"); +await client.mailboxes.create({ + mailbox_domain_id: "mailbox_domain_id", + mailbox_name: "mailbox_name", + related_object_type: "payable", +}); ```
@@ -6036,7 +4785,7 @@ await client.creditNotes.deletePayableCreditNotesId("credit_note_id");
-**creditNoteId:** `string` +**request:** `Monite.MailboxDomainRequest`
@@ -6044,7 +4793,7 @@ await client.creditNotes.deletePayableCreditNotesId("credit_note_id");
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `Mailboxes.RequestOptions`
@@ -6055,11 +4804,11 @@ await client.creditNotes.deletePayableCreditNotesId("credit_note_id");
-
client.creditNotes.patchPayableCreditNotesId(creditNoteId, { ...params }) -> Monite.CreditNoteResponse +
client.mailboxes.search({ ...params }) -> Monite.MailboxDataResponse
-#### 🔌 Usage +#### 📝 Description
@@ -6067,16 +4816,14 @@ await client.creditNotes.deletePayableCreditNotesId("credit_note_id");
-```typescript -await client.creditNotes.patchPayableCreditNotesId("credit_note_id"); -``` +Get all mailboxes owned by Entity
-#### ⚙️ Parameters +#### 🔌 Usage
@@ -6084,15 +4831,26 @@ await client.creditNotes.patchPayableCreditNotesId("credit_note_id");
-**creditNoteId:** `string` +```typescript +await client.mailboxes.search({ + entity_ids: ["entity_ids"], +}); +```
+
+
+ +#### ⚙️ Parameters + +
+
-**request:** `Monite.CreditNoteUpdateRequest` +**request:** `Monite.MailboxMultipleEntitiesRequest`
@@ -6100,7 +4858,7 @@ await client.creditNotes.patchPayableCreditNotesId("credit_note_id");
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `Mailboxes.RequestOptions`
@@ -6111,7 +4869,7 @@ await client.creditNotes.patchPayableCreditNotesId("credit_note_id");
-
client.creditNotes.postPayableCreditNotesIdApprove(creditNoteId) -> Monite.CreditNoteResponse +
client.mailboxes.deleteById(mailboxId) -> void
@@ -6123,7 +4881,7 @@ await client.creditNotes.patchPayableCreditNotesId("credit_note_id");
-Approve the credit note for appliance. +Delete mailbox
@@ -6139,7 +4897,7 @@ Approve the credit note for appliance.
```typescript -await client.creditNotes.postPayableCreditNotesIdApprove("credit_note_id"); +await client.mailboxes.deleteById("mailbox_id"); ```
@@ -6155,7 +4913,7 @@ await client.creditNotes.postPayableCreditNotesIdApprove("credit_note_id");
-**creditNoteId:** `string` +**mailboxId:** `string`
@@ -6163,7 +4921,7 @@ await client.creditNotes.postPayableCreditNotesIdApprove("credit_note_id");
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `Mailboxes.RequestOptions`
@@ -6174,11 +4932,30 @@ await client.creditNotes.postPayableCreditNotesIdApprove("credit_note_id");
-
client.creditNotes.postPayableCreditNotesIdCancel(creditNoteId) -> Monite.CreditNoteResponse +## Measure units + +
client.measureUnits.get() -> Monite.UnitListResponse +
+
+ +#### 🔌 Usage +
-#### 📝 Description +
+
+ +```typescript +await client.measureUnits.get(); +``` + +
+
+
+
+ +#### ⚙️ Parameters
@@ -6186,13 +4963,21 @@ await client.creditNotes.postPayableCreditNotesIdApprove("credit_note_id");
-Cancel the credit note that was not confirmed during the review. +**requestOptions:** `MeasureUnits.RequestOptions`
+
+
+
+ +
client.measureUnits.create({ ...params }) -> Monite.UnitResponse +
+
+ #### 🔌 Usage
@@ -6202,7 +4987,9 @@ Cancel the credit note that was not confirmed during the review.
```typescript -await client.creditNotes.postPayableCreditNotesIdCancel("credit_note_id"); +await client.measureUnits.create({ + name: "name", +}); ```
@@ -6218,7 +5005,7 @@ await client.creditNotes.postPayableCreditNotesIdCancel("credit_note_id");
-**creditNoteId:** `string` +**request:** `Monite.UnitRequest`
@@ -6226,7 +5013,7 @@ await client.creditNotes.postPayableCreditNotesIdCancel("credit_note_id");
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `MeasureUnits.RequestOptions`
@@ -6237,7 +5024,7 @@ await client.creditNotes.postPayableCreditNotesIdCancel("credit_note_id");
-
client.creditNotes.getPayableCreditNotesIdLineItems(creditNoteId, { ...params }) -> Monite.CreditNoteLineItemPaginationResponse +
client.measureUnits.getById(unitId) -> Monite.UnitResponse
@@ -6250,7 +5037,7 @@ await client.creditNotes.postPayableCreditNotesIdCancel("credit_note_id");
```typescript -await client.creditNotes.getPayableCreditNotesIdLineItems("credit_note_id"); +await client.measureUnits.getById("unit_id"); ```
@@ -6266,15 +5053,7 @@ await client.creditNotes.getPayableCreditNotesIdLineItems("credit_note_id");
-**creditNoteId:** `string` - -
-
- -
-
- -**request:** `Monite.GetPayableCreditNotesIdLineItemsRequest` +**unitId:** `string`
@@ -6282,7 +5061,7 @@ await client.creditNotes.getPayableCreditNotesIdLineItems("credit_note_id");
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `MeasureUnits.RequestOptions`
@@ -6293,7 +5072,7 @@ await client.creditNotes.getPayableCreditNotesIdLineItems("credit_note_id");
-
client.creditNotes.postPayableCreditNotesIdLineItems(creditNoteId, { ...params }) -> Monite.CreditNoteLineItemResponse +
client.measureUnits.deleteById(unitId) -> void
@@ -6306,7 +5085,7 @@ await client.creditNotes.getPayableCreditNotesIdLineItems("credit_note_id");
```typescript -await client.creditNotes.postPayableCreditNotesIdLineItems("credit_note_id", {}); +await client.measureUnits.deleteById("unit_id"); ```
@@ -6322,15 +5101,7 @@ await client.creditNotes.postPayableCreditNotesIdLineItems("credit_note_id", {})
-**creditNoteId:** `string` - -
-
- -
-
- -**request:** `Monite.CreditNoteLineItemCreateRequest` +**unitId:** `string`
@@ -6338,7 +5109,7 @@ await client.creditNotes.postPayableCreditNotesIdLineItems("credit_note_id", {})
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `MeasureUnits.RequestOptions`
@@ -6349,7 +5120,7 @@ await client.creditNotes.postPayableCreditNotesIdLineItems("credit_note_id", {})
-
client.creditNotes.putPayableCreditNotesIdLineItems(creditNoteId, { ...params }) -> Monite.CreditNoteLineItemPaginationResponse +
client.measureUnits.updateById(unitId, { ...params }) -> Monite.UnitResponse
@@ -6362,9 +5133,7 @@ await client.creditNotes.postPayableCreditNotesIdLineItems("credit_note_id", {})
```typescript -await client.creditNotes.putPayableCreditNotesIdLineItems("credit_note_id", { - data: [{}], -}); +await client.measureUnits.updateById("unit_id"); ```
@@ -6380,7 +5149,7 @@ await client.creditNotes.putPayableCreditNotesIdLineItems("credit_note_id", {
-**creditNoteId:** `string` +**unitId:** `string`
@@ -6388,7 +5157,7 @@ await client.creditNotes.putPayableCreditNotesIdLineItems("credit_note_id", {
-**request:** `Monite.CreditNoteLineItemReplaceRequest` +**request:** `Monite.UnitUpdate`
@@ -6396,7 +5165,7 @@ await client.creditNotes.putPayableCreditNotesIdLineItems("credit_note_id", {
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `MeasureUnits.RequestOptions`
@@ -6407,7 +5176,9 @@ await client.creditNotes.putPayableCreditNotesIdLineItems("credit_note_id", {
-
client.creditNotes.getPayableCreditNotesIdLineItemsId(creditNoteId, lineItemId) -> Monite.CreditNoteLineItemResponse +## Onboarding links + +
client.onboardingLinks.create({ ...params }) -> Monite.OnboardingLinkPublicResponse
@@ -6420,7 +5191,11 @@ await client.creditNotes.putPayableCreditNotesIdLineItems("credit_note_id", {
```typescript -await client.creditNotes.getPayableCreditNotesIdLineItemsId("credit_note_id", "line_item_id"); +await client.onboardingLinks.create({ + expires_at: "2024-01-15T09:30:00Z", + refresh_url: "refresh_url", + return_url: "return_url", +}); ```
@@ -6436,15 +5211,7 @@ await client.creditNotes.getPayableCreditNotesIdLineItemsId("credit_note_id", "l
-**creditNoteId:** `string` - -
-
- -
-
- -**lineItemId:** `string` +**request:** `Monite.OnboardingLinkRequest`
@@ -6452,7 +5219,7 @@ await client.creditNotes.getPayableCreditNotesIdLineItemsId("credit_note_id", "l
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `OnboardingLinks.RequestOptions`
@@ -6463,7 +5230,9 @@ await client.creditNotes.getPayableCreditNotesIdLineItemsId("credit_note_id", "l
-
client.creditNotes.deletePayableCreditNotesIdLineItemsId(creditNoteId, lineItemId) -> Monite.CreditNoteLineItemPaginationResponse +## Overdue reminders + +
client.overdueReminders.get() -> Monite.AllOverdueRemindersResponse
@@ -6476,7 +5245,7 @@ await client.creditNotes.getPayableCreditNotesIdLineItemsId("credit_note_id", "l
```typescript -await client.creditNotes.deletePayableCreditNotesIdLineItemsId("credit_note_id", "line_item_id"); +await client.overdueReminders.get(); ```
@@ -6492,23 +5261,7 @@ await client.creditNotes.deletePayableCreditNotesIdLineItemsId("credit_note_id",
-**creditNoteId:** `string` - -
-
- -
-
- -**lineItemId:** `string` - -
-
- -
-
- -**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `OverdueReminders.RequestOptions`
@@ -6519,7 +5272,7 @@ await client.creditNotes.deletePayableCreditNotesIdLineItemsId("credit_note_id",
-
client.creditNotes.patchPayableCreditNotesIdLineItemsId(creditNoteId, lineItemId, { ...params }) -> Monite.CreditNoteLineItemResponse +
client.overdueReminders.create({ ...params }) -> Monite.OverdueReminderResponse
@@ -6532,7 +5285,9 @@ await client.creditNotes.deletePayableCreditNotesIdLineItemsId("credit_note_id",
```typescript -await client.creditNotes.patchPayableCreditNotesIdLineItemsId("credit_note_id", "line_item_id"); +await client.overdueReminders.create({ + name: "name", +}); ```
@@ -6548,7 +5303,7 @@ await client.creditNotes.patchPayableCreditNotesIdLineItemsId("credit_note_id",
-**creditNoteId:** `string` +**request:** `Monite.OverdueReminderRequest`
@@ -6556,52 +5311,69 @@ await client.creditNotes.patchPayableCreditNotesIdLineItemsId("credit_note_id",
-**lineItemId:** `string` +**requestOptions:** `OverdueReminders.RequestOptions` + +
+
+ +
+
+
client.overdueReminders.getById(overdueReminderId) -> Monite.OverdueReminderResponse
-**request:** `Monite.CreditNoteLineItemUpdateRequest` +#### 🔌 Usage -
-
+
+
-**requestOptions:** `CreditNotes.RequestOptions` +```typescript +await client.overdueReminders.getById("overdue_reminder_id"); +```
- - -
+#### ⚙️ Parameters -
client.creditNotes.postPayableCreditNotesIdReject(creditNoteId) -> Monite.CreditNoteResponse
-#### 📝 Description -
+**overdueReminderId:** `string` + +
+
+
-Decline the credit note when an approver finds any mismatch or discrepancies. +**requestOptions:** `OverdueReminders.RequestOptions`
+ + +
+ +
client.overdueReminders.deleteById(overdueReminderId) -> void +
+
+ #### 🔌 Usage
@@ -6611,7 +5383,7 @@ Decline the credit note when an approver finds any mismatch or discrepancies.
```typescript -await client.creditNotes.postPayableCreditNotesIdReject("credit_note_id"); +await client.overdueReminders.deleteById("overdue_reminder_id"); ```
@@ -6627,7 +5399,7 @@ await client.creditNotes.postPayableCreditNotesIdReject("credit_note_id");
-**creditNoteId:** `string` +**overdueReminderId:** `string`
@@ -6635,7 +5407,7 @@ await client.creditNotes.postPayableCreditNotesIdReject("credit_note_id");
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `OverdueReminders.RequestOptions`
@@ -6646,11 +5418,11 @@ await client.creditNotes.postPayableCreditNotesIdReject("credit_note_id");
-
client.creditNotes.postPayableCreditNotesIdSubmitForApproval(creditNoteId) -> Monite.CreditNoteResponse +
client.overdueReminders.updateById(overdueReminderId, { ...params }) -> Monite.OverdueReminderResponse
-#### 📝 Description +#### 🔌 Usage
@@ -6658,14 +5430,16 @@ await client.creditNotes.postPayableCreditNotesIdReject("credit_note_id");
-Start the approval process once the uploaded credit note is validated. +```typescript +await client.overdueReminders.updateById("overdue_reminder_id"); +```
-#### 🔌 Usage +#### ⚙️ Parameters
@@ -6673,24 +5447,15 @@ Start the approval process once the uploaded credit note is validated.
-```typescript -await client.creditNotes.postPayableCreditNotesIdSubmitForApproval("credit_note_id"); -``` +**overdueReminderId:** `string`
-
-
- -#### ⚙️ Parameters
-
-
- -**creditNoteId:** `string` +**request:** `Monite.OverdueReminderUpdateRequest`
@@ -6698,7 +5463,7 @@ await client.creditNotes.postPayableCreditNotesIdSubmitForApproval("credit_note_
-**requestOptions:** `CreditNotes.RequestOptions` +**requestOptions:** `OverdueReminders.RequestOptions`
@@ -7323,8 +6088,6 @@ await client.payables.create(); Retrieve aggregated statistics for payables, including total amount and count, both overall and by status. -For more flexible configuration and retrieval of other data types, use GET /analytics/payables. -
@@ -10162,9 +8925,9 @@ This endpoint supports [pagination](https://docs.monite.com/api/concepts/paginat - Find all credit notes created for a specific invoice: - ``` - GET /receivables?type=credit_note?based_on=INVOICE_ID - ``` + ``` + GET /receivables?type=credit_note?based_on=INVOICE_ID + ```
@@ -12897,25 +11660,6 @@ await client.vatRates.get();
-#### 📝 Description - -
-
- -
-
- -Returns an aggregated log of webhook delivery attempts. The data contains a list of triggered webhook events, how many times Monite tried to send each event to your server, the last HTTP status code returned by your webhook listener endpoint, and whether the final attempt to deliver that event was successful. - -We guarantee access to webhook delivery data only from the last three months. Earlier data may be unavailable. - -Note that if the same event type is included in multiple webhook subscriptions, the results will include several entries for each occurrence of this event - one entry per subscription. - -
-
-
-
- #### 🔌 Usage
diff --git a/src/Client.ts b/src/Client.ts index 9dc3642..8517cfd 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -4,7 +4,6 @@ import * as environments from "./environments"; import * as core from "./core"; -import { Analytics } from "./api/resources/analytics/client/Client"; import { ApprovalPolicies } from "./api/resources/approvalPolicies/client/Client"; import { ApprovalRequests } from "./api/resources/approvalRequests/client/Client"; import { AuditLogs } from "./api/resources/auditLogs/client/Client"; @@ -18,14 +17,12 @@ import { Entities } from "./api/resources/entities/client/Client"; import { EntityUsers } from "./api/resources/entityUsers/client/Client"; import { Events } from "./api/resources/events/client/Client"; import { Files } from "./api/resources/files/client/Client"; -import { Financing } from "./api/resources/financing/client/Client"; import { MailTemplates } from "./api/resources/mailTemplates/client/Client"; import { MailboxDomains } from "./api/resources/mailboxDomains/client/Client"; import { Mailboxes } from "./api/resources/mailboxes/client/Client"; import { MeasureUnits } from "./api/resources/measureUnits/client/Client"; import { OnboardingLinks } from "./api/resources/onboardingLinks/client/Client"; import { OverdueReminders } from "./api/resources/overdueReminders/client/Client"; -import { CreditNotes } from "./api/resources/creditNotes/client/Client"; import { PurchaseOrders } from "./api/resources/purchaseOrders/client/Client"; import { Payables } from "./api/resources/payables/client/Client"; import { PaymentIntents } from "./api/resources/paymentIntents/client/Client"; @@ -68,20 +65,12 @@ export declare namespace MoniteClient { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } export class MoniteClient { constructor(protected readonly _options: MoniteClient.Options) {} - protected _analytics: Analytics | undefined; - - public get analytics(): Analytics { - return (this._analytics ??= new Analytics(this._options)); - } - protected _approvalPolicies: ApprovalPolicies | undefined; public get approvalPolicies(): ApprovalPolicies { @@ -160,12 +149,6 @@ export class MoniteClient { return (this._files ??= new Files(this._options)); } - protected _financing: Financing | undefined; - - public get financing(): Financing { - return (this._financing ??= new Financing(this._options)); - } - protected _mailTemplates: MailTemplates | undefined; public get mailTemplates(): MailTemplates { @@ -202,12 +185,6 @@ export class MoniteClient { return (this._overdueReminders ??= new OverdueReminders(this._options)); } - protected _creditNotes: CreditNotes | undefined; - - public get creditNotes(): CreditNotes { - return (this._creditNotes ??= new CreditNotes(this._options)); - } - protected _purchaseOrders: PurchaseOrders | undefined; public get purchaseOrders(): PurchaseOrders { diff --git a/src/api/errors/RangeNotSatisfiableError.ts b/src/api/errors/RangeNotSatisfiableError.ts new file mode 100644 index 0000000..8669a2d --- /dev/null +++ b/src/api/errors/RangeNotSatisfiableError.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../errors/index"; +import * as Monite from "../index"; + +export class RangeNotSatisfiableError extends errors.MoniteError { + constructor(body: Monite.ErrorSchemaResponse) { + super({ + message: "RangeNotSatisfiableError", + statusCode: 416, + body: body, + }); + Object.setPrototypeOf(this, RangeNotSatisfiableError.prototype); + } +} diff --git a/src/api/errors/index.ts b/src/api/errors/index.ts index 470cad5..95220b9 100644 --- a/src/api/errors/index.ts +++ b/src/api/errors/index.ts @@ -1,8 +1,9 @@ export * from "./UnprocessableEntityError"; export * from "./InternalServerError"; export * from "./UnauthorizedError"; -export * from "./ForbiddenError"; export * from "./ConflictError"; export * from "./BadRequestError"; export * from "./NotFoundError"; +export * from "./ForbiddenError"; export * from "./NotAcceptableError"; +export * from "./RangeNotSatisfiableError"; diff --git a/src/api/resources/accessTokens/client/Client.ts b/src/api/resources/accessTokens/client/Client.ts index be57d8e..2340ed7 100644 --- a/src/api/resources/accessTokens/client/Client.ts +++ b/src/api/resources/accessTokens/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace AccessTokens { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -77,7 +75,6 @@ export class AccessTokens { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -111,7 +108,7 @@ export class AccessTokens { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /auth/revoke."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -159,7 +156,6 @@ export class AccessTokens { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -195,7 +191,7 @@ export class AccessTokens { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /auth/token."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/accounting/client/Client.ts b/src/api/resources/accounting/client/Client.ts index e528b90..fbcfcf7 100644 --- a/src/api/resources/accounting/client/Client.ts +++ b/src/api/resources/accounting/client/Client.ts @@ -33,8 +33,6 @@ export declare namespace Accounting { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } diff --git a/src/api/resources/accounting/resources/connections/client/Client.ts b/src/api/resources/accounting/resources/connections/client/Client.ts index 86a0bdc..2746f10 100644 --- a/src/api/resources/accounting/resources/connections/client/Client.ts +++ b/src/api/resources/accounting/resources/connections/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Connections { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -69,7 +67,6 @@ export class Connections { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -102,7 +99,7 @@ export class Connections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting_connections."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -145,7 +142,6 @@ export class Connections { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -179,7 +175,7 @@ export class Connections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /accounting_connections."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -222,7 +218,6 @@ export class Connections { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -255,9 +250,7 @@ export class Connections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /accounting_connections/{connection_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -300,7 +293,6 @@ export class Connections { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -333,9 +325,7 @@ export class Connections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /accounting_connections/{connection_id}/disconnect." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -376,7 +366,6 @@ export class Connections { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -409,9 +398,7 @@ export class Connections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /accounting_connections/{connection_id}/sync." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/accounting/resources/ledgerAccounts/client/Client.ts b/src/api/resources/accounting/resources/ledgerAccounts/client/Client.ts index bb7961e..24aad51 100644 --- a/src/api/resources/accounting/resources/ledgerAccounts/client/Client.ts +++ b/src/api/resources/accounting/resources/ledgerAccounts/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace LedgerAccounts { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -91,7 +89,6 @@ export class LedgerAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -125,7 +122,7 @@ export class LedgerAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /ledger_accounts."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -168,7 +165,6 @@ export class LedgerAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -201,9 +197,7 @@ export class LedgerAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /ledger_accounts/{ledger_account_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/accounting/resources/payables/client/Client.ts b/src/api/resources/accounting/resources/payables/client/Client.ts index 29986d0..5f137fa 100644 --- a/src/api/resources/accounting/resources/payables/client/Client.ts +++ b/src/api/resources/accounting/resources/payables/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Payables { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -87,7 +85,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -121,7 +118,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting/payables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -164,7 +161,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -197,9 +193,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /accounting/payables/{payable_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/accounting/resources/receivables/client/Client.ts b/src/api/resources/accounting/resources/receivables/client/Client.ts index 6b9a0e8..f5e7c84 100644 --- a/src/api/resources/accounting/resources/receivables/client/Client.ts +++ b/src/api/resources/accounting/resources/receivables/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Receivables { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -87,7 +85,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -121,7 +118,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting/receivables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -164,7 +161,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -197,9 +193,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /accounting/receivables/{invoice_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/accounting/resources/syncedRecords/client/Client.ts b/src/api/resources/accounting/resources/syncedRecords/client/Client.ts index 783ca9a..c0aba57 100644 --- a/src/api/resources/accounting/resources/syncedRecords/client/Client.ts +++ b/src/api/resources/accounting/resources/syncedRecords/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace SyncedRecords { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -154,7 +152,6 @@ export class SyncedRecords { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -188,7 +185,7 @@ export class SyncedRecords { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting_synced_records."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -231,7 +228,6 @@ export class SyncedRecords { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -264,9 +260,7 @@ export class SyncedRecords { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /accounting_synced_records/{synced_record_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -309,7 +303,6 @@ export class SyncedRecords { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -342,9 +335,7 @@ export class SyncedRecords { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /accounting_synced_records/{synced_record_id}/push." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/accounting/resources/taxRates/client/Client.ts b/src/api/resources/accounting/resources/taxRates/client/Client.ts index 68bc16c..7c59bb0 100644 --- a/src/api/resources/accounting/resources/taxRates/client/Client.ts +++ b/src/api/resources/accounting/resources/taxRates/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace TaxRates { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -91,7 +89,6 @@ export class TaxRates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -125,7 +122,7 @@ export class TaxRates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting_tax_rates."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -168,7 +165,6 @@ export class TaxRates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -201,9 +197,7 @@ export class TaxRates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /accounting_tax_rates/{tax_rate_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/analytics/client/Client.ts b/src/api/resources/analytics/client/Client.ts deleted file mode 100644 index cd00877..0000000 --- a/src/api/resources/analytics/client/Client.ts +++ /dev/null @@ -1,354 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../environments"; -import * as core from "../../../../core"; -import * as Monite from "../../../index"; -import urlJoin from "url-join"; -import * as errors from "../../../../errors/index"; - -export declare namespace Analytics { - interface Options { - environment?: core.Supplier; - token?: core.Supplier; - /** Override the x-monite-version header */ - moniteVersion: core.Supplier; - /** Override the x-monite-entity-id header */ - moniteEntityId?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Override the x-monite-version header */ - moniteVersion?: string; - /** Override the x-monite-entity-id header */ - moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; - } -} - -export class Analytics { - constructor(protected readonly _options: Analytics.Options) {} - - /** - * Retrieve aggregated statistics for payables with different breakdowns. - * - * @param {Monite.GetAnalyticsPayablesRequest} request - * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.analytics.getAnalyticsPayables({ - * metric: "id", - * aggregation_function: "count" - * }) - */ - public async getAnalyticsPayables( - request: Monite.GetAnalyticsPayablesRequest, - requestOptions?: Analytics.RequestOptions - ): Promise { - const { - dimension, - metric, - aggregation_function: aggregationFunction, - date_dimension_breakdown: dateDimensionBreakdown, - created_at__gt: createdAtGt, - created_at__lt: createdAtLt, - created_at__gte: createdAtGte, - created_at__lte: createdAtLte, - status, - status__in: statusIn, - id__in: idIn, - total_amount: totalAmount, - total_amount__gt: totalAmountGt, - total_amount__lt: totalAmountLt, - total_amount__gte: totalAmountGte, - total_amount__lte: totalAmountLte, - amount, - amount__gt: amountGt, - amount__lt: amountLt, - amount__gte: amountGte, - amount__lte: amountLte, - currency, - counterpart_name: counterpartName, - counterpart_name__contains: counterpartNameContains, - counterpart_name__icontains: counterpartNameIcontains, - search_text: searchText, - due_date: dueDate, - due_date__gt: dueDateGt, - due_date__lt: dueDateLt, - due_date__gte: dueDateGte, - due_date__lte: dueDateLte, - document_id: documentId, - document_id__contains: documentIdContains, - document_id__icontains: documentIdIcontains, - was_created_by_user_id: wasCreatedByUserId, - counterpart_id: counterpartId, - source_of_payable_data: sourceOfPayableData, - ocr_status: ocrStatus, - line_item_id: lineItemId, - purchase_order_id: purchaseOrderId, - project_id: projectId, - tag_ids: tagIds, - } = request; - const _queryParams: Record = {}; - if (dimension != null) { - _queryParams["dimension"] = dimension; - } - - _queryParams["metric"] = metric; - _queryParams["aggregation_function"] = aggregationFunction; - if (dateDimensionBreakdown != null) { - _queryParams["date_dimension_breakdown"] = dateDimensionBreakdown; - } - - if (createdAtGt != null) { - _queryParams["created_at__gt"] = createdAtGt; - } - - if (createdAtLt != null) { - _queryParams["created_at__lt"] = createdAtLt; - } - - if (createdAtGte != null) { - _queryParams["created_at__gte"] = createdAtGte; - } - - if (createdAtLte != null) { - _queryParams["created_at__lte"] = createdAtLte; - } - - if (status != null) { - _queryParams["status"] = status; - } - - if (statusIn != null) { - if (Array.isArray(statusIn)) { - _queryParams["status__in"] = statusIn.map((item) => item); - } else { - _queryParams["status__in"] = statusIn; - } - } - - if (idIn != null) { - if (Array.isArray(idIn)) { - _queryParams["id__in"] = idIn.map((item) => item); - } else { - _queryParams["id__in"] = idIn; - } - } - - if (totalAmount != null) { - _queryParams["total_amount"] = totalAmount.toString(); - } - - if (totalAmountGt != null) { - _queryParams["total_amount__gt"] = totalAmountGt.toString(); - } - - if (totalAmountLt != null) { - _queryParams["total_amount__lt"] = totalAmountLt.toString(); - } - - if (totalAmountGte != null) { - _queryParams["total_amount__gte"] = totalAmountGte.toString(); - } - - if (totalAmountLte != null) { - _queryParams["total_amount__lte"] = totalAmountLte.toString(); - } - - if (amount != null) { - _queryParams["amount"] = amount.toString(); - } - - if (amountGt != null) { - _queryParams["amount__gt"] = amountGt.toString(); - } - - if (amountLt != null) { - _queryParams["amount__lt"] = amountLt.toString(); - } - - if (amountGte != null) { - _queryParams["amount__gte"] = amountGte.toString(); - } - - if (amountLte != null) { - _queryParams["amount__lte"] = amountLte.toString(); - } - - if (currency != null) { - _queryParams["currency"] = currency; - } - - if (counterpartName != null) { - _queryParams["counterpart_name"] = counterpartName; - } - - if (counterpartNameContains != null) { - _queryParams["counterpart_name__contains"] = counterpartNameContains; - } - - if (counterpartNameIcontains != null) { - _queryParams["counterpart_name__icontains"] = counterpartNameIcontains; - } - - if (searchText != null) { - _queryParams["search_text"] = searchText; - } - - if (dueDate != null) { - _queryParams["due_date"] = dueDate; - } - - if (dueDateGt != null) { - _queryParams["due_date__gt"] = dueDateGt; - } - - if (dueDateLt != null) { - _queryParams["due_date__lt"] = dueDateLt; - } - - if (dueDateGte != null) { - _queryParams["due_date__gte"] = dueDateGte; - } - - if (dueDateLte != null) { - _queryParams["due_date__lte"] = dueDateLte; - } - - if (documentId != null) { - _queryParams["document_id"] = documentId; - } - - if (documentIdContains != null) { - _queryParams["document_id__contains"] = documentIdContains; - } - - if (documentIdIcontains != null) { - _queryParams["document_id__icontains"] = documentIdIcontains; - } - - if (wasCreatedByUserId != null) { - _queryParams["was_created_by_user_id"] = wasCreatedByUserId; - } - - if (counterpartId != null) { - _queryParams["counterpart_id"] = counterpartId; - } - - if (sourceOfPayableData != null) { - _queryParams["source_of_payable_data"] = sourceOfPayableData; - } - - if (ocrStatus != null) { - _queryParams["ocr_status"] = ocrStatus; - } - - if (lineItemId != null) { - _queryParams["line_item_id"] = lineItemId; - } - - if (purchaseOrderId != null) { - _queryParams["purchase_order_id"] = purchaseOrderId; - } - - if (projectId != null) { - _queryParams["project_id"] = projectId; - } - - if (tagIds != null) { - if (Array.isArray(tagIds)) { - _queryParams["tag_ids"] = tagIds.map((item) => item); - } else { - _queryParams["tag_ids"] = tagIds; - } - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - "analytics/payables" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.PayableAnalyticsResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /analytics/payables."); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getAuthorizationHeader(): Promise { - const bearer = await core.Supplier.get(this._options.token); - if (bearer != null) { - return `Bearer ${bearer}`; - } - - return undefined; - } -} diff --git a/src/api/resources/analytics/client/index.ts b/src/api/resources/analytics/client/index.ts deleted file mode 100644 index 415726b..0000000 --- a/src/api/resources/analytics/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/api/resources/analytics/client/requests/GetAnalyticsPayablesRequest.ts b/src/api/resources/analytics/client/requests/GetAnalyticsPayablesRequest.ts deleted file mode 100644 index e7b17e5..0000000 --- a/src/api/resources/analytics/client/requests/GetAnalyticsPayablesRequest.ts +++ /dev/null @@ -1,187 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * { - * metric: "id", - * aggregation_function: "count" - * } - */ -export interface GetAnalyticsPayablesRequest { - dimension?: Monite.PayableDimensionEnum; - metric: Monite.PayableMetricEnum; - aggregation_function: Monite.AggregationFunctionEnum; - date_dimension_breakdown?: Monite.DateDimensionBreakdownEnum; - /** - * Return only payables created in Monite after the specified date and time. The value must be in the ISO 8601 format YYYY-MM-DDThh:mm[:ss[.ffffff]][z|±hh:mm]. - */ - created_at__gt?: string; - /** - * Return only payables created in Monite before the specified date and time. - */ - created_at__lt?: string; - /** - * Return only payables created in Monite on or after the specified date and time. - */ - created_at__gte?: string; - /** - * Return only payables created in Monite before or on the specified date and time. - */ - created_at__lte?: string; - /** - * Return only payables that have the specified [status](https://docs.monite.com/accounts-payable/payables/index). - * - * To query multiple statuses at once, use the `status__in` parameter instead. - */ - status?: Monite.PayableStateEnum; - /** - * Return only payables that have the specified [statuses](https://docs.monite.com/accounts-payable/payables/index). - * - * To specify multiple statuses, repeat this parameter for each value: `status__in=draft&status__in=new` - */ - status__in?: Monite.PayableStateEnum | Monite.PayableStateEnum[]; - /** - * Return only payables with specified IDs. Valid but nonexistent IDs do not raise errors but produce no results. - * - * To specify multiple IDs, repeat this parameter for each value: `id__in=&id__in=` - */ - id__in?: string | string[]; - /** - * Return only payables with the exact specified total amount. The amount must be specified in the minor units of currency. For example, $12.5 is represented as 1250. - */ - total_amount?: number; - /** - * Return only payables whose total amount (in minor units) exceeds the specified value. - */ - total_amount__gt?: number; - /** - * Return only payables whose total amount (in minor units) is less than the specified value. - */ - total_amount__lt?: number; - /** - * Return only payables whose total amount (in minor units) is greater than or equal to the specified value. - */ - total_amount__gte?: number; - /** - * Return only payables whose total amount (in minor units) is less than or equal to the specified value. - */ - total_amount__lte?: number; - /** - * Return only payables with the specified amount. - */ - amount?: number; - /** - * Return only payables whose amount (in minor units) exceeds the specified value. - */ - amount__gt?: number; - /** - * Return only payables whose amount (in minor units) is less than the specified value. - */ - amount__lt?: number; - /** - * Return only payables whose amount (in minor units) is greater than or equal to the specified value. - */ - amount__gte?: number; - /** - * Return only payables whose amount (in minor units) is less than or equal to the specified value. - */ - amount__lte?: number; - /** - * Return only payables that use the specified currency. - */ - currency?: Monite.CurrencyEnum; - /** - * Return only payables received from counterparts with the specified name (exact match, case-sensitive). - * - * For counterparts of `type = individual`, the full name is formatted as `first_name last_name`. - */ - counterpart_name?: string; - /** - * Return only payables received from counterparts whose name contains the specified string (case-sensitive). - */ - counterpart_name__contains?: string; - /** - * Return only payables received from counterparts whose name contains the specified string (case-insensitive). - */ - counterpart_name__icontains?: string; - /** - * Apply the `icontains` condition to search for the specified text in the `document_id` and `counterpart_name` fields in the payables. - */ - search_text?: string; - /** - * Return payables that are due on the specified date (YYYY-MM-DD) - */ - due_date?: string; - /** - * Return payables that are due after the specified date (exclusive, YYYY-MM-DD). - */ - due_date__gt?: string; - /** - * Return payables that are due before the specified date (exclusive, YYYY-MM-DD). - */ - due_date__lt?: string; - /** - * Return payables that are due on or after the specified date (YYYY-MM-DD). - */ - due_date__gte?: string; - /** - * Return payables that are due before or on the specified date (YYYY-MM-DD). - */ - due_date__lte?: string; - /** - * Return a payable with the exact specified document number (case-sensitive). - * - * The `document_id` is the user-facing document number such as INV-00042, not to be confused with Monite resource IDs (`id`). - */ - document_id?: string; - /** - * Return only payables whose document number (`document_id`) contains the specified string (case-sensitive). - */ - document_id__contains?: string; - /** - * Return only payables whose document number (`document_id`) contains the specified string (case-insensitive). - */ - document_id__icontains?: string; - /** - * Return only payables created in Monite by the entity user with the specified ID. - */ - was_created_by_user_id?: string; - /** - * Return only payables received from the counterpart with the specified ID. - * - * Counterparts that have been deleted but have associated payables will still return results here because the payables contain a frozen copy of the counterpart data. - * - * If the specified counterpart ID does not exist and never existed, no results are returned. - */ - counterpart_id?: string; - /** - * Return only payables coming from the specified source. - */ - source_of_payable_data?: Monite.SourceOfPayableDataEnum; - /** - * Return only payables with specific OCR statuses. - */ - ocr_status?: Monite.OcrStatusEnum; - /** - * Search for a payable by the identifier of the line item associated with it. - */ - line_item_id?: string; - /** - * Search for a payable by the identifier of the purchase order associated with it. - */ - purchase_order_id?: string; - /** - * Return only payables assigned to the project with the specified ID. - * - * Valid but nonexistent project IDs do not raise errors but return no results. - */ - project_id?: string; - /** - * Return only payables whose `tags` include at least one of the tags with the specified IDs. Valid but nonexistent tag IDs do not raise errors but produce no results. - */ - tag_ids?: string | string[]; -} diff --git a/src/api/resources/analytics/client/requests/index.ts b/src/api/resources/analytics/client/requests/index.ts deleted file mode 100644 index 2bb8389..0000000 --- a/src/api/resources/analytics/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type GetAnalyticsPayablesRequest } from "./GetAnalyticsPayablesRequest"; diff --git a/src/api/resources/analytics/index.ts b/src/api/resources/analytics/index.ts deleted file mode 100644 index 5ec7692..0000000 --- a/src/api/resources/analytics/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/api/resources/approvalPolicies/client/Client.ts b/src/api/resources/approvalPolicies/client/Client.ts index 3862a30..1135f3a 100644 --- a/src/api/resources/approvalPolicies/client/Client.ts +++ b/src/api/resources/approvalPolicies/client/Client.ts @@ -31,8 +31,6 @@ export declare namespace ApprovalPolicies { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -58,7 +56,6 @@ export class ApprovalPolicies { requestOptions?: ApprovalPolicies.RequestOptions ): Promise { const { - process_id: processId, order, limit, pagination_token: paginationToken, @@ -80,10 +77,6 @@ export class ApprovalPolicies { updated_at__lte: updatedAtLte, } = request; const _queryParams: Record = {}; - if (processId != null) { - _queryParams["process_id"] = processId; - } - if (order != null) { _queryParams["order"] = order; } @@ -187,7 +180,6 @@ export class ApprovalPolicies { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -225,7 +217,7 @@ export class ApprovalPolicies { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /approval_policies."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -275,7 +267,6 @@ export class ApprovalPolicies { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -315,7 +306,7 @@ export class ApprovalPolicies { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /approval_policies."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -361,7 +352,6 @@ export class ApprovalPolicies { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -400,9 +390,7 @@ export class ApprovalPolicies { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /approval_policies/{approval_policy_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -445,7 +433,6 @@ export class ApprovalPolicies { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -484,9 +471,7 @@ export class ApprovalPolicies { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /approval_policies/{approval_policy_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -535,7 +520,6 @@ export class ApprovalPolicies { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -577,9 +561,7 @@ export class ApprovalPolicies { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /approval_policies/{approval_policy_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/approvalPolicies/client/requests/ApprovalPoliciesGetRequest.ts b/src/api/resources/approvalPolicies/client/requests/ApprovalPoliciesGetRequest.ts index 5c3caa0..68319e0 100644 --- a/src/api/resources/approvalPolicies/client/requests/ApprovalPoliciesGetRequest.ts +++ b/src/api/resources/approvalPolicies/client/requests/ApprovalPoliciesGetRequest.ts @@ -9,7 +9,6 @@ import * as Monite from "../../../../index"; * {} */ export interface ApprovalPoliciesGetRequest { - process_id?: string; /** * Order by */ diff --git a/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyCreate.ts b/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyCreate.ts index 3c47452..160a355 100644 --- a/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyCreate.ts +++ b/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyCreate.ts @@ -13,10 +13,6 @@ import * as Monite from "../../../../index"; * } */ export interface ApprovalPolicyCreate { - /** The date and time (in the ISO 8601 format) when the approval policy becomes active. Only payables submitted for approval during the policy's active period will trigger this policy. If omitted or `null`, the policy is effective immediately. The value will be converted to UTC. */ - starts_at?: string; - /** The date and time (in the ISO 8601 format) when the approval policy stops being active and stops triggering approval workflows.If `ends_at` is provided in the request, then `starts_at` must also be provided and `ends_at` must be later than `starts_at`. The value will be converted to UTC. */ - ends_at?: string; /** The name of the approval policy. */ name: string; /** A brief description of the approval policy. */ diff --git a/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyUpdate.ts b/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyUpdate.ts index a70127c..47ab434 100644 --- a/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyUpdate.ts +++ b/src/api/resources/approvalPolicies/client/requests/ApprovalPolicyUpdate.ts @@ -9,10 +9,6 @@ import * as Monite from "../../../../index"; * {} */ export interface ApprovalPolicyUpdate { - /** The date and time (in the ISO 8601 format) when the approval policy becomes active. Only payables submitted for approval during the policy's active period will trigger this policy. If omitted or `null`, the policy is effective immediately. The value will be converted to UTC. */ - starts_at?: string; - /** The date and time (in the ISO 8601 format) when the approval policy stops being active and stops triggering approval workflows.If `ends_at` is provided in the request, then `starts_at` must also be provided and `ends_at` must be later than `starts_at`. The value will be converted to UTC. */ - ends_at?: string; /** The name of the approval policy. */ name?: string; /** A brief description of the approval policy. */ diff --git a/src/api/resources/approvalPolicies/resources/processes/client/Client.ts b/src/api/resources/approvalPolicies/resources/processes/client/Client.ts index c56520b..4b04d46 100644 --- a/src/api/resources/approvalPolicies/resources/processes/client/Client.ts +++ b/src/api/resources/approvalPolicies/resources/processes/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Processes { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -76,7 +74,6 @@ export class Processes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -115,9 +112,7 @@ export class Processes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /approval_policies/{approval_policy_id}/processes." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -165,7 +160,6 @@ export class Processes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -204,9 +198,7 @@ export class Processes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /approval_policies/{approval_policy_id}/processes/{process_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -256,7 +248,6 @@ export class Processes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -295,9 +286,7 @@ export class Processes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /approval_policies/{approval_policy_id}/processes/{process_id}/cancel." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -347,7 +336,6 @@ export class Processes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -386,9 +374,7 @@ export class Processes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /approval_policies/{approval_policy_id}/processes/{process_id}/steps." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/approvalRequests/client/Client.ts b/src/api/resources/approvalRequests/client/Client.ts index 63d28e5..1102e7e 100644 --- a/src/api/resources/approvalRequests/client/Client.ts +++ b/src/api/resources/approvalRequests/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace ApprovalRequests { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -195,7 +193,6 @@ export class ApprovalRequests { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -237,7 +234,7 @@ export class ApprovalRequests { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /approval_requests."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -288,7 +285,6 @@ export class ApprovalRequests { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -332,7 +328,7 @@ export class ApprovalRequests { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /approval_requests."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -378,7 +374,6 @@ export class ApprovalRequests { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -421,9 +416,7 @@ export class ApprovalRequests { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /approval_requests/{approval_request_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -469,7 +462,6 @@ export class ApprovalRequests { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -512,9 +504,7 @@ export class ApprovalRequests { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /approval_requests/{approval_request_id}/approve." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -560,7 +550,6 @@ export class ApprovalRequests { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -603,9 +592,7 @@ export class ApprovalRequests { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /approval_requests/{approval_request_id}/cancel." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -651,7 +638,6 @@ export class ApprovalRequests { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -694,9 +680,7 @@ export class ApprovalRequests { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /approval_requests/{approval_request_id}/reject." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/auditLogs/client/Client.ts b/src/api/resources/auditLogs/client/Client.ts index 565e24a..2c29205 100644 --- a/src/api/resources/auditLogs/client/Client.ts +++ b/src/api/resources/auditLogs/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace AuditLogs { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -134,7 +132,6 @@ export class AuditLogs { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -168,7 +165,7 @@ export class AuditLogs { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /audit_logs."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -206,7 +203,6 @@ export class AuditLogs { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -239,7 +235,7 @@ export class AuditLogs { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /audit_logs/{log_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/batchPayments/client/Client.ts b/src/api/resources/batchPayments/client/Client.ts index b5d8647..c5a54c0 100644 --- a/src/api/resources/batchPayments/client/Client.ts +++ b/src/api/resources/batchPayments/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace BatchPayments { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -83,7 +81,6 @@ export class BatchPayments { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -117,7 +114,7 @@ export class BatchPayments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /batch_payments."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -158,7 +155,6 @@ export class BatchPayments { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -191,9 +187,7 @@ export class BatchPayments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /batch_payments/{batch_payment_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/comments/client/Client.ts b/src/api/resources/comments/client/Client.ts index 7c51ab0..06f9550 100644 --- a/src/api/resources/comments/client/Client.ts +++ b/src/api/resources/comments/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Comments { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -126,7 +124,6 @@ export class Comments { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -166,7 +163,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /comments."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -217,7 +214,6 @@ export class Comments { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -259,7 +255,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /comments."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -303,7 +299,6 @@ export class Comments { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -344,7 +339,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /comments/{comment_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -388,7 +383,6 @@ export class Comments { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -429,7 +423,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /comments/{comment_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -478,7 +472,6 @@ export class Comments { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -520,7 +513,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /comments/{comment_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/counterparts/client/Client.ts b/src/api/resources/counterparts/client/Client.ts index 49fe619..5ba93c2 100644 --- a/src/api/resources/counterparts/client/Client.ts +++ b/src/api/resources/counterparts/client/Client.ts @@ -34,8 +34,6 @@ export declare namespace Counterparts { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -244,7 +242,6 @@ export class Counterparts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -280,7 +277,7 @@ export class Counterparts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /counterparts."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -335,7 +332,6 @@ export class Counterparts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -369,7 +365,7 @@ export class Counterparts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /counterparts."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -411,7 +407,6 @@ export class Counterparts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -446,9 +441,7 @@ export class Counterparts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -487,7 +480,6 @@ export class Counterparts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -522,9 +514,7 @@ export class Counterparts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /counterparts/{counterpart_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -570,7 +560,6 @@ export class Counterparts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -606,9 +595,7 @@ export class Counterparts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /counterparts/{counterpart_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -649,7 +636,6 @@ export class Counterparts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -682,9 +668,7 @@ export class Counterparts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/partner_metadata." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -731,7 +715,6 @@ export class Counterparts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -765,9 +748,7 @@ export class Counterparts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PUT /counterparts/{counterpart_id}/partner_metadata." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/counterparts/resources/addresses/client/Client.ts b/src/api/resources/counterparts/resources/addresses/client/Client.ts index 8bc8861..8955872 100644 --- a/src/api/resources/counterparts/resources/addresses/client/Client.ts +++ b/src/api/resources/counterparts/resources/addresses/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Addresses { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -72,7 +70,6 @@ export class Addresses { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -107,9 +104,7 @@ export class Addresses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/addresses." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -158,7 +153,6 @@ export class Addresses { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -194,9 +188,7 @@ export class Addresses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /counterparts/{counterpart_id}/addresses." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -240,7 +232,6 @@ export class Addresses { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -275,9 +266,7 @@ export class Addresses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/addresses/{address_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -321,7 +310,6 @@ export class Addresses { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -356,9 +344,7 @@ export class Addresses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /counterparts/{counterpart_id}/addresses/{address_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -404,7 +390,6 @@ export class Addresses { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -440,9 +425,7 @@ export class Addresses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /counterparts/{counterpart_id}/addresses/{address_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/counterparts/resources/bankAccounts/client/Client.ts b/src/api/resources/counterparts/resources/bankAccounts/client/Client.ts index 06ff11b..1757384 100644 --- a/src/api/resources/counterparts/resources/bankAccounts/client/Client.ts +++ b/src/api/resources/counterparts/resources/bankAccounts/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace BankAccounts { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -71,7 +69,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -104,9 +101,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/bank_accounts." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -153,7 +148,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -189,9 +183,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /counterparts/{counterpart_id}/bank_accounts." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -235,7 +227,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -270,9 +261,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/bank_accounts/{bank_account_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -316,7 +305,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -351,9 +339,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /counterparts/{counterpart_id}/bank_accounts/{bank_account_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -399,7 +385,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -435,9 +420,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /counterparts/{counterpart_id}/bank_accounts/{bank_account_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -482,7 +465,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -515,9 +497,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /counterparts/{counterpart_id}/bank_accounts/{bank_account_id}/make_default." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/counterparts/resources/contacts/client/Client.ts b/src/api/resources/counterparts/resources/contacts/client/Client.ts index c9e1f3a..9abaf05 100644 --- a/src/api/resources/counterparts/resources/contacts/client/Client.ts +++ b/src/api/resources/counterparts/resources/contacts/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Contacts { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -71,7 +69,6 @@ export class Contacts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -104,9 +101,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/contacts." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -159,7 +154,6 @@ export class Contacts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -195,9 +189,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /counterparts/{counterpart_id}/contacts." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -241,7 +233,6 @@ export class Contacts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -276,9 +267,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/contacts/{contact_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -322,7 +311,6 @@ export class Contacts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -357,9 +345,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /counterparts/{counterpart_id}/contacts/{contact_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -405,7 +391,6 @@ export class Contacts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -441,9 +426,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /counterparts/{counterpart_id}/contacts/{contact_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -489,7 +472,6 @@ export class Contacts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -524,9 +506,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /counterparts/{counterpart_id}/contacts/{contact_id}/make_default." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/counterparts/resources/vatIds/client/Client.ts b/src/api/resources/counterparts/resources/vatIds/client/Client.ts index b5a74a7..3e93554 100644 --- a/src/api/resources/counterparts/resources/vatIds/client/Client.ts +++ b/src/api/resources/counterparts/resources/vatIds/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace VatIds { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -71,7 +69,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -104,9 +101,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/vat_ids." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -152,7 +147,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -188,9 +182,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /counterparts/{counterpart_id}/vat_ids." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -234,7 +226,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -269,9 +260,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /counterparts/{counterpart_id}/vat_ids/{vat_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -315,7 +304,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -350,9 +338,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /counterparts/{counterpart_id}/vat_ids/{vat_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -398,7 +384,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -434,9 +419,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /counterparts/{counterpart_id}/vat_ids/{vat_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/creditNotes/client/Client.ts b/src/api/resources/creditNotes/client/Client.ts deleted file mode 100644 index 6d1ef3d..0000000 --- a/src/api/resources/creditNotes/client/Client.ts +++ /dev/null @@ -1,1770 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../environments"; -import * as core from "../../../../core"; -import * as Monite from "../../../index"; -import urlJoin from "url-join"; -import * as errors from "../../../../errors/index"; - -export declare namespace CreditNotes { - interface Options { - environment?: core.Supplier; - token?: core.Supplier; - /** Override the x-monite-version header */ - moniteVersion: core.Supplier; - /** Override the x-monite-entity-id header */ - moniteEntityId?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Override the x-monite-version header */ - moniteVersion?: string; - /** Override the x-monite-entity-id header */ - moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; - } -} - -export class CreditNotes { - constructor(protected readonly _options: CreditNotes.Options) {} - - /** - * @param {Monite.GetPayableCreditNotesRequest} request - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.BadRequestError} - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotAcceptableError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.getPayableCreditNotes() - */ - public async getPayableCreditNotes( - request: Monite.GetPayableCreditNotesRequest = {}, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const { - order, - limit, - pagination_token: paginationToken, - sort, - created_at__gt: createdAtGt, - created_at__lt: createdAtLt, - created_at__gte: createdAtGte, - created_at__lte: createdAtLte, - issued_at: issuedAt, - issued_at__gt: issuedAtGt, - issued_at__lt: issuedAtLt, - issued_at__gte: issuedAtGte, - issued_at__lte: issuedAtLte, - document_id: documentId, - document_id__iexact: documentIdIexact, - document_id__contains: documentIdContains, - document_id__icontains: documentIdIcontains, - amount__gt: amountGt, - amount__lt: amountLt, - amount__gte: amountGte, - amount__lte: amountLte, - subtotal__gt: subtotalGt, - subtotal__lt: subtotalLt, - subtotal__gte: subtotalGte, - subtotal__lte: subtotalLte, - based_on: basedOn, - counterpart_id: counterpartId, - created_by_entity_user_id: createdByEntityUserId, - status, - status__in: statusIn, - status__not_in: statusNotIn, - currency, - } = request; - const _queryParams: Record = {}; - if (order != null) { - _queryParams["order"] = order; - } - - if (limit != null) { - _queryParams["limit"] = limit.toString(); - } - - if (paginationToken != null) { - _queryParams["pagination_token"] = paginationToken; - } - - if (sort != null) { - _queryParams["sort"] = sort; - } - - if (createdAtGt != null) { - _queryParams["created_at__gt"] = createdAtGt; - } - - if (createdAtLt != null) { - _queryParams["created_at__lt"] = createdAtLt; - } - - if (createdAtGte != null) { - _queryParams["created_at__gte"] = createdAtGte; - } - - if (createdAtLte != null) { - _queryParams["created_at__lte"] = createdAtLte; - } - - if (issuedAt != null) { - _queryParams["issued_at"] = issuedAt; - } - - if (issuedAtGt != null) { - _queryParams["issued_at__gt"] = issuedAtGt; - } - - if (issuedAtLt != null) { - _queryParams["issued_at__lt"] = issuedAtLt; - } - - if (issuedAtGte != null) { - _queryParams["issued_at__gte"] = issuedAtGte; - } - - if (issuedAtLte != null) { - _queryParams["issued_at__lte"] = issuedAtLte; - } - - if (documentId != null) { - _queryParams["document_id"] = documentId; - } - - if (documentIdIexact != null) { - _queryParams["document_id__iexact"] = documentIdIexact; - } - - if (documentIdContains != null) { - _queryParams["document_id__contains"] = documentIdContains; - } - - if (documentIdIcontains != null) { - _queryParams["document_id__icontains"] = documentIdIcontains; - } - - if (amountGt != null) { - _queryParams["amount__gt"] = amountGt.toString(); - } - - if (amountLt != null) { - _queryParams["amount__lt"] = amountLt.toString(); - } - - if (amountGte != null) { - _queryParams["amount__gte"] = amountGte.toString(); - } - - if (amountLte != null) { - _queryParams["amount__lte"] = amountLte.toString(); - } - - if (subtotalGt != null) { - _queryParams["subtotal__gt"] = subtotalGt.toString(); - } - - if (subtotalLt != null) { - _queryParams["subtotal__lt"] = subtotalLt.toString(); - } - - if (subtotalGte != null) { - _queryParams["subtotal__gte"] = subtotalGte.toString(); - } - - if (subtotalLte != null) { - _queryParams["subtotal__lte"] = subtotalLte.toString(); - } - - if (basedOn != null) { - _queryParams["based_on"] = basedOn; - } - - if (counterpartId != null) { - _queryParams["counterpart_id"] = counterpartId; - } - - if (createdByEntityUserId != null) { - _queryParams["created_by_entity_user_id"] = createdByEntityUserId; - } - - if (status != null) { - _queryParams["status"] = status; - } - - if (statusIn != null) { - if (Array.isArray(statusIn)) { - _queryParams["status__in"] = statusIn.map((item) => item); - } else { - _queryParams["status__in"] = statusIn; - } - } - - if (statusNotIn != null) { - if (Array.isArray(statusNotIn)) { - _queryParams["status__not_in"] = statusNotIn.map((item) => item); - } else { - _queryParams["status__not_in"] = statusNotIn; - } - } - - if (currency != null) { - _queryParams["currency"] = currency; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - "payable_credit_notes" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNotePaginationResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Monite.BadRequestError(_response.error.body as Monite.ErrorSchemaResponse); - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 406: - throw new Monite.NotAcceptableError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payable_credit_notes."); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {Monite.CreditNoteCreateRequest} request - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.BadRequestError} - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.postPayableCreditNotes({ - * amount: 1200, - * based_on: "123e4567-e89b-12d3-a456-426614174000", - * document_id: "CN-2287", - * issued_at: "2024-01-15" - * }) - */ - public async postPayableCreditNotes( - request: Monite.CreditNoteCreateRequest, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - "payable_credit_notes" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Monite.BadRequestError(_response.error.body as Monite.ErrorSchemaResponse); - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payable_credit_notes."); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.getPayableCreditNotesId("credit_note_id") - */ - public async getPayableCreditNotesId( - creditNoteId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}` - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payable_credit_notes/{credit_note_id}." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.ConflictError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.deletePayableCreditNotesId("credit_note_id") - */ - public async deletePayableCreditNotesId( - creditNoteId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}` - ), - method: "DELETE", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 409: - throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /payable_credit_notes/{credit_note_id}." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {Monite.CreditNoteUpdateRequest} request - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.patchPayableCreditNotesId("credit_note_id") - */ - public async patchPayableCreditNotesId( - creditNoteId: string, - request: Monite.CreditNoteUpdateRequest = {}, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}` - ), - method: "PATCH", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /payable_credit_notes/{credit_note_id}." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Approve the credit note for appliance. - * - * @param {string} creditNoteId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.ConflictError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.postPayableCreditNotesIdApprove("credit_note_id") - */ - public async postPayableCreditNotesIdApprove( - creditNoteId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/approve` - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 409: - throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payable_credit_notes/{credit_note_id}/approve." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Cancel the credit note that was not confirmed during the review. - * - * @param {string} creditNoteId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.ConflictError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.postPayableCreditNotesIdCancel("credit_note_id") - */ - public async postPayableCreditNotesIdCancel( - creditNoteId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/cancel` - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 409: - throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payable_credit_notes/{credit_note_id}/cancel." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {Monite.GetPayableCreditNotesIdLineItemsRequest} request - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.getPayableCreditNotesIdLineItems("credit_note_id") - */ - public async getPayableCreditNotesIdLineItems( - creditNoteId: string, - request: Monite.GetPayableCreditNotesIdLineItemsRequest = {}, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const { - order, - limit, - pagination_token: paginationToken, - sort, - created_at__gt: createdAtGt, - created_at__lt: createdAtLt, - created_at__gte: createdAtGte, - created_at__lte: createdAtLte, - name, - name__iexact: nameIexact, - name__contains: nameContains, - name__icontains: nameIcontains, - description, - description__contains: descriptionContains, - description__icontains: descriptionIcontains, - total__gt: totalGt, - total__lt: totalLt, - total__gte: totalGte, - total__lte: totalLte, - subtotal__gt: subtotalGt, - subtotal__lt: subtotalLt, - subtotal__gte: subtotalGte, - subtotal__lte: subtotalLte, - unit_price__gt: unitPriceGt, - unit_price__lt: unitPriceLt, - unit_price__gte: unitPriceGte, - unit_price__lte: unitPriceLte, - quantity__gt: quantityGt, - quantity__lt: quantityLt, - quantity__gte: quantityGte, - quantity__lte: quantityLte, - tax__gt: taxGt, - tax__lt: taxLt, - tax__gte: taxGte, - tax__lte: taxLte, - tax_amount__gt: taxAmountGt, - tax_amount__lt: taxAmountLt, - tax_amount__gte: taxAmountGte, - tax_amount__lte: taxAmountLte, - created_by_user_id: createdByUserId, - unit, - unit__iexact: unitIexact, - source, - source_id: sourceId, - } = request; - const _queryParams: Record = {}; - if (order != null) { - _queryParams["order"] = order; - } - - if (limit != null) { - _queryParams["limit"] = limit.toString(); - } - - if (paginationToken != null) { - _queryParams["pagination_token"] = paginationToken; - } - - if (sort != null) { - _queryParams["sort"] = sort; - } - - if (createdAtGt != null) { - _queryParams["created_at__gt"] = createdAtGt; - } - - if (createdAtLt != null) { - _queryParams["created_at__lt"] = createdAtLt; - } - - if (createdAtGte != null) { - _queryParams["created_at__gte"] = createdAtGte; - } - - if (createdAtLte != null) { - _queryParams["created_at__lte"] = createdAtLte; - } - - if (name != null) { - _queryParams["name"] = name; - } - - if (nameIexact != null) { - _queryParams["name__iexact"] = nameIexact; - } - - if (nameContains != null) { - _queryParams["name__contains"] = nameContains; - } - - if (nameIcontains != null) { - _queryParams["name__icontains"] = nameIcontains; - } - - if (description != null) { - _queryParams["description"] = description; - } - - if (descriptionContains != null) { - _queryParams["description__contains"] = descriptionContains; - } - - if (descriptionIcontains != null) { - _queryParams["description__icontains"] = descriptionIcontains; - } - - if (totalGt != null) { - _queryParams["total__gt"] = totalGt.toString(); - } - - if (totalLt != null) { - _queryParams["total__lt"] = totalLt.toString(); - } - - if (totalGte != null) { - _queryParams["total__gte"] = totalGte.toString(); - } - - if (totalLte != null) { - _queryParams["total__lte"] = totalLte.toString(); - } - - if (subtotalGt != null) { - _queryParams["subtotal__gt"] = subtotalGt.toString(); - } - - if (subtotalLt != null) { - _queryParams["subtotal__lt"] = subtotalLt.toString(); - } - - if (subtotalGte != null) { - _queryParams["subtotal__gte"] = subtotalGte.toString(); - } - - if (subtotalLte != null) { - _queryParams["subtotal__lte"] = subtotalLte.toString(); - } - - if (unitPriceGt != null) { - _queryParams["unit_price__gt"] = unitPriceGt.toString(); - } - - if (unitPriceLt != null) { - _queryParams["unit_price__lt"] = unitPriceLt.toString(); - } - - if (unitPriceGte != null) { - _queryParams["unit_price__gte"] = unitPriceGte.toString(); - } - - if (unitPriceLte != null) { - _queryParams["unit_price__lte"] = unitPriceLte.toString(); - } - - if (quantityGt != null) { - _queryParams["quantity__gt"] = quantityGt.toString(); - } - - if (quantityLt != null) { - _queryParams["quantity__lt"] = quantityLt.toString(); - } - - if (quantityGte != null) { - _queryParams["quantity__gte"] = quantityGte.toString(); - } - - if (quantityLte != null) { - _queryParams["quantity__lte"] = quantityLte.toString(); - } - - if (taxGt != null) { - _queryParams["tax__gt"] = taxGt.toString(); - } - - if (taxLt != null) { - _queryParams["tax__lt"] = taxLt.toString(); - } - - if (taxGte != null) { - _queryParams["tax__gte"] = taxGte.toString(); - } - - if (taxLte != null) { - _queryParams["tax__lte"] = taxLte.toString(); - } - - if (taxAmountGt != null) { - _queryParams["tax_amount__gt"] = taxAmountGt.toString(); - } - - if (taxAmountLt != null) { - _queryParams["tax_amount__lt"] = taxAmountLt.toString(); - } - - if (taxAmountGte != null) { - _queryParams["tax_amount__gte"] = taxAmountGte.toString(); - } - - if (taxAmountLte != null) { - _queryParams["tax_amount__lte"] = taxAmountLte.toString(); - } - - if (createdByUserId != null) { - _queryParams["created_by_user_id"] = createdByUserId; - } - - if (unit != null) { - _queryParams["unit"] = unit; - } - - if (unitIexact != null) { - _queryParams["unit__iexact"] = unitIexact; - } - - if (source != null) { - _queryParams["source"] = source; - } - - if (sourceId != null) { - _queryParams["source_id"] = sourceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/line_items` - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteLineItemPaginationResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payable_credit_notes/{credit_note_id}/line_items." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {Monite.CreditNoteLineItemCreateRequest} request - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.postPayableCreditNotesIdLineItems("credit_note_id", {}) - */ - public async postPayableCreditNotesIdLineItems( - creditNoteId: string, - request: Monite.CreditNoteLineItemCreateRequest, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/line_items` - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteLineItemResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payable_credit_notes/{credit_note_id}/line_items." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {Monite.CreditNoteLineItemReplaceRequest} request - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.putPayableCreditNotesIdLineItems("credit_note_id", { - * data: [{}] - * }) - */ - public async putPayableCreditNotesIdLineItems( - creditNoteId: string, - request: Monite.CreditNoteLineItemReplaceRequest, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/line_items` - ), - method: "PUT", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteLineItemPaginationResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PUT /payable_credit_notes/{credit_note_id}/line_items." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {string} lineItemId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.getPayableCreditNotesIdLineItemsId("credit_note_id", "line_item_id") - */ - public async getPayableCreditNotesIdLineItemsId( - creditNoteId: string, - lineItemId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/line_items/${encodeURIComponent(lineItemId)}` - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteLineItemResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payable_credit_notes/{credit_note_id}/line_items/{line_item_id}." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {string} lineItemId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.deletePayableCreditNotesIdLineItemsId("credit_note_id", "line_item_id") - */ - public async deletePayableCreditNotesIdLineItemsId( - creditNoteId: string, - lineItemId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/line_items/${encodeURIComponent(lineItemId)}` - ), - method: "DELETE", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteLineItemPaginationResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /payable_credit_notes/{credit_note_id}/line_items/{line_item_id}." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} creditNoteId - * @param {string} lineItemId - * @param {Monite.CreditNoteLineItemUpdateRequest} request - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.patchPayableCreditNotesIdLineItemsId("credit_note_id", "line_item_id") - */ - public async patchPayableCreditNotesIdLineItemsId( - creditNoteId: string, - lineItemId: string, - request: Monite.CreditNoteLineItemUpdateRequest = {}, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/line_items/${encodeURIComponent(lineItemId)}` - ), - method: "PATCH", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteLineItemResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /payable_credit_notes/{credit_note_id}/line_items/{line_item_id}." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Decline the credit note when an approver finds any mismatch or discrepancies. - * - * @param {string} creditNoteId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.ConflictError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.postPayableCreditNotesIdReject("credit_note_id") - */ - public async postPayableCreditNotesIdReject( - creditNoteId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/reject` - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 409: - throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payable_credit_notes/{credit_note_id}/reject." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Start the approval process once the uploaded credit note is validated. - * - * @param {string} creditNoteId - * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnauthorizedError} - * @throws {@link Monite.ForbiddenError} - * @throws {@link Monite.NotFoundError} - * @throws {@link Monite.ConflictError} - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.creditNotes.postPayableCreditNotesIdSubmitForApproval("credit_note_id") - */ - public async postPayableCreditNotesIdSubmitForApproval( - creditNoteId: string, - requestOptions?: CreditNotes.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - `payable_credit_notes/${encodeURIComponent(creditNoteId)}/submit_for_approval` - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.CreditNoteResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 401: - throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); - case 403: - throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); - case 404: - throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); - case 409: - throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payable_credit_notes/{credit_note_id}/submit_for_approval." - ); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getAuthorizationHeader(): Promise { - const bearer = await core.Supplier.get(this._options.token); - if (bearer != null) { - return `Bearer ${bearer}`; - } - - return undefined; - } -} diff --git a/src/api/resources/creditNotes/client/index.ts b/src/api/resources/creditNotes/client/index.ts deleted file mode 100644 index 415726b..0000000 --- a/src/api/resources/creditNotes/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/api/resources/creditNotes/client/requests/CreditNoteCreateRequest.ts b/src/api/resources/creditNotes/client/requests/CreditNoteCreateRequest.ts deleted file mode 100644 index 26d853b..0000000 --- a/src/api/resources/creditNotes/client/requests/CreditNoteCreateRequest.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * { - * amount: 1200, - * based_on: "123e4567-e89b-12d3-a456-426614174000", - * document_id: "CN-2287", - * issued_at: "2024-01-15" - * } - */ -export interface CreditNoteCreateRequest { - /** The total amount including taxes */ - amount: number; - /** ID of the payable this credit note is based on. The credit note will be linked to this payable */ - based_on: string; - /** The document ID of the original payable that this credit note refers to */ - based_on_document_id?: string; - /** The ID of the counterpart's address */ - counterpart_address_id?: string; - /** The ID of the counterpart's bank account */ - counterpart_bank_account_id?: string; - /** The ID of the counterpart (vendor/supplier) */ - counterpart_id?: string; - /** The ID of the counterpart's VAT registration */ - counterpart_vat_id_id?: string; - /** The currency code of the credit note */ - currency?: Monite.CurrencyEnum; - /** An arbitrary description of this credit note */ - description?: string; - /** A unique credit note number assigned by the credit note issuer for tracking purposes */ - document_id: string; - /** The date when the credit note was issued, in the YYYY-MM-DD format */ - issued_at: string; - /** The ID of the project this credit note belongs to */ - project_id?: string; - /** The email address from which the credit note was received */ - sender?: string; - /** The subtotal amount before taxes */ - subtotal?: number; - /** List of tag IDs associated with this credit note */ - tag_ids?: string[]; - /** The tax percentage applied to the subtotal */ - tax?: number; - /** The calculated tax amount */ - tax_amount?: number; -} diff --git a/src/api/resources/creditNotes/client/requests/CreditNoteLineItemReplaceRequest.ts b/src/api/resources/creditNotes/client/requests/CreditNoteLineItemReplaceRequest.ts deleted file mode 100644 index 106cab7..0000000 --- a/src/api/resources/creditNotes/client/requests/CreditNoteLineItemReplaceRequest.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * { - * data: [{}] - * } - */ -export interface CreditNoteLineItemReplaceRequest { - /** List of credit note line items to replace existing ones */ - data: Monite.CreditNoteLineItemCreateRequest[]; -} diff --git a/src/api/resources/creditNotes/client/requests/CreditNoteLineItemUpdateRequest.ts b/src/api/resources/creditNotes/client/requests/CreditNoteLineItemUpdateRequest.ts deleted file mode 100644 index b2ae861..0000000 --- a/src/api/resources/creditNotes/client/requests/CreditNoteLineItemUpdateRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface CreditNoteLineItemUpdateRequest { - /** Detailed description of the line item */ - description?: string; - /** Name or title of the line item */ - name?: string; - /** Quantity of items */ - quantity?: number; - /** Subtotal amount before tax */ - subtotal?: number; - /** Tax percentage */ - tax?: number; - /** Tax amount */ - tax_amount?: number; - /** Total amount including tax */ - total?: number; - /** Unit of measurement */ - unit?: string; - /** Price per unit in smallest currency unit */ - unit_price?: number; -} diff --git a/src/api/resources/creditNotes/client/requests/CreditNoteUpdateRequest.ts b/src/api/resources/creditNotes/client/requests/CreditNoteUpdateRequest.ts deleted file mode 100644 index 9dcf834..0000000 --- a/src/api/resources/creditNotes/client/requests/CreditNoteUpdateRequest.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * {} - */ -export interface CreditNoteUpdateRequest { - /** The total amount including taxes */ - amount?: number; - /** ID of the payable this credit note is based on. The credit note will be linked to this payable */ - based_on?: string; - /** The document ID of the original payable */ - based_on_document_id?: string; - /** ID of the counterpart's address */ - counterpart_address_id?: string; - /** ID of the counterpart's bank account */ - counterpart_bank_account_id?: string; - /** ID of the counterpart */ - counterpart_id?: string; - /** ID of the counterpart's VAT registration */ - counterpart_vat_id_id?: string; - /** The currency code of the credit note */ - currency?: Monite.CurrencyEnum; - /** An arbitrary description of this credit note */ - description?: string; - /** A unique credit note number assigned by the credit note issuer for tracking purposes */ - document_id?: string; - /** The date when the credit note was issued, in the YYYY-MM-DD format */ - issued_at?: string; - /** The ID of the project this credit note belongs to */ - project_id?: string; - /** Email address of the sender */ - sender?: string; - /** The subtotal amount before taxes */ - subtotal?: number; - /** List of tag IDs associated with this credit note */ - tag_ids?: string[]; - /** The tax percentage applied to the subtotal */ - tax?: number; - /** The calculated tax amount */ - tax_amount?: number; -} diff --git a/src/api/resources/creditNotes/client/requests/GetPayableCreditNotesIdLineItemsRequest.ts b/src/api/resources/creditNotes/client/requests/GetPayableCreditNotesIdLineItemsRequest.ts deleted file mode 100644 index f854201..0000000 --- a/src/api/resources/creditNotes/client/requests/GetPayableCreditNotesIdLineItemsRequest.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * {} - */ -export interface GetPayableCreditNotesIdLineItemsRequest { - /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. - */ - order?: Monite.OrderEnum; - /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. - */ - limit?: number; - /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. - */ - pagination_token?: string; - /** - * The field to sort the results by. Typically used together with the `order` parameter. - */ - sort?: Monite.CreditNoteLineItemCursorFields; - created_at__gt?: string; - created_at__lt?: string; - created_at__gte?: string; - created_at__lte?: string; - name?: string; - name__iexact?: string; - name__contains?: string; - name__icontains?: string; - description?: string; - description__contains?: string; - description__icontains?: string; - total__gt?: number; - total__lt?: number; - total__gte?: number; - total__lte?: number; - subtotal__gt?: number; - subtotal__lt?: number; - subtotal__gte?: number; - subtotal__lte?: number; - unit_price__gt?: number; - unit_price__lt?: number; - unit_price__gte?: number; - unit_price__lte?: number; - quantity__gt?: number; - quantity__lt?: number; - quantity__gte?: number; - quantity__lte?: number; - tax__gt?: number; - tax__lt?: number; - tax__gte?: number; - tax__lte?: number; - tax_amount__gt?: number; - tax_amount__lt?: number; - tax_amount__gte?: number; - tax_amount__lte?: number; - created_by_user_id?: string; - unit?: string; - unit__iexact?: string; - source?: string; - source_id?: string; -} diff --git a/src/api/resources/creditNotes/client/requests/GetPayableCreditNotesRequest.ts b/src/api/resources/creditNotes/client/requests/GetPayableCreditNotesRequest.ts deleted file mode 100644 index d7d9d71..0000000 --- a/src/api/resources/creditNotes/client/requests/GetPayableCreditNotesRequest.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * {} - */ -export interface GetPayableCreditNotesRequest { - /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. - */ - order?: Monite.OrderEnum; - /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. - */ - limit?: number; - /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. - */ - pagination_token?: string; - /** - * The field to sort the results by. Typically used together with the `order` parameter. - */ - sort?: Monite.CreditNoteCursorFields; - created_at__gt?: string; - created_at__lt?: string; - created_at__gte?: string; - created_at__lte?: string; - issued_at?: string; - issued_at__gt?: string; - issued_at__lt?: string; - issued_at__gte?: string; - issued_at__lte?: string; - document_id?: string; - document_id__iexact?: string; - document_id__contains?: string; - document_id__icontains?: string; - amount__gt?: number; - amount__lt?: number; - amount__gte?: number; - amount__lte?: number; - subtotal__gt?: number; - subtotal__lt?: number; - subtotal__gte?: number; - subtotal__lte?: number; - based_on?: string; - counterpart_id?: string; - created_by_entity_user_id?: string; - status?: Monite.CreditNoteStateEnum; - status__in?: Monite.CreditNoteStateEnum | Monite.CreditNoteStateEnum[]; - status__not_in?: Monite.CreditNoteStateEnum | Monite.CreditNoteStateEnum[]; - currency?: Monite.CurrencyEnum; -} diff --git a/src/api/resources/creditNotes/client/requests/index.ts b/src/api/resources/creditNotes/client/requests/index.ts deleted file mode 100644 index 0b27749..0000000 --- a/src/api/resources/creditNotes/client/requests/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { type GetPayableCreditNotesRequest } from "./GetPayableCreditNotesRequest"; -export { type CreditNoteCreateRequest } from "./CreditNoteCreateRequest"; -export { type CreditNoteUpdateRequest } from "./CreditNoteUpdateRequest"; -export { type GetPayableCreditNotesIdLineItemsRequest } from "./GetPayableCreditNotesIdLineItemsRequest"; -export { type CreditNoteLineItemReplaceRequest } from "./CreditNoteLineItemReplaceRequest"; -export { type CreditNoteLineItemUpdateRequest } from "./CreditNoteLineItemUpdateRequest"; diff --git a/src/api/resources/creditNotes/index.ts b/src/api/resources/creditNotes/index.ts deleted file mode 100644 index 5ec7692..0000000 --- a/src/api/resources/creditNotes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/api/resources/dataExports/client/Client.ts b/src/api/resources/dataExports/client/Client.ts index 934290f..d11ba2f 100644 --- a/src/api/resources/dataExports/client/Client.ts +++ b/src/api/resources/dataExports/client/Client.ts @@ -31,8 +31,6 @@ export declare namespace DataExports { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -124,7 +122,6 @@ export class DataExports { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -166,7 +163,7 @@ export class DataExports { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /data_exports."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -220,7 +217,6 @@ export class DataExports { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -264,7 +260,7 @@ export class DataExports { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /data_exports."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -303,7 +299,6 @@ export class DataExports { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -336,9 +331,7 @@ export class DataExports { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /data_exports/supported_formats." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -383,7 +376,6 @@ export class DataExports { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -424,9 +416,7 @@ export class DataExports { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /data_exports/{document_export_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/dataExports/resources/extraData/client/Client.ts b/src/api/resources/dataExports/resources/extraData/client/Client.ts index 9039ef9..25e1981 100644 --- a/src/api/resources/dataExports/resources/extraData/client/Client.ts +++ b/src/api/resources/dataExports/resources/extraData/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace ExtraData { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -151,7 +149,6 @@ export class ExtraData { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -189,7 +186,7 @@ export class ExtraData { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /data_exports/extra_data."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -237,7 +234,6 @@ export class ExtraData { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -277,7 +273,7 @@ export class ExtraData { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /data_exports/extra_data."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -321,7 +317,6 @@ export class ExtraData { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -360,9 +355,7 @@ export class ExtraData { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /data_exports/extra_data/{extra_data_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -406,7 +399,6 @@ export class ExtraData { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -445,9 +437,7 @@ export class ExtraData { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /data_exports/extra_data/{extra_data_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -494,7 +484,6 @@ export class ExtraData { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -536,9 +525,7 @@ export class ExtraData { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /data_exports/extra_data/{extra_data_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entities/client/Client.ts b/src/api/resources/entities/client/Client.ts index 9395d48..191bb8a 100644 --- a/src/api/resources/entities/client/Client.ts +++ b/src/api/resources/entities/client/Client.ts @@ -37,8 +37,6 @@ export declare namespace Entities { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -173,7 +171,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -215,7 +212,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entities."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -268,7 +265,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -304,7 +300,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /entities."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -344,7 +340,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -379,7 +374,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entities/me."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -423,7 +418,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -459,7 +453,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /entities/me."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -500,7 +494,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -535,7 +528,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entities/{entity_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -581,7 +574,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -617,7 +609,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /entities/{entity_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -667,7 +659,6 @@ export class Entities { "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, - ...requestOptions?.headers, }, requestType: "file", duplex: _maybeEncodedRequest.duplex, @@ -703,7 +694,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PUT /entities/{entity_id}/logo."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -742,7 +733,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -777,7 +767,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /entities/{entity_id}/logo."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -820,7 +810,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -853,9 +842,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /entities/{entity_id}/partner_metadata." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -904,7 +891,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -938,9 +924,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PUT /entities/{entity_id}/partner_metadata." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -984,7 +968,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1019,9 +1002,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /entities/{entity_id}/settings." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1067,7 +1048,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1103,9 +1083,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /entities/{entity_id}/settings." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1148,7 +1126,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1182,7 +1159,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /onboarding_documents."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1223,7 +1200,6 @@ export class Entities { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1256,7 +1232,7 @@ export class Entities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /onboarding_requirements."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entities/client/requests/CreateEntityRequest.ts b/src/api/resources/entities/client/requests/CreateEntityRequest.ts index a0dd185..bad8323 100644 --- a/src/api/resources/entities/client/requests/CreateEntityRequest.ts +++ b/src/api/resources/entities/client/requests/CreateEntityRequest.ts @@ -26,7 +26,7 @@ export interface CreateEntityRequest { individual?: Monite.IndividualSchema; /** A set of meta data describing the organization */ organization?: Monite.OrganizationSchema; - /** The contact phone number of the entity. Required for US organizations to use payments. */ + /** A phone number of the entity */ phone?: string; /** The entity's taxpayer identification number or tax ID. This field is required for entities that are non-VAT registered. */ tax_id?: string; diff --git a/src/api/resources/entities/resources/bankAccounts/client/Client.ts b/src/api/resources/entities/resources/bankAccounts/client/Client.ts index d6ee378..9e8b416 100644 --- a/src/api/resources/entities/resources/bankAccounts/client/Client.ts +++ b/src/api/resources/entities/resources/bankAccounts/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace BankAccounts { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -72,7 +70,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -107,7 +104,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /bank_accounts."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -120,13 +117,13 @@ export class BankAccounts { * * The minimum required fields are `currency` and `country`. Other required fields depend on the currency: * - * - EUR accounts require `iban`. - * - GBP accounts require `account_holder_name`, `account_number`, and `sort_code`. - * - USD accounts require `account_holder_name`, `account_number`, and `routing_number`. - * - Accounts in other currencies require one of: - * - `iban` - * - `account_number` and `sort_code` - * - `account_number` and `routing_number` + * * EUR accounts require `iban`. + * * GBP accounts require `account_holder_name`, `account_number`, and `sort_code`. + * * USD accounts require `account_holder_name`, `account_number`, and `routing_number`. + * * Accounts in other currencies require one of: + * * `iban` + * * `account_number` and `sort_code` + * * `account_number` and `routing_number` * * @param {Monite.entities.CreateEntityBankAccountRequest} request * @param {BankAccounts.RequestOptions} requestOptions - Request-specific configuration. @@ -164,7 +161,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -200,7 +196,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /bank_accounts."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -261,7 +257,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -295,9 +290,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /bank_accounts/complete_verification." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -347,7 +340,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -381,9 +373,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /bank_accounts/start_verification." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -428,7 +418,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -465,9 +454,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /bank_accounts/{bank_account_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -509,7 +496,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -546,9 +532,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /bank_accounts/{bank_account_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -595,7 +579,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -633,9 +616,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /bank_accounts/{bank_account_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -680,7 +661,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -714,9 +694,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /bank_accounts/{bank_account_id}/complete_verification." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -761,7 +739,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -798,9 +775,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /bank_accounts/{bank_account_id}/make_default." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -849,7 +824,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -883,9 +857,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /bank_accounts/{bank_account_id}/refresh_verification." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -926,7 +898,6 @@ export class BankAccounts { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -959,9 +930,7 @@ export class BankAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /bank_accounts/{bank_account_id}/verifications." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entities/resources/bankAccounts/client/requests/CreateEntityBankAccountRequest.ts b/src/api/resources/entities/resources/bankAccounts/client/requests/CreateEntityBankAccountRequest.ts index 9a7d5c2..688002c 100644 --- a/src/api/resources/entities/resources/bankAccounts/client/requests/CreateEntityBankAccountRequest.ts +++ b/src/api/resources/entities/resources/bankAccounts/client/requests/CreateEntityBankAccountRequest.ts @@ -30,7 +30,7 @@ export interface CreateEntityBankAccountRequest { iban?: string; /** If set to `true` or if this is the first bank account added for the given currency, this account becomes the default one for its currency. */ is_default_for_currency?: boolean; - /** The bank's routing transit number (RTN) or branch code. Required if the account currency is USD. US routing numbers consist of 9 digits. */ + /** The bank's routing transit number (RTN). Required if the account currency is USD. US routing numbers consist of 9 digits. */ routing_number?: string; /** The bank's sort code. Required if the account currency is GBP. */ sort_code?: string; diff --git a/src/api/resources/entities/resources/onboardingData/client/Client.ts b/src/api/resources/entities/resources/onboardingData/client/Client.ts index 59d8f00..bc7b00b 100644 --- a/src/api/resources/entities/resources/onboardingData/client/Client.ts +++ b/src/api/resources/entities/resources/onboardingData/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace OnboardingData { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -73,7 +71,6 @@ export class OnboardingData { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -110,9 +107,7 @@ export class OnboardingData { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /entities/{entity_id}/onboarding_data." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -157,7 +152,6 @@ export class OnboardingData { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -195,9 +189,7 @@ export class OnboardingData { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /entities/{entity_id}/onboarding_data." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entities/resources/paymentMethods/client/Client.ts b/src/api/resources/entities/resources/paymentMethods/client/Client.ts index 897cacc..e6cf798 100644 --- a/src/api/resources/entities/resources/paymentMethods/client/Client.ts +++ b/src/api/resources/entities/resources/paymentMethods/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PaymentMethods { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -73,7 +71,6 @@ export class PaymentMethods { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -106,9 +103,7 @@ export class PaymentMethods { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /entities/{entity_id}/payment_methods." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -153,7 +148,6 @@ export class PaymentMethods { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -187,9 +181,7 @@ export class PaymentMethods { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PUT /entities/{entity_id}/payment_methods." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entities/resources/persons/client/Client.ts b/src/api/resources/entities/resources/persons/client/Client.ts index d2984f1..e5daf90 100644 --- a/src/api/resources/entities/resources/persons/client/Client.ts +++ b/src/api/resources/entities/resources/persons/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Persons { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -67,7 +65,6 @@ export class Persons { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -100,7 +97,7 @@ export class Persons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /persons."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -147,7 +144,6 @@ export class Persons { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -183,7 +179,7 @@ export class Persons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /persons."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -222,7 +218,6 @@ export class Persons { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -257,7 +252,7 @@ export class Persons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /persons/{person_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -297,7 +292,6 @@ export class Persons { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -334,7 +328,7 @@ export class Persons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /persons/{person_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -379,7 +373,6 @@ export class Persons { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -417,7 +410,7 @@ export class Persons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /persons/{person_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -462,7 +455,6 @@ export class Persons { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -496,9 +488,7 @@ export class Persons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /persons/{person_id}/onboarding_documents." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entities/resources/vatIds/client/Client.ts b/src/api/resources/entities/resources/vatIds/client/Client.ts index 11bfc3b..67618f3 100644 --- a/src/api/resources/entities/resources/vatIds/client/Client.ts +++ b/src/api/resources/entities/resources/vatIds/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace VatIds { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -71,7 +69,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -104,7 +101,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entities/{entity_id}/vat_ids."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -151,7 +148,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -187,9 +183,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /entities/{entity_id}/vat_ids." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -233,7 +227,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -268,9 +261,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /entities/{entity_id}/vat_ids/{id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -310,7 +301,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -345,9 +335,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /entities/{entity_id}/vat_ids/{id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -393,7 +381,6 @@ export class VatIds { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -429,9 +416,7 @@ export class VatIds { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /entities/{entity_id}/vat_ids/{id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entityUsers/client/Client.ts b/src/api/resources/entityUsers/client/Client.ts index 1ad3b20..5235bcd 100644 --- a/src/api/resources/entityUsers/client/Client.ts +++ b/src/api/resources/entityUsers/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace EntityUsers { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -70,7 +68,6 @@ export class EntityUsers { login, status, first_name: firstName, - name__istartswith: nameIstartswith, created_at__gt: createdAtGt, created_at__lt: createdAtLt, created_at__gte: createdAtGte, @@ -133,10 +130,6 @@ export class EntityUsers { _queryParams["first_name"] = firstName; } - if (nameIstartswith != null) { - _queryParams["name__istartswith"] = nameIstartswith; - } - if (createdAtGt != null) { _queryParams["created_at__gt"] = createdAtGt; } @@ -172,7 +165,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -214,7 +206,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entity_users."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -234,7 +226,7 @@ export class EntityUsers { * * @example * await client.entityUsers.create({ - * first_name: "Casey", + * first_name: "Andrey", * login: "login" * }) */ @@ -261,7 +253,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -297,7 +288,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /entity_users."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -337,7 +328,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -372,7 +362,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entity_users/me."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -416,7 +406,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -452,7 +441,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /entity_users/me."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -492,7 +481,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -527,7 +515,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entity_users/my_entity."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -571,7 +559,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -607,7 +594,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /entity_users/my_entity."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -646,7 +633,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -679,7 +665,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /entity_users/my_role."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -723,7 +709,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -758,9 +743,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /entity_users/{entity_user_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -799,7 +782,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -834,9 +816,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /entity_users/{entity_user_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -882,7 +862,6 @@ export class EntityUsers { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -918,9 +897,7 @@ export class EntityUsers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /entity_users/{entity_user_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/entityUsers/client/requests/CreateEntityUserRequest.ts b/src/api/resources/entityUsers/client/requests/CreateEntityUserRequest.ts index f7e3aff..8d12dad 100644 --- a/src/api/resources/entityUsers/client/requests/CreateEntityUserRequest.ts +++ b/src/api/resources/entityUsers/client/requests/CreateEntityUserRequest.ts @@ -5,7 +5,7 @@ /** * @example * { - * first_name: "Casey", + * first_name: "Andrey", * login: "login" * } */ diff --git a/src/api/resources/entityUsers/client/requests/EntityUsersGetRequest.ts b/src/api/resources/entityUsers/client/requests/EntityUsersGetRequest.ts index eaa72b6..6bcc1be 100644 --- a/src/api/resources/entityUsers/client/requests/EntityUsersGetRequest.ts +++ b/src/api/resources/entityUsers/client/requests/EntityUsersGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../index"; */ export interface EntityUsersGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.EntityUserCursorFields; id__in?: string | string[]; @@ -34,7 +32,6 @@ export interface EntityUsersGetRequest { login?: string; status?: string; first_name?: string; - name__istartswith?: string; created_at__gt?: string; created_at__lt?: string; created_at__gte?: string; diff --git a/src/api/resources/events/client/Client.ts b/src/api/resources/events/client/Client.ts index 124d635..813599b 100644 --- a/src/api/resources/events/client/Client.ts +++ b/src/api/resources/events/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Events { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -39,11 +37,7 @@ export class Events { constructor(protected readonly _options: Events.Options) {} /** - * Returns all webhook events that were triggered for the specified entity based on your enabled webhook subscriptions. These are the same events that were sent to your configured webhook listener endpoints, aggregated into a single list. Results can be filtered by the related object type or time period. - * - * You can use this to get the missed events for the time periods when your webhook listener was temporarily unavailable. - * - * We guarantee access to event data only from the last three months. Earlier events may be unavailable. + * Get events for a given entity. * * @param {Monite.EventsGetRequest} request * @param {Events.RequestOptions} requestOptions - Request-specific configuration. @@ -125,7 +119,6 @@ export class Events { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -159,7 +152,7 @@ export class Events { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /events."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -168,9 +161,9 @@ export class Events { } /** - * Get a webhook event by its ID. The data is the same as you might have previously received in a webhook sent by Monite to your server. + * Get event by ID. * - * @param {string} eventId - ID of the webhook event. This is the `id` value you might have received in a webhook or retrieved from `GET /events`. + * @param {string} eventId * @param {Events.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Monite.UnprocessableEntityError} @@ -199,7 +192,6 @@ export class Events { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -232,7 +224,7 @@ export class Events { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /events/{event_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/events/client/requests/EventsGetRequest.ts b/src/api/resources/events/client/requests/EventsGetRequest.ts index 116ecf2..35726a7 100644 --- a/src/api/resources/events/client/requests/EventsGetRequest.ts +++ b/src/api/resources/events/client/requests/EventsGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../index"; */ export interface EventsGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.EventCursorFields; object_type?: Monite.WebhookObjectType; diff --git a/src/api/resources/files/client/Client.ts b/src/api/resources/files/client/Client.ts index b9071d7..fc75c07 100644 --- a/src/api/resources/files/client/Client.ts +++ b/src/api/resources/files/client/Client.ts @@ -32,8 +32,6 @@ export declare namespace Files { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -48,9 +46,7 @@ export class Files { * @throws {@link Monite.InternalServerError} * * @example - * await client.files.get({ - * id__in: "string" - * }) + * await client.files.get() */ public async get( request: Monite.FilesGetRequest = {}, @@ -85,7 +81,6 @@ export class Files { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -119,7 +114,7 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /files."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -169,7 +164,6 @@ export class Files { "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, - ...requestOptions?.headers, }, requestType: "file", duplex: _maybeEncodedRequest.duplex, @@ -203,7 +197,7 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /files."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -241,7 +235,6 @@ export class Files { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -274,7 +267,7 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /files/{file_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -312,7 +305,6 @@ export class Files { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -345,7 +337,7 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /files/{file_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/files/client/requests/FilesGetRequest.ts b/src/api/resources/files/client/requests/FilesGetRequest.ts index 766a81c..66ec636 100644 --- a/src/api/resources/files/client/requests/FilesGetRequest.ts +++ b/src/api/resources/files/client/requests/FilesGetRequest.ts @@ -4,9 +4,7 @@ /** * @example - * { - * id__in: "string" - * } + * {} */ export interface FilesGetRequest { id__in?: string | string[]; diff --git a/src/api/resources/financing/client/Client.ts b/src/api/resources/financing/client/Client.ts deleted file mode 100644 index f748c56..0000000 --- a/src/api/resources/financing/client/Client.ts +++ /dev/null @@ -1,520 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../environments"; -import * as core from "../../../../core"; -import * as Monite from "../../../index"; -import urlJoin from "url-join"; -import * as errors from "../../../../errors/index"; - -export declare namespace Financing { - interface Options { - environment?: core.Supplier; - token?: core.Supplier; - /** Override the x-monite-version header */ - moniteVersion: core.Supplier; - /** Override the x-monite-entity-id header */ - moniteEntityId?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Override the x-monite-version header */ - moniteVersion?: string; - /** Override the x-monite-entity-id header */ - moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; - } -} - -export class Financing { - constructor(protected readonly _options: Financing.Options) {} - - /** - * Returns a list of invoices requested for financing - * - * @param {Monite.GetFinancingInvoicesRequest} request - * @param {Financing.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.financing.getFinancingInvoices() - */ - public async getFinancingInvoices( - request: Monite.GetFinancingInvoicesRequest = {}, - requestOptions?: Financing.RequestOptions - ): Promise { - const { - order, - limit, - pagination_token: paginationToken, - sort, - invoice_id: invoiceId, - invoice_id__in: invoiceIdIn, - status, - status__in: statusIn, - type: type_, - type__in: typeIn, - document_id: documentId, - document_id__in: documentIdIn, - issue_date__gt: issueDateGt, - issue_date__lt: issueDateLt, - issue_date__gte: issueDateGte, - issue_date__lte: issueDateLte, - due_date__gt: dueDateGt, - due_date__lt: dueDateLt, - due_date__gte: dueDateGte, - due_date__lte: dueDateLte, - created_at__gt: createdAtGt, - created_at__lt: createdAtLt, - created_at__gte: createdAtGte, - created_at__lte: createdAtLte, - total_amount: totalAmount, - total_amount__gt: totalAmountGt, - total_amount__lt: totalAmountLt, - total_amount__gte: totalAmountGte, - total_amount__lte: totalAmountLte, - } = request; - const _queryParams: Record = {}; - if (order != null) { - _queryParams["order"] = order; - } - - if (limit != null) { - _queryParams["limit"] = limit.toString(); - } - - if (paginationToken != null) { - _queryParams["pagination_token"] = paginationToken; - } - - if (sort != null) { - _queryParams["sort"] = sort; - } - - if (invoiceId != null) { - _queryParams["invoice_id"] = invoiceId; - } - - if (invoiceIdIn != null) { - if (Array.isArray(invoiceIdIn)) { - _queryParams["invoice_id__in"] = invoiceIdIn.map((item) => item); - } else { - _queryParams["invoice_id__in"] = invoiceIdIn; - } - } - - if (status != null) { - _queryParams["status"] = status; - } - - if (statusIn != null) { - if (Array.isArray(statusIn)) { - _queryParams["status__in"] = statusIn.map((item) => item); - } else { - _queryParams["status__in"] = statusIn; - } - } - - if (type_ != null) { - _queryParams["type"] = type_; - } - - if (typeIn != null) { - if (Array.isArray(typeIn)) { - _queryParams["type__in"] = typeIn.map((item) => item); - } else { - _queryParams["type__in"] = typeIn; - } - } - - if (documentId != null) { - _queryParams["document_id"] = documentId; - } - - if (documentIdIn != null) { - if (Array.isArray(documentIdIn)) { - _queryParams["document_id__in"] = documentIdIn.map((item) => item); - } else { - _queryParams["document_id__in"] = documentIdIn; - } - } - - if (issueDateGt != null) { - _queryParams["issue_date__gt"] = issueDateGt; - } - - if (issueDateLt != null) { - _queryParams["issue_date__lt"] = issueDateLt; - } - - if (issueDateGte != null) { - _queryParams["issue_date__gte"] = issueDateGte; - } - - if (issueDateLte != null) { - _queryParams["issue_date__lte"] = issueDateLte; - } - - if (dueDateGt != null) { - _queryParams["due_date__gt"] = dueDateGt; - } - - if (dueDateLt != null) { - _queryParams["due_date__lt"] = dueDateLt; - } - - if (dueDateGte != null) { - _queryParams["due_date__gte"] = dueDateGte; - } - - if (dueDateLte != null) { - _queryParams["due_date__lte"] = dueDateLte; - } - - if (createdAtGt != null) { - _queryParams["created_at__gt"] = createdAtGt; - } - - if (createdAtLt != null) { - _queryParams["created_at__lt"] = createdAtLt; - } - - if (createdAtGte != null) { - _queryParams["created_at__gte"] = createdAtGte; - } - - if (createdAtLte != null) { - _queryParams["created_at__lte"] = createdAtLte; - } - - if (totalAmount != null) { - _queryParams["total_amount"] = totalAmount.toString(); - } - - if (totalAmountGt != null) { - _queryParams["total_amount__gt"] = totalAmountGt.toString(); - } - - if (totalAmountLt != null) { - _queryParams["total_amount__lt"] = totalAmountLt.toString(); - } - - if (totalAmountGte != null) { - _queryParams["total_amount__gte"] = totalAmountGte.toString(); - } - - if (totalAmountLte != null) { - _queryParams["total_amount__lte"] = totalAmountLte.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - "financing_invoices" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.FinancingInvoiceListResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /financing_invoices."); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Returns a session token and a connect token to open Kanmon SDK for confirming invoice details. - * - * @param {Monite.FinancingPushInvoicesRequest} request - * @param {Financing.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.financing.postFinancingInvoices({ - * invoices: [{ - * id: "id", - * type: "payable" - * }] - * }) - */ - public async postFinancingInvoices( - request: Monite.FinancingPushInvoicesRequest, - requestOptions?: Financing.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - "financing_invoices" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.FinancingPushInvoicesResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /financing_invoices."); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Returns a list of financing offers and the business's onboarding status - * - * @param {Financing.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.financing.getFinancingOffers() - */ - public async getFinancingOffers( - requestOptions?: Financing.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - "financing_offers" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.FinancingOffersResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /financing_offers."); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Returns a token for Kanmon SDK. Creates a business and user on Kanmon if not already exist. - * - * @param {Financing.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Monite.UnprocessableEntityError} - * @throws {@link Monite.InternalServerError} - * - * @example - * await client.financing.postFinancingTokens() - */ - public async postFinancingTokens( - requestOptions?: Financing.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MoniteEnvironment.Sandbox, - "financing_tokens" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "x-monite-version": await core.Supplier.get(this._options.moniteVersion), - "x-monite-entity-id": - (await core.Supplier.get(this._options.moniteEntityId)) != null - ? await core.Supplier.get(this._options.moniteEntityId) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "monite", - "X-Fern-SDK-Version": "0.1.0", - "User-Agent": "monite/0.1.0", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as Monite.FinancingTokenResponse; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 422: - throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); - case 500: - throw new Monite.InternalServerError(_response.error.body as Monite.ErrorSchemaResponse); - default: - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.MoniteError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /financing_tokens."); - case "unknown": - throw new errors.MoniteError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getAuthorizationHeader(): Promise { - const bearer = await core.Supplier.get(this._options.token); - if (bearer != null) { - return `Bearer ${bearer}`; - } - - return undefined; - } -} diff --git a/src/api/resources/financing/client/index.ts b/src/api/resources/financing/client/index.ts deleted file mode 100644 index 415726b..0000000 --- a/src/api/resources/financing/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/api/resources/financing/client/requests/FinancingPushInvoicesRequest.ts b/src/api/resources/financing/client/requests/FinancingPushInvoicesRequest.ts deleted file mode 100644 index 90795b6..0000000 --- a/src/api/resources/financing/client/requests/FinancingPushInvoicesRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * { - * invoices: [{ - * id: "id", - * type: "payable" - * }] - * } - */ -export interface FinancingPushInvoicesRequest { - /** A list of invoices to request financing for. */ - invoices: Monite.FinancingPushInvoicesRequestInvoice[]; -} diff --git a/src/api/resources/financing/client/requests/GetFinancingInvoicesRequest.ts b/src/api/resources/financing/client/requests/GetFinancingInvoicesRequest.ts deleted file mode 100644 index a07879e..0000000 --- a/src/api/resources/financing/client/requests/GetFinancingInvoicesRequest.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../../../../index"; - -/** - * @example - * {} - */ -export interface GetFinancingInvoicesRequest { - /** - * Order by - */ - order?: Monite.OrderEnum; - /** - * Max is 100 - */ - limit?: number; - /** - * A token, obtained from previous page. Prior over other filters - */ - pagination_token?: string; - /** - * Allowed sort fields - */ - sort?: Monite.FinancingInvoiceCursorFields; - /** - * ID of a payable or receivable invoice. - */ - invoice_id?: string; - /** - * List of invoice IDs. - */ - invoice_id__in?: string | string[]; - /** - * Status of the invoice. - */ - status?: Monite.WcInvoiceStatus; - /** - * List of invoice statuses. - */ - status__in?: Monite.WcInvoiceStatus | Monite.WcInvoiceStatus[]; - /** - * Type of the invoice. payable or receivable. - */ - type?: Monite.FinancingInvoiceType; - /** - * List of invoice types. - */ - type__in?: Monite.FinancingInvoiceType | Monite.FinancingInvoiceType[]; - /** - * Document ID of the invoice. - */ - document_id?: string; - /** - * List of document IDs. - */ - document_id__in?: string | string[]; - /** - * Issue date greater than. - */ - issue_date__gt?: string; - /** - * Issue date less than. - */ - issue_date__lt?: string; - /** - * Issue date greater than or equal. - */ - issue_date__gte?: string; - /** - * Issue date less than or equal. - */ - issue_date__lte?: string; - /** - * Due date greater than. - */ - due_date__gt?: string; - /** - * Due date less than. - */ - due_date__lt?: string; - /** - * Due date greater than or equal. - */ - due_date__gte?: string; - /** - * Due date less than or equal. - */ - due_date__lte?: string; - /** - * Created date greater than. - */ - created_at__gt?: string; - /** - * Created date less than. - */ - created_at__lt?: string; - /** - * Created date greater than or equal. - */ - created_at__gte?: string; - /** - * Created date less than or equal. - */ - created_at__lte?: string; - /** - * Total amount of the invoice in minor units. - */ - total_amount?: number; - /** - * Total amount greater than. - */ - total_amount__gt?: number; - /** - * Total amount less than. - */ - total_amount__lt?: number; - /** - * Total amount greater than or equal. - */ - total_amount__gte?: number; - /** - * Total amount less than or equal. - */ - total_amount__lte?: number; -} diff --git a/src/api/resources/financing/client/requests/index.ts b/src/api/resources/financing/client/requests/index.ts deleted file mode 100644 index c5d90c1..0000000 --- a/src/api/resources/financing/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type GetFinancingInvoicesRequest } from "./GetFinancingInvoicesRequest"; -export { type FinancingPushInvoicesRequest } from "./FinancingPushInvoicesRequest"; diff --git a/src/api/resources/financing/index.ts b/src/api/resources/financing/index.ts deleted file mode 100644 index 5ec7692..0000000 --- a/src/api/resources/financing/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 3bc3bd5..bfb97ff 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -2,7 +2,6 @@ export * as approvalPolicies from "./approvalPolicies"; export * from "./approvalPolicies/types"; export * as receivables from "./receivables"; export * from "./receivables/types"; -export * as analytics from "./analytics"; export * as approvalRequests from "./approvalRequests"; export * as auditLogs from "./auditLogs"; export * as accessTokens from "./accessTokens"; @@ -15,14 +14,12 @@ export * as entities from "./entities"; export * as entityUsers from "./entityUsers"; export * as events from "./events"; export * as files from "./files"; -export * as financing from "./financing"; export * as mailTemplates from "./mailTemplates"; export * as mailboxDomains from "./mailboxDomains"; export * as mailboxes from "./mailboxes"; export * as measureUnits from "./measureUnits"; export * as onboardingLinks from "./onboardingLinks"; export * as overdueReminders from "./overdueReminders"; -export * as creditNotes from "./creditNotes"; export * as purchaseOrders from "./purchaseOrders"; export * as payables from "./payables"; export * as paymentIntents from "./paymentIntents"; @@ -41,7 +38,6 @@ export * as vatRates from "./vatRates"; export * as webhookDeliveries from "./webhookDeliveries"; export * as webhookSubscriptions from "./webhookSubscriptions"; export * as accounting from "./accounting"; -export * from "./analytics/client/requests"; export * from "./approvalPolicies/client/requests"; export * from "./approvalRequests/client/requests"; export * from "./auditLogs/client/requests"; @@ -54,14 +50,12 @@ export * from "./entities/client/requests"; export * from "./entityUsers/client/requests"; export * from "./events/client/requests"; export * from "./files/client/requests"; -export * from "./financing/client/requests"; export * from "./mailTemplates/client/requests"; export * from "./mailboxDomains/client/requests"; export * from "./mailboxes/client/requests"; export * from "./measureUnits/client/requests"; export * from "./onboardingLinks/client/requests"; export * from "./overdueReminders/client/requests"; -export * from "./creditNotes/client/requests"; export * from "./purchaseOrders/client/requests"; export * from "./payables/client/requests"; export * from "./paymentIntents/client/requests"; diff --git a/src/api/resources/mailTemplates/client/Client.ts b/src/api/resources/mailTemplates/client/Client.ts index 1b23201..2a7213d 100644 --- a/src/api/resources/mailTemplates/client/Client.ts +++ b/src/api/resources/mailTemplates/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace MailTemplates { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -144,7 +142,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -178,7 +175,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /mail_templates."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -226,7 +223,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -260,7 +256,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /mail_templates."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -308,7 +304,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -342,7 +337,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /mail_templates/preview."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -381,7 +376,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -414,7 +408,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /mail_templates/system."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -457,7 +451,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -490,7 +483,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /mail_templates/{template_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -530,7 +523,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -563,9 +555,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /mail_templates/{template_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -610,7 +600,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -644,9 +633,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /mail_templates/{template_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -689,7 +676,6 @@ export class MailTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -722,9 +708,7 @@ export class MailTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /mail_templates/{template_id}/make_default." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/mailboxDomains/client/Client.ts b/src/api/resources/mailboxDomains/client/Client.ts index ea15aed..24c46c8 100644 --- a/src/api/resources/mailboxDomains/client/Client.ts +++ b/src/api/resources/mailboxDomains/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace MailboxDomains { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -69,7 +67,6 @@ export class MailboxDomains { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -102,7 +99,7 @@ export class MailboxDomains { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /mailbox_domains."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -147,7 +144,6 @@ export class MailboxDomains { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -181,7 +177,7 @@ export class MailboxDomains { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /mailbox_domains."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -225,7 +221,6 @@ export class MailboxDomains { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -266,9 +261,7 @@ export class MailboxDomains { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /mailbox_domains/{domain_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -316,7 +309,6 @@ export class MailboxDomains { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -359,9 +351,7 @@ export class MailboxDomains { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /mailbox_domains/{domain_id}/verify." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/mailboxDomains/client/requests/DomainRequest.ts b/src/api/resources/mailboxDomains/client/requests/DomainRequest.ts index b168ec7..d3ab0ec 100644 --- a/src/api/resources/mailboxDomains/client/requests/DomainRequest.ts +++ b/src/api/resources/mailboxDomains/client/requests/DomainRequest.ts @@ -9,6 +9,5 @@ * } */ export interface DomainRequest { - /** The domain name, such as `mail.mycompany.com`. Can contain only alphanumeric characters (A..Z a..z 0..9), dots (.), and hyphens (-). Each segment of the domain name must start and end with either a letter or a digit. */ domain: string; } diff --git a/src/api/resources/mailboxes/client/Client.ts b/src/api/resources/mailboxes/client/Client.ts index d3ed5e1..a5dc225 100644 --- a/src/api/resources/mailboxes/client/Client.ts +++ b/src/api/resources/mailboxes/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Mailboxes { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -69,7 +67,6 @@ export class Mailboxes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -102,7 +99,7 @@ export class Mailboxes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /mailboxes."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -149,7 +146,6 @@ export class Mailboxes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -183,7 +179,7 @@ export class Mailboxes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /mailboxes."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -228,7 +224,6 @@ export class Mailboxes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -262,7 +257,7 @@ export class Mailboxes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /mailboxes/search."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -306,7 +301,6 @@ export class Mailboxes { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -347,7 +341,7 @@ export class Mailboxes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /mailboxes/{mailbox_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/measureUnits/client/Client.ts b/src/api/resources/measureUnits/client/Client.ts index 0ee4e19..7bdd68d 100644 --- a/src/api/resources/measureUnits/client/Client.ts +++ b/src/api/resources/measureUnits/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace MeasureUnits { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -70,7 +68,6 @@ export class MeasureUnits { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -109,7 +106,7 @@ export class MeasureUnits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /measure_units."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -155,7 +152,6 @@ export class MeasureUnits { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -195,7 +191,7 @@ export class MeasureUnits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /measure_units."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -237,7 +233,6 @@ export class MeasureUnits { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -278,7 +273,7 @@ export class MeasureUnits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /measure_units/{unit_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -320,7 +315,6 @@ export class MeasureUnits { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -361,7 +355,7 @@ export class MeasureUnits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /measure_units/{unit_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -408,7 +402,6 @@ export class MeasureUnits { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -450,7 +443,7 @@ export class MeasureUnits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /measure_units/{unit_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/onboardingLinks/client/Client.ts b/src/api/resources/onboardingLinks/client/Client.ts index 3d42350..2d4d3a3 100644 --- a/src/api/resources/onboardingLinks/client/Client.ts +++ b/src/api/resources/onboardingLinks/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace OnboardingLinks { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -75,7 +73,6 @@ export class OnboardingLinks { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -109,7 +106,7 @@ export class OnboardingLinks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /onboarding_links."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/overdueReminders/client/Client.ts b/src/api/resources/overdueReminders/client/Client.ts index 8965344..69f98bd 100644 --- a/src/api/resources/overdueReminders/client/Client.ts +++ b/src/api/resources/overdueReminders/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace OverdueReminders { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -69,7 +67,6 @@ export class OverdueReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -106,7 +103,7 @@ export class OverdueReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /overdue_reminders."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -152,7 +149,6 @@ export class OverdueReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -192,7 +188,7 @@ export class OverdueReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /overdue_reminders."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -236,7 +232,6 @@ export class OverdueReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -275,9 +270,7 @@ export class OverdueReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /overdue_reminders/{overdue_reminder_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -322,7 +315,6 @@ export class OverdueReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -363,9 +355,7 @@ export class OverdueReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /overdue_reminders/{overdue_reminder_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -412,7 +402,6 @@ export class OverdueReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -454,9 +443,7 @@ export class OverdueReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /overdue_reminders/{overdue_reminder_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/partnerSettings/client/Client.ts b/src/api/resources/partnerSettings/client/Client.ts index 48d35e3..67e21b6 100644 --- a/src/api/resources/partnerSettings/client/Client.ts +++ b/src/api/resources/partnerSettings/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PartnerSettings { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -70,7 +68,6 @@ export class PartnerSettings { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -105,7 +102,7 @@ export class PartnerSettings { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /settings."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -149,7 +146,6 @@ export class PartnerSettings { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -185,7 +181,7 @@ export class PartnerSettings { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /settings."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/partnerSettings/client/requests/PartnerProjectSettingsPayload.ts b/src/api/resources/partnerSettings/client/requests/PartnerProjectSettingsPayload.ts index 6ec8b15..43f82ec 100644 --- a/src/api/resources/partnerSettings/client/requests/PartnerProjectSettingsPayload.ts +++ b/src/api/resources/partnerSettings/client/requests/PartnerProjectSettingsPayload.ts @@ -10,7 +10,7 @@ import * as Monite from "../../../../index"; */ export interface PartnerProjectSettingsPayload { /** Settings for the accounting module. */ - accounting?: Monite.AccountingSettings; + accounting?: Monite.AccountingSettingsPayload; /** Default API version for partner. */ api_version?: Monite.ApiVersion; /** Commercial conditions for receivables. */ diff --git a/src/api/resources/payables/client/Client.ts b/src/api/resources/payables/client/Client.ts index ec39e53..855d107 100644 --- a/src/api/resources/payables/client/Client.ts +++ b/src/api/resources/payables/client/Client.ts @@ -33,8 +33,6 @@ export declare namespace Payables { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -44,9 +42,11 @@ export class Payables { /** * Lists all payables from the connected entity. * - * If you already have the data of the payable (amount in [minor units](https://docs.monite.com/docs/currencies#minor-units), currency, vendor information, and other details) + * If you already have the data of the payable (amount in [minor units]( + * https://docs.monite.com/docs/currencies#minor-units), currency, vendor information, and other details) * stored somewhere as individual attributes, you can create a payable with these attributes by calling [POST - * /payables](https://docs.monite.com/reference/post_payables) and providing the [base64-encoded](https://en.wikipedia.org/wiki/Base64) contents of the original invoice file in the field `base64_encoded_file`. + * /payables](https://docs.monite.com/reference/post_payables) and providing the [base64-encoded]( + * https://en.wikipedia.org/wiki/Base64) contents of the original invoice file in the field `base64_encoded_file`. * * A payable is a financial document given by an entity`s supplier itemizing the purchase of a good or a service and * demanding payment. @@ -62,6 +62,7 @@ export class Payables { * * See also: * + * * [Automatic calculation of due date](https://docs.monite.com/docs/collect-payables#automatic-calculation-of-due-date) * * [Suggested payment date](https://docs.monite.com/docs/collect-payables#suggested-payment-date) @@ -333,7 +334,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -375,7 +375,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -427,7 +427,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -467,7 +466,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -478,8 +477,6 @@ export class Payables { /** * Retrieve aggregated statistics for payables, including total amount and count, both overall and by status. * - * For more flexible configuration and retrieval of other data types, use GET /analytics/payables. - * * @param {Monite.PayablesGetAnalyticsRequest} request * @param {Payables.RequestOptions} requestOptions - Request-specific configuration. * @@ -719,7 +716,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -757,7 +753,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payables/analytics."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -808,7 +804,6 @@ export class Payables { "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, - ...requestOptions?.headers, }, requestType: "file", duplex: _maybeEncodedRequest.duplex, @@ -850,7 +845,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payables/upload_from_file."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -892,7 +887,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -931,7 +925,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payables/validations."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -979,7 +973,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1019,7 +1012,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PUT /payables/validations."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1063,7 +1056,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1102,7 +1094,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payables/validations/reset."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1144,7 +1136,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1179,7 +1170,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payables/variables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1226,7 +1217,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1267,7 +1257,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payables/{payable_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1311,7 +1301,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1352,7 +1341,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /payables/{payable_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1401,7 +1390,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1443,7 +1431,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /payables/{payable_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1491,7 +1479,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1534,9 +1521,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/approve_payment_operation." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1589,7 +1574,6 @@ export class Payables { "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, - ...requestOptions?.headers, }, requestType: "file", duplex: _maybeEncodedRequest.duplex, @@ -1631,9 +1615,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/attach_file." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1681,7 +1663,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1724,9 +1705,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/cancel." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1738,18 +1717,17 @@ export class Payables { * Mark a payable as paid. * * Payables can be paid using the payment channels offered by Monite or through external payment channels. In the latter - * case, the invoice is not automatically marked as paid in the system and needs to be converted to the paid status - * manually. + * case, the invoice is not automatically marked as paid in the system and needs to be converted to the paid status + * manually. * * Optionally, it is possible to pass the `comment` field in the request body, to describe how and when the invoice was * paid. * * Notes: - * * - To use this endpoint with an entity user token, this entity user must have a role that includes the `pay` permission - * for payables. + * for payables. * - The `amount_to_pay` field is automatically calculated based on the `amount_due` less the percentage described - * in the `payment_terms.discount` value. + * in the `payment_terms.discount` value. * * Related guide: [Mark a payable as paid](https://docs.monite.com/docs/payable-status-transitions#mark-as-paid) * @@ -1798,7 +1776,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1842,9 +1819,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/mark_as_paid." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1856,18 +1831,17 @@ export class Payables { * Mark a payable as partially paid. * * If the payable is partially paid, its status is moved to `partially_paid`. The value of the `amount_paid` field must be - * the sum of all payments made, not only the last one. + * the sum of all payments made, not only the last one. * * Notes: - * * - This endpoint can be used for payables in the `waiting_to_be_paid` status. * - The `amount_paid` must be greater than 0 and less than the total payable amount specified by the `amount` field. * - You can use this endpoint multiple times for the same payable to reflect multiple partial payments, always setting the - * sum of all payments made. + * sum of all payments made. * - To use this endpoint with an entity user token, this entity user must have a role that includes the `pay` - * permission for payables. + * permission for payables. * - The `amount_to_pay` field is automatically calculated based on the `amount_due` less the percentage described - * in the `payment_terms.discount` value. + * in the `payment_terms.discount` value. * * Related guide: [Mark a payable as partially paid](https://docs.monite.com/docs/payable-status-transitions#mark-as-partially-paid) * @@ -1920,7 +1894,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1964,9 +1937,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/mark_as_partially_paid." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2014,7 +1985,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2057,9 +2027,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/reject." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2107,7 +2075,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2150,9 +2117,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/reopen." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2200,7 +2165,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2243,9 +2207,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/submit_for_approval." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2292,7 +2254,6 @@ export class Payables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2333,9 +2294,7 @@ export class Payables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/validate." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/payables/client/requests/PayableUpdateSchema.ts b/src/api/resources/payables/client/requests/PayableUpdateSchema.ts index 61db499..3833c43 100644 --- a/src/api/resources/payables/client/requests/PayableUpdateSchema.ts +++ b/src/api/resources/payables/client/requests/PayableUpdateSchema.ts @@ -23,8 +23,6 @@ export interface PayableUpdateSchema { currency?: Monite.CurrencyEnum; /** An arbitrary description of this payable. */ description?: string; - /** The value of the additional discount that will be applied to the total amount. in [minor units](https://docs.monite.com/docs/currencies#minor-units). For example, $12.50 is represented as 1250. */ - discount?: number; /** A unique invoice number assigned by the invoice issuer for payment tracking purposes. */ document_id?: string; /** The date by which the payable must be paid, in the YYYY-MM-DD format. If the payable specifies payment terms with early payment discounts, this is the final payment date. */ diff --git a/src/api/resources/payables/client/requests/PayableUploadWithDataSchema.ts b/src/api/resources/payables/client/requests/PayableUploadWithDataSchema.ts index e535793..f099fb5 100644 --- a/src/api/resources/payables/client/requests/PayableUploadWithDataSchema.ts +++ b/src/api/resources/payables/client/requests/PayableUploadWithDataSchema.ts @@ -27,8 +27,6 @@ export interface PayableUploadWithDataSchema { currency?: Monite.CurrencyEnum; /** An arbitrary description of this payable. */ description?: string; - /** The value of the additional discount that will be applied to the total amount. in [minor units](https://docs.monite.com/docs/currencies#minor-units). For example, $12.50 is represented as 1250. */ - discount?: number; /** A unique invoice number assigned by the invoice issuer for payment tracking purposes. */ document_id?: string; /** The date by which the payable must be paid, in the YYYY-MM-DD format. If the payable specifies payment terms with early payment discounts, this is the final payment date. */ diff --git a/src/api/resources/payables/client/requests/PayablesGetAnalyticsRequest.ts b/src/api/resources/payables/client/requests/PayablesGetAnalyticsRequest.ts index 9a6c2e3..650b4a5 100644 --- a/src/api/resources/payables/client/requests/PayablesGetAnalyticsRequest.ts +++ b/src/api/resources/payables/client/requests/PayablesGetAnalyticsRequest.ts @@ -9,155 +9,39 @@ import * as Monite from "../../../../index"; * {} */ export interface PayablesGetAnalyticsRequest { - /** - * Return only payables created in Monite after the specified date and time. The value must be in the ISO 8601 format YYYY-MM-DDThh:mm[:ss[.ffffff]][z|±hh:mm]. - */ created_at__gt?: string; - /** - * Return only payables created in Monite before the specified date and time. - */ created_at__lt?: string; - /** - * Return only payables created in Monite on or after the specified date and time. - */ created_at__gte?: string; - /** - * Return only payables created in Monite before or on the specified date and time. - */ created_at__lte?: string; - /** - * Return only payables that have the specified [status](https://docs.monite.com/accounts-payable/payables/index). - * - * To query multiple statuses at once, use the `status__in` parameter instead. - */ status?: Monite.PayableStateEnum; - /** - * Return only payables that have the specified [statuses](https://docs.monite.com/accounts-payable/payables/index). - * - * To specify multiple statuses, repeat this parameter for each value: `status__in=draft&status__in=new` - */ status__in?: Monite.PayableStateEnum | Monite.PayableStateEnum[]; - /** - * Return only payables with specified IDs. Valid but nonexistent IDs do not raise errors but produce no results. - * - * To specify multiple IDs, repeat this parameter for each value: `id__in=&id__in=` - */ id__in?: string | string[]; - /** - * Return only payables with the exact specified total amount. The amount must be specified in the minor units of currency. For example, $12.5 is represented as 1250. - */ total_amount?: number; - /** - * Return only payables whose total amount (in minor units) exceeds the specified value. - */ total_amount__gt?: number; - /** - * Return only payables whose total amount (in minor units) is less than the specified value. - */ total_amount__lt?: number; - /** - * Return only payables whose total amount (in minor units) is greater than or equal to the specified value. - */ total_amount__gte?: number; - /** - * Return only payables whose total amount (in minor units) is less than or equal to the specified value. - */ total_amount__lte?: number; - /** - * Return only payables with the specified amount. - */ amount?: number; - /** - * Return only payables whose amount (in minor units) exceeds the specified value. - */ amount__gt?: number; - /** - * Return only payables whose amount (in minor units) is less than the specified value. - */ amount__lt?: number; - /** - * Return only payables whose amount (in minor units) is greater than or equal to the specified value. - */ amount__gte?: number; - /** - * Return only payables whose amount (in minor units) is less than or equal to the specified value. - */ amount__lte?: number; - /** - * Return only payables that use the specified currency. - */ currency?: Monite.CurrencyEnum; - /** - * Return only payables received from counterparts with the specified name (exact match, case-sensitive). - * - * For counterparts of `type = individual`, the full name is formatted as `first_name last_name`. - */ counterpart_name?: string; - /** - * Return only payables received from counterparts whose name contains the specified string (case-sensitive). - */ counterpart_name__contains?: string; - /** - * Return only payables received from counterparts whose name contains the specified string (case-insensitive). - */ counterpart_name__icontains?: string; - /** - * Apply the `icontains` condition to search for the specified text in the `document_id` and `counterpart_name` fields in the payables. - */ search_text?: string; - /** - * Return payables that are due on the specified date (YYYY-MM-DD) - */ due_date?: string; - /** - * Return payables that are due after the specified date (exclusive, YYYY-MM-DD). - */ due_date__gt?: string; - /** - * Return payables that are due before the specified date (exclusive, YYYY-MM-DD). - */ due_date__lt?: string; - /** - * Return payables that are due on or after the specified date (YYYY-MM-DD). - */ due_date__gte?: string; - /** - * Return payables that are due before or on the specified date (YYYY-MM-DD). - */ due_date__lte?: string; - /** - * Return a payable with the exact specified document number (case-sensitive). - * - * The `document_id` is the user-facing document number such as INV-00042, not to be confused with Monite resource IDs (`id`). - */ document_id?: string; - /** - * Return only payables whose document number (`document_id`) contains the specified string (case-sensitive). - */ document_id__contains?: string; - /** - * Return only payables whose document number (`document_id`) contains the specified string (case-insensitive). - */ document_id__icontains?: string; - /** - * Return only payables created in Monite by the entity user with the specified ID. - */ was_created_by_user_id?: string; - /** - * Return only payables received from the counterpart with the specified ID. - * - * Counterparts that have been deleted but have associated payables will still return results here because the payables contain a frozen copy of the counterpart data. - * - * If the specified counterpart ID does not exist and never existed, no results are returned. - */ counterpart_id?: string; - /** - * Return only payables coming from the specified source. - */ source_of_payable_data?: Monite.SourceOfPayableDataEnum; - /** - * Return only payables with specific OCR statuses. - */ ocr_status?: Monite.OcrStatusEnum; /** * Search for a payable by the identifier of the line item associated with it. @@ -168,13 +52,11 @@ export interface PayablesGetAnalyticsRequest { */ purchase_order_id?: string; /** - * Return only payables assigned to the project with the specified ID. - * - * Valid but nonexistent project IDs do not raise errors but return no results. + * Search for a payable by the identifier of the project associated with it. */ project_id?: string; /** - * Return only payables whose `tags` include at least one of the tags with the specified IDs. Valid but nonexistent tag IDs do not raise errors but produce no results. + * Search for a payable by the identifiers of the tags associated with it. */ tag_ids?: string | string[]; } diff --git a/src/api/resources/payables/client/requests/PayablesGetRequest.ts b/src/api/resources/payables/client/requests/PayablesGetRequest.ts index fc05a87..4ef2fd4 100644 --- a/src/api/resources/payables/client/requests/PayablesGetRequest.ts +++ b/src/api/resources/payables/client/requests/PayablesGetRequest.ts @@ -10,172 +10,54 @@ import * as Monite from "../../../../index"; */ export interface PayablesGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.PayableCursorFields; - /** - * Return only payables created in Monite after the specified date and time. The value must be in the ISO 8601 format YYYY-MM-DDThh:mm[:ss[.ffffff]][z|±hh:mm]. - */ created_at__gt?: string; - /** - * Return only payables created in Monite before the specified date and time. - */ created_at__lt?: string; - /** - * Return only payables created in Monite on or after the specified date and time. - */ created_at__gte?: string; - /** - * Return only payables created in Monite before or on the specified date and time. - */ created_at__lte?: string; - /** - * Return only payables that have the specified [status](https://docs.monite.com/accounts-payable/payables/index). - * - * To query multiple statuses at once, use the `status__in` parameter instead. - */ status?: Monite.PayableStateEnum; - /** - * Return only payables that have the specified [statuses](https://docs.monite.com/accounts-payable/payables/index). - * - * To specify multiple statuses, repeat this parameter for each value: `status__in=draft&status__in=new` - */ status__in?: Monite.PayableStateEnum | Monite.PayableStateEnum[]; - /** - * Return only payables with specified IDs. Valid but nonexistent IDs do not raise errors but produce no results. - * - * To specify multiple IDs, repeat this parameter for each value: `id__in=&id__in=` - */ id__in?: string | string[]; - /** - * Return only payables with the exact specified total amount. The amount must be specified in the minor units of currency. For example, $12.5 is represented as 1250. - */ total_amount?: number; - /** - * Return only payables whose total amount (in minor units) exceeds the specified value. - */ total_amount__gt?: number; - /** - * Return only payables whose total amount (in minor units) is less than the specified value. - */ total_amount__lt?: number; - /** - * Return only payables whose total amount (in minor units) is greater than or equal to the specified value. - */ total_amount__gte?: number; - /** - * Return only payables whose total amount (in minor units) is less than or equal to the specified value. - */ total_amount__lte?: number; - /** - * Return only payables with the specified amount. - */ amount?: number; - /** - * Return only payables whose amount (in minor units) exceeds the specified value. - */ amount__gt?: number; - /** - * Return only payables whose amount (in minor units) is less than the specified value. - */ amount__lt?: number; - /** - * Return only payables whose amount (in minor units) is greater than or equal to the specified value. - */ amount__gte?: number; - /** - * Return only payables whose amount (in minor units) is less than or equal to the specified value. - */ amount__lte?: number; - /** - * Return only payables that use the specified currency. - */ currency?: Monite.CurrencyEnum; - /** - * Return only payables received from counterparts with the specified name (exact match, case-sensitive). - * - * For counterparts of `type = individual`, the full name is formatted as `first_name last_name`. - */ counterpart_name?: string; - /** - * Return only payables received from counterparts whose name contains the specified string (case-sensitive). - */ counterpart_name__contains?: string; - /** - * Return only payables received from counterparts whose name contains the specified string (case-insensitive). - */ counterpart_name__icontains?: string; - /** - * Apply the `icontains` condition to search for the specified text in the `document_id` and `counterpart_name` fields in the payables. - */ search_text?: string; - /** - * Return payables that are due on the specified date (YYYY-MM-DD) - */ due_date?: string; - /** - * Return payables that are due after the specified date (exclusive, YYYY-MM-DD). - */ due_date__gt?: string; - /** - * Return payables that are due before the specified date (exclusive, YYYY-MM-DD). - */ due_date__lt?: string; - /** - * Return payables that are due on or after the specified date (YYYY-MM-DD). - */ due_date__gte?: string; - /** - * Return payables that are due before or on the specified date (YYYY-MM-DD). - */ due_date__lte?: string; - /** - * Return a payable with the exact specified document number (case-sensitive). - * - * The `document_id` is the user-facing document number such as INV-00042, not to be confused with Monite resource IDs (`id`). - */ document_id?: string; - /** - * Return only payables whose document number (`document_id`) contains the specified string (case-sensitive). - */ document_id__contains?: string; - /** - * Return only payables whose document number (`document_id`) contains the specified string (case-insensitive). - */ document_id__icontains?: string; - /** - * Return only payables created in Monite by the entity user with the specified ID. - */ was_created_by_user_id?: string; - /** - * Return only payables received from the counterpart with the specified ID. - * - * Counterparts that have been deleted but have associated payables will still return results here because the payables contain a frozen copy of the counterpart data. - * - * If the specified counterpart ID does not exist and never existed, no results are returned. - */ counterpart_id?: string; - /** - * Return only payables coming from the specified source. - */ source_of_payable_data?: Monite.SourceOfPayableDataEnum; - /** - * Return only payables with specific OCR statuses. - */ ocr_status?: Monite.OcrStatusEnum; /** * Search for a payable by the identifier of the line item associated with it. @@ -186,13 +68,11 @@ export interface PayablesGetRequest { */ purchase_order_id?: string; /** - * Return only payables assigned to the project with the specified ID. - * - * Valid but nonexistent project IDs do not raise errors but return no results. + * Search for a payable by the identifier of the project associated with it. */ project_id?: string; /** - * Return only payables whose `tags` include at least one of the tags with the specified IDs. Valid but nonexistent tag IDs do not raise errors but produce no results. + * Search for a payable by the identifiers of the tags associated with it. */ tag_ids?: string | string[]; } diff --git a/src/api/resources/payables/resources/lineItems/client/Client.ts b/src/api/resources/payables/resources/lineItems/client/Client.ts index e0a8ee1..dd49da3 100644 --- a/src/api/resources/payables/resources/lineItems/client/Client.ts +++ b/src/api/resources/payables/resources/lineItems/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace LineItems { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -114,7 +112,6 @@ export class LineItems { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -156,9 +153,7 @@ export class LineItems { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payables/{payable_id}/line_items." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -170,8 +165,8 @@ export class LineItems { * Add a new line item to a specific payable. * * The `subtotal` and `total` fields of line items are automatically calculated based on the `unit_price`, - * `quantity`, and `tax` fields, therefore, are read-only and appear only in the response schema. The field - * `ledger_account_id` is required **only** for account integration, otherwise, it is optional. + * `quantity`, and `tax` fields, therefore, are read-only and appear only in the response schema. The field + * `ledger_account_id` is required **only** for account integration, otherwise, it is optional. * * Related guide: [Add line items to a payable](https://docs.monite.com/docs/manage-line-items#add-line-items-to-a-payable) * @@ -220,7 +215,6 @@ export class LineItems { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -264,9 +258,7 @@ export class LineItems { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payables/{payable_id}/line_items." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -327,7 +319,6 @@ export class LineItems { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -373,9 +364,7 @@ export class LineItems { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PUT /payables/{payable_id}/line_items." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -433,7 +422,6 @@ export class LineItems { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -476,9 +464,7 @@ export class LineItems { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payables/{payable_id}/line_items/{line_item_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -535,7 +521,6 @@ export class LineItems { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -576,9 +561,7 @@ export class LineItems { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /payables/{payable_id}/line_items/{line_item_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -638,7 +621,6 @@ export class LineItems { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -682,9 +664,7 @@ export class LineItems { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /payables/{payable_id}/line_items/{line_item_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/payables/resources/lineItems/client/requests/LineItemsGetRequest.ts b/src/api/resources/payables/resources/lineItems/client/requests/LineItemsGetRequest.ts index 658b9c9..2d16a59 100644 --- a/src/api/resources/payables/resources/lineItems/client/requests/LineItemsGetRequest.ts +++ b/src/api/resources/payables/resources/lineItems/client/requests/LineItemsGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../../../index"; */ export interface LineItemsGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.LineItemCursorFields; was_created_by_user_id?: string; diff --git a/src/api/resources/paymentIntents/client/Client.ts b/src/api/resources/paymentIntents/client/Client.ts index 789af4e..f1e1d81 100644 --- a/src/api/resources/paymentIntents/client/Client.ts +++ b/src/api/resources/paymentIntents/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PaymentIntents { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -93,7 +91,6 @@ export class PaymentIntents { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -127,7 +124,7 @@ export class PaymentIntents { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payment_intents."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -168,7 +165,6 @@ export class PaymentIntents { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -201,9 +197,7 @@ export class PaymentIntents { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payment_intents/{payment_intent_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -248,7 +242,6 @@ export class PaymentIntents { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -282,9 +275,7 @@ export class PaymentIntents { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /payment_intents/{payment_intent_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -325,7 +316,6 @@ export class PaymentIntents { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -358,9 +348,7 @@ export class PaymentIntents { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payment_intents/{payment_intent_id}/history." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/paymentLinks/client/Client.ts b/src/api/resources/paymentLinks/client/Client.ts index 89c871f..8e4849e 100644 --- a/src/api/resources/paymentLinks/client/Client.ts +++ b/src/api/resources/paymentLinks/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PaymentLinks { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -77,7 +75,6 @@ export class PaymentLinks { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -111,7 +108,7 @@ export class PaymentLinks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payment_links."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -152,7 +149,6 @@ export class PaymentLinks { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -185,9 +181,7 @@ export class PaymentLinks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payment_links/{payment_link_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -228,7 +222,6 @@ export class PaymentLinks { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -261,9 +254,7 @@ export class PaymentLinks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payment_links/{payment_link_id}/expire." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/paymentLinks/client/requests/CreatePaymentLinkRequest.ts b/src/api/resources/paymentLinks/client/requests/CreatePaymentLinkRequest.ts index c2bf37c..b3c4227 100644 --- a/src/api/resources/paymentLinks/client/requests/CreatePaymentLinkRequest.ts +++ b/src/api/resources/paymentLinks/client/requests/CreatePaymentLinkRequest.ts @@ -28,6 +28,5 @@ export interface CreatePaymentLinkRequest { /** A payment reference number that the recipient can use to identify the payer or purpose of the transaction. Required if `object` is not specified. */ payment_reference?: string; recipient: Monite.PaymentAccountObject; - /** The URL where to redirect the payer after the payment. If `return_url` is specified, then after the payment is completed the payment page will display the "Return to platform" link that navigates to this URL. */ return_url?: string; } diff --git a/src/api/resources/paymentRecords/client/Client.ts b/src/api/resources/paymentRecords/client/Client.ts index f4313cf..813abaf 100644 --- a/src/api/resources/paymentRecords/client/Client.ts +++ b/src/api/resources/paymentRecords/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PaymentRecords { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -42,6 +40,13 @@ export class PaymentRecords { * @param {Monite.PaymentRecordsGetRequest} request * @param {PaymentRecords.RequestOptions} requestOptions - Request-specific configuration. * + * @throws {@link Monite.BadRequestError} + * @throws {@link Monite.UnauthorizedError} + * @throws {@link Monite.ForbiddenError} + * @throws {@link Monite.NotFoundError} + * @throws {@link Monite.NotAcceptableError} + * @throws {@link Monite.ConflictError} + * @throws {@link Monite.RangeNotSatisfiableError} * @throws {@link Monite.UnprocessableEntityError} * @throws {@link Monite.InternalServerError} * @@ -104,7 +109,6 @@ export class PaymentRecords { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -119,6 +123,20 @@ export class PaymentRecords { if (_response.error.reason === "status-code") { switch (_response.error.statusCode) { + case 400: + throw new Monite.BadRequestError(_response.error.body as Monite.ErrorSchemaResponse); + case 401: + throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); + case 403: + throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); + case 404: + throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); + case 406: + throw new Monite.NotAcceptableError(_response.error.body as Monite.ErrorSchemaResponse); + case 409: + throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); + case 416: + throw new Monite.RangeNotSatisfiableError(_response.error.body as Monite.ErrorSchemaResponse); case 422: throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); case 500: @@ -138,7 +156,7 @@ export class PaymentRecords { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payment_records."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -150,6 +168,13 @@ export class PaymentRecords { * @param {Monite.PaymentRecordRequest} request * @param {PaymentRecords.RequestOptions} requestOptions - Request-specific configuration. * + * @throws {@link Monite.BadRequestError} + * @throws {@link Monite.UnauthorizedError} + * @throws {@link Monite.ForbiddenError} + * @throws {@link Monite.NotFoundError} + * @throws {@link Monite.NotAcceptableError} + * @throws {@link Monite.ConflictError} + * @throws {@link Monite.RangeNotSatisfiableError} * @throws {@link Monite.UnprocessableEntityError} * @throws {@link Monite.InternalServerError} * @@ -188,7 +213,6 @@ export class PaymentRecords { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -203,6 +227,20 @@ export class PaymentRecords { if (_response.error.reason === "status-code") { switch (_response.error.statusCode) { + case 400: + throw new Monite.BadRequestError(_response.error.body as Monite.ErrorSchemaResponse); + case 401: + throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); + case 403: + throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); + case 404: + throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); + case 406: + throw new Monite.NotAcceptableError(_response.error.body as Monite.ErrorSchemaResponse); + case 409: + throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); + case 416: + throw new Monite.RangeNotSatisfiableError(_response.error.body as Monite.ErrorSchemaResponse); case 422: throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); case 500: @@ -222,7 +260,7 @@ export class PaymentRecords { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payment_records."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -234,6 +272,13 @@ export class PaymentRecords { * @param {string} paymentRecordId * @param {PaymentRecords.RequestOptions} requestOptions - Request-specific configuration. * + * @throws {@link Monite.BadRequestError} + * @throws {@link Monite.UnauthorizedError} + * @throws {@link Monite.ForbiddenError} + * @throws {@link Monite.NotFoundError} + * @throws {@link Monite.NotAcceptableError} + * @throws {@link Monite.ConflictError} + * @throws {@link Monite.RangeNotSatisfiableError} * @throws {@link Monite.UnprocessableEntityError} * @throws {@link Monite.InternalServerError} * @@ -263,7 +308,6 @@ export class PaymentRecords { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -277,6 +321,20 @@ export class PaymentRecords { if (_response.error.reason === "status-code") { switch (_response.error.statusCode) { + case 400: + throw new Monite.BadRequestError(_response.error.body as Monite.ErrorSchemaResponse); + case 401: + throw new Monite.UnauthorizedError(_response.error.body as Monite.ErrorSchemaResponse); + case 403: + throw new Monite.ForbiddenError(_response.error.body as Monite.ErrorSchemaResponse); + case 404: + throw new Monite.NotFoundError(_response.error.body as Monite.ErrorSchemaResponse); + case 406: + throw new Monite.NotAcceptableError(_response.error.body as Monite.ErrorSchemaResponse); + case 409: + throw new Monite.ConflictError(_response.error.body as Monite.ErrorSchemaResponse); + case 416: + throw new Monite.RangeNotSatisfiableError(_response.error.body as Monite.ErrorSchemaResponse); case 422: throw new Monite.UnprocessableEntityError(_response.error.body as Monite.HttpValidationError); case 500: @@ -296,9 +354,7 @@ export class PaymentRecords { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payment_records/{payment_record_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/paymentReminders/client/Client.ts b/src/api/resources/paymentReminders/client/Client.ts index b645e4b..64c441d 100644 --- a/src/api/resources/paymentReminders/client/Client.ts +++ b/src/api/resources/paymentReminders/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PaymentReminders { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -69,7 +67,6 @@ export class PaymentReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -106,7 +103,7 @@ export class PaymentReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payment_reminders."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -152,7 +149,6 @@ export class PaymentReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -192,7 +188,7 @@ export class PaymentReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payment_reminders."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -236,7 +232,6 @@ export class PaymentReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -275,9 +270,7 @@ export class PaymentReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payment_reminders/{payment_reminder_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -322,7 +315,6 @@ export class PaymentReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -363,9 +355,7 @@ export class PaymentReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /payment_reminders/{payment_reminder_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -412,7 +402,6 @@ export class PaymentReminders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -454,9 +443,7 @@ export class PaymentReminders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /payment_reminders/{payment_reminder_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/paymentTerms/client/Client.ts b/src/api/resources/paymentTerms/client/Client.ts index 81914e1..ca031b3 100644 --- a/src/api/resources/paymentTerms/client/Client.ts +++ b/src/api/resources/paymentTerms/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PaymentTerms { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -69,7 +67,6 @@ export class PaymentTerms { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -106,7 +103,7 @@ export class PaymentTerms { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payment_terms."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -155,7 +152,6 @@ export class PaymentTerms { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -195,7 +191,7 @@ export class PaymentTerms { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payment_terms."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -239,7 +235,6 @@ export class PaymentTerms { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -278,9 +273,7 @@ export class PaymentTerms { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payment_terms/{payment_terms_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -322,7 +315,6 @@ export class PaymentTerms { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -363,9 +355,7 @@ export class PaymentTerms { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /payment_terms/{payment_terms_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -412,7 +402,6 @@ export class PaymentTerms { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -454,9 +443,7 @@ export class PaymentTerms { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /payment_terms/{payment_terms_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/pdfTemplates/client/Client.ts b/src/api/resources/pdfTemplates/client/Client.ts index 0882077..cccda56 100644 --- a/src/api/resources/pdfTemplates/client/Client.ts +++ b/src/api/resources/pdfTemplates/client/Client.ts @@ -31,8 +31,6 @@ export declare namespace PdfTemplates { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -70,7 +68,6 @@ export class PdfTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -103,7 +100,7 @@ export class PdfTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /document_templates."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -142,7 +139,6 @@ export class PdfTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -175,7 +171,7 @@ export class PdfTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /document_templates/system."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -216,7 +212,6 @@ export class PdfTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -249,9 +244,7 @@ export class PdfTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /document_templates/{document_template_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -292,7 +285,6 @@ export class PdfTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -325,9 +317,7 @@ export class PdfTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /document_templates/{document_template_id}/make_default." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -363,7 +353,6 @@ export class PdfTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -397,9 +386,7 @@ export class PdfTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /document_templates/{document_template_id}/preview." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/products/client/Client.ts b/src/api/resources/products/client/Client.ts index 8674695..9905d3b 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Products { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -190,7 +188,6 @@ export class Products { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -230,7 +227,7 @@ export class Products { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /products."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -276,7 +273,6 @@ export class Products { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -316,7 +312,7 @@ export class Products { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /products."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -361,7 +357,6 @@ export class Products { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -402,7 +397,7 @@ export class Products { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /products/{product_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -444,7 +439,6 @@ export class Products { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -485,7 +479,7 @@ export class Products { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /products/{product_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -532,7 +526,6 @@ export class Products { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -574,7 +567,7 @@ export class Products { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /products/{product_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/products/client/requests/ProductsGetRequest.ts b/src/api/resources/products/client/requests/ProductsGetRequest.ts index 19460ac..0e993db 100644 --- a/src/api/resources/products/client/requests/ProductsGetRequest.ts +++ b/src/api/resources/products/client/requests/ProductsGetRequest.ts @@ -12,7 +12,7 @@ export interface ProductsGetRequest { /** * Order by */ - order?: Monite.OrderEnum; + order?: Monite.OrderEnum3; /** * Max is 100 */ diff --git a/src/api/resources/projects/client/Client.ts b/src/api/resources/projects/client/Client.ts index fd6ee71..120f111 100644 --- a/src/api/resources/projects/client/Client.ts +++ b/src/api/resources/projects/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Projects { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -201,7 +199,6 @@ export class Projects { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -245,7 +242,7 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /projects."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -293,7 +290,6 @@ export class Projects { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -333,7 +329,7 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /projects."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -377,7 +373,6 @@ export class Projects { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -418,7 +413,7 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /projects/{project_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -462,7 +457,6 @@ export class Projects { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -503,7 +497,7 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /projects/{project_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -552,7 +546,6 @@ export class Projects { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -594,7 +587,7 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /projects/{project_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/projects/client/requests/ProjectsGetRequest.ts b/src/api/resources/projects/client/requests/ProjectsGetRequest.ts index 1766161..f8d2e3b 100644 --- a/src/api/resources/projects/client/requests/ProjectsGetRequest.ts +++ b/src/api/resources/projects/client/requests/ProjectsGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../index"; */ export interface ProjectsGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.ProjectCursorFields; created_at__gt?: string; diff --git a/src/api/resources/purchaseOrders/client/Client.ts b/src/api/resources/purchaseOrders/client/Client.ts index f3ccef9..9e02657 100644 --- a/src/api/resources/purchaseOrders/client/Client.ts +++ b/src/api/resources/purchaseOrders/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace PurchaseOrders { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -213,7 +211,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -251,7 +248,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /payable_purchase_orders."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -307,7 +304,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -345,7 +341,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /payable_purchase_orders."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -385,7 +381,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -420,9 +415,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payable_purchase_orders/variables." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -465,7 +458,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -502,9 +494,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /payable_purchase_orders/{purchase_order_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -544,7 +534,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -581,9 +570,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /payable_purchase_orders/{purchase_order_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -628,7 +615,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -666,9 +652,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /payable_purchase_orders/{purchase_order_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -718,7 +702,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -760,9 +743,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payable_purchase_orders/{purchase_order_id}/preview." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -813,7 +794,6 @@ export class PurchaseOrders { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -857,9 +837,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /payable_purchase_orders/{purchase_order_id}/send." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/purchaseOrders/client/requests/PurchaseOrdersGetRequest.ts b/src/api/resources/purchaseOrders/client/requests/PurchaseOrdersGetRequest.ts index a10520b..6a85a00 100644 --- a/src/api/resources/purchaseOrders/client/requests/PurchaseOrdersGetRequest.ts +++ b/src/api/resources/purchaseOrders/client/requests/PurchaseOrdersGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../index"; */ export interface PurchaseOrdersGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.PurchaseOrderCursorFields; created_at__gt?: string; diff --git a/src/api/resources/receivables/client/Client.ts b/src/api/resources/receivables/client/Client.ts index 551a95f..f921257 100644 --- a/src/api/resources/receivables/client/Client.ts +++ b/src/api/resources/receivables/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Receivables { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -49,63 +47,62 @@ export class Receivables { * * ##### Invoices * - * - Get all overdue invoices: + * * Get all overdue invoices: + * ``` + * GET /receivables?type=invoice&status=overdue + * ``` * - * ``` - * GET /receivables?type=invoice&status=overdue - * ``` + * * Get all invoices created for the counterpart named "Solarwind" (case-insensitive): * - * - Get all invoices created for the counterpart named "Solarwind" (case-insensitive): + * ``` + * GET /receivables?type=invoice?counterpart_name__icontains=Solarwind + * ``` * - * ``` - * GET /receivables?type=invoice?counterpart_name__icontains=Solarwind - * ``` + * * Get invoices whose total amount starts from 500 EUR: * - * - Get invoices whose total amount starts from 500 EUR: + * ``` + * GET /receivables?type=invoice&total_amount__gte=50000 + * ``` * - * ``` - * GET /receivables?type=invoice&total_amount__gte=50000 - * ``` + * * Get invoices that are due for payment in September 2024: * - * - Get invoices that are due for payment in September 2024: + * ``` + * GET /receivables?type=invoice&due_date__gte=2024-09-01T00:00:00Z&due_date__lt=2024-10-01T00:00:00Z + * ``` * - * ``` - * GET /receivables?type=invoice&due_date__gte=2024-09-01T00:00:00Z&due_date__lt=2024-10-01T00:00:00Z - * ``` + * * Get invoices created on or after September 1, 2024: * - * - Get invoices created on or after September 1, 2024: + * ``` + * GET /receivables?type=invoice&created_at__gte=2024-09-01T00:00:00Z + * ``` * - * ``` - * GET /receivables?type=invoice&created_at__gte=2024-09-01T00:00:00Z - * ``` + * * Find an invoice created from a specific quote: * - * - Find an invoice created from a specific quote: - * - * ``` - * GET /receivables?type=invoice?based_on=QUOTE_ID - * ``` + * ``` + * GET /receivables?type=invoice?based_on=QUOTE_ID + * ``` * * ##### Quotes * - * - Get the latest created quote: + * * Get the latest created quote: * - * ``` - * GET /receivables?type=quote&sort=created_at&order=desc&limit=1 - * ``` + * ``` + * GET /receivables?type=quote&sort=created_at&order=desc&limit=1 + * ``` * - * - Get the latest issued quote: + * * Get the latest issued quote: * - * ``` - * GET /receivables?type=quote&sort=issue_date&order=desc&limit=1 - * ``` + * ``` + * GET /receivables?type=quote&sort=issue_date&order=desc&limit=1 + * ``` * * ##### Credit notes * - * - Find all credit notes created for a specific invoice: + * * Find all credit notes created for a specific invoice: * - * ``` - * GET /receivables?type=credit_note?based_on=INVOICE_ID - * ``` + * ``` + * GET /receivables?type=credit_note?based_on=INVOICE_ID + * ``` * * @param {Monite.ReceivablesGetRequest} request * @param {Receivables.RequestOptions} requestOptions - Request-specific configuration. @@ -347,7 +344,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -389,7 +385,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /receivables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -443,7 +439,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -487,7 +482,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /receivables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -530,7 +525,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -567,7 +561,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /receivables/variables."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -612,7 +606,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -653,7 +646,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /receivables/{receivable_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -696,7 +689,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -739,9 +731,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /receivables/{receivable_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -791,7 +781,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -835,9 +824,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /receivables/{receivable_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -885,7 +872,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -929,9 +915,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/accept." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -974,7 +958,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1017,9 +1000,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/cancel." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1065,7 +1046,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1108,9 +1088,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/clone." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1158,7 +1136,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1202,9 +1179,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/decline." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1312,7 +1287,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -1354,9 +1328,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /receivables/{receivable_id}/history." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1403,7 +1375,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1444,9 +1415,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /receivables/{receivable_id}/history/{receivable_history_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1492,7 +1461,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1535,9 +1503,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/issue." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1591,7 +1557,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1635,9 +1600,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PUT /receivables/{receivable_id}/line_items." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1741,7 +1704,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -1783,9 +1745,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /receivables/{receivable_id}/mails." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1832,7 +1792,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1873,9 +1832,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /receivables/{receivable_id}/mails/{mail_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -1923,7 +1880,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -1967,9 +1923,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/mark_as_paid." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2021,7 +1975,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2065,9 +2018,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/mark_as_partially_paid." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2115,7 +2066,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2159,9 +2109,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/mark_as_uncollectible." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2206,7 +2154,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2247,9 +2194,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /receivables/{receivable_id}/pdf_link." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2299,7 +2244,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2341,9 +2285,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/preview." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2394,7 +2336,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2438,9 +2379,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/send." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2490,7 +2429,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2534,9 +2472,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/send_test_reminder." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -2581,7 +2517,6 @@ export class Receivables { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -2622,9 +2557,7 @@ export class Receivables { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /receivables/{receivable_id}/verify." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/receivables/client/requests/ReceivablesGetHistoryRequest.ts b/src/api/resources/receivables/client/requests/ReceivablesGetHistoryRequest.ts index 7532eac..700ebf1 100644 --- a/src/api/resources/receivables/client/requests/ReceivablesGetHistoryRequest.ts +++ b/src/api/resources/receivables/client/requests/ReceivablesGetHistoryRequest.ts @@ -12,7 +12,7 @@ export interface ReceivablesGetHistoryRequest { /** * Order by */ - order?: Monite.OrderEnum; + order?: Monite.OrderEnum3; /** * Max is 100 */ diff --git a/src/api/resources/receivables/client/requests/ReceivablesGetMailsRequest.ts b/src/api/resources/receivables/client/requests/ReceivablesGetMailsRequest.ts index 3dde287..a3ad05a 100644 --- a/src/api/resources/receivables/client/requests/ReceivablesGetMailsRequest.ts +++ b/src/api/resources/receivables/client/requests/ReceivablesGetMailsRequest.ts @@ -12,7 +12,7 @@ export interface ReceivablesGetMailsRequest { /** * Order by */ - order?: Monite.OrderEnum; + order?: Monite.OrderEnum3; /** * Max is 100 */ diff --git a/src/api/resources/receivables/client/requests/ReceivablesGetRequest.ts b/src/api/resources/receivables/client/requests/ReceivablesGetRequest.ts index d93b275..2cd2f52 100644 --- a/src/api/resources/receivables/client/requests/ReceivablesGetRequest.ts +++ b/src/api/resources/receivables/client/requests/ReceivablesGetRequest.ts @@ -12,7 +12,7 @@ export interface ReceivablesGetRequest { /** * Sort order (ascending by default). Typically used together with the `sort` parameter. */ - order?: Monite.OrderEnum; + order?: Monite.OrderEnum2; /** * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. * @@ -56,13 +56,13 @@ export interface ReceivablesGetRequest { * Return only receivables whose [tags](https://docs.monite.com/common/tags) include at least one of the tags with the specified IDs. * * For example, given receivables with the following tags: - * * 1. tagA * 2. tagB * 3. tagA, tagB * 4. tagC * 5. tagB, tagC * + * * `tag_ids__in=&tag_ids__in=` will return receivables 1, 2, 3, and 5. * * Valid but nonexistent tag IDs do not raise errors but produce no results. diff --git a/src/api/resources/recurrences/client/Client.ts b/src/api/resources/recurrences/client/Client.ts index d59787b..3d93035 100644 --- a/src/api/resources/recurrences/client/Client.ts +++ b/src/api/resources/recurrences/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Recurrences { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -71,7 +69,6 @@ export class Recurrences { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -112,7 +109,7 @@ export class Recurrences { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /recurrences."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -164,7 +161,6 @@ export class Recurrences { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -206,7 +202,7 @@ export class Recurrences { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /recurrences."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -251,7 +247,6 @@ export class Recurrences { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -292,7 +287,7 @@ export class Recurrences { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /recurrences/{recurrence_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -339,7 +334,6 @@ export class Recurrences { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -381,9 +375,7 @@ export class Recurrences { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /recurrences/{recurrence_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -426,7 +418,6 @@ export class Recurrences { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -469,9 +460,7 @@ export class Recurrences { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /recurrences/{recurrence_id}/cancel." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/roles/client/Client.ts b/src/api/resources/roles/client/Client.ts index ecf65cc..1ab36d6 100644 --- a/src/api/resources/roles/client/Client.ts +++ b/src/api/resources/roles/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Roles { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -139,7 +137,6 @@ export class Roles { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -181,7 +178,7 @@ export class Roles { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /roles."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -228,7 +225,6 @@ export class Roles { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -264,7 +260,7 @@ export class Roles { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /roles."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -303,7 +299,6 @@ export class Roles { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -338,7 +333,7 @@ export class Roles { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /roles/{role_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -384,7 +379,6 @@ export class Roles { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -420,7 +414,7 @@ export class Roles { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /roles/{role_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/tags/client/Client.ts b/src/api/resources/tags/client/Client.ts index 760e50c..b582c30 100644 --- a/src/api/resources/tags/client/Client.ts +++ b/src/api/resources/tags/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace Tags { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -40,7 +38,7 @@ export class Tags { /** * Get a list of all tags. Tags can be assigned to resources to assist with searching and filtering. - * Tags can also be used as trigger conditions in payable approval policies. + * Tags can also be used as trigger conditions in payable approval policies. * * @param {Monite.TagsGetRequest} request * @param {Tags.RequestOptions} requestOptions - Request-specific configuration. @@ -124,7 +122,6 @@ export class Tags { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -166,7 +163,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /tags."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -176,7 +173,8 @@ export class Tags { /** * Create a new tag. The tag name must be unique. - * Tag names are case-sensitive, that is `Marketing` and `marketing` are two different tags. + * Tag names are case-sensitive, that is `Marketing` and `marketing` are two different tags. + * * * The response returns an auto-generated ID assigned to this tag. * To assign this tag to a resource, send the tag ID in the `tag_ids` list when creating or updating a resource. @@ -220,7 +218,6 @@ export class Tags { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -264,7 +261,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /tags."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -309,7 +306,6 @@ export class Tags { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -352,7 +348,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /tags/{tag_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -396,7 +392,6 @@ export class Tags { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -437,7 +432,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling DELETE /tags/{tag_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -447,7 +442,7 @@ export class Tags { /** * Change the tag name. The new name must be unique among existing tags. - * Tag names are case-sensitive, that is `Marketing` and `marketing` are two different tags. + * Tag names are case-sensitive, that is `Marketing` and `marketing` are two different tags. * * @param {string} tagId * @param {Monite.TagUpdateSchema} request @@ -488,7 +483,6 @@ export class Tags { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -532,7 +526,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling PATCH /tags/{tag_id}."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/tags/client/requests/TagsGetRequest.ts b/src/api/resources/tags/client/requests/TagsGetRequest.ts index 90f01f0..3780d2d 100644 --- a/src/api/resources/tags/client/requests/TagsGetRequest.ts +++ b/src/api/resources/tags/client/requests/TagsGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../index"; */ export interface TagsGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.TagCursorFields; created_by_entity_user_id?: string; diff --git a/src/api/resources/textTemplates/client/Client.ts b/src/api/resources/textTemplates/client/Client.ts index 0fdde1f..666fc8b 100644 --- a/src/api/resources/textTemplates/client/Client.ts +++ b/src/api/resources/textTemplates/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace TextTemplates { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -87,7 +85,6 @@ export class TextTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -121,7 +118,7 @@ export class TextTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /text_templates."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -169,7 +166,6 @@ export class TextTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -203,7 +199,7 @@ export class TextTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /text_templates."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -246,7 +242,6 @@ export class TextTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -279,9 +274,7 @@ export class TextTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /text_templates/{text_template_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -321,7 +314,6 @@ export class TextTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -354,9 +346,7 @@ export class TextTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /text_templates/{text_template_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -401,7 +391,6 @@ export class TextTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -435,9 +424,7 @@ export class TextTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /text_templates/{text_template_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -480,7 +467,6 @@ export class TextTemplates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -513,9 +499,7 @@ export class TextTemplates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /text_templates/{text_template_id}/make_default." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/vatRates/client/Client.ts b/src/api/resources/vatRates/client/Client.ts index 72b235a..62291e0 100644 --- a/src/api/resources/vatRates/client/Client.ts +++ b/src/api/resources/vatRates/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace VatRates { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -103,7 +101,6 @@ export class VatRates { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -145,7 +142,7 @@ export class VatRates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /vat_rates."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/webhookDeliveries/client/Client.ts b/src/api/resources/webhookDeliveries/client/Client.ts index 389ffdb..2a385d2 100644 --- a/src/api/resources/webhookDeliveries/client/Client.ts +++ b/src/api/resources/webhookDeliveries/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace WebhookDeliveries { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -39,12 +37,6 @@ export class WebhookDeliveries { constructor(protected readonly _options: WebhookDeliveries.Options) {} /** - * Returns an aggregated log of webhook delivery attempts. The data contains a list of triggered webhook events, how many times Monite tried to send each event to your server, the last HTTP status code returned by your webhook listener endpoint, and whether the final attempt to deliver that event was successful. - * - * We guarantee access to webhook delivery data only from the last three months. Earlier data may be unavailable. - * - * Note that if the same event type is included in multiple webhook subscriptions, the results will include several entries for each occurrence of this event - one entry per subscription. - * * @param {Monite.WebhookDeliveriesGetRequest} request * @param {WebhookDeliveries.RequestOptions} requestOptions - Request-specific configuration. * @@ -135,7 +127,6 @@ export class WebhookDeliveries { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -169,7 +160,7 @@ export class WebhookDeliveries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /webhook_deliveries."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/webhookDeliveries/client/requests/WebhookDeliveriesGetRequest.ts b/src/api/resources/webhookDeliveries/client/requests/WebhookDeliveriesGetRequest.ts index 09bf828..a2a6ba2 100644 --- a/src/api/resources/webhookDeliveries/client/requests/WebhookDeliveriesGetRequest.ts +++ b/src/api/resources/webhookDeliveries/client/requests/WebhookDeliveriesGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../index"; */ export interface WebhookDeliveriesGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.WebhookDeliveryCursorFields; event_id?: string; diff --git a/src/api/resources/webhookSubscriptions/client/Client.ts b/src/api/resources/webhookSubscriptions/client/Client.ts index bde61e6..a7ecae2 100644 --- a/src/api/resources/webhookSubscriptions/client/Client.ts +++ b/src/api/resources/webhookSubscriptions/client/Client.ts @@ -30,8 +30,6 @@ export declare namespace WebhookSubscriptions { moniteVersion?: string; /** Override the x-monite-entity-id header */ moniteEntityId?: string | undefined; - /** Additional headers to include in the request. */ - headers?: Record; } } @@ -119,7 +117,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, @@ -153,7 +150,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /webhook_subscriptions."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -197,7 +194,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -231,7 +227,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /webhook_subscriptions."); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -272,7 +268,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -305,9 +300,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling GET /webhook_subscriptions/{webhook_subscription_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -348,7 +341,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -381,9 +373,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling DELETE /webhook_subscriptions/{webhook_subscription_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -426,7 +416,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -460,9 +449,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling PATCH /webhook_subscriptions/{webhook_subscription_id}." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -503,7 +490,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -536,9 +522,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /webhook_subscriptions/{webhook_subscription_id}/disable." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -579,7 +563,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -612,9 +595,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /webhook_subscriptions/{webhook_subscription_id}/enable." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, @@ -655,7 +636,6 @@ export class WebhookSubscriptions { "User-Agent": "monite/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, }, contentType: "application/json", requestType: "json", @@ -688,9 +668,7 @@ export class WebhookSubscriptions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MoniteTimeoutError( - "Timeout exceeded when calling POST /webhook_subscriptions/{webhook_subscription_id}/regenerate_secret." - ); + throw new errors.MoniteTimeoutError(); case "unknown": throw new errors.MoniteError({ message: _response.error.errorMessage, diff --git a/src/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsGetRequest.ts b/src/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsGetRequest.ts index 9b79e51..7904a71 100644 --- a/src/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsGetRequest.ts +++ b/src/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsGetRequest.ts @@ -10,21 +10,19 @@ import * as Monite from "../../../../index"; */ export interface WebhookSubscriptionsGetRequest { /** - * Sort order (ascending by default). Typically used together with the `sort` parameter. + * Order by */ order?: Monite.OrderEnum; /** - * The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. + * Max is 100 */ limit?: number; /** - * A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. - * - * If not specified, the first page of results will be returned. + * A token, obtained from previous page. Prior over other filters */ pagination_token?: string; /** - * The field to sort the results by. Typically used together with the `order` parameter. + * Allowed sort fields */ sort?: Monite.WebhookSubscriptionCursorFields; object_type?: Monite.WebhookObjectType; diff --git a/src/api/types/AccountResponse.ts b/src/api/types/AccountResponse.ts new file mode 100644 index 0000000..95f4c9c --- /dev/null +++ b/src/api/types/AccountResponse.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Monite from "../index"; + +export interface AccountResponse { + id: string; + bank_accounts?: Monite.BankAccount[]; + type: Monite.PaymentAccountType; +} diff --git a/src/api/types/AccountingSettings.ts b/src/api/types/AccountingSettingsPayload.ts similarity index 79% rename from src/api/types/AccountingSettings.ts rename to src/api/types/AccountingSettingsPayload.ts index d620cf2..0483744 100644 --- a/src/api/types/AccountingSettings.ts +++ b/src/api/types/AccountingSettingsPayload.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -export interface AccountingSettings { +export interface AccountingSettingsPayload { provider: string; /** Token for the accounting provider (Codat only) */ token?: string; diff --git a/src/api/types/AccountingSettingsResponse.ts b/src/api/types/AccountingSettingsResponse.ts new file mode 100644 index 0000000..d571847 --- /dev/null +++ b/src/api/types/AccountingSettingsResponse.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AccountingSettingsResponse { + provider: string; + /** Token for the accounting provider (Codat only) */ + token?: string; +} diff --git a/src/api/types/AggregationFunctionEnum.ts b/src/api/types/AggregationFunctionEnum.ts deleted file mode 100644 index d3310ca..0000000 --- a/src/api/types/AggregationFunctionEnum.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type AggregationFunctionEnum = "count" | "average" | "summary" | "min" | "max"; - -export const AggregationFunctionEnum = { - Count: "count", - Average: "average", - Summary: "summary", - Min: "min", - Max: "max", -} as const; diff --git a/src/api/types/AnalyticsDataPoint.ts b/src/api/types/AnalyticsDataPoint.ts deleted file mode 100644 index c950056..0000000 --- a/src/api/types/AnalyticsDataPoint.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface AnalyticsDataPoint { - dimension_value?: string; - metric_value: number; -} diff --git a/src/api/types/ApprovalPolicyResource.ts b/src/api/types/ApprovalPolicyResource.ts index 73855d5..015ec9c 100644 --- a/src/api/types/ApprovalPolicyResource.ts +++ b/src/api/types/ApprovalPolicyResource.ts @@ -5,10 +5,6 @@ import * as Monite from "../index"; export interface ApprovalPolicyResource { - /** The date and time (in the ISO 8601 format) when the approval policy becomes active. Only payables submitted for approval during the policy's active period will trigger this policy. If omitted or `null`, the policy is effective immediately. The value will be converted to UTC. */ - starts_at?: string; - /** The date and time (in the ISO 8601 format) when the approval policy stops being active and stops triggering approval workflows.If `ends_at` is provided in the request, then `starts_at` must also be provided and `ends_at` must be later than `starts_at`. The value will be converted to UTC. */ - ends_at?: string; /** The name of the approval policy. */ name: string; /** A brief description of the approval policy. */ diff --git a/src/api/types/BankAccount.ts b/src/api/types/BankAccount.ts index da156ce..df4229f 100644 --- a/src/api/types/BankAccount.ts +++ b/src/api/types/BankAccount.ts @@ -5,30 +5,17 @@ import * as Monite from "../index"; export interface BankAccount { - /** The ID of the bank account. */ id: string; - /** The name of the person or business that owns this bank account. */ account_holder_name?: string; - /** The bank account number. Typically used for UK and US bank accounts. US account numbers contain 9 to 12 digits. UK account numbers typically contain 8 digits. */ account_number?: string; - /** The BIC/SWIFT code of the bank. */ bic?: string; - /** The country in which the bank account is registered, repsesented as a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ country?: Monite.AllowedCountries; - /** The currency of the bank account, represented as a three-letter ISO [currency code](https://docs.monite.com/references/currencies). */ currency?: Monite.CurrencyEnum; - /** User-defined name of this bank account, such as 'Primary account' or 'Savings account'. Used only for entity bank accounts. */ display_name?: string; - /** The IBAN of the bank account. */ iban?: string; - /** Indicates whether this bank account is the default one for its currency. */ is_default?: boolean; - /** User-defined name of this bank account, such as 'Primary account' or 'Savings account'. Used only for counterpart bank accounts. */ + /** Display name of a bank account */ name?: string; - /** The bank's routing transit number (RTN). Typically used for US banks. US routing numbers consist of 9 digits. */ - routing_number?: string; - /** The bank's sort code. Typically used for UK banks. */ sort_code?: string; - /** ID of the entity user who added this bank account, or `null` if it was added using a partner access token. Used only for entity bank accounts. */ was_created_by_user_id?: string; } diff --git a/src/api/types/ButtonThemeResponse.ts b/src/api/types/ButtonThemeResponse.ts new file mode 100644 index 0000000..9aab420 --- /dev/null +++ b/src/api/types/ButtonThemeResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ButtonThemeResponse { + primary_color?: string; + primary_hover_color?: string; + secondary_color?: string; + secondary_hover_color?: string; +} diff --git a/src/api/types/ReceivableCreatedEventData.ts b/src/api/types/CardThemeResponse.ts similarity index 51% rename from src/api/types/ReceivableCreatedEventData.ts rename to src/api/types/CardThemeResponse.ts index 67bd6b2..2c7274e 100644 --- a/src/api/types/ReceivableCreatedEventData.ts +++ b/src/api/types/CardThemeResponse.ts @@ -2,4 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -export interface ReceivableCreatedEventData {} +export interface CardThemeResponse { + background_color?: string; +} diff --git a/src/api/types/CounterpartIndividualRootCreatePayload.ts b/src/api/types/CounterpartIndividualRootCreatePayload.ts index 46da5e2..1910997 100644 --- a/src/api/types/CounterpartIndividualRootCreatePayload.ts +++ b/src/api/types/CounterpartIndividualRootCreatePayload.ts @@ -9,7 +9,7 @@ import * as Monite from "../index"; */ export interface CounterpartIndividualRootCreatePayload { individual: Monite.CounterpartIndividualCreatePayload; - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; reminders_enabled?: boolean; /** The counterpart's taxpayer identification number or tax ID. This field is required for counterparts that are non-VAT registered. */ diff --git a/src/api/types/CounterpartIndividualRootResponse.ts b/src/api/types/CounterpartIndividualRootResponse.ts index c70150d..8fc8320 100644 --- a/src/api/types/CounterpartIndividualRootResponse.ts +++ b/src/api/types/CounterpartIndividualRootResponse.ts @@ -23,7 +23,7 @@ export interface CounterpartIndividualRootResponse { /** Entity user ID of counterpart creator. */ created_by_entity_user_id?: string; individual: Monite.CounterpartIndividualResponse; - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; reminders_enabled?: boolean; /** The counterpart's taxpayer identification number or tax ID. This field is required for counterparts that are non-VAT registered. */ diff --git a/src/api/types/CounterpartIndividualRootUpdatePayload.ts b/src/api/types/CounterpartIndividualRootUpdatePayload.ts index cbbb535..af317d6 100644 --- a/src/api/types/CounterpartIndividualRootUpdatePayload.ts +++ b/src/api/types/CounterpartIndividualRootUpdatePayload.ts @@ -13,7 +13,7 @@ export interface CounterpartIndividualRootUpdatePayload { /** ID of the shipping address. */ default_shipping_address_id?: string; individual: Monite.CounterpartIndividualUpdatePayload; - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; reminders_enabled?: boolean; /** The counterpart's taxpayer identification number or tax ID. This field is required for counterparts that are non-VAT registered. */ diff --git a/src/api/types/CounterpartOrganizationRootCreatePayload.ts b/src/api/types/CounterpartOrganizationRootCreatePayload.ts index ed6faa0..eea8ab4 100644 --- a/src/api/types/CounterpartOrganizationRootCreatePayload.ts +++ b/src/api/types/CounterpartOrganizationRootCreatePayload.ts @@ -8,7 +8,7 @@ import * as Monite from "../index"; * This schema is used to create counterparts that are organizations (juridical persons). */ export interface CounterpartOrganizationRootCreatePayload { - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; organization: Monite.CounterpartOrganizationCreatePayload; reminders_enabled?: boolean; diff --git a/src/api/types/CounterpartOrganizationRootResponse.ts b/src/api/types/CounterpartOrganizationRootResponse.ts index 9ad5760..332f995 100644 --- a/src/api/types/CounterpartOrganizationRootResponse.ts +++ b/src/api/types/CounterpartOrganizationRootResponse.ts @@ -22,7 +22,7 @@ export interface CounterpartOrganizationRootResponse { default_shipping_address_id?: string; /** Entity user ID of counterpart creator. */ created_by_entity_user_id?: string; - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; organization: Monite.CounterpartOrganizationResponse; reminders_enabled?: boolean; diff --git a/src/api/types/CounterpartOrganizationRootUpdatePayload.ts b/src/api/types/CounterpartOrganizationRootUpdatePayload.ts index 9053e9b..a47ee9f 100644 --- a/src/api/types/CounterpartOrganizationRootUpdatePayload.ts +++ b/src/api/types/CounterpartOrganizationRootUpdatePayload.ts @@ -12,7 +12,7 @@ export interface CounterpartOrganizationRootUpdatePayload { default_billing_address_id?: string; /** ID of the shipping address. */ default_shipping_address_id?: string; - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; organization: Monite.CounterpartOrganizationUpdatePayload; reminders_enabled?: boolean; diff --git a/src/api/types/CreditNoteCursorFields.ts b/src/api/types/CreditNoteCursorFields.ts deleted file mode 100644 index 4c504f1..0000000 --- a/src/api/types/CreditNoteCursorFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type CreditNoteCursorFields = "id" | "created_at"; - -export const CreditNoteCursorFields = { - Id: "id", - CreatedAt: "created_at", -} as const; diff --git a/src/api/types/CreditNoteLineItemCreateRequest.ts b/src/api/types/CreditNoteLineItemCreateRequest.ts deleted file mode 100644 index 6b7b51c..0000000 --- a/src/api/types/CreditNoteLineItemCreateRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Schema for creating a new credit note line item. - */ -export interface CreditNoteLineItemCreateRequest { - /** Detailed description of the line item */ - description?: string; - /** Name or title of the line item */ - name?: string; - /** Quantity of items */ - quantity?: number; - /** Subtotal amount before tax in smallest currency unit */ - subtotal?: number; - /** Tax percentage */ - tax?: number; - /** Tax amount in smallest currency unit */ - tax_amount?: number; - /** Total amount including tax in smallest currency unit */ - total?: number; - /** Unit of measurement */ - unit?: string; - /** Price per unit in smallest currency unit (e.g. cents) */ - unit_price?: number; -} diff --git a/src/api/types/CreditNoteLineItemCursorFields.ts b/src/api/types/CreditNoteLineItemCursorFields.ts deleted file mode 100644 index 11da5d3..0000000 --- a/src/api/types/CreditNoteLineItemCursorFields.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type CreditNoteLineItemCursorFields = "id" | "created_at" | "name" | "total" | "quantity" | "unit_price"; - -export const CreditNoteLineItemCursorFields = { - Id: "id", - CreatedAt: "created_at", - Name: "name", - Total: "total", - Quantity: "quantity", - UnitPrice: "unit_price", -} as const; diff --git a/src/api/types/CreditNoteLineItemPaginationResponse.ts b/src/api/types/CreditNoteLineItemPaginationResponse.ts deleted file mode 100644 index b01ba2c..0000000 --- a/src/api/types/CreditNoteLineItemPaginationResponse.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -/** - * A paginated list of credit note line items. - */ -export interface CreditNoteLineItemPaginationResponse { - /** List of credit note line items for the current page */ - data: Monite.CreditNoteLineItemResponse[]; - /** Token to retrieve the next page of results */ - next_pagination_token?: string; - /** Token to retrieve the previous page of results */ - prev_pagination_token?: string; -} diff --git a/src/api/types/CreditNoteLineItemResponse.ts b/src/api/types/CreditNoteLineItemResponse.ts deleted file mode 100644 index da4a883..0000000 --- a/src/api/types/CreditNoteLineItemResponse.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Schema for credit note line item response. Includes all fields that can be returned from the API. - */ -export interface CreditNoteLineItemResponse { - /** Unique identifier of the line item */ - id: string; - /** Timestamp when the line item was created */ - created_at: string; - /** Timestamp when the line item was last updated */ - updated_at: string; - /** ID of the user who created the line item */ - created_by_user_id?: string; - /** ID of the parent credit note */ - credit_note_id: string; - /** Detailed description of the line item */ - description?: string; - /** Name or title of the line item */ - name?: string; - /** Quantity of items */ - quantity?: number; - /** Subtotal amount before tax */ - subtotal?: number; - /** Tax percentage */ - tax?: number; - /** Tax amount */ - tax_amount?: number; - /** Total amount including tax */ - total?: number; - /** Unit of measurement */ - unit?: string; - /** Price per unit in smallest currency unit */ - unit_price?: number; -} diff --git a/src/api/types/CreditNotePaginationResponse.ts b/src/api/types/CreditNotePaginationResponse.ts deleted file mode 100644 index c6c2d3e..0000000 --- a/src/api/types/CreditNotePaginationResponse.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -/** - * A paginated list of credit notes. - */ -export interface CreditNotePaginationResponse { - /** List of credit notes for the current page */ - data: Monite.CreditNoteResponse[]; - /** Token to retrieve the next page of results */ - next_pagination_token?: string; - /** Token to retrieve the previous page of results */ - prev_pagination_token?: string; -} diff --git a/src/api/types/CreditNoteResponse.ts b/src/api/types/CreditNoteResponse.ts deleted file mode 100644 index 69cdc4b..0000000 --- a/src/api/types/CreditNoteResponse.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -/** - * Schema for credit note response. Includes all fields that can be returned from the API. - */ -export interface CreditNoteResponse { - /** The unique identifier of the credit note */ - id: string; - /** Date and time when the credit note was created in the system */ - created_at: string; - /** Date and time of the last update to the credit note */ - updated_at: string; - /** The total amount including taxes */ - amount?: number; - /** ID of the payable this credit note is based on */ - based_on: string; - /** The document ID of the original payable that this credit note refers to */ - based_on_document_id?: string; - /** ID of the counterpart's address */ - counterpart_address_id?: string; - /** ID of the counterpart's bank account */ - counterpart_bank_account_id?: string; - /** ID of the counterpart */ - counterpart_id?: string; - /** ID of the counterpart's VAT registration */ - counterpart_vat_id_id?: string; - /** External system's user ID for the creator */ - created_by_external_user_id?: string; - /** Name of the external user who created the credit note */ - created_by_external_user_name?: string; - /** ID of the user who created the credit note */ - created_by_user_id?: string; - /** The currency code */ - currency?: string; - currency_exchange?: Monite.CurrencyExchangeSchema; - /** Description of the credit note */ - description?: string; - /** The credit note's unique document number */ - document_id?: string; - /** The ID of the entity to which the credit note belongs */ - entity_id: string; - /** Date when the credit note was issued */ - issued_at?: string; - /** ID of the OCR processing request */ - ocr_request_id?: string; - /** Status of OCR processing */ - ocr_status?: string; - /** The origin or source system of the credit note */ - origin: string; - /** ID of the associated project */ - project_id?: string; - /** Email address of the sender */ - sender?: string; - /** How the data was input (ocr/user_specified) */ - source_of_data: string; - /** The current status of the credit note in its lifecycle */ - status: string; - /** The subtotal amount before taxes */ - subtotal?: number; - /** List of tags associated with this credit note */ - tags?: Monite.TagReadSchema[]; - /** The tax percentage */ - tax?: number; - /** The calculated tax amount */ - tax_amount?: number; -} diff --git a/src/api/types/CurrencyExchangeSchema2.ts b/src/api/types/CurrencyExchangeSchema2.ts deleted file mode 100644 index 8667a66..0000000 --- a/src/api/types/CurrencyExchangeSchema2.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface CurrencyExchangeSchema2 { - default_currency_code: string; - rate: number; - total: number; -} diff --git a/src/api/types/DateDimensionBreakdownEnum.ts b/src/api/types/DateDimensionBreakdownEnum.ts deleted file mode 100644 index eeeefe5..0000000 --- a/src/api/types/DateDimensionBreakdownEnum.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type DateDimensionBreakdownEnum = "daily" | "weekly" | "monthly" | "quarterly" | "yearly"; - -export const DateDimensionBreakdownEnum = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", - Quarterly: "quarterly", - Yearly: "yearly", -} as const; diff --git a/src/api/types/DomainResponse.ts b/src/api/types/DomainResponse.ts index 8b47a9b..753d796 100644 --- a/src/api/types/DomainResponse.ts +++ b/src/api/types/DomainResponse.ts @@ -10,7 +10,6 @@ export interface DomainResponse { /** A dedicated IP address assigned to this mailbox and used to send outgoing email. */ dedicated_ip?: string; dns_records: Monite.DomainResponseDnsRecords; - /** The domain name. */ domain: string; /** The time the domain was updated for the last time */ last_updated_at?: string; diff --git a/src/api/types/EInvoicingSettingsResponse.ts b/src/api/types/EInvoicingSettingsResponse.ts new file mode 100644 index 0000000..4f9ad49 --- /dev/null +++ b/src/api/types/EInvoicingSettingsResponse.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Monite from "../index"; + +export interface EInvoicingSettingsResponse { + client_id: string; + client_secret: string; + provider: Monite.EInvoicingProviderEnum; +} diff --git a/src/api/types/EntityBankAccountResponse.ts b/src/api/types/EntityBankAccountResponse.ts index d9a5fa2..3afbbbe 100644 --- a/src/api/types/EntityBankAccountResponse.ts +++ b/src/api/types/EntityBankAccountResponse.ts @@ -28,7 +28,7 @@ export interface EntityBankAccountResponse { iban?: string; /** Indicates whether this bank account is the default one for its currency. */ is_default_for_currency?: boolean; - /** The bank's routing transit number (RTN) or branch code. Required if the account currency is USD. US routing numbers consist of 9 digits. */ + /** The bank's routing transit number (RTN). Required if the account currency is USD. US routing numbers consist of 9 digits. */ routing_number?: string; /** The bank's sort code. Required if the account currency is GBP. */ sort_code?: string; diff --git a/src/api/types/FileSchema.ts b/src/api/types/FileSchema.ts index 6219f7a..3c51415 100644 --- a/src/api/types/FileSchema.ts +++ b/src/api/types/FileSchema.ts @@ -10,7 +10,7 @@ import * as Monite from "../index"; export interface FileSchema { /** A unique ID of this file. */ id: string; - /** UTC date and time when this file was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ + /** UTC date and time when this workflow was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ created_at: string; /** The type of the business object associated with this file. */ file_type: string; diff --git a/src/api/types/FileSchema2.ts b/src/api/types/FileSchema2.ts index c71cafd..61d73d2 100644 --- a/src/api/types/FileSchema2.ts +++ b/src/api/types/FileSchema2.ts @@ -10,7 +10,7 @@ import * as Monite from "../index"; export interface FileSchema2 { /** A unique ID of this file. */ id: string; - /** UTC date and time when this file was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ + /** UTC date and time when this workflow was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ created_at: string; /** The type of the business object associated with this file. */ file_type: string; diff --git a/src/api/types/FileSchema4.ts b/src/api/types/FileSchema4.ts index dd209a6..1d0424e 100644 --- a/src/api/types/FileSchema4.ts +++ b/src/api/types/FileSchema4.ts @@ -10,7 +10,7 @@ import * as Monite from "../index"; export interface FileSchema4 { /** A unique ID of this file. */ id: string; - /** UTC date and time when this file was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ + /** UTC date and time when this workflow was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ created_at: string; /** The type of the business object associated with this file. */ file_type: string; diff --git a/src/api/types/FinancingInvoice.ts b/src/api/types/FinancingInvoice.ts deleted file mode 100644 index ee0cb85..0000000 --- a/src/api/types/FinancingInvoice.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface FinancingInvoice { - /** The type of the invoice i.e. receivable or payable. */ - type: Monite.FinancingInvoiceType; - /** Status of the invoice. */ - status: Monite.WcInvoiceStatus; - /** Monite invoice ID. */ - invoice_id: string; - /** Monite document ID. */ - document_id: string; - /** Monite invoice due date. */ - due_date: string; - /** Monite invoice issue date. */ - issue_date: string; - /** Total amount of the invoice in minor units. */ - total_amount: number; - /** Currency code. */ - currency: Monite.CurrencyEnum; - /** Description of the invoice. */ - description?: string; - /** Payer type. BUSINESS or INDIVIDUAL */ - payer_type: string; - /** Payer business name. Only applicable for BUSINESS payer type. */ - payer_business_name?: string; - /** Payer first name. Only applicable for INDIVIDUAL payer type. */ - payer_first_name?: string; - /** Payer last name. Only applicable for INDIVIDUAL payer type. */ - payer_last_name?: string; - /** Repayment schedule of the invoice. */ - repayment_schedule?: Monite.RepaymentSchedule; -} diff --git a/src/api/types/FinancingInvoiceCursorFields.ts b/src/api/types/FinancingInvoiceCursorFields.ts deleted file mode 100644 index 75a2ef9..0000000 --- a/src/api/types/FinancingInvoiceCursorFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type FinancingInvoiceCursorFields = "id" | "created_at"; - -export const FinancingInvoiceCursorFields = { - Id: "id", - CreatedAt: "created_at", -} as const; diff --git a/src/api/types/FinancingInvoiceListResponse.ts b/src/api/types/FinancingInvoiceListResponse.ts deleted file mode 100644 index a4c7344..0000000 --- a/src/api/types/FinancingInvoiceListResponse.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface FinancingInvoiceListResponse { - /** A list of invoices requested for financing. */ - data: Monite.FinancingInvoice[]; - /** A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page). */ - prev_pagination_token?: string; - /** A token that can be sent in the `pagination_token` query parameter to get the next page of results, or `null` if there is no next page (i.e. you've reached the last page). */ - next_pagination_token?: string; -} diff --git a/src/api/types/FinancingInvoiceType.ts b/src/api/types/FinancingInvoiceType.ts deleted file mode 100644 index 0d39e2c..0000000 --- a/src/api/types/FinancingInvoiceType.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type FinancingInvoiceType = "payable" | "receivable"; - -export const FinancingInvoiceType = { - Payable: "payable", - Receivable: "receivable", -} as const; diff --git a/src/api/types/FinancingOffer.ts b/src/api/types/FinancingOffer.ts deleted file mode 100644 index e2b03ed..0000000 --- a/src/api/types/FinancingOffer.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface FinancingOffer { - /** The status of the financing offer. */ - status: Monite.WcOfferStatus; - /** The total credit limit in minor units. */ - total_amount: number; - /** The available credit limit in minor units. */ - available_amount?: number; - /** The currency code. */ - currency: Monite.CurrencyEnum; - /** A list of pricing plans for the offer. */ - pricing_plans: Monite.PricingPlan[]; -} diff --git a/src/api/types/FinancingOffersResponse.ts b/src/api/types/FinancingOffersResponse.ts deleted file mode 100644 index d45662a..0000000 --- a/src/api/types/FinancingOffersResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface FinancingOffersResponse { - /** A list of financing offers extended to the business. */ - offers: Monite.FinancingOffer[]; - /** The business's onboarding status. */ - business_status: Monite.WcBusinessStatus; -} diff --git a/src/api/types/FinancingPushInvoicesRequestInvoice.ts b/src/api/types/FinancingPushInvoicesRequestInvoice.ts deleted file mode 100644 index aac108b..0000000 --- a/src/api/types/FinancingPushInvoicesRequestInvoice.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface FinancingPushInvoicesRequestInvoice { - /** The invoice ID. */ - id: string; - /** The invoice type. */ - type: Monite.FinancingInvoiceType; -} diff --git a/src/api/types/FinancingPushInvoicesResponse.ts b/src/api/types/FinancingPushInvoicesResponse.ts deleted file mode 100644 index 1382316..0000000 --- a/src/api/types/FinancingPushInvoicesResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface FinancingPushInvoicesResponse { - /** A connect token for Kanmon SDK. */ - connect_token: string; - /** An embedded session token for Kanmon SDK. */ - session_token: string; -} diff --git a/src/api/types/FinancingTokenResponse.ts b/src/api/types/FinancingTokenResponse.ts deleted file mode 100644 index 91c65dc..0000000 --- a/src/api/types/FinancingTokenResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface FinancingTokenResponse { - /** A connect token for Kanmon SDK. */ - connect_token: string; -} diff --git a/src/api/types/InvoiceResponsePayload.ts b/src/api/types/InvoiceResponsePayload.ts index 2aa036a..8975283 100644 --- a/src/api/types/InvoiceResponsePayload.ts +++ b/src/api/types/InvoiceResponsePayload.ts @@ -67,9 +67,10 @@ export interface InvoiceResponsePayload { /** The receivable's PDF URL in the counterpart's default language. */ file_url?: string; /** - * The date when the goods are shipped or the service is provided. Can be a current, past, or future date. + * The date when the goods are shipped or the service is provided. * - * If omitted or `null`, defaults to the invoice issue date and the value is automatically set when the invoice is moved to the `issued` status. + * If omitted, defaults to the invoice issue date, + * and the value is automatically set when the invoice status changes to `issued`. */ fulfillment_date?: string; /** Optional field for the issue of the entry. */ diff --git a/src/api/types/MailSettingsResponse.ts b/src/api/types/MailSettingsResponse.ts new file mode 100644 index 0000000..da85ebb --- /dev/null +++ b/src/api/types/MailSettingsResponse.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface MailSettingsResponse { + attach_documents_as_pdf: boolean; + from_email_username?: string; + from_name?: string; +} diff --git a/src/api/types/MergedSettingsResponse.ts b/src/api/types/MergedSettingsResponse.ts index 06bfbdf..1042f2e 100644 --- a/src/api/types/MergedSettingsResponse.ts +++ b/src/api/types/MergedSettingsResponse.ts @@ -6,7 +6,7 @@ import * as Monite from "../index"; export interface MergedSettingsResponse { /** Settings for the accounting module. */ - accounting?: Monite.AccountingSettings; + accounting?: Monite.AccountingSettingsResponse; /** Automatically attempt to find a corresponding purchase order for all incoming payables. */ allow_purchase_order_autolinking?: boolean; /** Default API version for partner. */ @@ -19,24 +19,24 @@ export interface MergedSettingsResponse { default_role?: Record; document_ids?: Monite.DocumentIDsSettings; /** Settings for the e-invoicing module. */ - einvoicing?: Monite.EInvoicingSettingsPayload; + einvoicing?: Monite.EInvoicingSettingsResponse; /** If enabled, the paid invoice's PDF will be in a new layout set by the user */ generate_paid_invoice_pdf?: boolean; language?: Monite.LanguageCodeEnum; /** Settings for email and mailboxes. */ - mail?: Monite.MailSettingsPayload; + mail?: Monite.MailSettingsResponse; /** Settings for the payables module. */ - payable?: Monite.PayableSettingsPayload; + payable?: Monite.PayableSettingsResponse; /** Auto tagging settings for all incoming OCR payable documents. */ payables_ocr_auto_tagging?: Monite.OcrAutoTaggingSettingsRequest[]; /** Payment preferences for entity to automate calculating suggested payment date basing on payment terms and entity preferences */ payment_priority?: Monite.PaymentPriorityEnum; /** Settings for the payments module. */ - payments?: Monite.PaymentsSettingsPayload; + payments?: Monite.PaymentsSettingsResponse; /** Sets the default behavior of whether a signature is required to accept quotes */ quote_signature_required?: boolean; /** Settings for the receivables module. */ - receivable?: Monite.ReceivableSettingsPayload; + receivable?: Monite.ReceivableSettingsResponse; receivable_edit_flow?: Monite.ReceivableEditFlow; reminder?: Monite.RemindersSettings; /** Measurement units. */ diff --git a/src/api/types/OcrAddress.ts b/src/api/types/OcrAddress.ts index b81ec08..428cb79 100644 --- a/src/api/types/OcrAddress.ts +++ b/src/api/types/OcrAddress.ts @@ -4,9 +4,8 @@ /** * In general it's compatible with CounterpartAddress model but - * - * - All fields are optional - * - There is an additional field original_country_name + * * All fields are optional + * * There is an additional field original_country_name */ export interface OcrAddress { /** Two-letter ISO country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ diff --git a/src/api/types/OcrResponseInvoiceReceiptData.ts b/src/api/types/OcrResponseInvoiceReceiptData.ts index c28623a..874eda1 100644 --- a/src/api/types/OcrResponseInvoiceReceiptData.ts +++ b/src/api/types/OcrResponseInvoiceReceiptData.ts @@ -7,8 +7,6 @@ import * as Monite from "../index"; export interface OcrResponseInvoiceReceiptData { /** Total in cents/eurocents. Outdated, actual conversion happens in payables. */ total?: number; - /** Total paid amount */ - total_paid_amount_raw?: number; /** Total, without minor units */ total_raw?: number; /** Subtotal cents/eurocents. Outdated, actual conversion happens in payables. */ diff --git a/src/api/types/OcrResponseInvoiceReceiptLineItem.ts b/src/api/types/OcrResponseInvoiceReceiptLineItem.ts index a8e45fa..c128403 100644 --- a/src/api/types/OcrResponseInvoiceReceiptLineItem.ts +++ b/src/api/types/OcrResponseInvoiceReceiptLineItem.ts @@ -9,7 +9,7 @@ export interface OcrResponseInvoiceReceiptLineItem { description?: string; /** Quanity */ quantity?: number; - /** Price in cents/eurocents */ + /** Price in cents/eurocents */ unit_price?: number; /** Unit */ unit?: string; diff --git a/src/api/types/OrderEnum2.ts b/src/api/types/OrderEnum2.ts new file mode 100644 index 0000000..b707bb6 --- /dev/null +++ b/src/api/types/OrderEnum2.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type OrderEnum2 = "asc" | "desc"; + +export const OrderEnum2 = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/types/OrderEnum3.ts b/src/api/types/OrderEnum3.ts new file mode 100644 index 0000000..1264802 --- /dev/null +++ b/src/api/types/OrderEnum3.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type OrderEnum3 = "asc" | "desc"; + +export const OrderEnum3 = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/types/PartnerProjectSettingsResponse.ts b/src/api/types/PartnerProjectSettingsResponse.ts index 134e524..caf425f 100644 --- a/src/api/types/PartnerProjectSettingsResponse.ts +++ b/src/api/types/PartnerProjectSettingsResponse.ts @@ -6,7 +6,7 @@ import * as Monite from "../index"; export interface PartnerProjectSettingsResponse { /** Settings for the accounting module. */ - accounting?: Monite.AccountingSettings; + accounting?: Monite.AccountingSettingsResponse; /** Default API version for partner. */ api_version?: Monite.ApiVersion; /** Commercial conditions for receivables. */ @@ -16,15 +16,15 @@ export interface PartnerProjectSettingsResponse { /** A default role to provision upon new entity creation. */ default_role?: Record; /** Settings for the e-invoicing module. */ - einvoicing?: Monite.EInvoicingSettingsPayload; + einvoicing?: Monite.EInvoicingSettingsResponse; /** Settings for email and mailboxes. */ - mail?: Monite.MailSettingsPayload; + mail?: Monite.MailSettingsResponse; /** Settings for the payables module. */ - payable?: Monite.PayableSettingsPayload; + payable?: Monite.PayableSettingsResponse; /** Settings for the payments module. */ - payments?: Monite.PaymentsSettingsPayload; + payments?: Monite.PaymentsSettingsResponse; /** Settings for the receivables module. */ - receivable?: Monite.ReceivableSettingsPayload; + receivable?: Monite.ReceivableSettingsResponse; /** Measurement units. */ units?: Monite.Unit[]; website?: string; diff --git a/src/api/types/PayableAnalyticsResponse.ts b/src/api/types/PayableAnalyticsResponse.ts deleted file mode 100644 index d455957..0000000 --- a/src/api/types/PayableAnalyticsResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface PayableAnalyticsResponse { - data: Monite.AnalyticsDataPoint[]; -} diff --git a/src/api/types/PayableCreditNoteData.ts b/src/api/types/PayableCreditNoteData.ts deleted file mode 100644 index 496ced5..0000000 --- a/src/api/types/PayableCreditNoteData.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface PayableCreditNoteData { - /** The unique identifier of the credit note. */ - id: string; - /** The credit note's unique document number. */ - document_id?: string; - /** The date when the credit note was issued, in the YYYY-MM-DD format */ - issued_at?: string; - /** The current status of the credit note in its lifecycle */ - status: string; - /** Credit note total amount. */ - total_amount?: number; -} diff --git a/src/api/types/PayableDimensionEnum.ts b/src/api/types/PayableDimensionEnum.ts deleted file mode 100644 index 126127a..0000000 --- a/src/api/types/PayableDimensionEnum.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type PayableDimensionEnum = - | "created_at" - | "status" - | "counterpart_id" - | "currency" - | "issued_at" - | "due_date" - | "project_id"; - -export const PayableDimensionEnum = { - CreatedAt: "created_at", - Status: "status", - CounterpartId: "counterpart_id", - Currency: "currency", - IssuedAt: "issued_at", - DueDate: "due_date", - ProjectId: "project_id", -} as const; diff --git a/src/api/types/PayableMetricEnum.ts b/src/api/types/PayableMetricEnum.ts deleted file mode 100644 index 3c53eb5..0000000 --- a/src/api/types/PayableMetricEnum.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type PayableMetricEnum = "id" | "total_amount"; - -export const PayableMetricEnum = { - Id: "id", - TotalAmount: "total_amount", -} as const; diff --git a/src/api/types/PayableResponseSchema.ts b/src/api/types/PayableResponseSchema.ts index e414f50..8011924 100644 --- a/src/api/types/PayableResponseSchema.ts +++ b/src/api/types/PayableResponseSchema.ts @@ -36,15 +36,11 @@ export interface PayableResponseSchema { counterpart_vat_id_id?: string; /** The ID of the role that the entity user who created this payable had at that time. If the payable was created using a partner access token, the value is `null`. */ created_by_role_id?: string; - /** The list of linked credit notes of the payable. */ - credit_notes: Monite.PayableCreditNoteData[]; /** The [currency code](https://docs.monite.com/docs/currencies) of the currency used in the payable. */ currency?: Monite.CurrencyEnum; - currency_exchange?: Monite.CurrencyExchangeSchema2; + currency_exchange?: Monite.CurrencyExchangeSchema; /** An arbitrary description of this payable. */ description?: string; - /** The value of the additional discount that will be applied to the total amount. in [minor units](https://docs.monite.com/docs/currencies#minor-units). For example, $12.50 is represented as 1250. */ - discount?: number; /** A unique invoice number assigned by the invoice issuer for payment tracking purposes. This is different from `id` which is an internal ID created automatically by Monite. */ document_id?: string; /** The date by which the payable must be paid, in the YYYY-MM-DD format. If the payable specifies payment terms with early payment discounts, this is the final payment date. */ @@ -87,7 +83,7 @@ export interface PayableResponseSchema { status: Monite.PayableStateEnum; /** The subtotal amount to be paid, in [minor units](https://docs.monite.com/docs/currencies#minor-units). For example, $12.50 is represented as 1250. */ subtotal?: number; - /** The suggested date and corresponding discount in which payable could be paid. The date is in the YYYY-MM-DD format. The discount is calculated as X \* (10^-4) - for example, 100 is 1%, 25 is 0,25%, 10000 is 100 %. Date varies depending on the payment terms and may even be equal to the due date with discount 0. */ + /** The suggested date and corresponding discount in which payable could be paid. The date is in the YYYY-MM-DD format. The discount is calculated as X * (10^-4) - for example, 100 is 1%, 25 is 0,25%, 10000 is 100 %. Date varies depending on the payment terms and may even be equal to the due date with discount 0. */ suggested_payment_term?: Monite.SuggestedPaymentTerm; /** A list of user-defined tags (labels) assigned to this payable. Tags can be used to trigger a specific approval policy for this payable. */ tags?: Monite.TagReadSchema[]; @@ -97,7 +93,5 @@ export interface PayableResponseSchema { tax_amount?: number; /** The total amount to be paid, in [minor units](https://docs.monite.com/docs/currencies#minor-units). For example, $12.50 is represented as 1250. */ total_amount?: number; - /** The total price of the payable in [minor units](https://docs.monite.com/docs/currencies#minor-units), excluding all issued credit notes. */ - total_amount_with_credit_notes?: number; was_created_by_user_id?: string; } diff --git a/src/api/types/PayableSettingsPayload.ts b/src/api/types/PayableSettingsPayload.ts index 6e49720..cceda7b 100644 --- a/src/api/types/PayableSettingsPayload.ts +++ b/src/api/types/PayableSettingsPayload.ts @@ -10,5 +10,4 @@ export interface PayableSettingsPayload { /** A state each new payable will have upon creation */ default_state?: string; enable_line_items?: boolean; - skip_approval_for_paid_invoice?: boolean; } diff --git a/src/api/types/PayableSettingsResponse.ts b/src/api/types/PayableSettingsResponse.ts new file mode 100644 index 0000000..83e8106 --- /dev/null +++ b/src/api/types/PayableSettingsResponse.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface PayableSettingsResponse { + allow_cancel_duplicates_automatically?: boolean; + allow_counterpart_autocreation?: boolean; + allow_counterpart_autolinking?: boolean; + approve_page_url: string; + /** A state each new payable will have upon creation */ + default_state?: string; + enable_line_items?: boolean; +} diff --git a/src/api/types/PayerAccountResponse.ts b/src/api/types/PayerAccountResponse.ts deleted file mode 100644 index 9d11b83..0000000 --- a/src/api/types/PayerAccountResponse.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface PayerAccountResponse { - /** ID of a payment account */ - id: string; - /** List of bank accounts */ - bank_accounts?: Monite.BankAccount[]; - /** Display name of a payment account */ - name?: string; - /** Type of a payment account. Can be `entity` or `counterpart` */ - type: Monite.PaymentAccountType; -} diff --git a/src/api/types/PaymentAccountObject.ts b/src/api/types/PaymentAccountObject.ts index edf6422..15fbbfe 100644 --- a/src/api/types/PaymentAccountObject.ts +++ b/src/api/types/PaymentAccountObject.ts @@ -5,8 +5,6 @@ import * as Monite from "../index"; export interface PaymentAccountObject { - /** ID of a payment account */ id: string; - /** Type of a payment account. Can be `entity` or `counterpart` */ type: Monite.PaymentAccountType; } diff --git a/src/api/types/PaymentIntentResponse.ts b/src/api/types/PaymentIntentResponse.ts index c2d02d1..418d032 100644 --- a/src/api/types/PaymentIntentResponse.ts +++ b/src/api/types/PaymentIntentResponse.ts @@ -13,7 +13,7 @@ export interface PaymentIntentResponse { currency: string; invoice?: Monite.Invoice; object?: Monite.PaymentObject; - payer?: Monite.PayerAccountResponse; + payer?: Monite.AccountResponse; payment_link_id?: string; payment_methods: Monite.MoniteAllPaymentMethodsTypes[]; payment_reference?: string; diff --git a/src/api/types/PaymentPageThemeResponse.ts b/src/api/types/PaymentPageThemeResponse.ts new file mode 100644 index 0000000..bc6ee8a --- /dev/null +++ b/src/api/types/PaymentPageThemeResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Monite from "../index"; + +export interface PaymentPageThemeResponse { + background_color?: string; + border_radius?: string; + button?: Monite.ButtonThemeResponse; + card?: Monite.CardThemeResponse; + font_color?: string; + font_family?: string; + font_link_href?: string; + logo_src?: string; +} diff --git a/src/api/types/PaymentsSettingsResponse.ts b/src/api/types/PaymentsSettingsResponse.ts new file mode 100644 index 0000000..9973e37 --- /dev/null +++ b/src/api/types/PaymentsSettingsResponse.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Monite from "../index"; + +export interface PaymentsSettingsResponse { + payment_page_domain?: string; + payment_page_theme?: Monite.PaymentPageThemeResponse; + /** The support email address */ + support_email?: string; +} diff --git a/src/api/types/Platform.ts b/src/api/types/Platform.ts index 117e73b..32d9130 100644 --- a/src/api/types/Platform.ts +++ b/src/api/types/Platform.ts @@ -2,11 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -export type Platform = "xero" | "quickbooks" | "quickbooks_online" | "quickbooks_online_sandbox"; +export type Platform = "xero" | "quickbooks_online" | "quickbooks_online_sandbox"; export const Platform = { Xero: "xero", - Quickbooks: "quickbooks", QuickbooksOnline: "quickbooks_online", QuickbooksOnlineSandbox: "quickbooks_online_sandbox", } as const; diff --git a/src/api/types/PricingPlan.ts b/src/api/types/PricingPlan.ts deleted file mode 100644 index b58efe9..0000000 --- a/src/api/types/PricingPlan.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -/** - * A pricing plan of a financing offer - */ -export interface PricingPlan { - /** Advance rate percentage. 10000 means 100% */ - advance_rate_percentage: number; - /** Transaction fee percentage. 300 means 3.00% */ - fee_percentage: number; - /** Repayment type of the loan. */ - repayment_type: Monite.WcRepaymentType; - /** This amount of days after which the repayment duration is due. This is only applicable for FIXED_DURATION repayment type */ - repayment_duration_days?: number; -} diff --git a/src/api/types/PublicPaymentLinkResponse.ts b/src/api/types/PublicPaymentLinkResponse.ts index 7da5f9c..3f1b0b6 100644 --- a/src/api/types/PublicPaymentLinkResponse.ts +++ b/src/api/types/PublicPaymentLinkResponse.ts @@ -10,14 +10,13 @@ export interface PublicPaymentLinkResponse { currency: Monite.CurrencyEnum; expires_at: string; invoice?: Monite.Invoice; - payer?: Monite.PayerAccountResponse; + payer?: Monite.AccountResponse; payment_intent?: Monite.PaymentIntent; payment_intent_id: string; payment_methods: string[]; payment_page_url: string; payment_reference?: string; recipient: Monite.RecipientAccountResponse; - /** The URL where to redirect the payer after the payment. If `return_url` is specified, then after the payment is completed the payment page will display the "Return to platform" link that navigates to this URL. */ return_url?: string; status: string; } diff --git a/src/api/types/PurchaseOrderCounterpartIndividualRootResponse.ts b/src/api/types/PurchaseOrderCounterpartIndividualRootResponse.ts index 181d6c1..c9fec20 100644 --- a/src/api/types/PurchaseOrderCounterpartIndividualRootResponse.ts +++ b/src/api/types/PurchaseOrderCounterpartIndividualRootResponse.ts @@ -23,7 +23,7 @@ export interface PurchaseOrderCounterpartIndividualRootResponse { /** Entity user ID of counterpart creator. */ created_by_entity_user_id?: string; individual: Monite.PurchaseOrderCounterpartIndividualResponse; - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; reminders_enabled?: boolean; /** The counterpart's taxpayer identification number or tax ID. This field is required for counterparts that are non-VAT registered. */ diff --git a/src/api/types/PurchaseOrderCounterpartOrganizationRootResponse.ts b/src/api/types/PurchaseOrderCounterpartOrganizationRootResponse.ts index 4ad7c8b..8cfda19 100644 --- a/src/api/types/PurchaseOrderCounterpartOrganizationRootResponse.ts +++ b/src/api/types/PurchaseOrderCounterpartOrganizationRootResponse.ts @@ -22,7 +22,7 @@ export interface PurchaseOrderCounterpartOrganizationRootResponse { default_shipping_address_id?: string; /** Entity user ID of counterpart creator. */ created_by_entity_user_id?: string; - /** The language used to generate PDF documents for this counterpart. */ + /** The language used to generate pdf documents for this counterpart. */ language?: Monite.LanguageCodeEnum; organization: Monite.PurchaseOrderCounterpartOrganizationResponse; reminders_enabled?: boolean; diff --git a/src/api/types/ReceivableFacadeCreateInvoicePayload.ts b/src/api/types/ReceivableFacadeCreateInvoicePayload.ts index 164e90f..6e941e6 100644 --- a/src/api/types/ReceivableFacadeCreateInvoicePayload.ts +++ b/src/api/types/ReceivableFacadeCreateInvoicePayload.ts @@ -22,17 +22,16 @@ export interface ReceivableFacadeCreateInvoicePayload { deduction_memo?: string; /** The discount for a receivable. */ discount?: Monite.Discount; - /** The document number of the receivable, which will appear in the PDF document. Can be set manually only in the [non-compliant mode](https://docs.monite.com/accounts-receivable/regulatory-compliance/invoice-compliance). Otherwise (or if omitted), it will be generated automatically based on the entity's [document number customization](https://docs.monite.com/advanced/document-number-customization) settings when the document is issued. */ - document_id?: string; entity?: Monite.ReceivableEntityBase; /** Entity bank account ID */ entity_bank_account_id?: string; /** Entity VAT ID id */ entity_vat_id_id?: string; /** - * The date when the goods are shipped or the service is provided. Can be a current, past, or future date. + * The date when the goods are shipped or the service is provided. * - * If omitted or `null`, defaults to the invoice issue date and the value is automatically set when the invoice is moved to the `issued` status. + * If omitted, defaults to the invoice issue date, + * and the value is automatically set when the invoice status changes to `issued`. */ fulfillment_date?: string; line_items: Monite.LineItem[]; diff --git a/src/api/types/ReceivableFacadeCreateQuotePayload.ts b/src/api/types/ReceivableFacadeCreateQuotePayload.ts index 711aba4..2e734be 100644 --- a/src/api/types/ReceivableFacadeCreateQuotePayload.ts +++ b/src/api/types/ReceivableFacadeCreateQuotePayload.ts @@ -22,8 +22,6 @@ export interface ReceivableFacadeCreateQuotePayload { deduction_memo?: string; /** The discount for a receivable. */ discount?: Monite.Discount; - /** The document number of the receivable, which will appear in the PDF document. Can be set manually only in the [non-compliant mode](https://docs.monite.com/accounts-receivable/regulatory-compliance/invoice-compliance). Otherwise (or if omitted), it will be generated automatically based on the entity's [document number customization](https://docs.monite.com/advanced/document-number-customization) settings when the document is issued. */ - document_id?: string; entity?: Monite.ReceivableEntityBase; /** Entity bank account ID */ entity_bank_account_id?: string; diff --git a/src/api/types/ReceivableFileSchema.ts b/src/api/types/ReceivableFileSchema.ts index be926e1..e5cf0c4 100644 --- a/src/api/types/ReceivableFileSchema.ts +++ b/src/api/types/ReceivableFileSchema.ts @@ -10,7 +10,7 @@ import * as Monite from "../index"; export interface ReceivableFileSchema { /** A unique ID of this file. */ id: string; - /** UTC date and time when this file was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ + /** UTC date and time when this workflow was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ created_at: string; /** The type of the business object associated with this file. */ file_type: string; diff --git a/src/api/types/ReceivableHistoryEventTypeEnum.ts b/src/api/types/ReceivableHistoryEventTypeEnum.ts index 6dcb26f..fd2bc1e 100644 --- a/src/api/types/ReceivableHistoryEventTypeEnum.ts +++ b/src/api/types/ReceivableHistoryEventTypeEnum.ts @@ -4,21 +4,15 @@ export type ReceivableHistoryEventTypeEnum = | "status_changed" - | "receivable_created" | "receivable_updated" | "based_on_receivable_created" | "payment_received" - | "mail_sent" - | "payment_reminder_mail_sent" - | "overdue_reminder_mail_sent"; + | "mail_sent"; export const ReceivableHistoryEventTypeEnum = { StatusChanged: "status_changed", - ReceivableCreated: "receivable_created", ReceivableUpdated: "receivable_updated", BasedOnReceivableCreated: "based_on_receivable_created", PaymentReceived: "payment_received", MailSent: "mail_sent", - PaymentReminderMailSent: "payment_reminder_mail_sent", - OverdueReminderMailSent: "overdue_reminder_mail_sent", } as const; diff --git a/src/api/types/ReceivableHistoryResponseEventData.ts b/src/api/types/ReceivableHistoryResponseEventData.ts index afab7c1..5f36098 100644 --- a/src/api/types/ReceivableHistoryResponseEventData.ts +++ b/src/api/types/ReceivableHistoryResponseEventData.ts @@ -10,8 +10,6 @@ import * as Monite from "../index"; export type ReceivableHistoryResponseEventData = | Monite.StatusChangedEventData | Monite.ReceivableUpdatedEventData - | Monite.ReceivableCreatedEventData | Monite.BasedOnReceivableCreatedEventData | Monite.PaymentReceivedEventData - | Monite.MailSentEventData - | Monite.ReminderMailSentEventData; + | Monite.MailSentEventData; diff --git a/src/api/types/ReceivableSettingsResponse.ts b/src/api/types/ReceivableSettingsResponse.ts new file mode 100644 index 0000000..4ce0a9f --- /dev/null +++ b/src/api/types/ReceivableSettingsResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ReceivableSettingsResponse { + create_without_personal_info: boolean; + deduction_title?: string; +} diff --git a/src/api/types/ReceivablesStatusEnum.ts b/src/api/types/ReceivablesStatusEnum.ts index 63bf56f..914afa3 100644 --- a/src/api/types/ReceivablesStatusEnum.ts +++ b/src/api/types/ReceivablesStatusEnum.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * This Enum the results of combining two types of statuses from + * QuoteStateEnum, CreditNoteStateEnum and InvoiceStateEnum. You shouldn't use + * it in your scenarios if only for edge cases in workers, but ideally need to + * remove this shared Enum. + */ export type ReceivablesStatusEnum = | "draft" | "issued" diff --git a/src/api/types/RecipientAccountResponse.ts b/src/api/types/RecipientAccountResponse.ts index 57bd403..a2af9a9 100644 --- a/src/api/types/RecipientAccountResponse.ts +++ b/src/api/types/RecipientAccountResponse.ts @@ -5,12 +5,8 @@ import * as Monite from "../index"; export interface RecipientAccountResponse { - /** ID of a payment account */ id: string; - /** List of bank accounts */ bank_accounts?: Monite.BankAccount[]; - /** Display name of a payment account */ name?: string; - /** Type of a payment account. Can be `entity` or `counterpart` */ type: Monite.PaymentAccountType; } diff --git a/src/api/types/ReminderMailSentEventData.ts b/src/api/types/ReminderMailSentEventData.ts deleted file mode 100644 index 55809cc..0000000 --- a/src/api/types/ReminderMailSentEventData.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Monite from "../index"; - -export interface ReminderMailSentEventData { - mail_id: string; - mail_status: Monite.ReceivableMailStatusEnum; - recipients: Monite.ReceivableMailRecipients; - term: Monite.ReminderTypeEnum; -} diff --git a/src/api/types/RepaymentSchedule.ts b/src/api/types/RepaymentSchedule.ts deleted file mode 100644 index bec3a1b..0000000 --- a/src/api/types/RepaymentSchedule.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Repayment schedule model - */ -export interface RepaymentSchedule { - /** Repayment date in ISO 8601 format */ - repayment_date: string; - /** Repayment amount in minor units */ - repayment_amount: number; - /** Repayment fee amount in minor units */ - repayment_fee_amount: number; - /** Repayment principal amount in minor units */ - repayment_principal_amount: number; -} diff --git a/src/api/types/RolePaginationResponse.ts b/src/api/types/RolePaginationResponse.ts index 4a8773c..f73ecb7 100644 --- a/src/api/types/RolePaginationResponse.ts +++ b/src/api/types/RolePaginationResponse.ts @@ -7,8 +7,8 @@ import * as Monite from "../index"; export interface RolePaginationResponse { /** array of records */ data: Monite.RoleResponse[]; - /** A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page). */ - prev_pagination_token?: string; /** A token that can be sent in the `pagination_token` query parameter to get the next page of results, or `null` if there is no next page (i.e. you've reached the last page). */ next_pagination_token?: string; + /** A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page). */ + prev_pagination_token?: string; } diff --git a/src/api/types/RoleResponse.ts b/src/api/types/RoleResponse.ts index 1d04b79..af67521 100644 --- a/src/api/types/RoleResponse.ts +++ b/src/api/types/RoleResponse.ts @@ -7,14 +7,14 @@ import * as Monite from "../index"; export interface RoleResponse { /** UUID role ID */ id: string; + /** UTC datetime */ + created_at: string; + /** UTC datetime */ + updated_at: string; /** Role name */ name: string; /** Access permissions */ permissions: Monite.BizObjectsSchema; /** record status, 'active' by default */ status: Monite.StatusEnum; - /** UTC datetime */ - created_at: string; - /** UTC datetime */ - updated_at: string; } diff --git a/src/api/types/RootSchema.ts b/src/api/types/RootSchema.ts index 865f4ac..09b9234 100644 --- a/src/api/types/RootSchema.ts +++ b/src/api/types/RootSchema.ts @@ -15,7 +15,6 @@ export type RootSchema = | Monite.RootSchema.CounterpartVatId | Monite.RootSchema.EntityBankAccount | Monite.RootSchema.Export - | Monite.RootSchema.Mailbox | Monite.RootSchema.PayablesPurchaseOrder | Monite.RootSchema.PaymentReminder | Monite.RootSchema.OverdueReminder @@ -75,10 +74,6 @@ export declare namespace RootSchema { object_type: "export"; } - interface Mailbox extends Monite.CommonSchema { - object_type: "mailbox"; - } - interface PayablesPurchaseOrder extends Monite.CommonSchema { object_type: "payables_purchase_order"; } diff --git a/src/api/types/UpdateEntityRequest.ts b/src/api/types/UpdateEntityRequest.ts index c9c7451..b956408 100644 --- a/src/api/types/UpdateEntityRequest.ts +++ b/src/api/types/UpdateEntityRequest.ts @@ -16,7 +16,7 @@ export interface UpdateEntityRequest { individual?: Monite.OptionalIndividualSchema; /** A set of meta data describing the organization */ organization?: Monite.OptionalOrganizationSchema; - /** The contact phone number of the entity. Required for US organizations to use payments. */ + /** A phone number of the entity */ phone?: string; /** The entity's taxpayer identification number or tax ID. This field is required for entities that are non-VAT registered. */ tax_id?: string; diff --git a/src/api/types/UpdateInvoice.ts b/src/api/types/UpdateInvoice.ts index e3fdd41..b2b8148 100644 --- a/src/api/types/UpdateInvoice.ts +++ b/src/api/types/UpdateInvoice.ts @@ -4,6 +4,9 @@ import * as Monite from "../index"; +/** + * Raise if None was explicitly passed to given fields + */ export interface UpdateInvoice { /** Unique ID of the counterpart contact. */ contact_id?: string; @@ -28,9 +31,10 @@ export interface UpdateInvoice { /** Entity VAT ID id */ entity_vat_id_id?: string; /** - * The date when the goods are shipped or the service is provided. Can be a current, past, or future date. + * The date when the goods are shipped or the service is provided. * - * If omitted or `null`, defaults to the invoice issue date and the value is automatically set when the invoice is moved to the `issued` status. + * If omitted, defaults to the invoice issue date, + * and the value is automatically set when the invoice status changes to `issued`. */ fulfillment_date?: string; line_items?: Monite.LineItemUpdate[]; diff --git a/src/api/types/UpdateIssuedInvoice.ts b/src/api/types/UpdateIssuedInvoice.ts index c9df890..35e58c4 100644 --- a/src/api/types/UpdateIssuedInvoice.ts +++ b/src/api/types/UpdateIssuedInvoice.ts @@ -4,6 +4,9 @@ import * as Monite from "../index"; +/** + * Raise if None was explicitly passed to given fields + */ export interface UpdateIssuedInvoice { /** Unique ID of the counterpart contact. */ contact_id?: string; @@ -15,7 +18,12 @@ export interface UpdateIssuedInvoice { entity_address?: Monite.ReceivableEntityAddressSchema; /** Entity VAT ID id */ entity_vat_id_id?: string; - /** The date when the goods are shipped or the service is provided. Can be a current, past, or future date. */ + /** + * The date when the goods are shipped or the service is provided. + * + * If omitted, defaults to the invoice issue date, + * and the value is automatically set when the invoice status changes to `issued`. + */ fulfillment_date?: string; /** A note with additional information for a receivable */ memo?: string; diff --git a/src/api/types/UpdateQuote.ts b/src/api/types/UpdateQuote.ts index 9db9d22..9e2ddd2 100644 --- a/src/api/types/UpdateQuote.ts +++ b/src/api/types/UpdateQuote.ts @@ -4,6 +4,9 @@ import * as Monite from "../index"; +/** + * Raise if None was explicitly passed to given fields + */ export interface UpdateQuote { /** Unique ID of the counterpart contact. */ contact_id?: string; diff --git a/src/api/types/VerifyResponse.ts b/src/api/types/VerifyResponse.ts index adde18b..02f0e13 100644 --- a/src/api/types/VerifyResponse.ts +++ b/src/api/types/VerifyResponse.ts @@ -5,7 +5,6 @@ export interface VerifyResponse { /** Entry UUID */ id: string; - /** The domain name. */ domain: string; status: string; } diff --git a/src/api/types/WcBusinessStatus.ts b/src/api/types/WcBusinessStatus.ts deleted file mode 100644 index 891960c..0000000 --- a/src/api/types/WcBusinessStatus.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * - NEW: A business has been created within Kanmon - * - ONBOARDED: A business has completed all of the onboarding steps within Kanmon and is now awaiting underwriting. - * - INPUT_REQUIRED: A business will be asked to provide required data - */ -export type WcBusinessStatus = "NEW" | "INPUT_REQUIRED" | "ONBOARDED"; - -export const WcBusinessStatus = { - New: "NEW", - InputRequired: "INPUT_REQUIRED", - Onboarded: "ONBOARDED", -} as const; diff --git a/src/api/types/WcInvoiceStatus.ts b/src/api/types/WcInvoiceStatus.ts deleted file mode 100644 index 4bbc39f..0000000 --- a/src/api/types/WcInvoiceStatus.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * - NEW: The business has submitted an invoice and it is under review. - * - FUNDED: The funds for the invoice have been disbursed. The business is now expected to pay back the funds. - * - PAID: A payment was made that fully paid off an outstanding invoice. - * - LATE: A payment was not made towards an outstanding invoice. - * - REJECTED: An invoice was rejected during the funding step. - * - DEFAULTED: A payment was not made towards an outstanding invoice. - */ -export type WcInvoiceStatus = "NEW" | "FUNDED" | "PAID" | "LATE" | "REJECTED" | "DEFAULTED"; - -export const WcInvoiceStatus = { - New: "NEW", - Funded: "FUNDED", - Paid: "PAID", - Late: "LATE", - Rejected: "REJECTED", - Defaulted: "DEFAULTED", -} as const; diff --git a/src/api/types/WcOfferStatus.ts b/src/api/types/WcOfferStatus.ts deleted file mode 100644 index 598a5cf..0000000 --- a/src/api/types/WcOfferStatus.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * - NEW: A new offer has been extended to the business. - * - ACCEPTED: Business has accepted an offer and is waiting on the closing process. - * - EXPIRED: Business has not accepted the offer, and the offer has expired. - * - CURRENT: A loan has been originated and does not currently have any outstanding delayed payments. - * - LATE: One or more repayments on the issued product have failed. - * - CLOSED: The issued product is no longer available to the business. - * - DEFAULTED: The business has failed to meet agreed-upon terms of the loan agreement. - */ -export type WcOfferStatus = "NEW" | "ACCEPTED" | "EXPIRED" | "CURRENT" | "LATE" | "CLOSED" | "DEFAULTED"; - -export const WcOfferStatus = { - New: "NEW", - Accepted: "ACCEPTED", - Expired: "EXPIRED", - Current: "CURRENT", - Late: "LATE", - Closed: "CLOSED", - Defaulted: "DEFAULTED", -} as const; diff --git a/src/api/types/WcRepaymentType.ts b/src/api/types/WcRepaymentType.ts deleted file mode 100644 index 1f2eb88..0000000 --- a/src/api/types/WcRepaymentType.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * - MULTIPLE_DURATION: The business can repay the loan over multiple durations. - * - FIXED_DURATION: The business must repay the loan over a fixed duration. - * - FIXED_DATE: The business must repay the loan on a fixed date. - */ -export type WcRepaymentType = "MULTIPLE_DURATION" | "FIXED_DURATION" | "FIXED_DATE"; - -export const WcRepaymentType = { - MultipleDuration: "MULTIPLE_DURATION", - FixedDuration: "FIXED_DURATION", - FixedDate: "FIXED_DATE", -} as const; diff --git a/src/api/types/WebhookObjectType.ts b/src/api/types/WebhookObjectType.ts index c78b933..b3b9566 100644 --- a/src/api/types/WebhookObjectType.ts +++ b/src/api/types/WebhookObjectType.ts @@ -38,8 +38,7 @@ export type WebhookObjectType = | "overdue_reminder" | "payment_reminder" | "accounting_connection" - | "project" - | "approval_policy_process"; + | "project"; export const WebhookObjectType = { Account: "account", @@ -78,5 +77,4 @@ export const WebhookObjectType = { PaymentReminder: "payment_reminder", AccountingConnection: "accounting_connection", Project: "project", - ApprovalPolicyProcess: "approval_policy_process", } as const; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 9957f5c..2d96b49 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,6 +1,7 @@ export * from "./ApiVersion"; export * from "./AccessTokenResponse"; export * from "./AccountDisabledReason"; +export * from "./AccountResponse"; export * from "./AccountingConnectionList"; export * from "./AccountingConnectionResponse"; export * from "./AccountingCustomerRefObject"; @@ -14,13 +15,13 @@ export * from "./AccountingReceivableDueDate"; export * from "./AccountingReceivable"; export * from "./AccountingReceivableList"; export * from "./AccountingRefObject"; -export * from "./AccountingSettings"; +export * from "./AccountingSettingsPayload"; +export * from "./AccountingSettingsResponse"; export * from "./AccountingTaxRateListResponse"; export * from "./AccountingTaxRateResponse"; export * from "./AccountingVendorRefObject"; export * from "./ActionEnum"; export * from "./ActionSchema"; -export * from "./AggregationFunctionEnum"; export * from "./AirwallexMandate"; export * from "./AirwallexMandateType"; export * from "./AirwallexMandateVersion"; @@ -32,7 +33,6 @@ export * from "./AllDocumentExportResponseSchema"; export * from "./AllOverdueRemindersResponse"; export * from "./AllowedCountries"; export * from "./AllowedFileTypes"; -export * from "./AnalyticsDataPoint"; export * from "./ApprovalPolicyCursorFields"; export * from "./ApprovalPolicyResourceScriptItem"; export * from "./ApprovalPolicyResourceTrigger"; @@ -59,7 +59,9 @@ export * from "./BasedOnTransitionType"; export * from "./BizObjectsSchema"; export * from "./BusinessProfile"; export * from "./ButtonThemePayload"; +export * from "./ButtonThemeResponse"; export * from "./CardThemePayload"; +export * from "./CardThemeResponse"; export * from "./CommentCursorFields"; export * from "./CommentResource"; export * from "./CommentResourceList"; @@ -107,19 +109,11 @@ export * from "./CounterpartVatIdResourceList"; export * from "./CounterpartVatIdResponse"; export * from "./CreateExportTaskResponseSchema"; export * from "./CreateOnboardingLinkRequest"; -export * from "./CreditNoteCursorFields"; -export * from "./CreditNoteLineItemCreateRequest"; -export * from "./CreditNoteLineItemCursorFields"; -export * from "./CreditNoteLineItemPaginationResponse"; -export * from "./CreditNoteLineItemResponse"; -export * from "./CreditNotePaginationResponse"; -export * from "./CreditNoteResponse"; export * from "./CreditNoteResponsePayloadEntity"; export * from "./CreditNoteResponsePayload"; export * from "./CreditNoteStateEnum"; export * from "./CurrencyEnum"; export * from "./CurrencyExchangeSchema"; -export * from "./CurrencyExchangeSchema2"; export * from "./CurrencySettings"; export * from "./CustomTemplateDataSchema"; export * from "./CustomTemplatesCursorFields"; @@ -129,7 +123,6 @@ export * from "./DnsRecordPurpose"; export * from "./DnsRecordType"; export * from "./DnsRecords"; export * from "./DataExportCursorFields"; -export * from "./DateDimensionBreakdownEnum"; export * from "./DayOfMonth"; export * from "./Discount"; export * from "./DiscountType"; @@ -146,6 +139,7 @@ export * from "./DomainResponseDnsRecords"; export * from "./DomainResponse"; export * from "./EInvoicingProviderEnum"; export * from "./EInvoicingSettingsPayload"; +export * from "./EInvoicingSettingsResponse"; export * from "./EntityAddressResponseSchema"; export * from "./EntityAddressSchema"; export * from "./EntityBankAccountPaginationResponse"; @@ -185,15 +179,6 @@ export * from "./FileSchema2"; export * from "./FileSchema3"; export * from "./FileSchema4"; export * from "./FilesResponse"; -export * from "./FinancingInvoice"; -export * from "./FinancingInvoiceCursorFields"; -export * from "./FinancingInvoiceListResponse"; -export * from "./FinancingInvoiceType"; -export * from "./FinancingOffer"; -export * from "./FinancingOffersResponse"; -export * from "./FinancingPushInvoicesRequestInvoice"; -export * from "./FinancingPushInvoicesResponse"; -export * from "./FinancingTokenResponse"; export * from "./GetAllPaymentReminders"; export * from "./GetAllRecurrences"; export * from "./GetOnboardingRequirementsResponse"; @@ -232,6 +217,7 @@ export * from "./LogTypeEnum"; export * from "./LogsResponse"; export * from "./MailSentEventData"; export * from "./MailSettingsPayload"; +export * from "./MailSettingsResponse"; export * from "./MailboxDataResponse"; export * from "./MailboxObjectTypeEnum"; export * from "./MailboxResponse"; @@ -264,6 +250,8 @@ export * from "./OptionalOrganizationSchema"; export * from "./OptionalPersonAddressRequest"; export * from "./OptionalPersonRelationship"; export * from "./OrderEnum"; +export * from "./OrderEnum2"; +export * from "./OrderEnum3"; export * from "./OrganizationResponseSchema"; export * from "./OrganizationSchema"; export * from "./OverdueReminderResponse"; @@ -280,15 +268,11 @@ export * from "./PayableActionEnum"; export * from "./PayableActionSchema"; export * from "./PayableAggregatedDataResponse"; export * from "./PayableAggregatedItem"; -export * from "./PayableAnalyticsResponse"; -export * from "./PayableCreditNoteData"; export * from "./PayableCursorFields"; -export * from "./PayableDimensionEnum"; export * from "./PayableEntityAddressSchema"; export * from "./PayableEntityIndividualResponse"; export * from "./PayableEntityOrganizationResponse"; export * from "./PayableIndividualSchema"; -export * from "./PayableMetricEnum"; export * from "./PayableOrganizationSchema"; export * from "./PayableOriginEnum"; export * from "./PayablePaginationResponse"; @@ -299,6 +283,7 @@ export * from "./PayableResponseSchemaOtherExtractedData"; export * from "./PayableResponseSchema"; export * from "./PayableSchema"; export * from "./PayableSettingsPayload"; +export * from "./PayableSettingsResponse"; export * from "./PayableStateEnum"; export * from "./PayableTemplatesVariable"; export * from "./PayableTemplatesVariablesObject"; @@ -307,7 +292,6 @@ export * from "./PayableValidationResponse"; export * from "./PayableValidationsResource"; export * from "./PayablesFieldsAllowedForValidate"; export * from "./PayablesVariableType"; -export * from "./PayerAccountResponse"; export * from "./PaymentAccountObject"; export * from "./PaymentAccountType"; export * from "./PaymentIntent"; @@ -326,6 +310,7 @@ export * from "./PaymentObject"; export * from "./PaymentObjectPayable"; export * from "./PaymentObjectType"; export * from "./PaymentPageThemePayload"; +export * from "./PaymentPageThemeResponse"; export * from "./PaymentPriorityEnum"; export * from "./PaymentReceivedEventData"; export * from "./PaymentRecordCursorFields"; @@ -344,6 +329,7 @@ export * from "./PaymentTermsResponse"; export * from "./PaymentsBatchPaymentResponse"; export * from "./PaymentsBatchPaymentStatus"; export * from "./PaymentsSettingsPayload"; +export * from "./PaymentsSettingsResponse"; export * from "./PermissionEnum"; export * from "./PersonAddressRequest"; export * from "./PersonAddressResponse"; @@ -359,7 +345,6 @@ export * from "./PreviewSchema3"; export * from "./PreviewSchema4"; export * from "./PreviewTemplateResponse"; export * from "./Price"; -export * from "./PricingPlan"; export * from "./ProcessResourceScriptSnapshot"; export * from "./ProcessResource"; export * from "./ProcessStatusEnum"; @@ -393,7 +378,6 @@ export * from "./ReceivableCounterpartContact"; export * from "./ReceivableCounterpartType"; export * from "./ReceivableCounterpartVatIdResponse"; export * from "./ReceivableCreateBasedOnPayload"; -export * from "./ReceivableCreatedEventData"; export * from "./ReceivableCursorFields"; export * from "./ReceivableEditFlow"; export * from "./ReceivableEntityAddressSchema"; @@ -426,6 +410,7 @@ export * from "./ReceivablePreviewSchema"; export * from "./ReceivableResponse"; export * from "./ReceivableSendResponse"; export * from "./ReceivableSettingsPayload"; +export * from "./ReceivableSettingsResponse"; export * from "./ReceivableTemplatesVariable"; export * from "./ReceivableTemplatesVariablesObject"; export * from "./ReceivableTemplatesVariablesObjectList"; @@ -448,10 +433,8 @@ export * from "./RecurrenceIteration"; export * from "./RecurrenceStatus"; export * from "./RelatedDocuments"; export * from "./Reminder"; -export * from "./ReminderMailSentEventData"; export * from "./ReminderTypeEnum"; export * from "./RemindersSettings"; -export * from "./RepaymentSchedule"; export * from "./RequirementsError"; export * from "./ResponseItem"; export * from "./RoleCursorFields"; @@ -529,10 +512,6 @@ export * from "./VerificationRequest"; export * from "./VerificationResponse"; export * from "./VerificationStatusEnum"; export * from "./VerifyResponse"; -export * from "./WcBusinessStatus"; -export * from "./WcInvoiceStatus"; -export * from "./WcOfferStatus"; -export * from "./WcRepaymentType"; export * from "./WebhookDeliveryCursorFields"; export * from "./WebhookDeliveryPaginationResource"; export * from "./WebhookDeliveryResource"; diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index b8f2371..d67bc04 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -21,7 +21,7 @@ export declare namespace Fetcher { withCredentials?: boolean; abortSignal?: AbortSignal; requestType?: "json" | "file" | "bytes"; - responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer"; + responseType?: "json" | "blob" | "sse" | "streaming" | "text"; duplex?: "half"; } diff --git a/src/core/fetcher/getResponseBody.ts b/src/core/fetcher/getResponseBody.ts index d046e6e..a7a9c50 100644 --- a/src/core/fetcher/getResponseBody.ts +++ b/src/core/fetcher/getResponseBody.ts @@ -3,8 +3,6 @@ import { chooseStreamWrapper } from "./stream-wrappers/chooseStreamWrapper"; export async function getResponseBody(response: Response, responseType?: string): Promise { if (response.body != null && responseType === "blob") { return await response.blob(); - } else if (response.body != null && responseType === "arrayBuffer") { - return await response.arrayBuffer(); } else if (response.body != null && responseType === "sse") { return response.body; } else if (response.body != null && responseType === "streaming") { diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts index 8d5af9d..ff5dc3b 100644 --- a/src/core/fetcher/requestWithRetries.ts +++ b/src/core/fetcher/requestWithRetries.ts @@ -1,13 +1,6 @@ -const INITIAL_RETRY_DELAY = 1000; // in milliseconds -const MAX_RETRY_DELAY = 60000; // in milliseconds +const INITIAL_RETRY_DELAY = 1; +const MAX_RETRY_DELAY = 60; const DEFAULT_MAX_RETRIES = 2; -const JITTER_FACTOR = 0.2; // 20% random jitter - -function addJitter(delay: number): number { - // Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR - const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR; - return delay * jitterMultiplier; -} export async function requestWithRetries( requestFn: () => Promise, @@ -17,13 +10,8 @@ export async function requestWithRetries( for (let i = 0; i < maxRetries; ++i) { if ([408, 409, 429].includes(response.status) || response.status >= 500) { - // Calculate base delay using exponential backoff (in milliseconds) - const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); - - // Add jitter to the delay - const delayWithJitter = addJitter(baseDelay); - - await new Promise((resolve) => setTimeout(resolve, delayWithJitter)); + const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); + await new Promise((resolve) => setTimeout(resolve, delay)); response = await requestFn(); } else { break; diff --git a/src/errors/MoniteTimeoutError.ts b/src/errors/MoniteTimeoutError.ts index 09ee823..92e1de8 100644 --- a/src/errors/MoniteTimeoutError.ts +++ b/src/errors/MoniteTimeoutError.ts @@ -3,8 +3,8 @@ */ export class MoniteTimeoutError extends Error { - constructor(message: string) { - super(message); + constructor() { + super("Timeout"); Object.setPrototypeOf(this, MoniteTimeoutError.prototype); } } diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts index ff80421..0e14a8c 100644 --- a/tests/unit/fetcher/Fetcher.test.ts +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -1,6 +1,5 @@ -import fs from "fs"; +import fetchMock from "fetch-mock-jest"; import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; -import { join } from "path"; describe("Test fetcherImpl", () => { it("should handle successful request", async () => { @@ -13,11 +12,8 @@ describe("Test fetcherImpl", () => { requestType: "json", }; - global.fetch = jest.fn().mockResolvedValue({ - ok: true, - status: 200, - text: () => Promise.resolve(JSON.stringify({ data: "test" })), - json: () => ({ data: "test" }), + fetchMock.mock("https://httpbin.org/post", 200, { + response: JSON.stringify({ data: "test" }), }); const result = await fetcherImpl(mockArgs); @@ -25,49 +21,5 @@ describe("Test fetcherImpl", () => { if (result.ok) { expect(result.body).toEqual({ data: "test" }); } - - expect(global.fetch).toHaveBeenCalledWith( - "https://httpbin.org/post", - expect.objectContaining({ - method: "POST", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), - body: JSON.stringify({ data: "test" }), - }) - ); - }); - - it("should send octet stream", async () => { - const url = "https://httpbin.org/post/file"; - const mockArgs: Fetcher.Args = { - url, - method: "POST", - headers: { "X-Test": "x-test-header" }, - contentType: "application/octet-stream", - requestType: "bytes", - duplex: "half", - body: fs.createReadStream(join(__dirname, "test-file.txt")), - }; - - global.fetch = jest.fn().mockResolvedValue({ - ok: true, - status: 200, - text: () => Promise.resolve(JSON.stringify({ data: "test" })), - json: () => Promise.resolve({ data: "test" }), - }); - - const result = await fetcherImpl(mockArgs); - - expect(global.fetch).toHaveBeenCalledWith( - url, - expect.objectContaining({ - method: "POST", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), - body: expect.any(fs.ReadStream), - }) - ); - expect(result.ok).toBe(true); - if (result.ok) { - expect(result.body).toEqual({ data: "test" }); - } }); }); diff --git a/tests/unit/fetcher/getRequestBody.test.ts b/tests/unit/fetcher/getRequestBody.test.ts index 919604c..1b1462c 100644 --- a/tests/unit/fetcher/getRequestBody.test.ts +++ b/tests/unit/fetcher/getRequestBody.test.ts @@ -1,6 +1,10 @@ import { RUNTIME } from "../../../src/core/runtime"; import { getRequestBody } from "../../../src/core/fetcher/getRequestBody"; +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + describe("Test getRequestBody", () => { it("should return FormData as is in Node environment", async () => { if (RUNTIME.type === "node") { diff --git a/tests/unit/fetcher/getResponseBody.test.ts b/tests/unit/fetcher/getResponseBody.test.ts index 1030c51..3510779 100644 --- a/tests/unit/fetcher/getResponseBody.test.ts +++ b/tests/unit/fetcher/getResponseBody.test.ts @@ -2,6 +2,10 @@ import { RUNTIME } from "../../../src/core/runtime"; import { getResponseBody } from "../../../src/core/fetcher/getResponseBody"; import { chooseStreamWrapper } from "../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + describe("Test getResponseBody", () => { it("should handle blob response type", async () => { const mockBlob = new Blob(["test"], { type: "text/plain" }); diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts index be94ab4..5969d51 100644 --- a/tests/unit/fetcher/makeRequest.test.ts +++ b/tests/unit/fetcher/makeRequest.test.ts @@ -1,6 +1,10 @@ import { RUNTIME } from "../../../src/core/runtime"; import { makeRequest } from "../../../src/core/fetcher/makeRequest"; +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + describe("Test makeRequest", () => { const mockPostUrl = "https://httpbin.org/post"; const mockGetUrl = "https://httpbin.org/get"; diff --git a/tests/unit/fetcher/requestWithRetries.test.ts b/tests/unit/fetcher/requestWithRetries.test.ts index 6f77f09..b53e043 100644 --- a/tests/unit/fetcher/requestWithRetries.test.ts +++ b/tests/unit/fetcher/requestWithRetries.test.ts @@ -1,133 +1,85 @@ import { RUNTIME } from "../../../src/core/runtime"; import { requestWithRetries } from "../../../src/core/fetcher/requestWithRetries"; -describe("requestWithRetries", () => { +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + +describe("Test exponential backoff", () => { let mockFetch: jest.Mock; - let originalMathRandom: typeof Math.random; - let setTimeoutSpy: jest.SpyInstance; + let originalSetTimeout: typeof setTimeout; beforeEach(() => { mockFetch = jest.fn(); - originalMathRandom = Math.random; - - // Mock Math.random for consistent jitter - Math.random = jest.fn(() => 0.5); - - jest.useFakeTimers({ doNotFake: ["nextTick"] }); + originalSetTimeout = global.setTimeout; + jest.useFakeTimers(); }); afterEach(() => { - Math.random = originalMathRandom; - jest.clearAllMocks(); - jest.clearAllTimers(); + jest.useRealTimers(); + global.setTimeout = originalSetTimeout; }); - it("should retry on retryable status codes", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { - process.nextTick(callback); - return null as any; - }); - - const retryableStatuses = [408, 409, 429, 500, 502]; - let callCount = 0; + it("should retry on 408, 409, 429, 500+", async () => { + mockFetch + .mockResolvedValueOnce(new Response("", { status: 408 })) + .mockResolvedValueOnce(new Response("", { status: 409 })) + .mockResolvedValueOnce(new Response("", { status: 429 })) + .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 502 })) + .mockResolvedValueOnce(new Response("", { status: 200 })) + .mockResolvedValueOnce(new Response("", { status: 408 })); - mockFetch.mockImplementation(async () => { - if (callCount < retryableStatuses.length) { - return new Response("", { status: retryableStatuses[callCount++] }); - } - return new Response("", { status: 200 }); - }); + const responsePromise = requestWithRetries(() => mockFetch(), 10); - const responsePromise = requestWithRetries(() => mockFetch(), retryableStatuses.length); - await jest.runAllTimersAsync(); + await jest.advanceTimersByTimeAsync(10000); const response = await responsePromise; - expect(mockFetch).toHaveBeenCalledTimes(retryableStatuses.length + 1); + expect(mockFetch).toHaveBeenCalledTimes(6); expect(response.status).toBe(200); }); - it("should respect maxRetries limit", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { - process.nextTick(callback); - return null as any; - }); + it("should retry max 3 times", async () => { + mockFetch + .mockResolvedValueOnce(new Response("", { status: 408 })) + .mockResolvedValueOnce(new Response("", { status: 409 })) + .mockResolvedValueOnce(new Response("", { status: 429 })) + .mockResolvedValueOnce(new Response("", { status: 429 })); - const maxRetries = 2; - mockFetch.mockResolvedValue(new Response("", { status: 500 })); + const responsePromise = requestWithRetries(() => mockFetch(), 3); - const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); - await jest.runAllTimersAsync(); + await jest.advanceTimersByTimeAsync(10000); const response = await responsePromise; - expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); - expect(response.status).toBe(500); + expect(mockFetch).toHaveBeenCalledTimes(4); + expect(response.status).toBe(429); }); + it("should not retry on 200", async () => { + mockFetch + .mockResolvedValueOnce(new Response("", { status: 200 })) + .mockResolvedValueOnce(new Response("", { status: 409 })); - it("should not retry on success status codes", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { - process.nextTick(callback); - return null as any; - }); - - const successStatuses = [200, 201, 202]; - - for (const status of successStatuses) { - mockFetch.mockReset(); - setTimeoutSpy.mockClear(); - mockFetch.mockResolvedValueOnce(new Response("", { status })); + const responsePromise = requestWithRetries(() => mockFetch(), 3); - const responsePromise = requestWithRetries(() => mockFetch(), 3); - await jest.runAllTimersAsync(); - await responsePromise; + await jest.advanceTimersByTimeAsync(10000); + const response = await responsePromise; - expect(mockFetch).toHaveBeenCalledTimes(1); - expect(setTimeoutSpy).not.toHaveBeenCalled(); - } + expect(mockFetch).toHaveBeenCalledTimes(1); + expect(response.status).toBe(200); }); - it("should apply correct exponential backoff with jitter", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { - process.nextTick(callback); - return null as any; - }); - + it("should retry with exponential backoff timing", async () => { mockFetch.mockResolvedValue(new Response("", { status: 500 })); - const maxRetries = 3; - const expectedDelays = [1000, 2000, 4000]; - + const maxRetries = 7; const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); - await jest.runAllTimersAsync(); - await responsePromise; - - // Verify setTimeout calls - expect(setTimeoutSpy).toHaveBeenCalledTimes(expectedDelays.length); + expect(mockFetch).toHaveBeenCalledTimes(1); - expectedDelays.forEach((delay, index) => { - expect(setTimeoutSpy).toHaveBeenNthCalledWith(index + 1, expect.any(Function), delay); - }); - - expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); - }); - - it("should handle concurrent retries independently", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { - process.nextTick(callback); - return null as any; - }); - - mockFetch - .mockResolvedValueOnce(new Response("", { status: 500 })) - .mockResolvedValueOnce(new Response("", { status: 500 })) - .mockResolvedValueOnce(new Response("", { status: 200 })) - .mockResolvedValueOnce(new Response("", { status: 200 })); - - const promise1 = requestWithRetries(() => mockFetch(), 1); - const promise2 = requestWithRetries(() => mockFetch(), 1); - - await jest.runAllTimersAsync(); - const [response1, response2] = await Promise.all([promise1, promise2]); - - expect(response1.status).toBe(200); - expect(response2.status).toBe(200); + const delays = [1, 2, 4, 8, 16, 32, 64]; + for (let i = 0; i < delays.length; i++) { + await jest.advanceTimersByTimeAsync(delays[i] as number); + expect(mockFetch).toHaveBeenCalledTimes(Math.min(i + 2, maxRetries + 1)); + } + const response = await responsePromise; + expect(response.status).toBe(500); }); }); diff --git a/tests/unit/fetcher/test-file.txt b/tests/unit/fetcher/test-file.txt deleted file mode 100644 index c66d471..0000000 --- a/tests/unit/fetcher/test-file.txt +++ /dev/null @@ -1 +0,0 @@ -This is a test file! diff --git a/yarn.lock b/yarn.lock index b2acded..53fded4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,12 +19,12 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/compat-data@^7.25.9": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02" - integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== +"@babel/compat-data@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.5.tgz#df93ac37f4417854130e21d72c66ff3d4b897fc7" + integrity sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg== -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": +"@babel/core@^7.0.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== @@ -45,23 +45,23 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.7.2": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" - integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== +"@babel/generator@^7.26.0", "@babel/generator@^7.26.5", "@babel/generator@^7.7.2": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.5.tgz#e44d4ab3176bbcaf78a5725da5f1dc28802a9458" + integrity sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw== dependencies: - "@babel/parser" "^7.26.3" - "@babel/types" "^7.26.3" + "@babel/parser" "^7.26.5" + "@babel/types" "^7.26.5" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" "@babel/helper-compilation-targets@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875" - integrity sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ== + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" + integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== dependencies: - "@babel/compat-data" "^7.25.9" + "@babel/compat-data" "^7.26.5" "@babel/helper-validator-option" "^7.25.9" browserslist "^4.24.0" lru-cache "^5.1.1" @@ -85,9 +85,9 @@ "@babel/traverse" "^7.25.9" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" - integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz#18580d00c9934117ad719392c4f6585c9333cc35" + integrity sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg== "@babel/helper-string-parser@^7.25.9": version "7.25.9" @@ -112,12 +112,12 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" - integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.5.tgz#6fec9aebddef25ca57a935c86dbb915ae2da3e1f" + integrity sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw== dependencies: - "@babel/types" "^7.26.3" + "@babel/types" "^7.26.5" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -238,6 +238,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" +"@babel/runtime@^7.0.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.25.9", "@babel/template@^7.3.3": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" @@ -248,22 +255,22 @@ "@babel/types" "^7.25.9" "@babel/traverse@^7.25.9": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.3.tgz#1ebfc75bd748d8f96b3cc63af5e82ebd4c37ba35" - integrity sha512-yTmc8J+Sj8yLzwr4PD5Xb/WF3bOYu2C2OoSZPzbuqRm4n98XirsbzaX+GloeO376UnSYIYJ4NCanwV5/ugZkwA== + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.5.tgz#6d0be3e772ff786456c1a37538208286f6e79021" + integrity sha512-rkOSPOw+AXbgtwUga3U4u8RpoK9FEFWBNAlTpcnkLFjL5CT+oyHNuUUC/xx6XefEJ16r38r8Bc/lfp6rYuHeJQ== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.3" - "@babel/parser" "^7.26.3" + "@babel/generator" "^7.26.5" + "@babel/parser" "^7.26.5" "@babel/template" "^7.25.9" - "@babel/types" "^7.26.3" + "@babel/types" "^7.26.5" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.3.3": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" - integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.5", "@babel/types@^7.3.3": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.5.tgz#7a1e1c01d28e26d1fe7f8ec9567b3b92b9d07747" + integrity sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -482,9 +489,9 @@ chalk "^4.0.0" "@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + version "0.3.8" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" + integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== dependencies: "@jridgewell/set-array" "^1.2.1" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -513,7 +520,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -642,7 +649,7 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -656,9 +663,9 @@ form-data "^4.0.0" "@types/node@*": - version "22.10.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.1.tgz#41ffeee127b8975a05f8c4f83fb89bcb2987d766" - integrity sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ== + version "22.10.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.7.tgz#14a1ca33fd0ebdd9d63593ed8d3fbc882a6d28d7" + integrity sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg== dependencies: undici-types "~6.20.0" @@ -877,11 +884,25 @@ agent-base@6: dependencies: debug "4" +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== +ajv-keywords@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -892,6 +913,16 @@ ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.0, ajv@^8.9.0: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -1025,13 +1056,13 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0: - version "4.24.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" - integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== + version "4.24.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.4.tgz#c6b2865a3f08bcb860a0e827389003b9fe686e4b" + integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== dependencies: - caniuse-lite "^1.0.30001669" - electron-to-chromium "^1.5.41" - node-releases "^2.0.18" + caniuse-lite "^1.0.30001688" + electron-to-chromium "^1.5.73" + node-releases "^2.0.19" update-browserslist-db "^1.1.1" bs-logger@0.x: @@ -1061,16 +1092,21 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== +call-bind-apply-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== dependencies: - es-define-property "^1.0.0" es-errors "^1.3.0" function-bind "^1.1.2" - get-intrinsic "^1.2.4" - set-function-length "^1.2.1" + +call-bound@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== + dependencies: + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" callsites@^3.0.0: version "3.1.0" @@ -1087,10 +1123,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001669: - version "1.0.30001686" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz#0e04b8d90de8753188e93c9989d56cb19d902670" - integrity sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA== +caniuse-lite@^1.0.30001688: + version "1.0.30001692" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz#4585729d95e6b95be5b439da6ab55250cd125bf9" + integrity sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1173,6 +1209,11 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +core-js@^3.0.0: + version "3.40.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.40.0.tgz#2773f6b06877d8eda102fc42f828176437062476" + integrity sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ== + create-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" @@ -1222,9 +1263,9 @@ data-urls@^3.0.2: whatwg-url "^11.0.0" debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" @@ -1243,15 +1284,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -1274,10 +1306,19 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" -electron-to-chromium@^1.5.41: - version "1.5.70" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.70.tgz#8be2f92e54a3d069c0eefcf766a48bf0f78d93e0" - integrity sha512-P6FPqAWIZrC3sHDAwBitJBs7N7IF58m39XVny7DFseQXK2eiMn7nNQizFf63mWDDUnFvaqsM8FI0+ZZfLkdUGA== +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +electron-to-chromium@^1.5.73: + version "1.5.83" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.83.tgz#3f74078f0c83e24bf7e692eaa855a998d1bec34f" + integrity sha512-LcUDPqSt+V0QmI47XLzZrz5OqILSMGsPFkDYus22rIbgorSvBYEFqq854ltTmUdHkY92FSdAAvsh4jWEULMdfQ== emittery@^0.13.1: version "0.13.1" @@ -1290,9 +1331,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: - version "5.17.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" - integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + version "5.18.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz#91eb1db193896b9801251eeff1c6980278b1e404" + integrity sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -1309,12 +1350,10 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== es-errors@^1.3.0: version "1.3.0" @@ -1322,9 +1361,16 @@ es-errors@^1.3.0: integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-module-lexer@^1.2.1: - version "1.5.4" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" - integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== + version "1.6.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.6.0.tgz#da49f587fd9e68ee2404fe4e256c0c7d3a81be21" + integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ== + +es-object-atoms@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" @@ -1423,7 +1469,7 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -1433,6 +1479,11 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-uri@^3.0.1: + version "3.0.5" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.5.tgz#19f5f9691d0dab9b85861a7bb5d98fca961da9cd" + integrity sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q== + fb-watchman@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" @@ -1440,6 +1491,29 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fetch-mock-jest@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/fetch-mock-jest/-/fetch-mock-jest-1.5.1.tgz#0e13df990d286d9239e284f12b279ed509bf53cd" + integrity sha512-+utwzP8C+Pax1GSka3nFXILWMY3Er2L+s090FOgqVNrNCPp0fDqgXnAHAJf12PLHi0z4PhcTaZNTz8e7K3fjqQ== + dependencies: + fetch-mock "^9.11.0" + +fetch-mock@^9.11.0: + version "9.11.0" + resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-9.11.0.tgz#371c6fb7d45584d2ae4a18ee6824e7ad4b637a3f" + integrity sha512-PG1XUv+x7iag5p/iNHD4/jdpxL9FtVSqRMUQhPab4hVDt80T1MH5ehzVrL2IdXO9Q2iBggArFvPqjUbHFuI58Q== + dependencies: + "@babel/core" "^7.0.0" + "@babel/runtime" "^7.0.0" + core-js "^3.0.0" + debug "^4.1.1" + glob-to-regexp "^0.4.0" + is-subset "^0.1.1" + lodash.isequal "^4.5.0" + path-to-regexp "^2.2.1" + querystring "^0.2.0" + whatwg-url "^6.5.0" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -1499,28 +1573,41 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== +get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.7.tgz#dcfcb33d3272e15f445d15124bc0a216189b9044" + integrity sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA== dependencies: + call-bind-apply-helpers "^1.0.1" + es-define-property "^1.0.1" es-errors "^1.3.0" + es-object-atoms "^1.0.0" function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" + get-proto "^1.0.0" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-proto@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -glob-to-regexp@^0.4.1: +glob-to-regexp@^0.4.0, glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== @@ -1542,7 +1629,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -gopd@^1.0.1: +gopd@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== @@ -1557,26 +1644,12 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - -has-proto@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.1.0.tgz#deb10494cbbe8809bce168a3b961f42969f5ed43" - integrity sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q== - dependencies: - call-bind "^1.0.7" - -has-symbols@^1.0.3: +has-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== -hasown@^2.0.0, hasown@^2.0.2: +hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -1660,10 +1733,10 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-core-module@^2.13.0: - version "2.15.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" - integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== +is-core-module@^2.16.0: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== dependencies: hasown "^2.0.2" @@ -1692,6 +1765,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + integrity sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2182,9 +2260,9 @@ jsdom@^20.0.0: xml-name-validator "^4.0.0" jsesc@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" - integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" @@ -2196,6 +2274,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -2228,11 +2311,21 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.memoize@4.x: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -2259,6 +2352,11 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -2323,10 +2421,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.18: - version "2.0.18" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" - integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== +node-releases@^2.0.19: + version "2.0.19" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" + integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== normalize-path@^3.0.0: version "3.0.0" @@ -2345,7 +2443,7 @@ nwsapi@^2.2.2: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.16.tgz#177760bba02c351df1d2644e220c31dfec8cdb43" integrity sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ== -object-inspect@^1.13.1: +object-inspect@^1.13.3: version "1.13.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== @@ -2427,7 +2525,12 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -picocolors@^1.0.0, picocolors@^1.1.0: +path-to-regexp@^2.2.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.4.0.tgz#35ce7f333d5616f1c1e1bfe266c3aba2e5b2e704" + integrity sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w== + +picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -2500,6 +2603,11 @@ qs@6.11.2: dependencies: side-channel "^1.0.4" +querystring@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" + integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== + querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -2518,9 +2626,9 @@ react-is@^18.0.0: integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== readable-stream@^4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" - integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + version "4.7.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.7.0.tgz#cedbd8a1146c13dfff8dab14068028d58c15ac91" + integrity sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg== dependencies: abort-controller "^3.0.0" buffer "^6.0.3" @@ -2528,11 +2636,21 @@ readable-stream@^4.5.2: process "^0.11.10" string_decoder "^1.3.0" +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -2556,11 +2674,11 @@ resolve.exports@^2.0.0: integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + version "1.22.10" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" + integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== dependencies: - is-core-module "^2.13.0" + is-core-module "^2.16.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -2586,7 +2704,7 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -schema-utils@^3.1.1, schema-utils@^3.2.0: +schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -2595,6 +2713,16 @@ schema-utils@^3.1.1, schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" +schema-utils@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0" + integrity sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -2605,25 +2733,13 @@ semver@^7.3.4, semver@^7.5.3, semver@^7.5.4: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -serialize-javascript@^6.0.1: +serialize-javascript@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" -set-function-length@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" - integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2636,15 +2752,45 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + side-channel@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" - integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== dependencies: - call-bind "^1.0.7" es-errors "^1.3.0" - get-intrinsic "^1.2.4" - object-inspect "^1.13.1" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" @@ -2775,17 +2921,17 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== terser-webpack-plugin@^5.3.10: - version "5.3.10" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" - integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + version "5.3.11" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz#93c21f44ca86634257cac176f884f942b7ba3832" + integrity sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ== dependencies: - "@jridgewell/trace-mapping" "^0.3.20" + "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.26.0" + schema-utils "^4.3.0" + serialize-javascript "^6.0.2" + terser "^5.31.1" -terser@^5.26.0: +terser@^5.31.1: version "5.37.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.37.0.tgz#38aa66d1cfc43d0638fab54e43ff8a4f72a21ba3" integrity sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA== @@ -2826,6 +2972,13 @@ tough-cookie@^4.1.2: universalify "^0.2.0" url-parse "^1.5.3" +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== + dependencies: + punycode "^2.1.0" + tr46@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" @@ -2853,9 +3006,9 @@ ts-jest@29.1.1: yargs-parser "^21.0.1" ts-loader@^9.3.1: - version "9.5.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89" - integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg== + version "9.5.2" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.2.tgz#1f3d7f4bb709b487aaa260e8f19b301635d08020" + integrity sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" @@ -2889,12 +3042,12 @@ universalify@^0.2.0: integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== update-browserslist-db@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" - integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz#97e9c96ab0ae7bcac08e9ae5151d26e6bc6b5580" + integrity sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg== dependencies: escalade "^3.2.0" - picocolors "^1.1.0" + picocolors "^1.1.1" uri-js@^4.2.2: version "4.4.1" @@ -2952,6 +3105,11 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + webidl-conversions@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" @@ -3019,6 +3177,15 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" +whatwg-url@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"