@mergeapi/merge-node-client 4.0.0-alpha.0 → 4.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseClient.js +2 -2
- package/api/resources/accounting/resources/expenses/client/Client.d.ts +8 -26
- package/api/resources/accounting/resources/expenses/client/Client.js +18 -67
- package/api/resources/accounting/resources/expenses/client/requests/ExpenseBulkRequest.d.ts +0 -6
- package/api/resources/accounting/resources/expenses/client/requests/index.d.ts +0 -1
- package/api/resources/accounting/resources/expenses/types/index.d.ts +0 -1
- package/api/resources/accounting/resources/expenses/types/index.js +0 -1
- package/api/resources/accounting/resources/invoices/client/Client.d.ts +8 -34
- package/api/resources/accounting/resources/invoices/client/Client.js +18 -89
- package/api/resources/accounting/resources/invoices/client/requests/InvoiceBulkRequest.d.ts +0 -6
- package/api/resources/accounting/resources/invoices/client/requests/index.d.ts +0 -1
- package/api/resources/accounting/resources/invoices/types/index.d.ts +0 -3
- package/api/resources/accounting/resources/invoices/types/index.js +0 -3
- package/api/resources/accounting/resources/itemFulfillments/client/Client.d.ts +8 -20
- package/api/resources/accounting/resources/itemFulfillments/client/Client.js +18 -55
- package/api/resources/accounting/resources/itemFulfillments/client/requests/ItemFulfillmentBulkRequest.d.ts +0 -6
- package/api/resources/accounting/resources/itemFulfillments/client/requests/index.d.ts +0 -1
- package/api/resources/accounting/resources/itemFulfillments/types/index.d.ts +0 -1
- package/api/resources/accounting/resources/itemFulfillments/types/index.js +0 -1
- package/api/resources/accounting/resources/salesOrders/client/Client.d.ts +8 -28
- package/api/resources/accounting/resources/salesOrders/client/Client.js +20 -71
- package/api/resources/accounting/resources/salesOrders/client/requests/SalesOrderBulkRequest.d.ts +0 -6
- package/api/resources/accounting/resources/salesOrders/client/requests/index.d.ts +0 -1
- package/api/resources/accounting/resources/salesOrders/types/index.d.ts +0 -1
- package/api/resources/accounting/resources/salesOrders/types/index.js +0 -1
- package/api/resources/accounting/types/AsyncBulkCreateResponse.d.ts +4 -0
- package/api/resources/accounting/types/BankFeedTransactionRequestRequestBankFeedAccount.d.ts +1 -1
- package/api/resources/accounting/types/BatchObject.d.ts +15 -1
- package/api/resources/accounting/types/BatchObjectItemResponse.d.ts +3 -0
- package/api/resources/accounting/types/BatchObjectStatus.d.ts +13 -0
- package/api/resources/accounting/types/BatchObjectStatusEnum.d.ts +15 -0
- package/api/resources/accounting/types/BatchObjectStatusEnum.js +18 -0
- package/api/resources/accounting/types/BatchObjectsResponse.d.ts +23 -1
- package/api/resources/accounting/types/BatchObjectsResponseStatus.d.ts +19 -0
- package/api/resources/accounting/types/BatchObjectsResponseStatusEnum.d.ts +24 -0
- package/api/resources/accounting/types/BatchObjectsResponseStatusEnum.js +27 -0
- package/api/resources/accounting/types/ContactRequestAddressesItem.d.ts +1 -1
- package/api/resources/accounting/types/ContactRequestPhoneNumbersItem.d.ts +1 -1
- package/api/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequestInvoice.d.ts +1 -1
- package/api/resources/accounting/types/CreditNoteLineItemRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/CreditNoteRequestAppliedPaymentsItem.d.ts +1 -1
- package/api/resources/accounting/types/CreditNoteRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/CreditNoteRequestLineItemsItem.d.ts +1 -1
- package/api/resources/accounting/types/CreditNoteRequestPaymentsItem.d.ts +1 -1
- package/api/resources/accounting/types/DataPassthroughRequest.d.ts +2 -2
- package/api/resources/accounting/types/ErrorValidationProblem.d.ts +2 -0
- package/api/resources/accounting/types/ExpenseLineRequestAccount.d.ts +1 -1
- package/api/resources/accounting/types/ExpenseLineRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/ExpenseReportLineRequestAccount.d.ts +1 -1
- package/api/resources/accounting/types/ExpenseReportLineRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/ExpenseRequestAccount.d.ts +1 -1
- package/api/resources/accounting/types/ExpenseRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/InvoiceLineItemRequestAccount.d.ts +1 -1
- package/api/resources/accounting/types/InvoiceLineItemRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/InvoiceRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/InvoiceRequestPaymentsItem.d.ts +1 -1
- package/api/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.d.ts +1 -1
- package/api/resources/accounting/types/ItemFulfillmentLineRequestSalesOrderLine.d.ts +1 -1
- package/api/resources/accounting/types/ItemFulfillmentRequestRequestCustomer.d.ts +1 -1
- package/api/resources/accounting/types/ItemRequestRequestPurchaseAccount.d.ts +1 -1
- package/api/resources/accounting/types/ItemRequestRequestSalesAccount.d.ts +1 -1
- package/api/resources/accounting/types/JournalEntryRequestLinesItem.d.ts +1 -1
- package/api/resources/accounting/types/JournalEntryRequestPaymentsItem.d.ts +1 -1
- package/api/resources/accounting/types/JournalLineRequestAccount.d.ts +1 -1
- package/api/resources/accounting/types/PaymentRequestAccount.d.ts +1 -1
- package/api/resources/accounting/types/PaymentRequestAppliedToLinesItem.d.ts +1 -1
- package/api/resources/accounting/types/PaymentRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.d.ts +1 -1
- package/api/resources/accounting/types/PurchaseOrderRequestLineItemsItem.d.ts +1 -1
- package/api/resources/accounting/types/PurchaseOrderRequestVendor.d.ts +1 -1
- package/api/resources/accounting/types/RemoteFieldApi.d.ts +1 -1
- package/api/resources/accounting/types/SalesOrderRequestRequestCustomer.d.ts +1 -1
- package/api/resources/accounting/types/SalesOrderRequestRequestShippingAddress.d.ts +1 -1
- package/api/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequestInvoice.d.ts +1 -1
- package/api/resources/accounting/types/VendorCreditLineRequestAccount.d.ts +1 -1
- package/api/resources/accounting/types/VendorCreditLineRequestContact.d.ts +1 -1
- package/api/resources/accounting/types/VendorCreditRequestVendor.d.ts +1 -1
- package/api/resources/accounting/types/WarningValidationProblem.d.ts +2 -0
- package/api/resources/accounting/types/index.d.ts +4 -3
- package/api/resources/accounting/types/index.js +4 -3
- package/package.json +1 -1
- package/reference.md +24 -128
- package/serialization/resources/accounting/resources/expenses/client/requests/ExpenseBulkRequest.d.ts +1 -1
- package/serialization/resources/accounting/resources/expenses/types/index.d.ts +0 -1
- package/serialization/resources/accounting/resources/expenses/types/index.js +0 -1
- package/serialization/resources/accounting/resources/invoices/client/requests/InvoiceBulkRequest.d.ts +1 -1
- package/serialization/resources/accounting/resources/invoices/types/index.d.ts +0 -3
- package/serialization/resources/accounting/resources/invoices/types/index.js +0 -3
- package/serialization/resources/accounting/resources/itemFulfillments/client/requests/ItemFulfillmentBulkRequest.d.ts +1 -1
- package/serialization/resources/accounting/resources/itemFulfillments/types/index.d.ts +0 -1
- package/serialization/resources/accounting/resources/itemFulfillments/types/index.js +0 -1
- package/serialization/resources/accounting/resources/salesOrders/client/requests/SalesOrderBulkRequest.d.ts +1 -1
- package/serialization/resources/accounting/resources/salesOrders/types/index.d.ts +0 -1
- package/serialization/resources/accounting/resources/salesOrders/types/index.js +0 -1
- package/serialization/resources/accounting/types/BankFeedTransactionRequestRequestBankFeedAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/BankFeedTransactionRequestRequestBankFeedAccount.js +2 -2
- package/serialization/resources/accounting/types/BatchObject.d.ts +2 -1
- package/serialization/resources/accounting/types/BatchObject.js +2 -1
- package/serialization/resources/accounting/types/BatchObjectStatus.d.ts +8 -0
- package/serialization/resources/accounting/types/{RemoteFieldApiAdvancedMetadata.js → BatchObjectStatus.js} +3 -3
- package/serialization/resources/accounting/types/BatchObjectStatusEnum.d.ts +7 -0
- package/serialization/resources/accounting/types/{DataPassthroughRequestMethod.js → BatchObjectStatusEnum.js} +2 -3
- package/serialization/resources/accounting/types/BatchObjectsResponse.d.ts +2 -1
- package/serialization/resources/accounting/types/BatchObjectsResponse.js +2 -1
- package/serialization/resources/accounting/types/BatchObjectsResponseStatus.d.ts +8 -0
- package/serialization/resources/accounting/types/{DataPassthroughRequestRequestFormat.js → BatchObjectsResponseStatus.js} +3 -3
- package/serialization/resources/accounting/types/BatchObjectsResponseStatusEnum.d.ts +7 -0
- package/serialization/resources/accounting/{resources/invoices/types/InvoicesBatchObjectsListRequestType.js → types/BatchObjectsResponseStatusEnum.js} +3 -3
- package/serialization/resources/accounting/types/ContactRequestAddressesItem.d.ts +2 -2
- package/serialization/resources/accounting/types/ContactRequestAddressesItem.js +2 -2
- package/serialization/resources/accounting/types/ContactRequestPhoneNumbersItem.d.ts +2 -2
- package/serialization/resources/accounting/types/ContactRequestPhoneNumbersItem.js +2 -2
- package/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequestInvoice.d.ts +2 -3
- package/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequestInvoice.js +5 -2
- package/serialization/resources/accounting/types/CreditNoteLineItemRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/CreditNoteLineItemRequestContact.js +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestAppliedPaymentsItem.d.ts +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestAppliedPaymentsItem.js +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestContact.js +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestLineItemsItem.d.ts +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestLineItemsItem.js +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestPaymentsItem.d.ts +2 -2
- package/serialization/resources/accounting/types/CreditNoteRequestPaymentsItem.js +2 -2
- package/serialization/resources/accounting/types/DataPassthroughRequest.d.ts +4 -4
- package/serialization/resources/accounting/types/DataPassthroughRequest.js +4 -4
- package/serialization/resources/accounting/types/ErrorValidationProblem.d.ts +2 -0
- package/serialization/resources/accounting/types/ErrorValidationProblem.js +2 -0
- package/serialization/resources/accounting/types/ExpenseLineRequestAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/ExpenseLineRequestAccount.js +2 -2
- package/serialization/resources/accounting/types/ExpenseLineRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/ExpenseLineRequestContact.js +2 -2
- package/serialization/resources/accounting/types/ExpenseReportLineRequestAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/ExpenseReportLineRequestAccount.js +2 -2
- package/serialization/resources/accounting/types/ExpenseReportLineRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/ExpenseReportLineRequestContact.js +2 -2
- package/serialization/resources/accounting/types/ExpenseRequestAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/ExpenseRequestAccount.js +2 -2
- package/serialization/resources/accounting/types/ExpenseRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/ExpenseRequestContact.js +2 -2
- package/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.js +2 -2
- package/serialization/resources/accounting/types/InvoiceLineItemRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/InvoiceLineItemRequestContact.js +2 -2
- package/serialization/resources/accounting/types/InvoiceRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/InvoiceRequestContact.js +2 -2
- package/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.d.ts +2 -2
- package/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.js +2 -2
- package/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.d.ts +2 -2
- package/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.js +2 -2
- package/serialization/resources/accounting/types/ItemFulfillmentLineRequestSalesOrderLine.d.ts +2 -2
- package/serialization/resources/accounting/types/ItemFulfillmentLineRequestSalesOrderLine.js +2 -2
- package/serialization/resources/accounting/types/ItemFulfillmentRequestRequestCustomer.d.ts +2 -2
- package/serialization/resources/accounting/types/ItemFulfillmentRequestRequestCustomer.js +2 -2
- package/serialization/resources/accounting/types/ItemRequestRequestPurchaseAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/ItemRequestRequestPurchaseAccount.js +2 -2
- package/serialization/resources/accounting/types/ItemRequestRequestSalesAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/ItemRequestRequestSalesAccount.js +2 -2
- package/serialization/resources/accounting/types/JournalEntryRequestLinesItem.d.ts +2 -2
- package/serialization/resources/accounting/types/JournalEntryRequestLinesItem.js +2 -2
- package/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.d.ts +2 -2
- package/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.js +2 -2
- package/serialization/resources/accounting/types/JournalLineRequestAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/JournalLineRequestAccount.js +2 -2
- package/serialization/resources/accounting/types/PaymentRequestAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/PaymentRequestAccount.js +2 -2
- package/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.d.ts +2 -2
- package/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.js +2 -2
- package/serialization/resources/accounting/types/PaymentRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/PaymentRequestContact.js +2 -2
- package/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.d.ts +2 -2
- package/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.js +2 -2
- package/serialization/resources/accounting/types/PurchaseOrderRequestLineItemsItem.d.ts +2 -2
- package/serialization/resources/accounting/types/PurchaseOrderRequestLineItemsItem.js +2 -2
- package/serialization/resources/accounting/types/PurchaseOrderRequestVendor.d.ts +2 -2
- package/serialization/resources/accounting/types/PurchaseOrderRequestVendor.js +2 -2
- package/serialization/resources/accounting/types/RemoteFieldApi.d.ts +2 -2
- package/serialization/resources/accounting/types/RemoteFieldApi.js +2 -2
- package/serialization/resources/accounting/types/SalesOrderRequestRequestCustomer.d.ts +2 -2
- package/serialization/resources/accounting/types/SalesOrderRequestRequestCustomer.js +2 -2
- package/serialization/resources/accounting/types/SalesOrderRequestRequestShippingAddress.d.ts +2 -2
- package/serialization/resources/accounting/types/SalesOrderRequestRequestShippingAddress.js +2 -2
- package/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequestInvoice.d.ts +2 -3
- package/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequestInvoice.js +5 -2
- package/serialization/resources/accounting/types/VendorCreditLineRequestAccount.d.ts +2 -2
- package/serialization/resources/accounting/types/VendorCreditLineRequestAccount.js +2 -2
- package/serialization/resources/accounting/types/VendorCreditLineRequestContact.d.ts +2 -2
- package/serialization/resources/accounting/types/VendorCreditLineRequestContact.js +2 -2
- package/serialization/resources/accounting/types/VendorCreditRequestVendor.d.ts +2 -2
- package/serialization/resources/accounting/types/VendorCreditRequestVendor.js +2 -2
- package/serialization/resources/accounting/types/WarningValidationProblem.d.ts +2 -0
- package/serialization/resources/accounting/types/WarningValidationProblem.js +2 -0
- package/serialization/resources/accounting/types/index.d.ts +4 -3
- package/serialization/resources/accounting/types/index.js +4 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/accounting/resources/expenses/client/requests/ExpensesBatchObjectsListRequest.d.ts +0 -52
- package/api/resources/accounting/resources/expenses/types/ExpensesBatchObjectsListRequestExpandItem.d.ts +0 -9
- package/api/resources/accounting/resources/expenses/types/ExpensesBatchObjectsListRequestExpandItem.js +0 -12
- package/api/resources/accounting/resources/invoices/client/requests/InvoicesBatchObjectsListRequest.d.ts +0 -84
- package/api/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestExpandItem.d.ts +0 -16
- package/api/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestExpandItem.js +0 -19
- package/api/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestStatus.d.ts +0 -9
- package/api/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestStatus.js +0 -12
- package/api/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestType.d.ts +0 -5
- package/api/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestType.js +0 -8
- package/api/resources/accounting/resources/itemFulfillments/client/requests/ItemFulfillmentsBatchObjectsListRequest.d.ts +0 -34
- package/api/resources/accounting/resources/itemFulfillments/client/requests/ItemFulfillmentsBatchObjectsListRequest.js +0 -3
- package/api/resources/accounting/resources/itemFulfillments/types/ItemFulfillmentsBatchObjectsListRequestExpandItem.d.ts +0 -7
- package/api/resources/accounting/resources/itemFulfillments/types/ItemFulfillmentsBatchObjectsListRequestExpandItem.js +0 -10
- package/api/resources/accounting/resources/salesOrders/client/requests/SalesOrdersBatchObjectsListRequest.d.ts +0 -58
- package/api/resources/accounting/resources/salesOrders/client/requests/SalesOrdersBatchObjectsListRequest.js +0 -3
- package/api/resources/accounting/resources/salesOrders/types/SalesOrdersBatchObjectsListRequestExpandItem.d.ts +0 -9
- package/api/resources/accounting/resources/salesOrders/types/SalesOrdersBatchObjectsListRequestExpandItem.js +0 -12
- package/api/resources/accounting/types/DataPassthroughRequestMethod.d.ts +0 -2
- package/api/resources/accounting/types/DataPassthroughRequestMethod.js +0 -3
- package/api/resources/accounting/types/DataPassthroughRequestRequestFormat.d.ts +0 -2
- package/api/resources/accounting/types/DataPassthroughRequestRequestFormat.js +0 -3
- package/api/resources/accounting/types/RemoteFieldApiAdvancedMetadata.d.ts +0 -2
- package/api/resources/accounting/types/RemoteFieldApiAdvancedMetadata.js +0 -3
- package/serialization/resources/accounting/resources/expenses/types/ExpensesBatchObjectsListRequestExpandItem.d.ts +0 -7
- package/serialization/resources/accounting/resources/expenses/types/ExpensesBatchObjectsListRequestExpandItem.js +0 -39
- package/serialization/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestExpandItem.d.ts +0 -7
- package/serialization/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestExpandItem.js +0 -53
- package/serialization/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestStatus.d.ts +0 -7
- package/serialization/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestStatus.js +0 -39
- package/serialization/resources/accounting/resources/invoices/types/InvoicesBatchObjectsListRequestType.d.ts +0 -7
- package/serialization/resources/accounting/resources/itemFulfillments/types/ItemFulfillmentsBatchObjectsListRequestExpandItem.d.ts +0 -7
- package/serialization/resources/accounting/resources/itemFulfillments/types/ItemFulfillmentsBatchObjectsListRequestExpandItem.js +0 -39
- package/serialization/resources/accounting/resources/salesOrders/types/SalesOrdersBatchObjectsListRequestExpandItem.d.ts +0 -7
- package/serialization/resources/accounting/resources/salesOrders/types/SalesOrdersBatchObjectsListRequestExpandItem.js +0 -46
- package/serialization/resources/accounting/types/DataPassthroughRequestMethod.d.ts +0 -8
- package/serialization/resources/accounting/types/DataPassthroughRequestRequestFormat.d.ts +0 -8
- package/serialization/resources/accounting/types/RemoteFieldApiAdvancedMetadata.d.ts +0 -8
- /package/api/resources/accounting/{resources/expenses/client/requests/ExpensesBatchObjectsListRequest.js → types/BatchObjectStatus.js} +0 -0
- /package/api/resources/accounting/{resources/invoices/client/requests/InvoicesBatchObjectsListRequest.js → types/BatchObjectsResponseStatus.js} +0 -0
package/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@mergeapi/merge-node-client",
|
|
46
|
-
"X-Fern-SDK-Version": "
|
|
47
|
-
"User-Agent": "@mergeapi/merge-node-client/
|
|
46
|
+
"X-Fern-SDK-Version": "4.0.0-alpha.1",
|
|
47
|
+
"User-Agent": "@mergeapi/merge-node-client/4.0.0-alpha.1",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
"X-Account-Token": options === null || options === void 0 ? void 0 : options.accountToken,
|
|
@@ -67,50 +67,32 @@ export declare class ExpensesClient {
|
|
|
67
67
|
retrieve(id: string, request?: Merge.accounting.ExpensesRetrieveRequest, requestOptions?: ExpensesClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.Expense>;
|
|
68
68
|
private __retrieve;
|
|
69
69
|
/**
|
|
70
|
-
* Creates
|
|
70
|
+
* Creates multiple `Expense` objects with the given values.
|
|
71
71
|
*
|
|
72
72
|
* @param {Merge.accounting.ExpenseBulkRequest} request
|
|
73
73
|
* @param {ExpensesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
74
|
*
|
|
75
75
|
* @example
|
|
76
|
-
* await client.accounting.expenses.
|
|
77
|
-
* isDebugMode: true,
|
|
78
|
-
* runAsync: true,
|
|
76
|
+
* await client.accounting.expenses.bulkCreate({
|
|
79
77
|
* batchItems: [{
|
|
80
78
|
* itemId: "item_id",
|
|
81
79
|
* payload: {}
|
|
82
80
|
* }]
|
|
83
81
|
* })
|
|
84
82
|
*/
|
|
85
|
-
|
|
86
|
-
private
|
|
83
|
+
bulkCreate(request: Merge.accounting.ExpenseBulkRequest, requestOptions?: ExpensesClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.AsyncBulkCreateResponse>;
|
|
84
|
+
private __bulkCreate;
|
|
87
85
|
/**
|
|
88
|
-
* Returns
|
|
86
|
+
* Returns the status and results of an `Expense` bulk create batch.
|
|
89
87
|
*
|
|
90
88
|
* @param {string} batch_id
|
|
91
|
-
* @param {Merge.accounting.ExpensesBatchObjectsListRequest} request
|
|
92
89
|
* @param {ExpensesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
93
90
|
*
|
|
94
91
|
* @example
|
|
95
|
-
* await client.accounting.expenses.
|
|
96
|
-
* companyId: "company_id",
|
|
97
|
-
* createdAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
98
|
-
* createdBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
99
|
-
* cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
100
|
-
* includeDeletedData: true,
|
|
101
|
-
* includeRemoteData: true,
|
|
102
|
-
* includeRemoteFields: true,
|
|
103
|
-
* includeShellData: true,
|
|
104
|
-
* modifiedAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
105
|
-
* modifiedBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
106
|
-
* pageSize: 1,
|
|
107
|
-
* remoteId: "remote_id",
|
|
108
|
-
* transactionDateAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
109
|
-
* transactionDateBefore: new Date("2024-01-15T09:30:00.000Z")
|
|
110
|
-
* })
|
|
92
|
+
* await client.accounting.expenses.bulkRetrieve("batch_id")
|
|
111
93
|
*/
|
|
112
|
-
|
|
113
|
-
private
|
|
94
|
+
bulkRetrieve(batch_id: string, requestOptions?: ExpensesClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.BatchObjectsResponse>;
|
|
95
|
+
private __bulkRetrieve;
|
|
114
96
|
/**
|
|
115
97
|
* Returns a list of `RemoteFieldClass` objects.
|
|
116
98
|
*
|
|
@@ -301,42 +301,35 @@ class ExpensesClient {
|
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
303
|
/**
|
|
304
|
-
* Creates
|
|
304
|
+
* Creates multiple `Expense` objects with the given values.
|
|
305
305
|
*
|
|
306
306
|
* @param {Merge.accounting.ExpenseBulkRequest} request
|
|
307
307
|
* @param {ExpensesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
308
308
|
*
|
|
309
309
|
* @example
|
|
310
|
-
* await client.accounting.expenses.
|
|
311
|
-
* isDebugMode: true,
|
|
312
|
-
* runAsync: true,
|
|
310
|
+
* await client.accounting.expenses.bulkCreate({
|
|
313
311
|
* batchItems: [{
|
|
314
312
|
* itemId: "item_id",
|
|
315
313
|
* payload: {}
|
|
316
314
|
* }]
|
|
317
315
|
* })
|
|
318
316
|
*/
|
|
319
|
-
|
|
320
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
317
|
+
bulkCreate(request, requestOptions) {
|
|
318
|
+
return core.HttpResponsePromise.fromPromise(this.__bulkCreate(request, requestOptions));
|
|
321
319
|
}
|
|
322
|
-
|
|
320
|
+
__bulkCreate(request, requestOptions) {
|
|
323
321
|
return __awaiter(this, void 0, void 0, function* () {
|
|
324
322
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
325
|
-
const { isDebugMode, runAsync } = request, _body = __rest(request, ["isDebugMode", "runAsync"]);
|
|
326
|
-
const _queryParams = {
|
|
327
|
-
is_debug_mode: isDebugMode,
|
|
328
|
-
run_async: runAsync,
|
|
329
|
-
};
|
|
330
323
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
331
324
|
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "X-Account-Token": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.accountToken) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.accountToken }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
332
325
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
333
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, "accounting/v1/expenses/
|
|
326
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, "accounting/v1/expenses/bulk"),
|
|
334
327
|
method: "POST",
|
|
335
328
|
headers: _headers,
|
|
336
329
|
contentType: "application/json",
|
|
337
|
-
queryParameters:
|
|
330
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
338
331
|
requestType: "json",
|
|
339
|
-
body: serializers.accounting.ExpenseBulkRequest.jsonOrThrow(
|
|
332
|
+
body: serializers.accounting.ExpenseBulkRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
340
333
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
341
334
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
342
335
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -362,73 +355,31 @@ class ExpensesClient {
|
|
|
362
355
|
rawResponse: _response.rawResponse,
|
|
363
356
|
});
|
|
364
357
|
}
|
|
365
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/accounting/v1/expenses/
|
|
358
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/accounting/v1/expenses/bulk");
|
|
366
359
|
});
|
|
367
360
|
}
|
|
368
361
|
/**
|
|
369
|
-
* Returns
|
|
362
|
+
* Returns the status and results of an `Expense` bulk create batch.
|
|
370
363
|
*
|
|
371
364
|
* @param {string} batch_id
|
|
372
|
-
* @param {Merge.accounting.ExpensesBatchObjectsListRequest} request
|
|
373
365
|
* @param {ExpensesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
374
366
|
*
|
|
375
367
|
* @example
|
|
376
|
-
* await client.accounting.expenses.
|
|
377
|
-
* companyId: "company_id",
|
|
378
|
-
* createdAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
379
|
-
* createdBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
380
|
-
* cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
381
|
-
* includeDeletedData: true,
|
|
382
|
-
* includeRemoteData: true,
|
|
383
|
-
* includeRemoteFields: true,
|
|
384
|
-
* includeShellData: true,
|
|
385
|
-
* modifiedAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
386
|
-
* modifiedBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
387
|
-
* pageSize: 1,
|
|
388
|
-
* remoteId: "remote_id",
|
|
389
|
-
* transactionDateAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
390
|
-
* transactionDateBefore: new Date("2024-01-15T09:30:00.000Z")
|
|
391
|
-
* })
|
|
368
|
+
* await client.accounting.expenses.bulkRetrieve("batch_id")
|
|
392
369
|
*/
|
|
393
|
-
|
|
394
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
370
|
+
bulkRetrieve(batch_id, requestOptions) {
|
|
371
|
+
return core.HttpResponsePromise.fromPromise(this.__bulkRetrieve(batch_id, requestOptions));
|
|
395
372
|
}
|
|
396
|
-
|
|
397
|
-
return __awaiter(this,
|
|
373
|
+
__bulkRetrieve(batch_id, requestOptions) {
|
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
398
375
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
399
|
-
const { companyId, createdAfter, createdBefore, cursor, expand, includeDeletedData, includeRemoteData, includeRemoteFields, includeShellData, modifiedAfter, modifiedBefore, pageSize, remoteId, transactionDateAfter, transactionDateBefore, } = request;
|
|
400
|
-
const _queryParams = {
|
|
401
|
-
company_id: companyId,
|
|
402
|
-
created_after: createdAfter === null || createdAfter === void 0 ? void 0 : createdAfter.toISOString(),
|
|
403
|
-
created_before: createdBefore === null || createdBefore === void 0 ? void 0 : createdBefore.toISOString(),
|
|
404
|
-
cursor,
|
|
405
|
-
expand: Array.isArray(expand)
|
|
406
|
-
? expand.map((item) => serializers.accounting.ExpensesBatchObjectsListRequestExpandItem.jsonOrThrow(item, {
|
|
407
|
-
unrecognizedObjectKeys: "strip",
|
|
408
|
-
}))
|
|
409
|
-
: expand != null
|
|
410
|
-
? serializers.accounting.ExpensesBatchObjectsListRequestExpandItem.jsonOrThrow(expand, {
|
|
411
|
-
unrecognizedObjectKeys: "strip",
|
|
412
|
-
})
|
|
413
|
-
: undefined,
|
|
414
|
-
include_deleted_data: includeDeletedData,
|
|
415
|
-
include_remote_data: includeRemoteData,
|
|
416
|
-
include_remote_fields: includeRemoteFields,
|
|
417
|
-
include_shell_data: includeShellData,
|
|
418
|
-
modified_after: modifiedAfter === null || modifiedAfter === void 0 ? void 0 : modifiedAfter.toISOString(),
|
|
419
|
-
modified_before: modifiedBefore === null || modifiedBefore === void 0 ? void 0 : modifiedBefore.toISOString(),
|
|
420
|
-
page_size: pageSize,
|
|
421
|
-
remote_id: remoteId,
|
|
422
|
-
transaction_date_after: transactionDateAfter === null || transactionDateAfter === void 0 ? void 0 : transactionDateAfter.toISOString(),
|
|
423
|
-
transaction_date_before: transactionDateBefore === null || transactionDateBefore === void 0 ? void 0 : transactionDateBefore.toISOString(),
|
|
424
|
-
};
|
|
425
376
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
426
377
|
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "X-Account-Token": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.accountToken) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.accountToken }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
427
378
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
428
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, `accounting/v1/expenses/
|
|
379
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, `accounting/v1/expenses/bulk/${core.url.encodePathParam(batch_id)}`),
|
|
429
380
|
method: "GET",
|
|
430
381
|
headers: _headers,
|
|
431
|
-
queryParameters:
|
|
382
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
432
383
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
433
384
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
434
385
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -454,7 +405,7 @@ class ExpensesClient {
|
|
|
454
405
|
rawResponse: _response.rawResponse,
|
|
455
406
|
});
|
|
456
407
|
}
|
|
457
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/accounting/v1/expenses/
|
|
408
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/accounting/v1/expenses/bulk/{batch_id}");
|
|
458
409
|
});
|
|
459
410
|
}
|
|
460
411
|
/**
|
|
@@ -2,8 +2,6 @@ import type * as Merge from "../../../../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* isDebugMode: true,
|
|
6
|
-
* runAsync: true,
|
|
7
5
|
* batchItems: [{
|
|
8
6
|
* itemId: "item_id",
|
|
9
7
|
* payload: {}
|
|
@@ -11,9 +9,5 @@ import type * as Merge from "../../../../../../index";
|
|
|
11
9
|
* }
|
|
12
10
|
*/
|
|
13
11
|
export interface ExpenseBulkRequest {
|
|
14
|
-
/** Whether to include debug fields (such as log file links) in the response. */
|
|
15
|
-
isDebugMode?: boolean;
|
|
16
|
-
/** Whether or not third-party updates should be run asynchronously. */
|
|
17
|
-
runAsync?: boolean;
|
|
18
12
|
batchItems: Merge.accounting.ExpenseBatchItemRequest[];
|
|
19
13
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type { ExpenseBulkRequest } from "./ExpenseBulkRequest";
|
|
2
2
|
export type { ExpenseEndpointRequest } from "./ExpenseEndpointRequest";
|
|
3
|
-
export type { ExpensesBatchObjectsListRequest } from "./ExpensesBatchObjectsListRequest";
|
|
4
3
|
export type { ExpensesLinesRemoteFieldClassesListRequest } from "./ExpensesLinesRemoteFieldClassesListRequest";
|
|
5
4
|
export type { ExpensesListRequest } from "./ExpensesListRequest";
|
|
6
5
|
export type { ExpensesRemoteFieldClassesListRequest } from "./ExpensesRemoteFieldClassesListRequest";
|
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ExpensesBatchObjectsListRequestExpandItem"), exports);
|
|
18
17
|
__exportStar(require("./ExpensesListRequestExpandItem"), exports);
|
|
19
18
|
__exportStar(require("./ExpensesRetrieveRequestExpandItem"), exports);
|
|
@@ -93,58 +93,32 @@ export declare class InvoicesClient {
|
|
|
93
93
|
partialUpdate(id: string, request: Merge.accounting.PatchedInvoiceEndpointRequest, requestOptions?: InvoicesClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.InvoiceResponse>;
|
|
94
94
|
private __partialUpdate;
|
|
95
95
|
/**
|
|
96
|
-
* Creates
|
|
97
|
-
* Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s).
|
|
98
|
-
*
|
|
96
|
+
* Creates multiple `Invoice` objects with the given values.
|
|
99
97
|
*
|
|
100
98
|
* @param {Merge.accounting.InvoiceBulkRequest} request
|
|
101
99
|
* @param {InvoicesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
100
|
*
|
|
103
101
|
* @example
|
|
104
|
-
* await client.accounting.invoices.
|
|
105
|
-
* isDebugMode: true,
|
|
106
|
-
* runAsync: true,
|
|
102
|
+
* await client.accounting.invoices.bulkCreate({
|
|
107
103
|
* batchItems: [{
|
|
108
104
|
* itemId: "item_id",
|
|
109
105
|
* payload: {}
|
|
110
106
|
* }]
|
|
111
107
|
* })
|
|
112
108
|
*/
|
|
113
|
-
|
|
114
|
-
private
|
|
109
|
+
bulkCreate(request: Merge.accounting.InvoiceBulkRequest, requestOptions?: InvoicesClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.AsyncBulkCreateResponse>;
|
|
110
|
+
private __bulkCreate;
|
|
115
111
|
/**
|
|
116
|
-
* Returns
|
|
112
|
+
* Returns the status and results of an `Invoice` bulk create batch.
|
|
117
113
|
*
|
|
118
114
|
* @param {string} batch_id
|
|
119
|
-
* @param {Merge.accounting.InvoicesBatchObjectsListRequest} request
|
|
120
115
|
* @param {InvoicesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
116
|
*
|
|
122
117
|
* @example
|
|
123
|
-
* await client.accounting.invoices.
|
|
124
|
-
* companyId: "company_id",
|
|
125
|
-
* contactId: "contact_id",
|
|
126
|
-
* createdAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
127
|
-
* createdBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
128
|
-
* cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
129
|
-
* includeDeletedData: true,
|
|
130
|
-
* includeRemoteData: true,
|
|
131
|
-
* includeRemoteFields: true,
|
|
132
|
-
* includeShellData: true,
|
|
133
|
-
* issueDateAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
134
|
-
* issueDateBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
135
|
-
* modifiedAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
136
|
-
* modifiedBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
137
|
-
* number: "number",
|
|
138
|
-
* pageSize: 1,
|
|
139
|
-
* remoteFields: "type",
|
|
140
|
-
* remoteId: "remote_id",
|
|
141
|
-
* showEnumOrigins: "type",
|
|
142
|
-
* status: "DRAFT",
|
|
143
|
-
* type: "ACCOUNTS_PAYABLE"
|
|
144
|
-
* })
|
|
118
|
+
* await client.accounting.invoices.bulkRetrieve("batch_id")
|
|
145
119
|
*/
|
|
146
|
-
|
|
147
|
-
private
|
|
120
|
+
bulkRetrieve(batch_id: string, requestOptions?: InvoicesClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.BatchObjectsResponse>;
|
|
121
|
+
private __bulkRetrieve;
|
|
148
122
|
/**
|
|
149
123
|
* Returns a list of `RemoteFieldClass` objects.
|
|
150
124
|
*
|
|
@@ -392,44 +392,35 @@ class InvoicesClient {
|
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
|
-
* Creates
|
|
396
|
-
* Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s).
|
|
397
|
-
*
|
|
395
|
+
* Creates multiple `Invoice` objects with the given values.
|
|
398
396
|
*
|
|
399
397
|
* @param {Merge.accounting.InvoiceBulkRequest} request
|
|
400
398
|
* @param {InvoicesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
401
399
|
*
|
|
402
400
|
* @example
|
|
403
|
-
* await client.accounting.invoices.
|
|
404
|
-
* isDebugMode: true,
|
|
405
|
-
* runAsync: true,
|
|
401
|
+
* await client.accounting.invoices.bulkCreate({
|
|
406
402
|
* batchItems: [{
|
|
407
403
|
* itemId: "item_id",
|
|
408
404
|
* payload: {}
|
|
409
405
|
* }]
|
|
410
406
|
* })
|
|
411
407
|
*/
|
|
412
|
-
|
|
413
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
408
|
+
bulkCreate(request, requestOptions) {
|
|
409
|
+
return core.HttpResponsePromise.fromPromise(this.__bulkCreate(request, requestOptions));
|
|
414
410
|
}
|
|
415
|
-
|
|
411
|
+
__bulkCreate(request, requestOptions) {
|
|
416
412
|
return __awaiter(this, void 0, void 0, function* () {
|
|
417
413
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
418
|
-
const { isDebugMode, runAsync } = request, _body = __rest(request, ["isDebugMode", "runAsync"]);
|
|
419
|
-
const _queryParams = {
|
|
420
|
-
is_debug_mode: isDebugMode,
|
|
421
|
-
run_async: runAsync,
|
|
422
|
-
};
|
|
423
414
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
424
415
|
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "X-Account-Token": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.accountToken) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.accountToken }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
425
416
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
426
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, "accounting/v1/invoices/
|
|
417
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, "accounting/v1/invoices/bulk"),
|
|
427
418
|
method: "POST",
|
|
428
419
|
headers: _headers,
|
|
429
420
|
contentType: "application/json",
|
|
430
|
-
queryParameters:
|
|
421
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
431
422
|
requestType: "json",
|
|
432
|
-
body: serializers.accounting.InvoiceBulkRequest.jsonOrThrow(
|
|
423
|
+
body: serializers.accounting.InvoiceBulkRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
433
424
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
434
425
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
435
426
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -455,93 +446,31 @@ class InvoicesClient {
|
|
|
455
446
|
rawResponse: _response.rawResponse,
|
|
456
447
|
});
|
|
457
448
|
}
|
|
458
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/accounting/v1/invoices/
|
|
449
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/accounting/v1/invoices/bulk");
|
|
459
450
|
});
|
|
460
451
|
}
|
|
461
452
|
/**
|
|
462
|
-
* Returns
|
|
453
|
+
* Returns the status and results of an `Invoice` bulk create batch.
|
|
463
454
|
*
|
|
464
455
|
* @param {string} batch_id
|
|
465
|
-
* @param {Merge.accounting.InvoicesBatchObjectsListRequest} request
|
|
466
456
|
* @param {InvoicesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
467
457
|
*
|
|
468
458
|
* @example
|
|
469
|
-
* await client.accounting.invoices.
|
|
470
|
-
* companyId: "company_id",
|
|
471
|
-
* contactId: "contact_id",
|
|
472
|
-
* createdAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
473
|
-
* createdBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
474
|
-
* cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
475
|
-
* includeDeletedData: true,
|
|
476
|
-
* includeRemoteData: true,
|
|
477
|
-
* includeRemoteFields: true,
|
|
478
|
-
* includeShellData: true,
|
|
479
|
-
* issueDateAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
480
|
-
* issueDateBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
481
|
-
* modifiedAfter: new Date("2024-01-15T09:30:00.000Z"),
|
|
482
|
-
* modifiedBefore: new Date("2024-01-15T09:30:00.000Z"),
|
|
483
|
-
* number: "number",
|
|
484
|
-
* pageSize: 1,
|
|
485
|
-
* remoteFields: "type",
|
|
486
|
-
* remoteId: "remote_id",
|
|
487
|
-
* showEnumOrigins: "type",
|
|
488
|
-
* status: "DRAFT",
|
|
489
|
-
* type: "ACCOUNTS_PAYABLE"
|
|
490
|
-
* })
|
|
459
|
+
* await client.accounting.invoices.bulkRetrieve("batch_id")
|
|
491
460
|
*/
|
|
492
|
-
|
|
493
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
461
|
+
bulkRetrieve(batch_id, requestOptions) {
|
|
462
|
+
return core.HttpResponsePromise.fromPromise(this.__bulkRetrieve(batch_id, requestOptions));
|
|
494
463
|
}
|
|
495
|
-
|
|
496
|
-
return __awaiter(this,
|
|
464
|
+
__bulkRetrieve(batch_id, requestOptions) {
|
|
465
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
497
466
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
498
|
-
const { companyId, contactId, createdAfter, createdBefore, cursor, expand, includeDeletedData, includeRemoteData, includeRemoteFields, includeShellData, issueDateAfter, issueDateBefore, modifiedAfter, modifiedBefore, number: number_, pageSize, remoteFields, remoteId, showEnumOrigins, status, type: type_, } = request;
|
|
499
|
-
const _queryParams = {
|
|
500
|
-
company_id: companyId,
|
|
501
|
-
contact_id: contactId,
|
|
502
|
-
created_after: createdAfter === null || createdAfter === void 0 ? void 0 : createdAfter.toISOString(),
|
|
503
|
-
created_before: createdBefore === null || createdBefore === void 0 ? void 0 : createdBefore.toISOString(),
|
|
504
|
-
cursor,
|
|
505
|
-
expand: Array.isArray(expand)
|
|
506
|
-
? expand.map((item) => serializers.accounting.InvoicesBatchObjectsListRequestExpandItem.jsonOrThrow(item, {
|
|
507
|
-
unrecognizedObjectKeys: "strip",
|
|
508
|
-
}))
|
|
509
|
-
: expand != null
|
|
510
|
-
? serializers.accounting.InvoicesBatchObjectsListRequestExpandItem.jsonOrThrow(expand, {
|
|
511
|
-
unrecognizedObjectKeys: "strip",
|
|
512
|
-
})
|
|
513
|
-
: undefined,
|
|
514
|
-
include_deleted_data: includeDeletedData,
|
|
515
|
-
include_remote_data: includeRemoteData,
|
|
516
|
-
include_remote_fields: includeRemoteFields,
|
|
517
|
-
include_shell_data: includeShellData,
|
|
518
|
-
issue_date_after: issueDateAfter === null || issueDateAfter === void 0 ? void 0 : issueDateAfter.toISOString(),
|
|
519
|
-
issue_date_before: issueDateBefore === null || issueDateBefore === void 0 ? void 0 : issueDateBefore.toISOString(),
|
|
520
|
-
modified_after: modifiedAfter === null || modifiedAfter === void 0 ? void 0 : modifiedAfter.toISOString(),
|
|
521
|
-
modified_before: modifiedBefore === null || modifiedBefore === void 0 ? void 0 : modifiedBefore.toISOString(),
|
|
522
|
-
number: number_,
|
|
523
|
-
page_size: pageSize,
|
|
524
|
-
remote_fields: remoteFields != null ? remoteFields : undefined,
|
|
525
|
-
remote_id: remoteId,
|
|
526
|
-
show_enum_origins: showEnumOrigins != null ? showEnumOrigins : undefined,
|
|
527
|
-
status: status != null
|
|
528
|
-
? serializers.accounting.InvoicesBatchObjectsListRequestStatus.jsonOrThrow(status, {
|
|
529
|
-
unrecognizedObjectKeys: "strip",
|
|
530
|
-
})
|
|
531
|
-
: undefined,
|
|
532
|
-
type: type_ != null
|
|
533
|
-
? serializers.accounting.InvoicesBatchObjectsListRequestType.jsonOrThrow(type_, {
|
|
534
|
-
unrecognizedObjectKeys: "strip",
|
|
535
|
-
})
|
|
536
|
-
: undefined,
|
|
537
|
-
};
|
|
538
467
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
539
468
|
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "X-Account-Token": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.accountToken) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.accountToken }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
540
469
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
541
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, `accounting/v1/invoices/
|
|
470
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, `accounting/v1/invoices/bulk/${core.url.encodePathParam(batch_id)}`),
|
|
542
471
|
method: "GET",
|
|
543
472
|
headers: _headers,
|
|
544
|
-
queryParameters:
|
|
473
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
545
474
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
546
475
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
547
476
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -567,7 +496,7 @@ class InvoicesClient {
|
|
|
567
496
|
rawResponse: _response.rawResponse,
|
|
568
497
|
});
|
|
569
498
|
}
|
|
570
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/accounting/v1/invoices/
|
|
499
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/accounting/v1/invoices/bulk/{batch_id}");
|
|
571
500
|
});
|
|
572
501
|
}
|
|
573
502
|
/**
|
|
@@ -2,8 +2,6 @@ import type * as Merge from "../../../../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* isDebugMode: true,
|
|
6
|
-
* runAsync: true,
|
|
7
5
|
* batchItems: [{
|
|
8
6
|
* itemId: "item_id",
|
|
9
7
|
* payload: {}
|
|
@@ -11,9 +9,5 @@ import type * as Merge from "../../../../../../index";
|
|
|
11
9
|
* }
|
|
12
10
|
*/
|
|
13
11
|
export interface InvoiceBulkRequest {
|
|
14
|
-
/** Whether to include debug fields (such as log file links) in the response. */
|
|
15
|
-
isDebugMode?: boolean;
|
|
16
|
-
/** Whether or not third-party updates should be run asynchronously. */
|
|
17
|
-
runAsync?: boolean;
|
|
18
12
|
batchItems: Merge.accounting.InvoiceBatchItemRequest[];
|
|
19
13
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type { InvoiceBulkRequest } from "./InvoiceBulkRequest";
|
|
2
2
|
export type { InvoiceEndpointRequest } from "./InvoiceEndpointRequest";
|
|
3
|
-
export type { InvoicesBatchObjectsListRequest } from "./InvoicesBatchObjectsListRequest";
|
|
4
3
|
export type { InvoicesLineItemsRemoteFieldClassesListRequest } from "./InvoicesLineItemsRemoteFieldClassesListRequest";
|
|
5
4
|
export type { InvoicesListRequest } from "./InvoicesListRequest";
|
|
6
5
|
export type { InvoicesRemoteFieldClassesListRequest } from "./InvoicesRemoteFieldClassesListRequest";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export * from "./InvoicesBatchObjectsListRequestExpandItem";
|
|
2
|
-
export * from "./InvoicesBatchObjectsListRequestStatus";
|
|
3
|
-
export * from "./InvoicesBatchObjectsListRequestType";
|
|
4
1
|
export * from "./InvoicesListRequestExpandItem";
|
|
5
2
|
export * from "./InvoicesListRequestStatus";
|
|
6
3
|
export * from "./InvoicesListRequestType";
|
|
@@ -14,9 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./InvoicesBatchObjectsListRequestExpandItem"), exports);
|
|
18
|
-
__exportStar(require("./InvoicesBatchObjectsListRequestStatus"), exports);
|
|
19
|
-
__exportStar(require("./InvoicesBatchObjectsListRequestType"), exports);
|
|
20
17
|
__exportStar(require("./InvoicesListRequestExpandItem"), exports);
|
|
21
18
|
__exportStar(require("./InvoicesListRequestStatus"), exports);
|
|
22
19
|
__exportStar(require("./InvoicesListRequestType"), exports);
|
|
@@ -63,44 +63,32 @@ export declare class ItemFulfillmentsClient {
|
|
|
63
63
|
retrieve(id: string, request?: Merge.accounting.ItemFulfillmentsRetrieveRequest, requestOptions?: ItemFulfillmentsClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.ItemFulfillment>;
|
|
64
64
|
private __retrieve;
|
|
65
65
|
/**
|
|
66
|
-
* Creates
|
|
66
|
+
* Creates multiple `ItemFulfillment` objects with the given values.
|
|
67
67
|
*
|
|
68
68
|
* @param {Merge.accounting.ItemFulfillmentBulkRequest} request
|
|
69
69
|
* @param {ItemFulfillmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
|
-
* await client.accounting.itemFulfillments.
|
|
73
|
-
* isDebugMode: true,
|
|
74
|
-
* runAsync: true,
|
|
72
|
+
* await client.accounting.itemFulfillments.bulkCreate({
|
|
75
73
|
* batchItems: [{
|
|
76
74
|
* itemId: "item_id",
|
|
77
75
|
* payload: {}
|
|
78
76
|
* }]
|
|
79
77
|
* })
|
|
80
78
|
*/
|
|
81
|
-
|
|
82
|
-
private
|
|
79
|
+
bulkCreate(request: Merge.accounting.ItemFulfillmentBulkRequest, requestOptions?: ItemFulfillmentsClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.AsyncBulkCreateResponse>;
|
|
80
|
+
private __bulkCreate;
|
|
83
81
|
/**
|
|
84
|
-
* Returns
|
|
82
|
+
* Returns the status and results of an `ItemFulfillment` bulk create batch.
|
|
85
83
|
*
|
|
86
84
|
* @param {string} batch_id
|
|
87
|
-
* @param {Merge.accounting.ItemFulfillmentsBatchObjectsListRequest} request
|
|
88
85
|
* @param {ItemFulfillmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
86
|
*
|
|
90
87
|
* @example
|
|
91
|
-
* await client.accounting.itemFulfillments.
|
|
92
|
-
* cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
93
|
-
* includeDeletedData: true,
|
|
94
|
-
* includeRemoteData: true,
|
|
95
|
-
* includeRemoteFields: true,
|
|
96
|
-
* includeShellData: true,
|
|
97
|
-
* pageSize: 1,
|
|
98
|
-
* remoteFields: "status",
|
|
99
|
-
* showEnumOrigins: "status"
|
|
100
|
-
* })
|
|
88
|
+
* await client.accounting.itemFulfillments.bulkRetrieve("batch_id")
|
|
101
89
|
*/
|
|
102
|
-
|
|
103
|
-
private
|
|
90
|
+
bulkRetrieve(batch_id: string, requestOptions?: ItemFulfillmentsClient.RequestOptions): core.HttpResponsePromise<Merge.accounting.BatchObjectsResponse>;
|
|
91
|
+
private __bulkRetrieve;
|
|
104
92
|
/**
|
|
105
93
|
* Returns a list of `RemoteFieldClass` objects.
|
|
106
94
|
*
|