diff --git a/.mock/definition/accounting/accountDetails.yml b/.mock/definition/accounting/accountDetails.yml index a9e9606fb..300d24e09 100644 --- a/.mock/definition/accounting/accountDetails.yml +++ b/.mock/definition/accounting/accountDetails.yml @@ -16,7 +16,8 @@ service: type: root.AccountDetails status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd diff --git a/.mock/definition/accounting/accountToken.yml b/.mock/definition/accounting/accountToken.yml index e5fa0475f..0f3134f8d 100644 --- a/.mock/definition/accounting/accountToken.yml +++ b/.mock/definition/accounting/accountToken.yml @@ -22,6 +22,8 @@ service: examples: - path-parameters: public_token: public_token + headers: + X-Account-Token: '[object Object]' response: body: account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB diff --git a/.mock/definition/accounting/accountingPeriods.yml b/.mock/definition/accounting/accountingPeriods.yml index d6fc7c6b6..4adc5e1ba 100644 --- a/.mock/definition/accounting/accountingPeriods.yml +++ b/.mock/definition/accounting/accountingPeriods.yml @@ -43,7 +43,10 @@ service: type: root.PaginatedAccountingPeriodList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -95,7 +98,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 diff --git a/.mock/definition/accounting/accounts.yml b/.mock/definition/accounting/accounts.yml index c6746098d..7f5c1aac6 100644 --- a/.mock/definition/accounting/accounts.yml +++ b/.mock/definition/accounting/accounts.yml @@ -127,7 +127,10 @@ service: type: root.PaginatedAccountList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -185,7 +188,8 @@ service: type: root.AccountResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -280,7 +284,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 @@ -320,7 +325,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/accounting/addresses.yml b/.mock/definition/accounting/addresses.yml index 989f0df1a..c8ae76263 100644 --- a/.mock/definition/accounting/addresses.yml +++ b/.mock/definition/accounting/addresses.yml @@ -43,7 +43,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: created_at: '2021-09-15T00:00:00Z' diff --git a/.mock/definition/accounting/asyncPassthrough.yml b/.mock/definition/accounting/asyncPassthrough.yml index da15bafd5..2a665ed2e 100644 --- a/.mock/definition/accounting/asyncPassthrough.yml +++ b/.mock/definition/accounting/asyncPassthrough.yml @@ -21,7 +21,8 @@ service: type: root.AsyncPassthroughReciept status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters @@ -44,7 +45,8 @@ service: examples: - path-parameters: async_passthrough_receipt_id: async_passthrough_receipt_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: method: GET diff --git a/.mock/definition/accounting/asyncTasks.yml b/.mock/definition/accounting/asyncTasks.yml index 6365c3ab5..ae58d9982 100644 --- a/.mock/definition/accounting/asyncTasks.yml +++ b/.mock/definition/accounting/asyncTasks.yml @@ -20,7 +20,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: status: QUEUED diff --git a/.mock/definition/accounting/attachments.yml b/.mock/definition/accounting/attachments.yml index cae3762b3..2487a3cf0 100644 --- a/.mock/definition/accounting/attachments.yml +++ b/.mock/definition/accounting/attachments.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedAccountingAttachmentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -120,7 +123,8 @@ service: type: root.AccountingAttachmentResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -193,7 +197,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 @@ -226,7 +231,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/accounting/auditTrail.yml b/.mock/definition/accounting/auditTrail.yml index 6e1b86722..0dcfb0861 100644 --- a/.mock/definition/accounting/auditTrail.yml +++ b/.mock/definition/accounting/auditTrail.yml @@ -75,7 +75,11 @@ service: type: root.PaginatedAuditLogEventList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/accounting/availableActions.yml b/.mock/definition/accounting/availableActions.yml index 35fca3fac..e7a930def 100644 --- a/.mock/definition/accounting/availableActions.yml +++ b/.mock/definition/accounting/availableActions.yml @@ -16,7 +16,8 @@ service: type: root.AvailableActions status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: integration: diff --git a/.mock/definition/accounting/balanceSheets.yml b/.mock/definition/accounting/balanceSheets.yml index dde810e4f..28152b37e 100644 --- a/.mock/definition/accounting/balanceSheets.yml +++ b/.mock/definition/accounting/balanceSheets.yml @@ -72,7 +72,10 @@ service: type: root.PaginatedBalanceSheetList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -169,7 +172,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 diff --git a/.mock/definition/accounting/bankFeedAccounts.yml b/.mock/definition/accounting/bankFeedAccounts.yml index 2e64d197f..a5d6ed067 100644 --- a/.mock/definition/accounting/bankFeedAccounts.yml +++ b/.mock/definition/accounting/bankFeedAccounts.yml @@ -43,7 +43,10 @@ service: type: root.PaginatedBankFeedAccountList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -96,7 +99,8 @@ service: type: root.BankFeedAccountResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -173,7 +177,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 @@ -210,7 +215,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/accounting/bankFeedTransactions.yml b/.mock/definition/accounting/bankFeedTransactions.yml index 682615d07..7a1d41c9e 100644 --- a/.mock/definition/accounting/bankFeedTransactions.yml +++ b/.mock/definition/accounting/bankFeedTransactions.yml @@ -74,7 +74,10 @@ service: type: root.PaginatedBankFeedTransactionList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -122,7 +125,8 @@ service: type: root.BankFeedTransactionResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -197,7 +201,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 @@ -227,7 +232,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/accounting/cashFlowStatements.yml b/.mock/definition/accounting/cashFlowStatements.yml index 179afb9c7..2db3914f7 100644 --- a/.mock/definition/accounting/cashFlowStatements.yml +++ b/.mock/definition/accounting/cashFlowStatements.yml @@ -74,7 +74,10 @@ service: type: root.PaginatedCashFlowStatementList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -170,7 +173,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b diff --git a/.mock/definition/accounting/companyInfo.yml b/.mock/definition/accounting/companyInfo.yml index 488a43081..339533064 100644 --- a/.mock/definition/accounting/companyInfo.yml +++ b/.mock/definition/accounting/companyInfo.yml @@ -86,7 +86,10 @@ service: type: root.PaginatedCompanyInfoList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -159,7 +162,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 diff --git a/.mock/definition/accounting/contacts.yml b/.mock/definition/accounting/contacts.yml index c4b6af242..c809b0ff6 100644 --- a/.mock/definition/accounting/contacts.yml +++ b/.mock/definition/accounting/contacts.yml @@ -137,7 +137,10 @@ service: type: root.PaginatedContactList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -203,7 +206,8 @@ service: type: root.ContactResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -311,7 +315,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: c640b80b-fac9-409f-aa19-1f9221aec445 @@ -361,7 +366,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -582,7 +588,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/creditNotes.yml b/.mock/definition/accounting/creditNotes.yml index edd13752a..880ab2477 100644 --- a/.mock/definition/accounting/creditNotes.yml +++ b/.mock/definition/accounting/creditNotes.yml @@ -659,7 +659,10 @@ service: type: root.PaginatedCreditNoteList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -755,7 +758,8 @@ service: type: root.CreditNoteResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -888,7 +892,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 @@ -917,7 +922,6 @@ service: unit_price: '5.0' tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 total_line_amount: '5.0' - tracking_category: tracking_category tracking_categories: - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -969,7 +973,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/accounting/deleteAccount.yml b/.mock/definition/accounting/deleteAccount.yml index 402b4e72a..dd6432e85 100644 --- a/.mock/definition/accounting/deleteAccount.yml +++ b/.mock/definition/accounting/deleteAccount.yml @@ -10,6 +10,7 @@ service: source: openapi: openapi/openapi.yml examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/employees.yml b/.mock/definition/accounting/employees.yml index bc9f9fdb4..d77b43e34 100644 --- a/.mock/definition/accounting/employees.yml +++ b/.mock/definition/accounting/employees.yml @@ -72,7 +72,10 @@ service: type: root.PaginatedEmployeeList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -133,7 +136,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: c640b80b-fac9-409f-aa19-1f9221aec445 diff --git a/.mock/definition/accounting/expenseReports.yml b/.mock/definition/accounting/expenseReports.yml index af9085aeb..66977e4f4 100644 --- a/.mock/definition/accounting/expenseReports.yml +++ b/.mock/definition/accounting/expenseReports.yml @@ -262,7 +262,10 @@ service: type: root.PaginatedExpenseReportList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -349,7 +352,8 @@ service: type: root.ExpenseReportResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: tracking_categories: @@ -487,7 +491,10 @@ service: examples: - path-parameters: expense_report_id: expense_report_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -559,7 +566,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 123e4567-e89b-12d3-a456-426614174000 @@ -669,7 +677,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -698,7 +709,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -919,7 +931,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/expenses.yml b/.mock/definition/accounting/expenses.yml index a4c1bc4b3..4a409f715 100644 --- a/.mock/definition/accounting/expenses.yml +++ b/.mock/definition/accounting/expenses.yml @@ -334,7 +334,10 @@ service: type: root.PaginatedExpenseList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -433,7 +436,8 @@ service: type: root.ExpenseResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -564,7 +568,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 @@ -591,7 +596,6 @@ service: modified_at: '2021-10-16T00:00:00Z' item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d net_amount: 25.54 - tracking_category: tracking_category tracking_categories: - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -612,7 +616,6 @@ service: modified_at: '2021-10-16T00:00:00Z' item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d net_amount: 10 - tracking_category: tracking_category tracking_categories: - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -695,7 +698,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -724,7 +730,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -945,7 +952,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/fieldMapping.yml b/.mock/definition/accounting/fieldMapping.yml index 663890883..70f7267f0 100644 --- a/.mock/definition/accounting/fieldMapping.yml +++ b/.mock/definition/accounting/fieldMapping.yml @@ -30,7 +30,8 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Account: @@ -517,7 +518,8 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name target_field_description: this is a example description of the target field @@ -584,7 +586,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: model: @@ -666,7 +669,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: {} response: body: @@ -737,7 +741,8 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Account: @@ -1107,7 +1112,8 @@ service: type: root.ExternalTargetFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Account: diff --git a/.mock/definition/accounting/forceResync.yml b/.mock/definition/accounting/forceResync.yml index 8e7e969ab..23d80d647 100644 --- a/.mock/definition/accounting/forceResync.yml +++ b/.mock/definition/accounting/forceResync.yml @@ -21,7 +21,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - model_name: Invoice diff --git a/.mock/definition/accounting/generalLedgerTransactions.yml b/.mock/definition/accounting/generalLedgerTransactions.yml index 38fe72923..5e43d543e 100644 --- a/.mock/definition/accounting/generalLedgerTransactions.yml +++ b/.mock/definition/accounting/generalLedgerTransactions.yml @@ -143,7 +143,10 @@ service: type: root.PaginatedGeneralLedgerTransactionList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -228,7 +231,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 diff --git a/.mock/definition/accounting/generateKey.yml b/.mock/definition/accounting/generateKey.yml index 4d79b8cea..7ec4bf68a 100644 --- a/.mock/definition/accounting/generateKey.yml +++ b/.mock/definition/accounting/generateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/accounting/incomeStatements.yml b/.mock/definition/accounting/incomeStatements.yml index 92f62e776..f1da1a7bb 100644 --- a/.mock/definition/accounting/incomeStatements.yml +++ b/.mock/definition/accounting/incomeStatements.yml @@ -72,7 +72,10 @@ service: type: root.PaginatedIncomeStatementList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -183,7 +186,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0958cbc6-6040-430a-848e-aafacbadf4ae diff --git a/.mock/definition/accounting/invoices.yml b/.mock/definition/accounting/invoices.yml index e11794784..963f67bb5 100644 --- a/.mock/definition/accounting/invoices.yml +++ b/.mock/definition/accounting/invoices.yml @@ -27076,7 +27076,10 @@ service: type: root.PaginatedInvoiceList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -27195,7 +27198,8 @@ service: type: root.InvoiceResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -27353,7 +27357,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 @@ -27409,7 +27414,6 @@ service: item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b account: cd0f32d4-a493-11ec-b909-0242ac120002 tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - tracking_category: tracking_category tracking_categories: - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -27485,7 +27489,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -27643,7 +27648,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -27676,7 +27684,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -27860,7 +27869,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -28081,7 +28091,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/issues.yml b/.mock/definition/accounting/issues.yml index 58c4f3b1e..f75687391 100644 --- a/.mock/definition/accounting/issues.yml +++ b/.mock/definition/accounting/issues.yml @@ -80,7 +80,11 @@ service: type: root.PaginatedIssueList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ @@ -112,6 +116,8 @@ service: examples: - path-parameters: id: id + headers: + X-Account-Token: '[object Object]' response: body: id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/.mock/definition/accounting/items.yml b/.mock/definition/accounting/items.yml index 29a34438f..67a784e9d 100644 --- a/.mock/definition/accounting/items.yml +++ b/.mock/definition/accounting/items.yml @@ -207,7 +207,10 @@ service: type: root.PaginatedItemList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -265,7 +268,8 @@ service: type: root.ItemResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -360,7 +364,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: d2f972d0-2526-434b-9409-4c3b468e08f0 @@ -419,7 +424,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -486,7 +492,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -670,7 +677,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/accounting/journalEntries.yml b/.mock/definition/accounting/journalEntries.yml index 625e4f6ee..e471027d9 100644 --- a/.mock/definition/accounting/journalEntries.yml +++ b/.mock/definition/accounting/journalEntries.yml @@ -338,7 +338,10 @@ service: type: root.PaginatedJournalEntryList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -431,7 +434,8 @@ service: type: root.JournalEntryResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -556,7 +560,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 @@ -580,7 +585,6 @@ service: modified_at: '2021-10-16T00:00:00Z' account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 net_amount: 25.54 - tracking_category: tracking_category tracking_categories: - d25d609b-945f-4762-b55a-1c8fb220c43c - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -602,7 +606,6 @@ service: modified_at: '2021-10-16T00:00:00Z' account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 net_amount: 10 - tracking_category: tracking_category tracking_categories: - d25d609b-945f-4762-b55a-1c8fb220c43c - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -690,7 +693,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -719,7 +725,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -940,7 +947,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/linkToken.yml b/.mock/definition/accounting/linkToken.yml index 5a2f0a6f3..1d7aa0a0a 100644 --- a/.mock/definition/accounting/linkToken.yml +++ b/.mock/definition/accounting/linkToken.yml @@ -136,7 +136,9 @@ service: type: root.LinkToken status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: end_user_email_address: example@gmail.com end_user_organization_name: Test Organization end_user_origin_id: '12345' diff --git a/.mock/definition/accounting/linkedAccounts.yml b/.mock/definition/accounting/linkedAccounts.yml index aa8806e85..a831126a6 100644 --- a/.mock/definition/accounting/linkedAccounts.yml +++ b/.mock/definition/accounting/linkedAccounts.yml @@ -107,7 +107,11 @@ service: type: root.PaginatedAccountDetailsAndActionsList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/accounting/passthrough.yml b/.mock/definition/accounting/passthrough.yml index 25ab767ce..db79aa9e1 100644 --- a/.mock/definition/accounting/passthrough.yml +++ b/.mock/definition/accounting/passthrough.yml @@ -19,7 +19,8 @@ service: type: root.RemoteResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters diff --git a/.mock/definition/accounting/paymentMethods.yml b/.mock/definition/accounting/paymentMethods.yml index c53c952c0..844d0b854 100644 --- a/.mock/definition/accounting/paymentMethods.yml +++ b/.mock/definition/accounting/paymentMethods.yml @@ -43,7 +43,10 @@ service: type: root.PaginatedPaymentMethodList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -95,7 +98,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 diff --git a/.mock/definition/accounting/paymentTerms.yml b/.mock/definition/accounting/paymentTerms.yml index 688ed9c3c..edf234554 100644 --- a/.mock/definition/accounting/paymentTerms.yml +++ b/.mock/definition/accounting/paymentTerms.yml @@ -48,7 +48,10 @@ service: type: root.PaginatedPaymentTermList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -107,7 +110,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 diff --git a/.mock/definition/accounting/payments.yml b/.mock/definition/accounting/payments.yml index 8f52bb355..8a628d653 100644 --- a/.mock/definition/accounting/payments.yml +++ b/.mock/definition/accounting/payments.yml @@ -624,7 +624,10 @@ service: type: root.PaginatedPaymentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -705,7 +708,8 @@ service: type: root.PaymentResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -818,7 +822,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 @@ -902,7 +907,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -1025,7 +1031,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -1058,7 +1067,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -1242,7 +1252,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -1463,7 +1474,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/phoneNumbers.yml b/.mock/definition/accounting/phoneNumbers.yml index b67323851..75ad3e16e 100644 --- a/.mock/definition/accounting/phoneNumbers.yml +++ b/.mock/definition/accounting/phoneNumbers.yml @@ -33,7 +33,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: created_at: '2021-09-15T00:00:00Z' diff --git a/.mock/definition/accounting/projects.yml b/.mock/definition/accounting/projects.yml index c83c66268..add59523b 100644 --- a/.mock/definition/accounting/projects.yml +++ b/.mock/definition/accounting/projects.yml @@ -89,7 +89,10 @@ service: type: root.PaginatedProjectList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -146,7 +149,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 diff --git a/.mock/definition/accounting/purchaseOrders.yml b/.mock/definition/accounting/purchaseOrders.yml index 0e34e2edc..bc57e698c 100644 --- a/.mock/definition/accounting/purchaseOrders.yml +++ b/.mock/definition/accounting/purchaseOrders.yml @@ -634,7 +634,10 @@ service: type: root.PaginatedPurchaseOrderList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -737,7 +740,8 @@ service: type: root.PurchaseOrderResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -882,7 +886,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0048ea5b-911e-4dff-9364-92070dea62ff @@ -912,7 +917,6 @@ service: quantity: 10 item: 0958cbc6-6040-430a-848e-aafacbadf4ae account: account - tracking_category: tracking_category tracking_categories: - f1214c24-2702-4617-b74b-3ddecfc0d384 - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -935,7 +939,6 @@ service: quantity: 10 item: 249c9faa-3045-4a31-953b-8f22d3613301 account: account - tracking_category: tracking_category tracking_categories: - f1214c24-2702-4617-b74b-3ddecfc0d384 - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -1020,7 +1023,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -1049,7 +1055,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -1270,7 +1277,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/regenerateKey.yml b/.mock/definition/accounting/regenerateKey.yml index 39fe26f92..fa714152e 100644 --- a/.mock/definition/accounting/regenerateKey.yml +++ b/.mock/definition/accounting/regenerateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/accounting/scopes.yml b/.mock/definition/accounting/scopes.yml index ab81c591d..4c9904631 100644 --- a/.mock/definition/accounting/scopes.yml +++ b/.mock/definition/accounting/scopes.yml @@ -19,7 +19,9 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - response: + - headers: + X-Account-Token: '[object Object]' + response: body: common_models: - model_name: Employee @@ -60,7 +62,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: common_models: @@ -111,7 +114,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: common_models: - model_name: Employee diff --git a/.mock/definition/accounting/syncStatus.yml b/.mock/definition/accounting/syncStatus.yml index 38dcf2cea..2a5e4eb4f 100644 --- a/.mock/definition/accounting/syncStatus.yml +++ b/.mock/definition/accounting/syncStatus.yml @@ -36,7 +36,10 @@ service: type: root.PaginatedSyncStatusList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/accounting/taxRates.yml b/.mock/definition/accounting/taxRates.yml index 3ff151957..c2695fb63 100644 --- a/.mock/definition/accounting/taxRates.yml +++ b/.mock/definition/accounting/taxRates.yml @@ -75,7 +75,10 @@ service: type: root.PaginatedTaxRateList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -146,7 +149,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: b82302de-852e-4e60-b050-edf9da3b7c02 diff --git a/.mock/definition/accounting/trackingCategories.yml b/.mock/definition/accounting/trackingCategories.yml index 2e3f062f8..b63996f95 100644 --- a/.mock/definition/accounting/trackingCategories.yml +++ b/.mock/definition/accounting/trackingCategories.yml @@ -95,7 +95,10 @@ service: type: root.PaginatedTrackingCategoryList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -160,7 +163,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 diff --git a/.mock/definition/accounting/transactions.yml b/.mock/definition/accounting/transactions.yml index 94a999db9..342ce17fd 100644 --- a/.mock/definition/accounting/transactions.yml +++ b/.mock/definition/accounting/transactions.yml @@ -205,7 +205,10 @@ service: type: root.PaginatedTransactionList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -308,7 +311,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0048ea5b-911e-4dff-9364-92070dea62ff @@ -339,7 +343,6 @@ service: quantity: '10.0' item: 0958cbc6-6040-430a-848e-aafacbadf4ae account: 2b38c085-2620-4269-b5ec-75dd9095ed2c - tracking_category: tracking_category tracking_categories: - f1214c24-2702-4617-b74b-3ddecfc0d384 - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -359,7 +362,6 @@ service: quantity: '10.0' item: 249c9faa-3045-4a31-953b-8f22d3613301 account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - tracking_category: tracking_category tracking_categories: - f1214c24-2702-4617-b74b-3ddecfc0d384 - 9b840d2-686a-465a-8a8e-7b028498f8e4 diff --git a/.mock/definition/accounting/vendorCredits.yml b/.mock/definition/accounting/vendorCredits.yml index 39b414150..b8507e7c3 100644 --- a/.mock/definition/accounting/vendorCredits.yml +++ b/.mock/definition/accounting/vendorCredits.yml @@ -203,7 +203,10 @@ service: type: root.PaginatedVendorCreditList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -298,7 +301,8 @@ service: type: root.VendorCreditResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -420,7 +424,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 @@ -441,7 +446,6 @@ service: created_at: '2021-09-15T00:00:00Z' modified_at: '2021-10-16T00:00:00Z' net_amount: 25.54 - tracking_category: tracking_category tracking_categories: - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -459,7 +463,6 @@ service: created_at: '2021-09-15T00:00:00Z' modified_at: '2021-10-16T00:00:00Z' net_amount: 10 - tracking_category: tracking_category tracking_categories: - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - 9b840d2-686a-465a-8a8e-7b028498f8e4 @@ -507,7 +510,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/accounting/webhookReceivers.yml b/.mock/definition/accounting/webhookReceivers.yml index 0c90c8266..c7bb86ce9 100644 --- a/.mock/definition/accounting/webhookReceivers.yml +++ b/.mock/definition/accounting/webhookReceivers.yml @@ -16,7 +16,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - event: event @@ -48,7 +49,8 @@ service: type: root.WebhookReceiver status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: event: event is_active: true diff --git a/.mock/definition/ats/accountDetails.yml b/.mock/definition/ats/accountDetails.yml index fe37fa601..a09c48498 100644 --- a/.mock/definition/ats/accountDetails.yml +++ b/.mock/definition/ats/accountDetails.yml @@ -16,7 +16,8 @@ service: type: root.AccountDetails status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd diff --git a/.mock/definition/ats/accountToken.yml b/.mock/definition/ats/accountToken.yml index 0c372796f..3c0554212 100644 --- a/.mock/definition/ats/accountToken.yml +++ b/.mock/definition/ats/accountToken.yml @@ -22,6 +22,8 @@ service: examples: - path-parameters: public_token: public_token + headers: + X-Account-Token: '[object Object]' response: body: account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB diff --git a/.mock/definition/ats/activities.yml b/.mock/definition/ats/activities.yml index 362836ad7..2ed08a544 100644 --- a/.mock/definition/ats/activities.yml +++ b/.mock/definition/ats/activities.yml @@ -115,7 +115,10 @@ service: type: root.PaginatedActivityList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -170,7 +173,8 @@ service: type: root.ActivityResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} remote_user_id: remote_user_id @@ -262,7 +266,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 @@ -298,7 +303,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ats/applications.yml b/.mock/definition/ats/applications.yml index 4a5822f90..a6c869474 100644 --- a/.mock/definition/ats/applications.yml +++ b/.mock/definition/ats/applications.yml @@ -1426,7 +1426,10 @@ service: type: root.PaginatedApplicationList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -1498,7 +1501,8 @@ service: type: root.ApplicationResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} remote_user_id: remote_user_id @@ -1586,7 +1590,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 @@ -1655,7 +1660,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: {} response: body: @@ -1727,7 +1733,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ats/asyncPassthrough.yml b/.mock/definition/ats/asyncPassthrough.yml index 94686f10b..1ab045cf7 100644 --- a/.mock/definition/ats/asyncPassthrough.yml +++ b/.mock/definition/ats/asyncPassthrough.yml @@ -21,7 +21,8 @@ service: type: root.AsyncPassthroughReciept status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters @@ -44,7 +45,8 @@ service: examples: - path-parameters: async_passthrough_receipt_id: async_passthrough_receipt_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: method: GET diff --git a/.mock/definition/ats/attachments.yml b/.mock/definition/ats/attachments.yml index 14b45b1b2..901d2eac1 100644 --- a/.mock/definition/ats/attachments.yml +++ b/.mock/definition/ats/attachments.yml @@ -82,7 +82,10 @@ service: type: root.PaginatedAttachmentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -134,7 +137,8 @@ service: type: root.AttachmentResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} remote_user_id: remote_user_id @@ -223,7 +227,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: c640b80b-fac9-409f-aa19-1f9221aec445 @@ -256,7 +261,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ats/auditTrail.yml b/.mock/definition/ats/auditTrail.yml index 36833ffee..d5a8c6157 100644 --- a/.mock/definition/ats/auditTrail.yml +++ b/.mock/definition/ats/auditTrail.yml @@ -75,7 +75,11 @@ service: type: root.PaginatedAuditLogEventList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/ats/availableActions.yml b/.mock/definition/ats/availableActions.yml index 8e529df3f..2f7515dfa 100644 --- a/.mock/definition/ats/availableActions.yml +++ b/.mock/definition/ats/availableActions.yml @@ -16,7 +16,8 @@ service: type: root.AvailableActions status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: integration: diff --git a/.mock/definition/ats/candidates.yml b/.mock/definition/ats/candidates.yml index e5f23a792..e38f44e94 100644 --- a/.mock/definition/ats/candidates.yml +++ b/.mock/definition/ats/candidates.yml @@ -110,7 +110,10 @@ service: type: root.PaginatedCandidateList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -194,7 +197,8 @@ service: type: root.CandidateResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} remote_user_id: remote_user_id @@ -305,7 +309,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 521b18c2-4d01-4297-b451-19858d07c133 @@ -393,7 +398,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} remote_user_id: remote_user_id @@ -497,7 +503,8 @@ service: examples: - path-parameters: model_id: model_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: reason: GENERAL_CUSTOMER_REQUEST metaPatchRetrieve: @@ -516,7 +523,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -700,7 +708,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ats/deleteAccount.yml b/.mock/definition/ats/deleteAccount.yml index 6255a3934..9ffe1a710 100644 --- a/.mock/definition/ats/deleteAccount.yml +++ b/.mock/definition/ats/deleteAccount.yml @@ -10,6 +10,7 @@ service: source: openapi: openapi/openapi.yml examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/departments.yml b/.mock/definition/ats/departments.yml index 8f001f43d..ec1c4fa06 100644 --- a/.mock/definition/ats/departments.yml +++ b/.mock/definition/ats/departments.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedDepartmentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -114,7 +117,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b diff --git a/.mock/definition/ats/eeocs.yml b/.mock/definition/ats/eeocs.yml index 91dbf6b92..b14f676de 100644 --- a/.mock/definition/ats/eeocs.yml +++ b/.mock/definition/ats/eeocs.yml @@ -203,7 +203,10 @@ service: type: root.PaginatedEeocList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -273,7 +276,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: f7dd7b4f-237e-4772-8bd4-3246384c6c58 diff --git a/.mock/definition/ats/fieldMapping.yml b/.mock/definition/ats/fieldMapping.yml index 9d92fea8b..949a75b58 100644 --- a/.mock/definition/ats/fieldMapping.yml +++ b/.mock/definition/ats/fieldMapping.yml @@ -30,7 +30,8 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Activity: @@ -357,7 +358,8 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name target_field_description: this is a example description of the target field @@ -424,7 +426,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: model: @@ -506,7 +509,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: {} response: body: @@ -577,7 +581,8 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Activity: @@ -821,7 +826,8 @@ service: type: root.ExternalTargetFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Activity: diff --git a/.mock/definition/ats/forceResync.yml b/.mock/definition/ats/forceResync.yml index 8a6039921..b939eabe6 100644 --- a/.mock/definition/ats/forceResync.yml +++ b/.mock/definition/ats/forceResync.yml @@ -21,7 +21,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - model_name: Candidate diff --git a/.mock/definition/ats/generateKey.yml b/.mock/definition/ats/generateKey.yml index 40a39dcbc..c7da4da84 100644 --- a/.mock/definition/ats/generateKey.yml +++ b/.mock/definition/ats/generateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/ats/interviews.yml b/.mock/definition/ats/interviews.yml index aa95289ce..0d25c536b 100644 --- a/.mock/definition/ats/interviews.yml +++ b/.mock/definition/ats/interviews.yml @@ -152,7 +152,10 @@ service: type: root.PaginatedScheduledInterviewList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -212,7 +215,8 @@ service: type: root.ScheduledInterviewResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} remote_user_id: remote_user_id @@ -309,7 +313,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: b8faf072-98b9-4445-8a9a-6b4950efca19 @@ -350,7 +355,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ats/issues.yml b/.mock/definition/ats/issues.yml index 4984ce4ef..51de2a7d0 100644 --- a/.mock/definition/ats/issues.yml +++ b/.mock/definition/ats/issues.yml @@ -80,7 +80,11 @@ service: type: root.PaginatedIssueList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ @@ -112,6 +116,8 @@ service: examples: - path-parameters: id: id + headers: + X-Account-Token: '[object Object]' response: body: id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/.mock/definition/ats/jobInterviewStages.yml b/.mock/definition/ats/jobInterviewStages.yml index 5753b281b..d1a7f9fda 100644 --- a/.mock/definition/ats/jobInterviewStages.yml +++ b/.mock/definition/ats/jobInterviewStages.yml @@ -72,7 +72,10 @@ service: type: root.PaginatedJobInterviewStageList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -129,7 +132,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: f9813dd5-e70b-484c-91d8-00acd6065b07 diff --git a/.mock/definition/ats/jobPostings.yml b/.mock/definition/ats/jobPostings.yml index 859b5bb40..c888c890e 100644 --- a/.mock/definition/ats/jobPostings.yml +++ b/.mock/definition/ats/jobPostings.yml @@ -95,7 +95,10 @@ service: type: root.PaginatedJobPostingList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -161,7 +164,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 156a2bef-57e5-4def-8ed2-7c41bd9a554t diff --git a/.mock/definition/ats/jobs.yml b/.mock/definition/ats/jobs.yml index 7ec7441a2..b5f780afc 100644 --- a/.mock/definition/ats/jobs.yml +++ b/.mock/definition/ats/jobs.yml @@ -243,7 +243,10 @@ service: type: root.PaginatedJobList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -334,7 +337,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 @@ -427,7 +431,10 @@ service: examples: - path-parameters: job_id: job_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/ats/linkToken.yml b/.mock/definition/ats/linkToken.yml index 1548f705c..a6b770723 100644 --- a/.mock/definition/ats/linkToken.yml +++ b/.mock/definition/ats/linkToken.yml @@ -136,7 +136,9 @@ service: type: root.LinkToken status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: end_user_email_address: example@gmail.com end_user_organization_name: Test Organization end_user_origin_id: '12345' diff --git a/.mock/definition/ats/linkedAccounts.yml b/.mock/definition/ats/linkedAccounts.yml index 7acf3099c..1f9426771 100644 --- a/.mock/definition/ats/linkedAccounts.yml +++ b/.mock/definition/ats/linkedAccounts.yml @@ -107,7 +107,11 @@ service: type: root.PaginatedAccountDetailsAndActionsList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/ats/offers.yml b/.mock/definition/ats/offers.yml index cb2591c86..bfbc9bb76 100644 --- a/.mock/definition/ats/offers.yml +++ b/.mock/definition/ats/offers.yml @@ -102,7 +102,10 @@ service: type: root.PaginatedOfferList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -173,7 +176,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: dd85625c-6a59-446f-a317-6de64d83bae7 diff --git a/.mock/definition/ats/offices.yml b/.mock/definition/ats/offices.yml index 080386b86..d80099297 100644 --- a/.mock/definition/ats/offices.yml +++ b/.mock/definition/ats/offices.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedOfficeList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -115,7 +118,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 diff --git a/.mock/definition/ats/passthrough.yml b/.mock/definition/ats/passthrough.yml index 7141a6bdf..a3dff5132 100644 --- a/.mock/definition/ats/passthrough.yml +++ b/.mock/definition/ats/passthrough.yml @@ -19,7 +19,8 @@ service: type: root.RemoteResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters diff --git a/.mock/definition/ats/regenerateKey.yml b/.mock/definition/ats/regenerateKey.yml index 1ea4149a7..5db09f20b 100644 --- a/.mock/definition/ats/regenerateKey.yml +++ b/.mock/definition/ats/regenerateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/ats/rejectReasons.yml b/.mock/definition/ats/rejectReasons.yml index 1552c46c9..fc100819c 100644 --- a/.mock/definition/ats/rejectReasons.yml +++ b/.mock/definition/ats/rejectReasons.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedRejectReasonList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -114,7 +117,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 8be99a4a-f8d4-4339-bf1e-30eac970e217 diff --git a/.mock/definition/ats/scopes.yml b/.mock/definition/ats/scopes.yml index 422d3fa4e..bdaf6ed03 100644 --- a/.mock/definition/ats/scopes.yml +++ b/.mock/definition/ats/scopes.yml @@ -19,7 +19,9 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - response: + - headers: + X-Account-Token: '[object Object]' + response: body: common_models: - model_name: Employee @@ -60,7 +62,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: common_models: @@ -111,7 +114,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: common_models: - model_name: Employee diff --git a/.mock/definition/ats/scorecards.yml b/.mock/definition/ats/scorecards.yml index 6f83e854d..a5f93514f 100644 --- a/.mock/definition/ats/scorecards.yml +++ b/.mock/definition/ats/scorecards.yml @@ -119,7 +119,10 @@ service: type: root.PaginatedScorecardList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -189,7 +192,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 3eab2f17-eeb1-450d-97f0-029d8be1e06f diff --git a/.mock/definition/ats/syncStatus.yml b/.mock/definition/ats/syncStatus.yml index 99b9bd54e..81b1fa9c3 100644 --- a/.mock/definition/ats/syncStatus.yml +++ b/.mock/definition/ats/syncStatus.yml @@ -36,7 +36,10 @@ service: type: root.PaginatedSyncStatusList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/ats/tags.yml b/.mock/definition/ats/tags.yml index f6007d903..106e5cf9c 100644 --- a/.mock/definition/ats/tags.yml +++ b/.mock/definition/ats/tags.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedTagList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/ats/users.yml b/.mock/definition/ats/users.yml index 3bd2db1fe..90a2bb54d 100644 --- a/.mock/definition/ats/users.yml +++ b/.mock/definition/ats/users.yml @@ -81,7 +81,10 @@ service: type: root.PaginatedRemoteUserList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -146,7 +149,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: b82302de-852e-4e60-b050-edf9da3b7c02 diff --git a/.mock/definition/ats/webhookReceivers.yml b/.mock/definition/ats/webhookReceivers.yml index 91d2ae656..76339c9ff 100644 --- a/.mock/definition/ats/webhookReceivers.yml +++ b/.mock/definition/ats/webhookReceivers.yml @@ -16,7 +16,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - event: event @@ -48,7 +49,8 @@ service: type: root.WebhookReceiver status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: event: event is_active: true diff --git a/.mock/definition/crm/accountDetails.yml b/.mock/definition/crm/accountDetails.yml index 4fe53ba52..2d2405a1e 100644 --- a/.mock/definition/crm/accountDetails.yml +++ b/.mock/definition/crm/accountDetails.yml @@ -16,7 +16,8 @@ service: type: root.AccountDetails status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd diff --git a/.mock/definition/crm/accountToken.yml b/.mock/definition/crm/accountToken.yml index f06c40c51..a47b83c31 100644 --- a/.mock/definition/crm/accountToken.yml +++ b/.mock/definition/crm/accountToken.yml @@ -22,6 +22,8 @@ service: examples: - path-parameters: public_token: public_token + headers: + X-Account-Token: '[object Object]' response: body: account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB diff --git a/.mock/definition/crm/accounts.yml b/.mock/definition/crm/accounts.yml index f7fccdff3..2e9368254 100644 --- a/.mock/definition/crm/accounts.yml +++ b/.mock/definition/crm/accounts.yml @@ -80,7 +80,10 @@ service: type: root.PaginatedAccountList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -153,7 +156,8 @@ service: type: root.CrmAccountResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -258,7 +262,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0958cbc6-6040-430a-848e-aafacbadf4ae @@ -334,7 +339,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -416,7 +422,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -600,7 +607,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -826,7 +834,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/associationTypes.yml b/.mock/definition/crm/associationTypes.yml index 01f582d69..44da88c36 100644 --- a/.mock/definition/crm/associationTypes.yml +++ b/.mock/definition/crm/associationTypes.yml @@ -73,7 +73,10 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -124,7 +127,8 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: source_object_class: @@ -208,7 +212,8 @@ service: - path-parameters: custom_object_class_id: custom_object_class_id id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 @@ -244,7 +249,8 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/crm/associations.yml b/.mock/definition/crm/associations.yml index bf27f3eb0..983b55fed 100644 --- a/.mock/definition/crm/associations.yml +++ b/.mock/definition/crm/associations.yml @@ -81,7 +81,10 @@ service: - path-parameters: custom_object_class_id: custom_object_class_id object_id: object_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -130,7 +133,8 @@ service: source_object_id: source_object_id target_class_id: target_class_id target_object_id: target_object_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: created_at: '2021-09-15T00:00:00Z' diff --git a/.mock/definition/crm/asyncPassthrough.yml b/.mock/definition/crm/asyncPassthrough.yml index 6a7e257eb..2fc106c9c 100644 --- a/.mock/definition/crm/asyncPassthrough.yml +++ b/.mock/definition/crm/asyncPassthrough.yml @@ -21,7 +21,8 @@ service: type: root.AsyncPassthroughReciept status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters @@ -44,7 +45,8 @@ service: examples: - path-parameters: async_passthrough_receipt_id: async_passthrough_receipt_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: method: GET diff --git a/.mock/definition/crm/auditTrail.yml b/.mock/definition/crm/auditTrail.yml index 68ad5c2f6..be883e268 100644 --- a/.mock/definition/crm/auditTrail.yml +++ b/.mock/definition/crm/auditTrail.yml @@ -75,7 +75,11 @@ service: type: root.PaginatedAuditLogEventList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/crm/availableActions.yml b/.mock/definition/crm/availableActions.yml index 40338033d..71b5d8908 100644 --- a/.mock/definition/crm/availableActions.yml +++ b/.mock/definition/crm/availableActions.yml @@ -16,7 +16,8 @@ service: type: root.AvailableActions status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: integration: diff --git a/.mock/definition/crm/contacts.yml b/.mock/definition/crm/contacts.yml index 4fefc64ae..3fbcf9cd5 100644 --- a/.mock/definition/crm/contacts.yml +++ b/.mock/definition/crm/contacts.yml @@ -104,7 +104,10 @@ service: type: root.PaginatedContactList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -179,7 +182,8 @@ service: type: root.CrmContactResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -286,7 +290,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 550e8400-e29b-41d4-a716-446655440000 @@ -364,7 +369,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -451,7 +457,8 @@ service: examples: - path-parameters: model_id: model_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: reason: GENERAL_CUSTOMER_REQUEST metaPatchRetrieve: @@ -470,7 +477,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -654,7 +662,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -880,7 +889,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/customObjectClasses.yml b/.mock/definition/crm/customObjectClasses.yml index 7f6a5fbac..87b54cad3 100644 --- a/.mock/definition/crm/customObjectClasses.yml +++ b/.mock/definition/crm/customObjectClasses.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedCustomObjectClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -146,7 +149,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 diff --git a/.mock/definition/crm/customObjects.yml b/.mock/definition/crm/customObjects.yml index 4680ae98e..275d59c9e 100644 --- a/.mock/definition/crm/customObjects.yml +++ b/.mock/definition/crm/customObjects.yml @@ -73,7 +73,10 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -121,7 +124,8 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: fields: @@ -197,7 +201,8 @@ service: - path-parameters: custom_object_class_id: custom_object_class_id id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: da0b1963-be70-469c-9f8c-06a81d0fe759 @@ -230,7 +235,8 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -456,7 +462,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/deleteAccount.yml b/.mock/definition/crm/deleteAccount.yml index b0bfe1cdf..9a343bd87 100644 --- a/.mock/definition/crm/deleteAccount.yml +++ b/.mock/definition/crm/deleteAccount.yml @@ -10,6 +10,7 @@ service: source: openapi: openapi/openapi.yml examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/engagementTypes.yml b/.mock/definition/crm/engagementTypes.yml index 3dae18435..025fe8e80 100644 --- a/.mock/definition/crm/engagementTypes.yml +++ b/.mock/definition/crm/engagementTypes.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedEngagementTypeList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -117,7 +120,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 550e8400-e29b-41d4-a716-446655440000 @@ -184,7 +188,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/engagements.yml b/.mock/definition/crm/engagements.yml index de2229131..0812685b6 100644 --- a/.mock/definition/crm/engagements.yml +++ b/.mock/definition/crm/engagements.yml @@ -145,7 +145,10 @@ service: type: root.PaginatedEngagementList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -204,7 +207,8 @@ service: type: root.EngagementResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -295,7 +299,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 550e8400-e29b-41d4-a716-446655440000 @@ -357,7 +362,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -425,7 +431,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -609,7 +616,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -835,7 +843,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/fieldMapping.yml b/.mock/definition/crm/fieldMapping.yml index 5318dcf3b..81c29c9c6 100644 --- a/.mock/definition/crm/fieldMapping.yml +++ b/.mock/definition/crm/fieldMapping.yml @@ -30,7 +30,8 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Account: @@ -245,7 +246,8 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name target_field_description: this is a example description of the target field @@ -312,7 +314,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: model: @@ -394,7 +397,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: {} response: body: @@ -465,7 +469,8 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Account: @@ -611,7 +616,8 @@ service: type: root.ExternalTargetFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Account: diff --git a/.mock/definition/crm/forceResync.yml b/.mock/definition/crm/forceResync.yml index eb74ba188..32a995cb2 100644 --- a/.mock/definition/crm/forceResync.yml +++ b/.mock/definition/crm/forceResync.yml @@ -21,7 +21,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - model_name: Account diff --git a/.mock/definition/crm/generateKey.yml b/.mock/definition/crm/generateKey.yml index 233479dad..c913f239a 100644 --- a/.mock/definition/crm/generateKey.yml +++ b/.mock/definition/crm/generateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/crm/issues.yml b/.mock/definition/crm/issues.yml index ed21c69c7..85deddd4a 100644 --- a/.mock/definition/crm/issues.yml +++ b/.mock/definition/crm/issues.yml @@ -80,7 +80,11 @@ service: type: root.PaginatedIssueList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ @@ -112,6 +116,8 @@ service: examples: - path-parameters: id: id + headers: + X-Account-Token: '[object Object]' response: body: id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/.mock/definition/crm/leads.yml b/.mock/definition/crm/leads.yml index d12db2896..f6cc37af6 100644 --- a/.mock/definition/crm/leads.yml +++ b/.mock/definition/crm/leads.yml @@ -124,7 +124,10 @@ service: type: root.PaginatedLeadList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -204,7 +207,8 @@ service: type: root.LeadResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -316,7 +320,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 550e8400-e29b-41d4-a716-446655440000 @@ -380,7 +385,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -606,7 +612,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/linkToken.yml b/.mock/definition/crm/linkToken.yml index f67b68926..d01d1d249 100644 --- a/.mock/definition/crm/linkToken.yml +++ b/.mock/definition/crm/linkToken.yml @@ -136,7 +136,9 @@ service: type: root.LinkToken status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: end_user_email_address: example@gmail.com end_user_organization_name: Test Organization end_user_origin_id: '12345' diff --git a/.mock/definition/crm/linkedAccounts.yml b/.mock/definition/crm/linkedAccounts.yml index c6f4399e3..d2bf12d2a 100644 --- a/.mock/definition/crm/linkedAccounts.yml +++ b/.mock/definition/crm/linkedAccounts.yml @@ -107,7 +107,11 @@ service: type: root.PaginatedAccountDetailsAndActionsList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/crm/notes.yml b/.mock/definition/crm/notes.yml index b0acff5e5..ac7d94d1d 100644 --- a/.mock/definition/crm/notes.yml +++ b/.mock/definition/crm/notes.yml @@ -147,7 +147,10 @@ service: type: root.PaginatedNoteList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -203,7 +206,8 @@ service: type: root.NoteResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -291,7 +295,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 550e8400-e29b-41d4-a716-446655440000 @@ -331,7 +336,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -557,7 +563,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/opportunities.yml b/.mock/definition/crm/opportunities.yml index 88e8e9016..3aaaa4d0e 100644 --- a/.mock/definition/crm/opportunities.yml +++ b/.mock/definition/crm/opportunities.yml @@ -148,7 +148,10 @@ service: type: root.PaginatedOpportunityList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -207,7 +210,8 @@ service: type: root.OpportunityResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -308,7 +312,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 550e8400-e29b-41d4-a716-446655440000 @@ -370,7 +375,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -438,7 +444,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -622,7 +629,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -848,7 +856,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/passthrough.yml b/.mock/definition/crm/passthrough.yml index 902b459d1..a0a040156 100644 --- a/.mock/definition/crm/passthrough.yml +++ b/.mock/definition/crm/passthrough.yml @@ -19,7 +19,8 @@ service: type: root.RemoteResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters diff --git a/.mock/definition/crm/regenerateKey.yml b/.mock/definition/crm/regenerateKey.yml index 06a1b8568..d807b2732 100644 --- a/.mock/definition/crm/regenerateKey.yml +++ b/.mock/definition/crm/regenerateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/crm/scopes.yml b/.mock/definition/crm/scopes.yml index 67286e702..7069f3000 100644 --- a/.mock/definition/crm/scopes.yml +++ b/.mock/definition/crm/scopes.yml @@ -19,7 +19,9 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - response: + - headers: + X-Account-Token: '[object Object]' + response: body: common_models: - model_name: Employee @@ -60,7 +62,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: common_models: @@ -111,7 +114,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: common_models: - model_name: Employee diff --git a/.mock/definition/crm/stages.yml b/.mock/definition/crm/stages.yml index b9e114d9d..126f73c64 100644 --- a/.mock/definition/crm/stages.yml +++ b/.mock/definition/crm/stages.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedStageList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -126,7 +129,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0358cbc6-2040-430a-848e-aafacbadf3aa @@ -202,7 +206,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/syncStatus.yml b/.mock/definition/crm/syncStatus.yml index 52d8c36e1..8e3a610c1 100644 --- a/.mock/definition/crm/syncStatus.yml +++ b/.mock/definition/crm/syncStatus.yml @@ -36,7 +36,10 @@ service: type: root.PaginatedSyncStatusList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/tasks.yml b/.mock/definition/crm/tasks.yml index ece065166..e5b9f3b84 100644 --- a/.mock/definition/crm/tasks.yml +++ b/.mock/definition/crm/tasks.yml @@ -105,7 +105,10 @@ service: type: root.PaginatedTaskList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -162,7 +165,8 @@ service: type: root.TaskResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -251,7 +255,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 550e8400-e29b-41d4-a716-446655440000 @@ -311,7 +316,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -377,7 +383,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -561,7 +568,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -787,7 +795,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/users.yml b/.mock/definition/crm/users.yml index 05ddcfc50..ba9863c8e 100644 --- a/.mock/definition/crm/users.yml +++ b/.mock/definition/crm/users.yml @@ -72,7 +72,10 @@ service: type: root.PaginatedUserList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -131,7 +134,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0358cbc6-2040-430a-848e-aafacbadf3aa @@ -174,7 +178,8 @@ service: examples: - path-parameters: model_id: model_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: reason: GENERAL_CUSTOMER_REQUEST remoteFieldClassesList: @@ -231,7 +236,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/crm/webhookReceivers.yml b/.mock/definition/crm/webhookReceivers.yml index c68cd98bd..e01c1645b 100644 --- a/.mock/definition/crm/webhookReceivers.yml +++ b/.mock/definition/crm/webhookReceivers.yml @@ -16,7 +16,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - event: event @@ -48,7 +49,8 @@ service: type: root.WebhookReceiver status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: event: event is_active: true diff --git a/.mock/definition/filestorage/accountDetails.yml b/.mock/definition/filestorage/accountDetails.yml index 2411f37c2..944a422bf 100644 --- a/.mock/definition/filestorage/accountDetails.yml +++ b/.mock/definition/filestorage/accountDetails.yml @@ -16,7 +16,8 @@ service: type: root.AccountDetails status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd diff --git a/.mock/definition/filestorage/accountToken.yml b/.mock/definition/filestorage/accountToken.yml index 2c17a04f5..e5400279b 100644 --- a/.mock/definition/filestorage/accountToken.yml +++ b/.mock/definition/filestorage/accountToken.yml @@ -22,6 +22,8 @@ service: examples: - path-parameters: public_token: public_token + headers: + X-Account-Token: '[object Object]' response: body: account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB diff --git a/.mock/definition/filestorage/asyncPassthrough.yml b/.mock/definition/filestorage/asyncPassthrough.yml index 58df8351f..1408e0561 100644 --- a/.mock/definition/filestorage/asyncPassthrough.yml +++ b/.mock/definition/filestorage/asyncPassthrough.yml @@ -21,7 +21,8 @@ service: type: root.AsyncPassthroughReciept status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters @@ -44,7 +45,8 @@ service: examples: - path-parameters: async_passthrough_receipt_id: async_passthrough_receipt_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: method: GET diff --git a/.mock/definition/filestorage/auditTrail.yml b/.mock/definition/filestorage/auditTrail.yml index f21c35fe7..c9fb17ce9 100644 --- a/.mock/definition/filestorage/auditTrail.yml +++ b/.mock/definition/filestorage/auditTrail.yml @@ -75,7 +75,11 @@ service: type: root.PaginatedAuditLogEventList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/filestorage/availableActions.yml b/.mock/definition/filestorage/availableActions.yml index b7a5e2b10..b60bd0c81 100644 --- a/.mock/definition/filestorage/availableActions.yml +++ b/.mock/definition/filestorage/availableActions.yml @@ -16,7 +16,8 @@ service: type: root.AvailableActions status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: integration: diff --git a/.mock/definition/filestorage/deleteAccount.yml b/.mock/definition/filestorage/deleteAccount.yml index 9b6911542..cb9280c25 100644 --- a/.mock/definition/filestorage/deleteAccount.yml +++ b/.mock/definition/filestorage/deleteAccount.yml @@ -10,6 +10,7 @@ service: source: openapi: openapi/openapi.yml examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/drives.yml b/.mock/definition/filestorage/drives.yml index 969b23212..8053831fb 100644 --- a/.mock/definition/filestorage/drives.yml +++ b/.mock/definition/filestorage/drives.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedDriveList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -121,7 +124,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 diff --git a/.mock/definition/filestorage/fieldMapping.yml b/.mock/definition/filestorage/fieldMapping.yml index 0ef97a188..733789900 100644 --- a/.mock/definition/filestorage/fieldMapping.yml +++ b/.mock/definition/filestorage/fieldMapping.yml @@ -30,7 +30,8 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: File: @@ -181,7 +182,8 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name target_field_description: this is a example description of the target field @@ -248,7 +250,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: model: @@ -330,7 +333,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: {} response: body: @@ -401,7 +405,8 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: File: @@ -491,7 +496,8 @@ service: type: root.ExternalTargetFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: File: diff --git a/.mock/definition/filestorage/files.yml b/.mock/definition/filestorage/files.yml index 7230424da..97b56cdeb 100644 --- a/.mock/definition/filestorage/files.yml +++ b/.mock/definition/filestorage/files.yml @@ -150,7 +150,10 @@ service: type: root.PaginatedFileList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -215,7 +218,8 @@ service: type: root.FileStorageFileResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -307,7 +311,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 45ce474c-dhcj-43a6-754r-629f799f7d68 @@ -401,7 +406,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 @@ -473,7 +479,10 @@ service: type: root.PaginatedDownloadRequestMetaList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -496,7 +505,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/filestorage/folders.yml b/.mock/definition/filestorage/folders.yml index 50ad205bc..5ad69d065 100644 --- a/.mock/definition/filestorage/folders.yml +++ b/.mock/definition/filestorage/folders.yml @@ -113,7 +113,10 @@ service: type: root.PaginatedFolderList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -169,7 +172,8 @@ service: type: root.FileStorageFolderResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -252,7 +256,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: e021f7a7-74fc-4487-8e12-14180c92d3b7 @@ -290,7 +295,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/filestorage/forceResync.yml b/.mock/definition/filestorage/forceResync.yml index 644c49b81..6dc20ca9a 100644 --- a/.mock/definition/filestorage/forceResync.yml +++ b/.mock/definition/filestorage/forceResync.yml @@ -21,7 +21,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - model_name: File diff --git a/.mock/definition/filestorage/generateKey.yml b/.mock/definition/filestorage/generateKey.yml index 04ac41b87..06b1c8d73 100644 --- a/.mock/definition/filestorage/generateKey.yml +++ b/.mock/definition/filestorage/generateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/filestorage/groups.yml b/.mock/definition/filestorage/groups.yml index 247ce30a9..75e3efbd8 100644 --- a/.mock/definition/filestorage/groups.yml +++ b/.mock/definition/filestorage/groups.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedGroupList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -128,7 +131,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 5624aceb-0ea2-4864-ba08-354ac56b9884 diff --git a/.mock/definition/filestorage/issues.yml b/.mock/definition/filestorage/issues.yml index b6a1d19e5..19a40bd96 100644 --- a/.mock/definition/filestorage/issues.yml +++ b/.mock/definition/filestorage/issues.yml @@ -80,7 +80,11 @@ service: type: root.PaginatedIssueList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ @@ -112,6 +116,8 @@ service: examples: - path-parameters: id: id + headers: + X-Account-Token: '[object Object]' response: body: id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/.mock/definition/filestorage/linkToken.yml b/.mock/definition/filestorage/linkToken.yml index fda54a0c7..96af04e81 100644 --- a/.mock/definition/filestorage/linkToken.yml +++ b/.mock/definition/filestorage/linkToken.yml @@ -119,7 +119,9 @@ service: type: root.LinkToken status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: end_user_email_address: example@gmail.com end_user_organization_name: Test Organization end_user_origin_id: '12345' diff --git a/.mock/definition/filestorage/linkedAccounts.yml b/.mock/definition/filestorage/linkedAccounts.yml index d8fb0eb69..3c6565103 100644 --- a/.mock/definition/filestorage/linkedAccounts.yml +++ b/.mock/definition/filestorage/linkedAccounts.yml @@ -107,7 +107,11 @@ service: type: root.PaginatedAccountDetailsAndActionsList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/filestorage/passthrough.yml b/.mock/definition/filestorage/passthrough.yml index 432034bc2..71b42437d 100644 --- a/.mock/definition/filestorage/passthrough.yml +++ b/.mock/definition/filestorage/passthrough.yml @@ -19,7 +19,8 @@ service: type: root.RemoteResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters diff --git a/.mock/definition/filestorage/regenerateKey.yml b/.mock/definition/filestorage/regenerateKey.yml index cd80f783a..b251851a5 100644 --- a/.mock/definition/filestorage/regenerateKey.yml +++ b/.mock/definition/filestorage/regenerateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/filestorage/scopes.yml b/.mock/definition/filestorage/scopes.yml index a48a1642c..b6b40f3ec 100644 --- a/.mock/definition/filestorage/scopes.yml +++ b/.mock/definition/filestorage/scopes.yml @@ -19,7 +19,9 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - response: + - headers: + X-Account-Token: '[object Object]' + response: body: common_models: - model_name: Employee @@ -60,7 +62,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: common_models: @@ -111,7 +114,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: common_models: - model_name: Employee diff --git a/.mock/definition/filestorage/syncStatus.yml b/.mock/definition/filestorage/syncStatus.yml index 53140e4d7..a35bc7c6a 100644 --- a/.mock/definition/filestorage/syncStatus.yml +++ b/.mock/definition/filestorage/syncStatus.yml @@ -36,7 +36,10 @@ service: type: root.PaginatedSyncStatusList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/filestorage/users.yml b/.mock/definition/filestorage/users.yml index 6921bd654..38b7714cf 100644 --- a/.mock/definition/filestorage/users.yml +++ b/.mock/definition/filestorage/users.yml @@ -67,7 +67,10 @@ service: type: root.PaginatedUserList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -119,7 +122,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 83902e75-4362-4803-b76c-a7d6be292cbd diff --git a/.mock/definition/filestorage/webhookReceivers.yml b/.mock/definition/filestorage/webhookReceivers.yml index 3b0bcace0..6b965003d 100644 --- a/.mock/definition/filestorage/webhookReceivers.yml +++ b/.mock/definition/filestorage/webhookReceivers.yml @@ -16,7 +16,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - event: event @@ -48,7 +49,8 @@ service: type: root.WebhookReceiver status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: event: event is_active: true diff --git a/.mock/definition/hris/accountDetails.yml b/.mock/definition/hris/accountDetails.yml index 2d4833d38..140409e52 100644 --- a/.mock/definition/hris/accountDetails.yml +++ b/.mock/definition/hris/accountDetails.yml @@ -16,7 +16,8 @@ service: type: root.AccountDetails status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd diff --git a/.mock/definition/hris/accountToken.yml b/.mock/definition/hris/accountToken.yml index 84185ffb1..022851f23 100644 --- a/.mock/definition/hris/accountToken.yml +++ b/.mock/definition/hris/accountToken.yml @@ -22,6 +22,8 @@ service: examples: - path-parameters: public_token: public_token + headers: + X-Account-Token: '[object Object]' response: body: account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB diff --git a/.mock/definition/hris/asyncPassthrough.yml b/.mock/definition/hris/asyncPassthrough.yml index 841c4d914..9cb0b9413 100644 --- a/.mock/definition/hris/asyncPassthrough.yml +++ b/.mock/definition/hris/asyncPassthrough.yml @@ -21,7 +21,8 @@ service: type: root.AsyncPassthroughReciept status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters @@ -44,7 +45,8 @@ service: examples: - path-parameters: async_passthrough_receipt_id: async_passthrough_receipt_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: method: GET diff --git a/.mock/definition/hris/auditTrail.yml b/.mock/definition/hris/auditTrail.yml index 19e653eae..684b7e5d1 100644 --- a/.mock/definition/hris/auditTrail.yml +++ b/.mock/definition/hris/auditTrail.yml @@ -75,7 +75,11 @@ service: type: root.PaginatedAuditLogEventList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/hris/availableActions.yml b/.mock/definition/hris/availableActions.yml index 74b6e655d..e03e84f26 100644 --- a/.mock/definition/hris/availableActions.yml +++ b/.mock/definition/hris/availableActions.yml @@ -16,7 +16,8 @@ service: type: root.AvailableActions status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: integration: diff --git a/.mock/definition/hris/bankInfo.yml b/.mock/definition/hris/bankInfo.yml index d8d8fc216..872097f9e 100644 --- a/.mock/definition/hris/bankInfo.yml +++ b/.mock/definition/hris/bankInfo.yml @@ -115,7 +115,10 @@ service: type: root.PaginatedBankInfoList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -185,7 +188,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d diff --git a/.mock/definition/hris/benefits.yml b/.mock/definition/hris/benefits.yml index 2a98a3781..a4ad2db24 100644 --- a/.mock/definition/hris/benefits.yml +++ b/.mock/definition/hris/benefits.yml @@ -74,7 +74,10 @@ service: type: root.PaginatedBenefitList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -86,7 +89,6 @@ service: modified_at: '2021-10-16T00:00:00Z' employee: employee provider_name: Blue Shield of California - benefit_plan_type: benefit_plan_type employee_contribution: 23.65 company_contribution: 150 start_date: '2020-11-15T00:59:25Z' @@ -136,7 +138,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 @@ -145,7 +148,6 @@ service: modified_at: '2021-10-16T00:00:00Z' employee: employee provider_name: Blue Shield of California - benefit_plan_type: benefit_plan_type employee_contribution: 23.65 company_contribution: 150 start_date: '2020-11-15T00:59:25Z' diff --git a/.mock/definition/hris/companies.yml b/.mock/definition/hris/companies.yml index 3b107952f..cb3881df5 100644 --- a/.mock/definition/hris/companies.yml +++ b/.mock/definition/hris/companies.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedCompanyList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -119,7 +122,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 1b998423-db0a-4037-a4cf-f79c60cb67b3 diff --git a/.mock/definition/hris/deleteAccount.yml b/.mock/definition/hris/deleteAccount.yml index d8b1e45ca..fb59bf5f6 100644 --- a/.mock/definition/hris/deleteAccount.yml +++ b/.mock/definition/hris/deleteAccount.yml @@ -10,6 +10,7 @@ service: source: openapi: openapi/openapi.yml examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/dependents.yml b/.mock/definition/hris/dependents.yml index a4254ddd6..bab4360c1 100644 --- a/.mock/definition/hris/dependents.yml +++ b/.mock/definition/hris/dependents.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedDependentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -134,7 +137,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 025fjlc6-6000-430a-848e-aafacbadf4fe diff --git a/.mock/definition/hris/employeePayrollRuns.yml b/.mock/definition/hris/employeePayrollRuns.yml index c4ffb0b90..f6f53b281 100644 --- a/.mock/definition/hris/employeePayrollRuns.yml +++ b/.mock/definition/hris/employeePayrollRuns.yml @@ -116,7 +116,10 @@ service: type: root.PaginatedEmployeePayrollRunList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -206,7 +209,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d diff --git a/.mock/definition/hris/employees.yml b/.mock/definition/hris/employees.yml index bd50cfa6d..df2cd00f7 100644 --- a/.mock/definition/hris/employees.yml +++ b/.mock/definition/hris/employees.yml @@ -1320,7 +1320,10 @@ service: type: root.PaginatedEmployeeList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -1347,14 +1350,12 @@ service: home_location: home_location work_location: work_location manager: manager - team: team pay_group: pay_group ssn: '1234567890' gender: MALE ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE marital_status: SINGLE date_of_birth: '1990-11-10T00:00:00Z' - hire_date: '2020-10-10T00:00:00Z' start_date: '2020-10-11T00:00:00Z' remote_created_at: '2020-10-11T00:00:00Z' employment_status: ACTIVE @@ -1399,7 +1400,8 @@ service: type: root.EmployeeResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -1426,14 +1428,12 @@ service: home_location: home_location work_location: work_location manager: manager - team: team pay_group: pay_group ssn: '1234567890' gender: MALE ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE marital_status: SINGLE date_of_birth: '1990-11-10T00:00:00Z' - hire_date: '2020-10-10T00:00:00Z' start_date: '2020-10-11T00:00:00Z' remote_created_at: '2020-10-11T00:00:00Z' employment_status: ACTIVE @@ -1520,7 +1520,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0958cbc6-6040-430a-848e-aafacbadf4ae @@ -1544,14 +1545,12 @@ service: home_location: home_location work_location: work_location manager: manager - team: team pay_group: pay_group ssn: '1234567890' gender: MALE ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE marital_status: SINGLE date_of_birth: '1990-11-10T00:00:00Z' - hire_date: '2020-10-10T00:00:00Z' start_date: '2020-10-11T00:00:00Z' remote_created_at: '2020-10-11T00:00:00Z' employment_status: ACTIVE @@ -1596,7 +1595,8 @@ service: examples: - path-parameters: model_id: model_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: reason: GENERAL_CUSTOMER_REQUEST metaPostRetrieve: @@ -1611,7 +1611,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/hris/employerBenefits.yml b/.mock/definition/hris/employerBenefits.yml index f110617fe..c8b0023c3 100644 --- a/.mock/definition/hris/employerBenefits.yml +++ b/.mock/definition/hris/employerBenefits.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedEmployerBenefitList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -115,7 +118,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 025fjlc6-6000-430a-848e-aafacbadf4fele diff --git a/.mock/definition/hris/employments.yml b/.mock/definition/hris/employments.yml index f676c7df4..d653306f9 100644 --- a/.mock/definition/hris/employments.yml +++ b/.mock/definition/hris/employments.yml @@ -232,7 +232,10 @@ service: type: root.PaginatedEmploymentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -306,7 +309,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 diff --git a/.mock/definition/hris/fieldMapping.yml b/.mock/definition/hris/fieldMapping.yml index 2c83b146d..1a222f9fe 100644 --- a/.mock/definition/hris/fieldMapping.yml +++ b/.mock/definition/hris/fieldMapping.yml @@ -30,7 +30,8 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Benefit: @@ -357,7 +358,8 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name target_field_description: this is a example description of the target field @@ -424,7 +426,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: model: @@ -506,7 +509,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: {} response: body: @@ -577,7 +581,8 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Benefit: @@ -821,7 +826,8 @@ service: type: root.ExternalTargetFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Benefit: diff --git a/.mock/definition/hris/forceResync.yml b/.mock/definition/hris/forceResync.yml index ccae8e7b1..3871daeb4 100644 --- a/.mock/definition/hris/forceResync.yml +++ b/.mock/definition/hris/forceResync.yml @@ -21,7 +21,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - model_name: Employee diff --git a/.mock/definition/hris/generateKey.yml b/.mock/definition/hris/generateKey.yml index 94a399fc6..18c4f7c37 100644 --- a/.mock/definition/hris/generateKey.yml +++ b/.mock/definition/hris/generateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/hris/groups.yml b/.mock/definition/hris/groups.yml index 942ebedfc..a9bc5589d 100644 --- a/.mock/definition/hris/groups.yml +++ b/.mock/definition/hris/groups.yml @@ -91,7 +91,10 @@ service: type: root.PaginatedGroupList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -154,7 +157,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 134e0111-0f67-44f6-98f0-597000290bb3 diff --git a/.mock/definition/hris/issues.yml b/.mock/definition/hris/issues.yml index 9fd39ae26..d9de53064 100644 --- a/.mock/definition/hris/issues.yml +++ b/.mock/definition/hris/issues.yml @@ -80,7 +80,11 @@ service: type: root.PaginatedIssueList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ @@ -112,6 +116,8 @@ service: examples: - path-parameters: id: id + headers: + X-Account-Token: '[object Object]' response: body: id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/.mock/definition/hris/linkToken.yml b/.mock/definition/hris/linkToken.yml index c83a57e8a..766171de3 100644 --- a/.mock/definition/hris/linkToken.yml +++ b/.mock/definition/hris/linkToken.yml @@ -136,7 +136,9 @@ service: type: root.LinkToken status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: end_user_email_address: example@gmail.com end_user_organization_name: Test Organization end_user_origin_id: '12345' diff --git a/.mock/definition/hris/linkedAccounts.yml b/.mock/definition/hris/linkedAccounts.yml index 3ed63936b..5d4c897d7 100644 --- a/.mock/definition/hris/linkedAccounts.yml +++ b/.mock/definition/hris/linkedAccounts.yml @@ -107,7 +107,11 @@ service: type: root.PaginatedAccountDetailsAndActionsList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/hris/locations.yml b/.mock/definition/hris/locations.yml index a4c2f9b6b..d52172229 100644 --- a/.mock/definition/hris/locations.yml +++ b/.mock/definition/hris/locations.yml @@ -120,7 +120,10 @@ service: type: root.PaginatedLocationList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -188,7 +191,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: f5e6a151-f44e-449a-afb1-8fd781905958 diff --git a/.mock/definition/hris/passthrough.yml b/.mock/definition/hris/passthrough.yml index 602b2cd67..fbe19301b 100644 --- a/.mock/definition/hris/passthrough.yml +++ b/.mock/definition/hris/passthrough.yml @@ -19,7 +19,8 @@ service: type: root.RemoteResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters diff --git a/.mock/definition/hris/payGroups.yml b/.mock/definition/hris/payGroups.yml index 981803d8e..dd031706f 100644 --- a/.mock/definition/hris/payGroups.yml +++ b/.mock/definition/hris/payGroups.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedPayGroupList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -114,7 +117,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d diff --git a/.mock/definition/hris/payrollRuns.yml b/.mock/definition/hris/payrollRuns.yml index b4414e439..8687f6d58 100644 --- a/.mock/definition/hris/payrollRuns.yml +++ b/.mock/definition/hris/payrollRuns.yml @@ -153,7 +153,10 @@ service: type: root.PaginatedPayrollRunList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -217,7 +220,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 37336947-b3d4-4a4c-a310-ab6ab510e079 diff --git a/.mock/definition/hris/regenerateKey.yml b/.mock/definition/hris/regenerateKey.yml index e29e77d39..b9daa8b26 100644 --- a/.mock/definition/hris/regenerateKey.yml +++ b/.mock/definition/hris/regenerateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/hris/scopes.yml b/.mock/definition/hris/scopes.yml index 59ec6a77b..31252ad4d 100644 --- a/.mock/definition/hris/scopes.yml +++ b/.mock/definition/hris/scopes.yml @@ -19,7 +19,9 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - response: + - headers: + X-Account-Token: '[object Object]' + response: body: common_models: - model_name: Employee @@ -60,7 +62,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: common_models: @@ -111,7 +114,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: common_models: - model_name: Employee diff --git a/.mock/definition/hris/syncStatus.yml b/.mock/definition/hris/syncStatus.yml index c7e03e66a..cca7aca26 100644 --- a/.mock/definition/hris/syncStatus.yml +++ b/.mock/definition/hris/syncStatus.yml @@ -36,7 +36,10 @@ service: type: root.PaginatedSyncStatusList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/hris/teams.yml b/.mock/definition/hris/teams.yml index 4cb87414c..902b49a31 100644 --- a/.mock/definition/hris/teams.yml +++ b/.mock/definition/hris/teams.yml @@ -72,7 +72,10 @@ service: type: root.PaginatedTeamList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -128,7 +131,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 13a72919-9fae-4f54-81ca-ddfd8712a1ba diff --git a/.mock/definition/hris/timeOff.yml b/.mock/definition/hris/timeOff.yml index 94818112c..6ed9b7853 100644 --- a/.mock/definition/hris/timeOff.yml +++ b/.mock/definition/hris/timeOff.yml @@ -236,7 +236,10 @@ service: type: root.PaginatedTimeOffList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -292,7 +295,8 @@ service: type: root.TimeOffResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -385,7 +389,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 91b2b905-e866-40c8-8be2-efe53827a0aa @@ -423,7 +428,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/hris/timeOffBalances.yml b/.mock/definition/hris/timeOffBalances.yml index 509df3618..22ad8176a 100644 --- a/.mock/definition/hris/timeOffBalances.yml +++ b/.mock/definition/hris/timeOffBalances.yml @@ -112,7 +112,10 @@ service: type: root.PaginatedTimeOffBalanceList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -180,7 +183,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 91b2b905-e866-40c8-8be2-efe53827a0aa diff --git a/.mock/definition/hris/timesheetEntries.yml b/.mock/definition/hris/timesheetEntries.yml index 69380ef45..62f532659 100644 --- a/.mock/definition/hris/timesheetEntries.yml +++ b/.mock/definition/hris/timesheetEntries.yml @@ -106,7 +106,10 @@ service: type: root.PaginatedTimesheetEntryList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -157,7 +160,8 @@ service: type: root.TimesheetEntryResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -235,7 +239,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 91b2b905-e866-40c8-8be2-efe53827a0aa @@ -268,7 +273,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/hris/webhookReceivers.yml b/.mock/definition/hris/webhookReceivers.yml index 05eae39d7..62fbcab54 100644 --- a/.mock/definition/hris/webhookReceivers.yml +++ b/.mock/definition/hris/webhookReceivers.yml @@ -16,7 +16,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - event: event @@ -48,7 +49,8 @@ service: type: root.WebhookReceiver status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: event: event is_active: true diff --git a/.mock/definition/ticketing/accountDetails.yml b/.mock/definition/ticketing/accountDetails.yml index 1cd26dd4b..4204619fd 100644 --- a/.mock/definition/ticketing/accountDetails.yml +++ b/.mock/definition/ticketing/accountDetails.yml @@ -16,7 +16,8 @@ service: type: root.AccountDetails status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd diff --git a/.mock/definition/ticketing/accountToken.yml b/.mock/definition/ticketing/accountToken.yml index e3b505e57..057dc6d63 100644 --- a/.mock/definition/ticketing/accountToken.yml +++ b/.mock/definition/ticketing/accountToken.yml @@ -22,6 +22,8 @@ service: examples: - path-parameters: public_token: public_token + headers: + X-Account-Token: '[object Object]' response: body: account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB diff --git a/.mock/definition/ticketing/accounts.yml b/.mock/definition/ticketing/accounts.yml index 9dc3f7a81..4f695f73a 100644 --- a/.mock/definition/ticketing/accounts.yml +++ b/.mock/definition/ticketing/accounts.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedAccountList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -117,7 +120,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 17a54124-287f-494d-965e-3c5b330c9a68 diff --git a/.mock/definition/ticketing/asyncPassthrough.yml b/.mock/definition/ticketing/asyncPassthrough.yml index 0a2001fe1..02724e93f 100644 --- a/.mock/definition/ticketing/asyncPassthrough.yml +++ b/.mock/definition/ticketing/asyncPassthrough.yml @@ -21,7 +21,8 @@ service: type: root.AsyncPassthroughReciept status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters @@ -44,7 +45,8 @@ service: examples: - path-parameters: async_passthrough_receipt_id: async_passthrough_receipt_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: method: GET diff --git a/.mock/definition/ticketing/attachments.yml b/.mock/definition/ticketing/attachments.yml index 9a8a8a9c5..671474bf4 100644 --- a/.mock/definition/ticketing/attachments.yml +++ b/.mock/definition/ticketing/attachments.yml @@ -77,7 +77,10 @@ service: type: root.PaginatedAttachmentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -128,7 +131,8 @@ service: type: root.TicketingAttachmentResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -206,7 +210,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 17a54124-287f-494d-965e-3c5b330c9a68 @@ -270,7 +275,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ticketing/auditTrail.yml b/.mock/definition/ticketing/auditTrail.yml index 82660fae0..5b42e8b82 100644 --- a/.mock/definition/ticketing/auditTrail.yml +++ b/.mock/definition/ticketing/auditTrail.yml @@ -75,7 +75,11 @@ service: type: root.PaginatedAuditLogEventList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/ticketing/availableActions.yml b/.mock/definition/ticketing/availableActions.yml index 745b76c72..750b5faab 100644 --- a/.mock/definition/ticketing/availableActions.yml +++ b/.mock/definition/ticketing/availableActions.yml @@ -16,7 +16,8 @@ service: type: root.AvailableActions status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: integration: diff --git a/.mock/definition/ticketing/collections.yml b/.mock/definition/ticketing/collections.yml index dbf6f1317..0861c8255 100644 --- a/.mock/definition/ticketing/collections.yml +++ b/.mock/definition/ticketing/collections.yml @@ -87,7 +87,10 @@ service: type: root.PaginatedCollectionList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -162,7 +165,10 @@ service: examples: - path-parameters: collection_id: collection_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -218,7 +224,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d diff --git a/.mock/definition/ticketing/comments.yml b/.mock/definition/ticketing/comments.yml index 71a70dc5b..7c789021f 100644 --- a/.mock/definition/ticketing/comments.yml +++ b/.mock/definition/ticketing/comments.yml @@ -108,7 +108,10 @@ service: type: root.PaginatedCommentList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -164,7 +167,8 @@ service: type: root.CommentResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -247,7 +251,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0958cbc6-6040-430a-848e-aafacbadf4ae @@ -285,7 +290,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ticketing/contacts.yml b/.mock/definition/ticketing/contacts.yml index e4a13d7c4..6bc83943d 100644 --- a/.mock/definition/ticketing/contacts.yml +++ b/.mock/definition/ticketing/contacts.yml @@ -69,7 +69,10 @@ service: type: root.PaginatedContactList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -119,7 +122,8 @@ service: type: root.TicketingContactResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -196,7 +200,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 17a54124-287f-494d-965e-3c5b330c9a68 @@ -230,7 +235,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: diff --git a/.mock/definition/ticketing/deleteAccount.yml b/.mock/definition/ticketing/deleteAccount.yml index b2d1911dd..021acbdea 100644 --- a/.mock/definition/ticketing/deleteAccount.yml +++ b/.mock/definition/ticketing/deleteAccount.yml @@ -10,6 +10,7 @@ service: source: openapi: openapi/openapi.yml examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/fieldMapping.yml b/.mock/definition/ticketing/fieldMapping.yml index 3051c3fcc..8721c1c27 100644 --- a/.mock/definition/ticketing/fieldMapping.yml +++ b/.mock/definition/ticketing/fieldMapping.yml @@ -30,7 +30,8 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Ticket: @@ -277,7 +278,8 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name target_field_description: this is a example description of the target field @@ -344,7 +346,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: model: @@ -426,7 +429,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id - headers: {} + headers: + X-Account-Token: X-Account-Token request: {} response: body: @@ -497,7 +501,8 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Ticket: @@ -671,7 +676,8 @@ service: type: root.ExternalTargetFieldApiResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: Ticket: diff --git a/.mock/definition/ticketing/forceResync.yml b/.mock/definition/ticketing/forceResync.yml index a9669fa27..39b442777 100644 --- a/.mock/definition/ticketing/forceResync.yml +++ b/.mock/definition/ticketing/forceResync.yml @@ -21,7 +21,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - model_name: Ticket diff --git a/.mock/definition/ticketing/generateKey.yml b/.mock/definition/ticketing/generateKey.yml index 54e7585ca..03e42e8e0 100644 --- a/.mock/definition/ticketing/generateKey.yml +++ b/.mock/definition/ticketing/generateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/ticketing/issues.yml b/.mock/definition/ticketing/issues.yml index badd03c17..22c452d49 100644 --- a/.mock/definition/ticketing/issues.yml +++ b/.mock/definition/ticketing/issues.yml @@ -80,7 +80,11 @@ service: type: root.PaginatedIssueList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ @@ -112,6 +116,8 @@ service: examples: - path-parameters: id: id + headers: + X-Account-Token: '[object Object]' response: body: id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/.mock/definition/ticketing/linkToken.yml b/.mock/definition/ticketing/linkToken.yml index 908ed5849..b3c797379 100644 --- a/.mock/definition/ticketing/linkToken.yml +++ b/.mock/definition/ticketing/linkToken.yml @@ -136,7 +136,9 @@ service: type: root.LinkToken status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: end_user_email_address: example@gmail.com end_user_organization_name: Test Organization end_user_origin_id: '12345' diff --git a/.mock/definition/ticketing/linkedAccounts.yml b/.mock/definition/ticketing/linkedAccounts.yml index 072cf0e3d..a95639780 100644 --- a/.mock/definition/ticketing/linkedAccounts.yml +++ b/.mock/definition/ticketing/linkedAccounts.yml @@ -107,7 +107,11 @@ service: type: root.PaginatedAccountDetailsAndActionsList status-code: 200 examples: - - response: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ diff --git a/.mock/definition/ticketing/passthrough.yml b/.mock/definition/ticketing/passthrough.yml index 44434d155..f20522bf5 100644 --- a/.mock/definition/ticketing/passthrough.yml +++ b/.mock/definition/ticketing/passthrough.yml @@ -19,7 +19,8 @@ service: type: root.RemoteResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: method: GET path: /scooters diff --git a/.mock/definition/ticketing/projects.yml b/.mock/definition/ticketing/projects.yml index dd7493460..7623e288c 100644 --- a/.mock/definition/ticketing/projects.yml +++ b/.mock/definition/ticketing/projects.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedProjectList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -113,7 +116,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d @@ -180,7 +184,10 @@ service: examples: - path-parameters: parent_id: parent_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/ticketing/regenerateKey.yml b/.mock/definition/ticketing/regenerateKey.yml index 5dab779d7..1697dc883 100644 --- a/.mock/definition/ticketing/regenerateKey.yml +++ b/.mock/definition/ticketing/regenerateKey.yml @@ -26,7 +26,9 @@ service: type: root.RemoteKey status-code: 200 examples: - - request: + - headers: + X-Account-Token: '[object Object]' + request: name: Remote Deployment Key 1 response: body: diff --git a/.mock/definition/ticketing/roles.yml b/.mock/definition/ticketing/roles.yml index 09eb46802..38784053b 100644 --- a/.mock/definition/ticketing/roles.yml +++ b/.mock/definition/ticketing/roles.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedRoleList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -117,7 +120,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 23454124-387f-494d-265e-345b330c9123 diff --git a/.mock/definition/ticketing/scopes.yml b/.mock/definition/ticketing/scopes.yml index 118666544..61201cbfd 100644 --- a/.mock/definition/ticketing/scopes.yml +++ b/.mock/definition/ticketing/scopes.yml @@ -19,7 +19,9 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - response: + - headers: + X-Account-Token: '[object Object]' + response: body: common_models: - model_name: Employee @@ -60,7 +62,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: common_models: @@ -111,7 +114,8 @@ service: type: root.CommonModelScopeApi status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: common_models: - model_name: Employee diff --git a/.mock/definition/ticketing/syncStatus.yml b/.mock/definition/ticketing/syncStatus.yml index 5b49f2a35..5cc91fe76 100644 --- a/.mock/definition/ticketing/syncStatus.yml +++ b/.mock/definition/ticketing/syncStatus.yml @@ -36,7 +36,10 @@ service: type: root.PaginatedSyncStatusList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/ticketing/tags.yml b/.mock/definition/ticketing/tags.yml index 7ebaf1579..d8046d5ff 100644 --- a/.mock/definition/ticketing/tags.yml +++ b/.mock/definition/ticketing/tags.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedTagList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -112,7 +115,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: remote_id: '19202938' diff --git a/.mock/definition/ticketing/teams.yml b/.mock/definition/ticketing/teams.yml index 47bcb682c..0f6096db3 100644 --- a/.mock/definition/ticketing/teams.yml +++ b/.mock/definition/ticketing/teams.yml @@ -64,7 +64,10 @@ service: type: root.PaginatedTeamList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -113,7 +116,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 17a54124-287f-494d-965e-3c5b330c9a68 diff --git a/.mock/definition/ticketing/tickets.yml b/.mock/definition/ticketing/tickets.yml index 8b7632a58..07c87379f 100644 --- a/.mock/definition/ticketing/tickets.yml +++ b/.mock/definition/ticketing/tickets.yml @@ -1276,7 +1276,10 @@ service: type: root.PaginatedTicketList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -1355,7 +1358,8 @@ service: type: root.TicketResponse status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -1476,7 +1480,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 0958cbc6-6040-430a-848e-aafacbadf4ae @@ -1560,7 +1565,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token request: model: {} response: @@ -1684,7 +1690,10 @@ service: examples: - path-parameters: ticket_id: ticket_id - headers: {} + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -1712,7 +1721,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -1905,7 +1915,8 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: request_schema: @@ -2131,7 +2142,10 @@ service: type: root.PaginatedRemoteFieldClassList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw diff --git a/.mock/definition/ticketing/users.yml b/.mock/definition/ticketing/users.yml index 76cfbe5fa..05094917f 100644 --- a/.mock/definition/ticketing/users.yml +++ b/.mock/definition/ticketing/users.yml @@ -94,7 +94,10 @@ service: type: root.PaginatedUserList status-code: 200 examples: - - headers: {} + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token response: body: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -155,7 +158,8 @@ service: examples: - path-parameters: id: id - headers: {} + headers: + X-Account-Token: X-Account-Token response: body: id: 17a54124-287f-494d-965e-3c5b330c9a68 diff --git a/.mock/definition/ticketing/webhookReceivers.yml b/.mock/definition/ticketing/webhookReceivers.yml index 54b5126ac..454c1a98e 100644 --- a/.mock/definition/ticketing/webhookReceivers.yml +++ b/.mock/definition/ticketing/webhookReceivers.yml @@ -16,7 +16,8 @@ service: type: list status-code: 200 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token response: body: - event: event @@ -48,7 +49,8 @@ service: type: root.WebhookReceiver status-code: 201 examples: - - headers: {} + - headers: + X-Account-Token: X-Account-Token request: event: event is_active: true diff --git a/.mock/fern.config.json b/.mock/fern.config.json index c4faf103e..43adf15e6 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "merge", - "version" : "0.63.28" + "version" : "0.66.29" } \ No newline at end of file diff --git a/.npmignore b/.npmignore index 6db0876c4..383dd3695 100644 --- a/.npmignore +++ b/.npmignore @@ -6,4 +6,5 @@ tests .fernignore .prettierrc.yml tsconfig.json -yarn.lock \ No newline at end of file +yarn.lock +pnpm-lock.yaml \ No newline at end of file diff --git a/package.json b/package.json index dc8ace4f4..8b5d24221 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mergeapi/merge-node-client", - "version": "2.1.2", + "version": "2.1.3", "private": false, "repository": "github:merge-api/merge-node-client", "main": "./index.js", diff --git a/reference.md b/reference.md index 7da5d9f3a..d328cf66c 100644 --- a/reference.md +++ b/reference.md @@ -152,7 +152,9 @@ Returns a list of `Activity` objects.
```typescript -await client.ats.activities.list(); +await client.ats.activities.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -409,7 +411,9 @@ Returns a list of `Application` objects.
```typescript -await client.ats.applications.list(); +await client.ats.applications.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -879,7 +883,9 @@ Returns a list of `Attachment` objects.
```typescript -await client.ats.attachments.list(); +await client.ats.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -1136,7 +1142,9 @@ Gets a list of audit trail events.
```typescript -await client.ats.auditTrail.list(); +await client.ats.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -1258,7 +1266,9 @@ Returns a list of `Candidate` objects.
```typescript -await client.ats.candidates.list(); +await client.ats.candidates.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -1983,7 +1993,9 @@ Returns a list of `Department` objects.
```typescript -await client.ats.departments.list(); +await client.ats.departments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -2119,7 +2131,9 @@ Returns a list of `EEOC` objects.
```typescript -await client.ats.eeocs.list(); +await client.ats.eeocs.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -2709,7 +2723,9 @@ Returns a list of `ScheduledInterview` objects.
```typescript -await client.ats.interviews.list(); +await client.ats.interviews.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -2966,7 +2982,9 @@ Gets all issues for Organization.
```typescript -await client.ats.issues.list(); +await client.ats.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -3094,7 +3112,9 @@ Returns a list of `JobInterviewStage` objects.
```typescript -await client.ats.jobInterviewStages.list(); +await client.ats.jobInterviewStages.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -3230,7 +3250,9 @@ Returns a list of `JobPosting` objects.
```typescript -await client.ats.jobPostings.list(); +await client.ats.jobPostings.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -3366,7 +3388,9 @@ Returns a list of `Job` objects.
```typescript -await client.ats.jobs.list(); +await client.ats.jobs.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -3500,7 +3524,9 @@ Returns a list of `ScreeningQuestion` objects.
```typescript -await client.ats.jobs.screeningQuestionsList("job_id"); +await client.ats.jobs.screeningQuestionsList("job_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -3643,7 +3669,9 @@ List linked accounts for your organization.
```typescript -await client.ats.linkedAccounts.list(); +await client.ats.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -3708,7 +3736,9 @@ Returns a list of `Offer` objects.
```typescript -await client.ats.offers.list(); +await client.ats.offers.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -3844,7 +3874,9 @@ Returns a list of `Office` objects.
```typescript -await client.ats.offices.list(); +await client.ats.offices.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -4115,7 +4147,9 @@ Returns a list of `RejectReason` objects.
```typescript -await client.ats.rejectReasons.list(); +await client.ats.rejectReasons.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -4251,7 +4285,9 @@ Returns a list of `Scorecard` objects.
```typescript -await client.ats.scorecards.list(); +await client.ats.scorecards.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -4387,7 +4423,9 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.ats.syncStatus.list(); +await client.ats.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -4509,7 +4547,9 @@ Returns a list of `Tag` objects.
```typescript -await client.ats.tags.list(); +await client.ats.tags.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -4574,7 +4614,9 @@ Returns a list of `RemoteUser` objects.
```typescript -await client.ats.users.list(); +await client.ats.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -4955,7 +4997,9 @@ Returns a list of `Account` objects.
```typescript -await client.crm.accounts.list(); +await client.crm.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -5345,7 +5389,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.accounts.remoteFieldClassesList(); +await client.crm.accounts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -5541,7 +5587,9 @@ Gets a list of audit trail events.
```typescript -await client.crm.auditTrail.list(); +await client.crm.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -5663,7 +5711,9 @@ Returns a list of `Contact` objects.
```typescript -await client.crm.contacts.list(); +await client.crm.contacts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6126,7 +6176,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.contacts.remoteFieldClassesList(); +await client.crm.contacts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6191,7 +6243,9 @@ Returns a list of `CustomObjectClass` objects.
```typescript -await client.crm.customObjectClasses.list(); +await client.crm.customObjectClasses.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6327,7 +6381,9 @@ Returns a list of `AssociationType` objects.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id"); +await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6627,7 +6683,9 @@ Returns a list of `CustomObject` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id"); +await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6917,7 +6975,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList(); +await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6982,7 +7042,9 @@ Returns a list of `Association` objects.
```typescript -await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id"); +await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -7430,7 +7492,9 @@ Returns a list of `EngagementType` objects.
```typescript -await client.crm.engagementTypes.list(); +await client.crm.engagementTypes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -7564,7 +7628,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagementTypes.remoteFieldClassesList(); +await client.crm.engagementTypes.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -7629,7 +7695,9 @@ Returns a list of `Engagement` objects.
```typescript -await client.crm.engagements.list(); +await client.crm.engagements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -8019,7 +8087,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagements.remoteFieldClassesList(); +await client.crm.engagements.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -8538,7 +8608,9 @@ Gets all issues for Organization.
```typescript -await client.crm.issues.list(); +await client.crm.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -8666,7 +8738,9 @@ Returns a list of `Lead` objects.
```typescript -await client.crm.leads.list(); +await client.crm.leads.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -8920,7 +8994,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.leads.remoteFieldClassesList(); +await client.crm.leads.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -9055,7 +9131,9 @@ List linked accounts for your organization.
```typescript -await client.crm.linkedAccounts.list(); +await client.crm.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -9120,7 +9198,9 @@ Returns a list of `Note` objects.
```typescript -await client.crm.notes.list(); +await client.crm.notes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -9374,7 +9454,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.notes.remoteFieldClassesList(); +await client.crm.notes.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -9439,7 +9521,9 @@ Returns a list of `Opportunity` objects.
```typescript -await client.crm.opportunities.list(); +await client.crm.opportunities.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -9829,7 +9913,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.opportunities.remoteFieldClassesList(); +await client.crm.opportunities.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10029,7 +10115,9 @@ Returns a list of `Stage` objects.
```typescript -await client.crm.stages.list(); +await client.crm.stages.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10163,7 +10251,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.stages.remoteFieldClassesList(); +await client.crm.stages.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10228,7 +10318,9 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.crm.syncStatus.list(); +await client.crm.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10350,7 +10442,9 @@ Returns a list of `Task` objects.
```typescript -await client.crm.tasks.list(); +await client.crm.tasks.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10740,7 +10834,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.tasks.remoteFieldClassesList(); +await client.crm.tasks.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10805,7 +10901,9 @@ Returns a list of `User` objects.
```typescript -await client.crm.users.list(); +await client.crm.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -11012,7 +11110,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.users.remoteFieldClassesList(); +await client.crm.users.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -11453,7 +11553,9 @@ Gets a list of audit trail events.
```typescript -await client.filestorage.auditTrail.list(); +await client.filestorage.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -11833,7 +11935,9 @@ Returns a list of `Drive` objects.
```typescript -await client.filestorage.drives.list(); +await client.filestorage.drives.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -12356,7 +12460,9 @@ Returns a list of `File` objects.
```typescript -await client.filestorage.files.list(); +await client.filestorage.files.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -12626,7 +12732,9 @@ Returns metadata to construct authenticated file download requests, allowing you
```typescript -await client.filestorage.files.downloadRequestMetaList(); +await client.filestorage.files.downloadRequestMetaList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -12746,7 +12854,9 @@ Returns a list of `Folder` objects.
```typescript -await client.filestorage.folders.list(); +await client.filestorage.folders.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13069,7 +13179,9 @@ Returns a list of `Group` objects.
```typescript -await client.filestorage.groups.list(); +await client.filestorage.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13205,7 +13317,9 @@ Gets all issues for Organization.
```typescript -await client.filestorage.issues.list(); +await client.filestorage.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13403,7 +13517,9 @@ List linked accounts for your organization.
```typescript -await client.filestorage.linkedAccounts.list(); +await client.filestorage.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13603,7 +13719,9 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.filestorage.syncStatus.list(); +await client.filestorage.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13725,7 +13843,9 @@ Returns a list of `User` objects.
```typescript -await client.filestorage.users.list(); +await client.filestorage.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -14237,7 +14357,9 @@ Gets a list of audit trail events.
```typescript -await client.hris.auditTrail.list(); +await client.hris.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -14359,7 +14481,9 @@ Returns a list of `BankInfo` objects.
```typescript -await client.hris.bankInfo.list(); +await client.hris.bankInfo.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -14495,7 +14619,9 @@ Returns a list of `Benefit` objects.
```typescript -await client.hris.benefits.list(); +await client.hris.benefits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -14631,7 +14757,9 @@ Returns a list of `Company` objects.
```typescript -await client.hris.companies.list(); +await client.hris.companies.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -15025,7 +15153,9 @@ Returns a list of `Dependent` objects.
```typescript -await client.hris.dependents.list(); +await client.hris.dependents.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -15161,7 +15291,9 @@ Returns a list of `EmployeePayrollRun` objects.
```typescript -await client.hris.employeePayrollRuns.list(); +await client.hris.employeePayrollRuns.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -15297,7 +15429,9 @@ Returns a list of `Employee` objects.
```typescript -await client.hris.employees.list(); +await client.hris.employees.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -15626,7 +15760,9 @@ Returns a list of `EmployerBenefit` objects.
```typescript -await client.hris.employerBenefits.list(); +await client.hris.employerBenefits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -15762,7 +15898,9 @@ Returns a list of `Employment` objects.
```typescript -await client.hris.employments.list(); +await client.hris.employments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16352,7 +16490,9 @@ Returns a list of `Group` objects.
```typescript -await client.hris.groups.list(); +await client.hris.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16488,7 +16628,9 @@ Gets all issues for Organization.
```typescript -await client.hris.issues.list(); +await client.hris.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16686,7 +16828,9 @@ List linked accounts for your organization.
```typescript -await client.hris.linkedAccounts.list(); +await client.hris.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16751,7 +16895,9 @@ Returns a list of `Location` objects.
```typescript -await client.hris.locations.list(); +await client.hris.locations.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16955,7 +17101,9 @@ Returns a list of `PayGroup` objects.
```typescript -await client.hris.payGroups.list(); +await client.hris.payGroups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -17091,7 +17239,9 @@ Returns a list of `PayrollRun` objects.
```typescript -await client.hris.payrollRuns.list(); +await client.hris.payrollRuns.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -17294,7 +17444,9 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.hris.syncStatus.list(); +await client.hris.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -17416,7 +17568,9 @@ Returns a list of `Team` objects.
```typescript -await client.hris.teams.list(); +await client.hris.teams.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -17552,7 +17706,9 @@ Returns a list of `TimeOff` objects.
```typescript -await client.hris.timeOff.list(); +await client.hris.timeOff.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -17808,7 +17964,9 @@ Returns a list of `TimeOffBalance` objects.
```typescript -await client.hris.timeOffBalances.list(); +await client.hris.timeOffBalances.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -17944,7 +18102,9 @@ Returns a list of `TimesheetEntry` objects.
```typescript -await client.hris.timesheetEntries.list(); +await client.hris.timesheetEntries.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -18445,7 +18605,9 @@ Returns a list of `Account` objects.
```typescript -await client.ticketing.accounts.list(); +await client.ticketing.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -18712,7 +18874,9 @@ Returns a list of `Attachment` objects.
```typescript -await client.ticketing.attachments.list(); +await client.ticketing.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -18968,7 +19132,9 @@ Gets a list of audit trail events.
```typescript -await client.ticketing.auditTrail.list(); +await client.ticketing.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -19090,7 +19256,9 @@ Returns a list of `Collection` objects.
```typescript -await client.ticketing.collections.list(); +await client.ticketing.collections.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -19153,7 +19321,9 @@ Returns a list of `Viewer` objects that point to a User id or Team id that is ei
```typescript -await client.ticketing.collections.viewersList("collection_id"); +await client.ticketing.collections.viewersList("collection_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -19297,7 +19467,9 @@ Returns a list of `Comment` objects.
```typescript -await client.ticketing.comments.list(); +await client.ticketing.comments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -19553,7 +19725,9 @@ Returns a list of `Contact` objects.
```typescript -await client.ticketing.contacts.list(); +await client.ticketing.contacts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -20521,7 +20695,9 @@ Gets all issues for Organization.
```typescript -await client.ticketing.issues.list(); +await client.ticketing.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -20719,7 +20895,9 @@ List linked accounts for your organization.
```typescript -await client.ticketing.linkedAccounts.list(); +await client.ticketing.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -20852,7 +21030,9 @@ Returns a list of `Project` objects.
```typescript -await client.ticketing.projects.list(); +await client.ticketing.projects.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -20986,7 +21166,9 @@ Returns a list of `User` objects.
```typescript -await client.ticketing.projects.usersList("parent_id"); +await client.ticketing.projects.usersList("parent_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -21126,7 +21308,9 @@ Returns a list of `Role` objects.
```typescript -await client.ticketing.roles.list(); +await client.ticketing.roles.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -21262,7 +21446,9 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.ticketing.syncStatus.list(); +await client.ticketing.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -21384,7 +21570,9 @@ Returns a list of `Tag` objects.
```typescript -await client.ticketing.tags.list(); +await client.ticketing.tags.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -21520,7 +21708,9 @@ Returns a list of `Team` objects.
```typescript -await client.ticketing.teams.list(); +await client.ticketing.teams.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -21656,7 +21846,9 @@ Returns a list of `Ticket` objects.
```typescript -await client.ticketing.tickets.list(); +await client.ticketing.tickets.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -21928,7 +22120,9 @@ Returns a list of `Viewer` objects that point to a User id or Team id that is ei
```typescript -await client.ticketing.tickets.viewersList("ticket_id"); +await client.ticketing.tickets.viewersList("ticket_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -22125,7 +22319,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.ticketing.tickets.remoteFieldClassesList(); +await client.ticketing.tickets.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -22190,7 +22386,9 @@ Returns a list of `User` objects.
```typescript -await client.ticketing.users.list(); +await client.ticketing.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -22571,7 +22769,9 @@ Returns a list of `AccountingPeriod` objects.
```typescript -await client.accounting.accountingPeriods.list(); +await client.accounting.accountingPeriods.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -22707,7 +22907,9 @@ Returns a list of `Account` objects.
```typescript -await client.accounting.accounts.list(); +await client.accounting.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -23232,7 +23434,9 @@ Returns a list of `AccountingAttachment` objects.
```typescript -await client.accounting.attachments.list(); +await client.accounting.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -23488,7 +23692,9 @@ Gets a list of audit trail events.
```typescript -await client.accounting.auditTrail.list(); +await client.accounting.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -23610,7 +23816,9 @@ Returns a list of `BalanceSheet` objects.
```typescript -await client.accounting.balanceSheets.list(); +await client.accounting.balanceSheets.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -23746,7 +23954,9 @@ Returns a list of `BankFeedAccount` objects.
```typescript -await client.accounting.bankFeedAccounts.list(); +await client.accounting.bankFeedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -24002,7 +24212,9 @@ Returns a list of `BankFeedTransaction` objects.
```typescript -await client.accounting.bankFeedTransactions.list(); +await client.accounting.bankFeedTransactions.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -24258,7 +24470,9 @@ Returns a list of `CashFlowStatement` objects.
```typescript -await client.accounting.cashFlowStatements.list(); +await client.accounting.cashFlowStatements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -24394,7 +24608,9 @@ Returns a list of `CompanyInfo` objects.
```typescript -await client.accounting.companyInfo.list(); +await client.accounting.companyInfo.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -24530,7 +24746,9 @@ Returns a list of `Contact` objects.
```typescript -await client.accounting.contacts.list(); +await client.accounting.contacts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -24784,7 +25002,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.contacts.remoteFieldClassesList(); +await client.accounting.contacts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -24849,7 +25069,9 @@ Returns a list of `CreditNote` objects.
```typescript -await client.accounting.creditNotes.list(); +await client.accounting.creditNotes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -25363,7 +25585,9 @@ Returns a list of `Employee` objects.
```typescript -await client.accounting.employees.list(); +await client.accounting.employees.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -25499,7 +25723,9 @@ Returns a list of `ExpenseReport` objects.
```typescript -await client.accounting.expenseReports.list(); +await client.accounting.expenseReports.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -25629,7 +25855,9 @@ Returns a list of `ExpenseReportLine` objects that point to a `ExpenseReport` wi
```typescript -await client.accounting.expenseReports.linesList("expense_report_id"); +await client.accounting.expenseReports.linesList("expense_report_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -25771,7 +25999,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.expenseReports.linesRemoteFieldClassesList(); +await client.accounting.expenseReports.linesRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -25889,7 +26119,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.expenseReports.remoteFieldClassesList(); +await client.accounting.expenseReports.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -25954,7 +26186,9 @@ Returns a list of `Expense` objects.
```typescript -await client.accounting.expenses.list(); +await client.accounting.expenses.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -26153,7 +26387,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.expenses.linesRemoteFieldClassesList(); +await client.accounting.expenses.linesRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -26271,7 +26507,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.expenses.remoteFieldClassesList(); +await client.accounting.expenses.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -26723,7 +26961,9 @@ Returns a list of `GeneralLedgerTransaction` objects.
```typescript -await client.accounting.generalLedgerTransactions.list(); +await client.accounting.generalLedgerTransactions.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -26926,7 +27166,9 @@ Returns a list of `IncomeStatement` objects.
```typescript -await client.accounting.incomeStatements.list(); +await client.accounting.incomeStatements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -27062,7 +27304,9 @@ Returns a list of `Invoice` objects.
```typescript -await client.accounting.invoices.list(); +await client.accounting.invoices.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -27335,7 +27579,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.invoices.lineItemsRemoteFieldClassesList(); +await client.accounting.invoices.lineItemsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -27516,7 +27762,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.invoices.remoteFieldClassesList(); +await client.accounting.invoices.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -27581,7 +27829,9 @@ Gets all issues for Organization.
```typescript -await client.accounting.issues.list(); +await client.accounting.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -27709,7 +27959,9 @@ Returns a list of `Item` objects.
```typescript -await client.accounting.items.list(); +await client.accounting.items.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -28101,7 +28353,9 @@ Returns a list of `JournalEntry` objects.
```typescript -await client.accounting.journalEntries.list(); +await client.accounting.journalEntries.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -28300,7 +28554,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.journalEntries.linesRemoteFieldClassesList(); +await client.accounting.journalEntries.linesRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -28418,7 +28674,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.journalEntries.remoteFieldClassesList(); +await client.accounting.journalEntries.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -28553,7 +28811,9 @@ List linked accounts for your organization.
```typescript -await client.accounting.linkedAccounts.list(); +await client.accounting.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -28686,7 +28946,9 @@ Returns a list of `PaymentMethod` objects.
```typescript -await client.accounting.paymentMethods.list(); +await client.accounting.paymentMethods.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -28822,7 +29084,9 @@ Returns a list of `PaymentTerm` objects.
```typescript -await client.accounting.paymentTerms.list(); +await client.accounting.paymentTerms.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -28958,7 +29222,9 @@ Returns a list of `Payment` objects.
```typescript -await client.accounting.payments.list(); +await client.accounting.payments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -29230,7 +29496,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.payments.lineItemsRemoteFieldClassesList(); +await client.accounting.payments.lineItemsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -29411,7 +29679,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.payments.remoteFieldClassesList(); +await client.accounting.payments.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -29549,7 +29819,9 @@ Returns a list of `Project` objects.
```typescript -await client.accounting.projects.list(); +await client.accounting.projects.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -29685,7 +29957,9 @@ Returns a list of `PurchaseOrder` objects.
```typescript -await client.accounting.purchaseOrders.list(); +await client.accounting.purchaseOrders.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -29884,7 +30158,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList(); +await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -30002,7 +30278,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.accounting.purchaseOrders.remoteFieldClassesList(); +await client.accounting.purchaseOrders.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -30134,7 +30412,9 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.accounting.syncStatus.list(); +await client.accounting.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -30256,7 +30536,9 @@ Returns a list of `TaxRate` objects.
```typescript -await client.accounting.taxRates.list(); +await client.accounting.taxRates.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -30392,7 +30674,9 @@ Returns a list of `TrackingCategory` objects.
```typescript -await client.accounting.trackingCategories.list(); +await client.accounting.trackingCategories.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -30528,7 +30812,9 @@ Returns a list of `Transaction` objects.
```typescript -await client.accounting.transactions.list(); +await client.accounting.transactions.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -30664,7 +30950,9 @@ Returns a list of `VendorCredit` objects.
```typescript -await client.accounting.vendorCredits.list(); +await client.accounting.vendorCredits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
diff --git a/src/Client.ts b/src/Client.ts index 5370eeb1e..97d3c5687 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -58,8 +58,8 @@ export class MergeClient { "X-Account-Token": _options?.accountToken, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "2.1.2", - "User-Agent": "@mergeapi/merge-node-client/2.1.2", + "X-Fern-SDK-Version": "2.1.3", + "User-Agent": "@mergeapi/merge-node-client/2.1.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/accounting/resources/accountDetails/client/Client.ts b/src/api/resources/accounting/resources/accountDetails/client/Client.ts index 36b189d53..d300582b1 100644 --- a/src/api/resources/accounting/resources/accountDetails/client/Client.ts +++ b/src/api/resources/accounting/resources/accountDetails/client/Client.ts @@ -62,6 +62,14 @@ export class AccountDetails { private async __retrieve( requestOptions?: AccountDetails.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AccountDetails { "accounting/v1/account-details", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/accountToken/client/Client.ts b/src/api/resources/accounting/resources/accountToken/client/Client.ts index 39d8e916a..c554b0e1e 100644 --- a/src/api/resources/accounting/resources/accountToken/client/Client.ts +++ b/src/api/resources/accounting/resources/accountToken/client/Client.ts @@ -65,6 +65,14 @@ export class AccountToken { publicToken: string, requestOptions?: AccountToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -73,14 +81,7 @@ export class AccountToken { `accounting/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts b/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts index 56627e1c6..d2da8f8ab 100644 --- a/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts +++ b/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts @@ -52,7 +52,9 @@ export class AccountingPeriods { * @param {AccountingPeriods.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.accountingPeriods.list() + * await client.accounting.accountingPeriods.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.AccountingPeriodsListRequest = {}, @@ -87,6 +89,14 @@ export class AccountingPeriods { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -95,14 +105,7 @@ export class AccountingPeriods { "accounting/v1/accounting-periods", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -181,6 +184,14 @@ export class AccountingPeriods { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -189,14 +200,7 @@ export class AccountingPeriods { `accounting/v1/accounting-periods/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsListRequest.ts b/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsListRequest.ts index b28cb50ce..5397713fc 100644 --- a/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsListRequest.ts +++ b/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsListRequest.ts @@ -4,27 +4,19 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AccountingPeriodsListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsRetrieveRequest.ts b/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsRetrieveRequest.ts index 147d9f6e1..e4f32b554 100644 --- a/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/accountingPeriods/client/requests/AccountingPeriodsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface AccountingPeriodsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/accounts/client/Client.ts b/src/api/resources/accounting/resources/accounts/client/Client.ts index 3570aa57b..19a11d70d 100644 --- a/src/api/resources/accounting/resources/accounts/client/Client.ts +++ b/src/api/resources/accounting/resources/accounts/client/Client.ts @@ -52,7 +52,9 @@ export class Accounts { * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.accounts.list() + * await client.accounting.accounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.AccountsListRequest = {}, @@ -164,6 +166,14 @@ export class Accounts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -172,14 +182,7 @@ export class Accounts { "accounting/v1/accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -255,6 +258,14 @@ export class Accounts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -263,14 +274,7 @@ export class Accounts { "accounting/v1/accounts", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -368,6 +372,14 @@ export class Accounts { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -376,14 +388,7 @@ export class Accounts { `accounting/v1/accounts/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -444,6 +449,14 @@ export class Accounts { private async __metaPostRetrieve( requestOptions?: Accounts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -452,14 +465,7 @@ export class Accounts { "accounting/v1/accounts/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts b/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts index fa6cd6e9d..b2f718711 100644 --- a/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts +++ b/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface AccountEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.AccountRequest; } diff --git a/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts b/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts index d64151695..7de81c392 100644 --- a/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts +++ b/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts @@ -6,79 +6,45 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AccountsListRequest { - /** - * If provided, will only return accounts with the passed in enum. - */ + /** If provided, will only return accounts with the passed in enum. */ accountType?: string; - /** - * If provided, will only return accounts with this classification. - */ + /** If provided, will only return accounts with this classification. */ classification?: string; - /** - * If provided, will only return accounts for this company. - */ + /** If provided, will only return accounts for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return Accounts with this name. - */ + /** If provided, will only return Accounts with this name. */ name?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.accounting.AccountsListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.accounting.AccountsListRequestShowEnumOrigins; - /** - * If provided, will only return accounts with this status. - */ + /** If provided, will only return accounts with this status. */ status?: string; } diff --git a/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts b/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts index c39ced441..a51b85999 100644 --- a/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface AccountsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.accounting.AccountsRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.accounting.AccountsRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/accounting/resources/addresses/client/Client.ts b/src/api/resources/accounting/resources/addresses/client/Client.ts index c93602548..02ab16643 100644 --- a/src/api/resources/accounting/resources/addresses/client/Client.ts +++ b/src/api/resources/accounting/resources/addresses/client/Client.ts @@ -86,6 +86,14 @@ export class Addresses { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -94,14 +102,7 @@ export class Addresses { `accounting/v1/addresses/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/addresses/client/requests/AddressesRetrieveRequest.ts b/src/api/resources/accounting/resources/addresses/client/requests/AddressesRetrieveRequest.ts index 4939d30ea..5f368ae47 100644 --- a/src/api/resources/accounting/resources/addresses/client/requests/AddressesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/addresses/client/requests/AddressesRetrieveRequest.ts @@ -7,20 +7,12 @@ * {} */ export interface AddressesRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "type"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "type"; } diff --git a/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts b/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts index c7006220d..f425ff236 100644 --- a/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts @@ -68,6 +68,14 @@ export class AsyncPassthrough { request: Merge.accounting.DataPassthroughRequest, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class AsyncPassthrough { "accounting/v1/async-passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -154,6 +155,14 @@ export class AsyncPassthrough { asyncPassthroughReceiptId: string, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -162,14 +171,7 @@ export class AsyncPassthrough { `accounting/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/asyncTasks/client/Client.ts b/src/api/resources/accounting/resources/asyncTasks/client/Client.ts index 67a110029..20b30759a 100644 --- a/src/api/resources/accounting/resources/asyncTasks/client/Client.ts +++ b/src/api/resources/accounting/resources/asyncTasks/client/Client.ts @@ -65,6 +65,14 @@ export class AsyncTasks { id: string, requestOptions?: AsyncTasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -73,14 +81,7 @@ export class AsyncTasks { `accounting/v1/async-tasks/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/attachments/client/Client.ts b/src/api/resources/accounting/resources/attachments/client/Client.ts index 707fcef11..7d3fa68a4 100644 --- a/src/api/resources/accounting/resources/attachments/client/Client.ts +++ b/src/api/resources/accounting/resources/attachments/client/Client.ts @@ -52,7 +52,9 @@ export class Attachments { * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.attachments.list() + * await client.accounting.attachments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.AttachmentsListRequest = {}, @@ -123,6 +125,14 @@ export class Attachments { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class Attachments { "accounting/v1/attachments", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -214,6 +217,14 @@ export class Attachments { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -222,14 +233,7 @@ export class Attachments { "accounting/v1/attachments", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -311,6 +315,14 @@ export class Attachments { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -319,14 +331,7 @@ export class Attachments { `accounting/v1/attachments/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -389,6 +394,14 @@ export class Attachments { private async __metaPostRetrieve( requestOptions?: Attachments.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -397,14 +410,7 @@ export class Attachments { "accounting/v1/attachments/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts b/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts index 5b706b836..8eba385a0 100644 --- a/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts +++ b/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface AccountingAttachmentEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.AccountingAttachmentRequest; } diff --git a/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsListRequest.ts b/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsListRequest.ts index dec0fa7cf..daadfe5eb 100644 --- a/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsListRequest.ts +++ b/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AttachmentsListRequest { - /** - * If provided, will only return accounting attachments for this company. - */ + /** If provided, will only return accounting attachments for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts b/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts index f5d722e36..75983eb0b 100644 --- a/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface AttachmentsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/auditTrail/client/Client.ts b/src/api/resources/accounting/resources/auditTrail/client/Client.ts index 792c866a4..3fe6b2ad3 100644 --- a/src/api/resources/accounting/resources/auditTrail/client/Client.ts +++ b/src/api/resources/accounting/resources/auditTrail/client/Client.ts @@ -52,7 +52,9 @@ export class AuditTrail { * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.auditTrail.list() + * await client.accounting.auditTrail.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.AuditTrailListRequest = {}, @@ -91,6 +93,14 @@ export class AuditTrail { _queryParams["user_email"] = userEmail; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -99,14 +109,7 @@ export class AuditTrail { "accounting/v1/audit-trail", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/auditTrail/client/requests/AuditTrailListRequest.ts b/src/api/resources/accounting/resources/auditTrail/client/requests/AuditTrailListRequest.ts index 99ee8b1ad..351c48dc5 100644 --- a/src/api/resources/accounting/resources/auditTrail/client/requests/AuditTrailListRequest.ts +++ b/src/api/resources/accounting/resources/auditTrail/client/requests/AuditTrailListRequest.ts @@ -4,31 +4,21 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AuditTrailListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include audit trail events that occurred before this time - */ + /** If included, will only include audit trail events that occurred before this time */ endDate?: string; - /** - * If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - */ + /** If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` */ eventType?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include audit trail events that occurred after this time - */ + /** If included, will only include audit trail events that occurred after this time */ startDate?: string; - /** - * If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - */ + /** If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. */ userEmail?: string; } diff --git a/src/api/resources/accounting/resources/availableActions/client/Client.ts b/src/api/resources/accounting/resources/availableActions/client/Client.ts index 0cdfc0b3a..10b024fa6 100644 --- a/src/api/resources/accounting/resources/availableActions/client/Client.ts +++ b/src/api/resources/accounting/resources/availableActions/client/Client.ts @@ -62,6 +62,14 @@ export class AvailableActions { private async __retrieve( requestOptions?: AvailableActions.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AvailableActions { "accounting/v1/available-actions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/balanceSheets/client/Client.ts b/src/api/resources/accounting/resources/balanceSheets/client/Client.ts index 964643986..d05a2f67f 100644 --- a/src/api/resources/accounting/resources/balanceSheets/client/Client.ts +++ b/src/api/resources/accounting/resources/balanceSheets/client/Client.ts @@ -52,7 +52,9 @@ export class BalanceSheets { * @param {BalanceSheets.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.balanceSheets.list() + * await client.accounting.balanceSheets.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.BalanceSheetsListRequest = {}, @@ -128,6 +130,14 @@ export class BalanceSheets { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class BalanceSheets { "accounting/v1/balance-sheets", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -224,6 +227,14 @@ export class BalanceSheets { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -232,14 +243,7 @@ export class BalanceSheets { `accounting/v1/balance-sheets/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsListRequest.ts b/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsListRequest.ts index 6094e5b94..f9d2e88a6 100644 --- a/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsListRequest.ts +++ b/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface BalanceSheetsListRequest { - /** - * If provided, will only return balance sheets for this company. - */ + /** If provided, will only return balance sheets for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsRetrieveRequest.ts b/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsRetrieveRequest.ts index 25436ebab..1023d54c7 100644 --- a/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/balanceSheets/client/requests/BalanceSheetsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface BalanceSheetsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts b/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts index 810c25e04..4cac0ff9d 100644 --- a/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts +++ b/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts @@ -52,7 +52,9 @@ export class BankFeedAccounts { * @param {BankFeedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.bankFeedAccounts.list() + * await client.accounting.bankFeedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.BankFeedAccountsListRequest = {}, @@ -87,6 +89,14 @@ export class BankFeedAccounts { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -95,14 +105,7 @@ export class BankFeedAccounts { "accounting/v1/bank-feed-accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -180,6 +183,14 @@ export class BankFeedAccounts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -188,14 +199,7 @@ export class BankFeedAccounts { "accounting/v1/bank-feed-accounts", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -279,6 +283,14 @@ export class BankFeedAccounts { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -287,14 +299,7 @@ export class BankFeedAccounts { `accounting/v1/bank-feed-accounts/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -357,6 +362,14 @@ export class BankFeedAccounts { private async __metaPostRetrieve( requestOptions?: BankFeedAccounts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -365,14 +378,7 @@ export class BankFeedAccounts { "accounting/v1/bank-feed-accounts/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts b/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts index bc66b7450..5d9ec1000 100644 --- a/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts +++ b/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface BankFeedAccountEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.BankFeedAccountRequest; } diff --git a/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsListRequest.ts b/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsListRequest.ts index fbbf997c7..a3db59c0b 100644 --- a/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsListRequest.ts +++ b/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsListRequest.ts @@ -4,27 +4,19 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface BankFeedAccountsListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsRetrieveRequest.ts b/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsRetrieveRequest.ts index 07c0ac158..22c90a07a 100644 --- a/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface BankFeedAccountsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts b/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts index 2562f7ace..bd59cbb29 100644 --- a/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts +++ b/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts @@ -52,7 +52,9 @@ export class BankFeedTransactions { * @param {BankFeedTransactions.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.bankFeedTransactions.list() + * await client.accounting.bankFeedTransactions.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.BankFeedTransactionsListRequest = {}, @@ -128,6 +130,14 @@ export class BankFeedTransactions { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class BankFeedTransactions { "accounting/v1/bank-feed-transactions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -221,6 +224,14 @@ export class BankFeedTransactions { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -229,14 +240,7 @@ export class BankFeedTransactions { "accounting/v1/bank-feed-transactions", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -324,6 +328,14 @@ export class BankFeedTransactions { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -332,14 +344,7 @@ export class BankFeedTransactions { `accounting/v1/bank-feed-transactions/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -402,6 +407,14 @@ export class BankFeedTransactions { private async __metaPostRetrieve( requestOptions?: BankFeedTransactions.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -410,14 +423,7 @@ export class BankFeedTransactions { "accounting/v1/bank-feed-transactions/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts b/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts index 76c9b809f..608c90332 100644 --- a/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts +++ b/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface BankFeedTransactionEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.BankFeedTransactionRequestRequest; } diff --git a/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsListRequest.ts b/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsListRequest.ts index 89a014f60..8c4b8a100 100644 --- a/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsListRequest.ts +++ b/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface BankFeedTransactionsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "bank_feed_account"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return bank feed transactions with this is_processed value - */ + /** If provided, will only return bank feed transactions with this is_processed value */ isProcessed?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsRetrieveRequest.ts b/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsRetrieveRequest.ts index c7b81101b..91d3d4bc1 100644 --- a/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface BankFeedTransactionsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "bank_feed_account"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts b/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts index d931e15b5..3b3af6ee6 100644 --- a/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts +++ b/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts @@ -52,7 +52,9 @@ export class CashFlowStatements { * @param {CashFlowStatements.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.cashFlowStatements.list() + * await client.accounting.cashFlowStatements.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.CashFlowStatementsListRequest = {}, @@ -128,6 +130,14 @@ export class CashFlowStatements { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class CashFlowStatements { "accounting/v1/cash-flow-statements", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -226,6 +229,14 @@ export class CashFlowStatements { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -234,14 +245,7 @@ export class CashFlowStatements { `accounting/v1/cash-flow-statements/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsListRequest.ts b/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsListRequest.ts index a8dde43b3..f654241af 100644 --- a/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsListRequest.ts +++ b/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CashFlowStatementsListRequest { - /** - * If provided, will only return cash flow statements for this company. - */ + /** If provided, will only return cash flow statements for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsRetrieveRequest.ts b/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsRetrieveRequest.ts index b23ce022c..b237c016a 100644 --- a/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/cashFlowStatements/client/requests/CashFlowStatementsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface CashFlowStatementsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/companyInfo/client/Client.ts b/src/api/resources/accounting/resources/companyInfo/client/Client.ts index 251743b7e..25ef7fa00 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/Client.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/Client.ts @@ -52,7 +52,9 @@ export class CompanyInfo { * @param {CompanyInfo.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.companyInfo.list() + * await client.accounting.companyInfo.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.CompanyInfoListRequest = {}, @@ -125,6 +127,14 @@ export class CompanyInfo { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -133,14 +143,7 @@ export class CompanyInfo { "accounting/v1/company-info", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -223,6 +226,14 @@ export class CompanyInfo { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -231,14 +242,7 @@ export class CompanyInfo { `accounting/v1/company-info/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts index 4aa5007d0..ae9c5c20e 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts @@ -6,51 +6,31 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CompanyInfoListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.CompanyInfoListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts index 49cf84df6..d267b5cec 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface CompanyInfoRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.CompanyInfoRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/contacts/client/Client.ts b/src/api/resources/accounting/resources/contacts/client/Client.ts index e1e0bc8de..3d17af894 100644 --- a/src/api/resources/accounting/resources/contacts/client/Client.ts +++ b/src/api/resources/accounting/resources/contacts/client/Client.ts @@ -52,7 +52,9 @@ export class Contacts { * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.contacts.list() + * await client.accounting.contacts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.ContactsListRequest = {}, @@ -170,6 +172,14 @@ export class Contacts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -178,14 +188,7 @@ export class Contacts { "accounting/v1/contacts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -261,6 +264,14 @@ export class Contacts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -269,14 +280,7 @@ export class Contacts { "accounting/v1/contacts", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -375,6 +379,14 @@ export class Contacts { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -383,14 +395,7 @@ export class Contacts { `accounting/v1/contacts/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -451,6 +456,14 @@ export class Contacts { private async __metaPostRetrieve( requestOptions?: Contacts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -459,14 +472,7 @@ export class Contacts { "accounting/v1/contacts/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -519,7 +525,9 @@ export class Contacts { * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.contacts.remoteFieldClassesList() + * await client.accounting.contacts.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.accounting.ContactsRemoteFieldClassesListRequest = {}, @@ -570,6 +578,14 @@ export class Contacts { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -578,14 +594,7 @@ export class Contacts { "accounting/v1/contacts/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts index 130bb61d7..99d6fcde1 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface ContactEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.ContactRequest; } diff --git a/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts index 375a1642c..af2da2b5e 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts @@ -6,87 +6,49 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ContactsListRequest { - /** - * If provided, will only return contacts for this company. - */ + /** If provided, will only return contacts for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return Contacts that match this email. - */ + /** If provided, will only return Contacts that match this email. */ emailAddress?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ContactsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return Contacts that are denoted as customers. - */ + /** If provided, will only return Contacts that are denoted as customers. */ isCustomer?: string; - /** - * If provided, will only return Contacts that are denoted as suppliers. - */ + /** If provided, will only return Contacts that are denoted as suppliers. */ isSupplier?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return Contacts that match this name. - */ + /** If provided, will only return Contacts that match this name. */ name?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; - /** - * If provided, will only return Contacts that match this status. - */ + /** If provided, will only return Contacts that match this status. */ status?: string; } diff --git a/src/api/resources/accounting/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts index 757600f0e..89c59f1f4 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ContactsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts index ca071c284..84b845717 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts @@ -9,28 +9,16 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ContactsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ContactsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/accounting/resources/creditNotes/client/Client.ts b/src/api/resources/accounting/resources/creditNotes/client/Client.ts index a09bbb976..37980a913 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/Client.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/Client.ts @@ -52,7 +52,9 @@ export class CreditNotes { * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.creditNotes.list() + * await client.accounting.creditNotes.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.CreditNotesListRequest = {}, @@ -156,6 +158,14 @@ export class CreditNotes { _queryParams["transaction_date_before"] = transactionDateBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -164,14 +174,7 @@ export class CreditNotes { "accounting/v1/credit-notes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -247,6 +250,14 @@ export class CreditNotes { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -255,14 +266,7 @@ export class CreditNotes { "accounting/v1/credit-notes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -364,6 +368,14 @@ export class CreditNotes { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -372,14 +384,7 @@ export class CreditNotes { `accounting/v1/credit-notes/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -442,6 +447,14 @@ export class CreditNotes { private async __metaPostRetrieve( requestOptions?: CreditNotes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -450,14 +463,7 @@ export class CreditNotes { "accounting/v1/credit-notes/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts index 0e728e676..5a8021d4a 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface CreditNoteEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.CreditNoteRequest; } diff --git a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts index 57456f2ac..c6c2702ad 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts @@ -6,71 +6,41 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CreditNotesListRequest { - /** - * If provided, will only return credit notes for this company. - */ + /** If provided, will only return credit notes for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.CreditNotesListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.accounting.CreditNotesListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.accounting.CreditNotesListRequestShowEnumOrigins; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ transactionDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ transactionDateBefore?: Date; } diff --git a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts index e26193038..72a8ff3ed 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface CreditNotesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.CreditNotesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.accounting.CreditNotesRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.accounting.CreditNotesRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/accounting/resources/deleteAccount/client/Client.ts b/src/api/resources/accounting/resources/deleteAccount/client/Client.ts index 55abf7e9e..92eb0fc5a 100644 --- a/src/api/resources/accounting/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/accounting/resources/deleteAccount/client/Client.ts @@ -56,6 +56,14 @@ export class DeleteAccount { } private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -64,14 +72,7 @@ export class DeleteAccount { "accounting/v1/delete-account", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/employees/client/Client.ts b/src/api/resources/accounting/resources/employees/client/Client.ts index 2adf4fa5c..c5d7b3f5b 100644 --- a/src/api/resources/accounting/resources/employees/client/Client.ts +++ b/src/api/resources/accounting/resources/employees/client/Client.ts @@ -52,7 +52,9 @@ export class Employees { * @param {Employees.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.employees.list() + * await client.accounting.employees.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.EmployeesListRequest = {}, @@ -128,6 +130,14 @@ export class Employees { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class Employees { "accounting/v1/employees", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -224,6 +227,14 @@ export class Employees { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -232,14 +243,7 @@ export class Employees { `accounting/v1/employees/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/employees/client/requests/EmployeesListRequest.ts b/src/api/resources/accounting/resources/employees/client/requests/EmployeesListRequest.ts index e644c0753..94768a380 100644 --- a/src/api/resources/accounting/resources/employees/client/requests/EmployeesListRequest.ts +++ b/src/api/resources/accounting/resources/employees/client/requests/EmployeesListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EmployeesListRequest { - /** - * If provided, will only return employees for this company. - */ + /** If provided, will only return employees for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/employees/client/requests/EmployeesRetrieveRequest.ts b/src/api/resources/accounting/resources/employees/client/requests/EmployeesRetrieveRequest.ts index c2e404594..5b72e9d54 100644 --- a/src/api/resources/accounting/resources/employees/client/requests/EmployeesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/employees/client/requests/EmployeesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface EmployeesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/expenseReports/client/Client.ts b/src/api/resources/accounting/resources/expenseReports/client/Client.ts index 2a2267710..05bcf6050 100644 --- a/src/api/resources/accounting/resources/expenseReports/client/Client.ts +++ b/src/api/resources/accounting/resources/expenseReports/client/Client.ts @@ -52,7 +52,9 @@ export class ExpenseReports { * @param {ExpenseReports.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.expenseReports.list() + * await client.accounting.expenseReports.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.ExpenseReportsListRequest = {}, @@ -135,6 +137,14 @@ export class ExpenseReports { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class ExpenseReports { "accounting/v1/expense-reports", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -228,6 +231,14 @@ export class ExpenseReports { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -236,14 +247,7 @@ export class ExpenseReports { "accounting/v1/expense-reports", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -302,7 +306,9 @@ export class ExpenseReports { * @param {ExpenseReports.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.expenseReports.linesList("expense_report_id") + * await client.accounting.expenseReports.linesList("expense_report_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public linesList( expenseReportId: string, @@ -357,6 +363,14 @@ export class ExpenseReports { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -365,14 +379,7 @@ export class ExpenseReports { `accounting/v1/expense-reports/${encodeURIComponent(expenseReportId)}/lines`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -461,6 +468,14 @@ export class ExpenseReports { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -469,14 +484,7 @@ export class ExpenseReports { `accounting/v1/expense-reports/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -529,7 +537,9 @@ export class ExpenseReports { * @param {ExpenseReports.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.expenseReports.linesRemoteFieldClassesList() + * await client.accounting.expenseReports.linesRemoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public linesRemoteFieldClassesList( request: Merge.accounting.ExpenseReportsLinesRemoteFieldClassesListRequest = {}, @@ -580,6 +590,14 @@ export class ExpenseReports { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -588,14 +606,7 @@ export class ExpenseReports { "accounting/v1/expense-reports/lines/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -658,6 +669,14 @@ export class ExpenseReports { private async __metaPostRetrieve( requestOptions?: ExpenseReports.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -666,14 +685,7 @@ export class ExpenseReports { "accounting/v1/expense-reports/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -726,7 +738,9 @@ export class ExpenseReports { * @param {ExpenseReports.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.expenseReports.remoteFieldClassesList() + * await client.accounting.expenseReports.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.accounting.ExpenseReportsRemoteFieldClassesListRequest = {}, @@ -777,6 +791,14 @@ export class ExpenseReports { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -785,14 +807,7 @@ export class ExpenseReports { "accounting/v1/expense-reports/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportEndpointRequest.ts b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportEndpointRequest.ts index 659b23c8b..65d81230b 100644 --- a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportEndpointRequest.ts +++ b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportEndpointRequest.ts @@ -13,13 +13,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface ExpenseReportEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.ExpenseReportRequest; } diff --git a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesListRequest.ts b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesListRequest.ts index d8e2b6b83..81486926c 100644 --- a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesListRequest.ts +++ b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesListRequest.ts @@ -6,35 +6,23 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ExpenseReportsLinesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ExpenseReportsLinesListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesRemoteFieldClassesListRequest.ts index 4094a4689..6f9501643 100644 --- a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsLinesRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ExpenseReportsLinesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsListRequest.ts b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsListRequest.ts index 69c707762..c49c1742a 100644 --- a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsListRequest.ts +++ b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsListRequest.ts @@ -6,59 +6,35 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ExpenseReportsListRequest { - /** - * If provided, will only return expense reports for this company. - */ + /** If provided, will only return expense reports for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ExpenseReportsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRemoteFieldClassesListRequest.ts index bc48aef91..d458245f5 100644 --- a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ExpenseReportsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRetrieveRequest.ts b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRetrieveRequest.ts index c0f8435e0..bfd62a876 100644 --- a/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/expenseReports/client/requests/ExpenseReportsRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ExpenseReportsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ExpenseReportsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/expenses/client/Client.ts b/src/api/resources/accounting/resources/expenses/client/Client.ts index 067d4ba14..7fd04f480 100644 --- a/src/api/resources/accounting/resources/expenses/client/Client.ts +++ b/src/api/resources/accounting/resources/expenses/client/Client.ts @@ -52,7 +52,9 @@ export class Expenses { * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.expenses.list() + * await client.accounting.expenses.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.ExpensesListRequest = {}, @@ -145,6 +147,14 @@ export class Expenses { _queryParams["transaction_date_before"] = transactionDateBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -153,14 +163,7 @@ export class Expenses { "accounting/v1/expenses", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -236,6 +239,14 @@ export class Expenses { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -244,14 +255,7 @@ export class Expenses { "accounting/v1/expenses", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -341,6 +345,14 @@ export class Expenses { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -349,14 +361,7 @@ export class Expenses { `accounting/v1/expenses/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -407,7 +412,9 @@ export class Expenses { * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.expenses.linesRemoteFieldClassesList() + * await client.accounting.expenses.linesRemoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public linesRemoteFieldClassesList( request: Merge.accounting.ExpensesLinesRemoteFieldClassesListRequest = {}, @@ -458,6 +465,14 @@ export class Expenses { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -466,14 +481,7 @@ export class Expenses { "accounting/v1/expenses/lines/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -536,6 +544,14 @@ export class Expenses { private async __metaPostRetrieve( requestOptions?: Expenses.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -544,14 +560,7 @@ export class Expenses { "accounting/v1/expenses/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -604,7 +613,9 @@ export class Expenses { * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.expenses.remoteFieldClassesList() + * await client.accounting.expenses.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.accounting.ExpensesRemoteFieldClassesListRequest = {}, @@ -655,6 +666,14 @@ export class Expenses { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -663,14 +682,7 @@ export class Expenses { "accounting/v1/expenses/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts index 026f23a62..7ab1f937d 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface ExpenseEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.ExpenseRequest; } diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesLinesRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesLinesRemoteFieldClassesListRequest.ts index a6604d145..f3a886d6d 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesLinesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesLinesRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ExpensesLinesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts index 2084272bd..9a609ea71 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts @@ -6,67 +6,39 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ExpensesListRequest { - /** - * If provided, will only return expenses for this company. - */ + /** If provided, will only return expenses for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ExpensesListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ transactionDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ transactionDateBefore?: Date; } diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRemoteFieldClassesListRequest.ts index d7104f6b4..219731f76 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ExpensesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts index 513c888c1..4012340d0 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ExpensesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ExpensesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/fieldMapping/client/Client.ts b/src/api/resources/accounting/resources/fieldMapping/client/Client.ts index c0d5a84a4..edf5f93df 100644 --- a/src/api/resources/accounting/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/accounting/resources/fieldMapping/client/Client.ts @@ -71,6 +71,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -79,14 +87,7 @@ export class FieldMapping { "accounting/v1/field-mappings", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -163,6 +164,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -171,14 +180,7 @@ export class FieldMapping { "accounting/v1/field-mappings", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -247,6 +249,14 @@ export class FieldMapping { fieldMappingId: string, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -255,14 +265,7 @@ export class FieldMapping { `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -333,6 +336,14 @@ export class FieldMapping { request: Merge.accounting.PatchedEditFieldMappingRequest = {}, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -341,14 +352,7 @@ export class FieldMapping { `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -429,6 +433,14 @@ export class FieldMapping { _queryParams["include_example_values"] = includeExampleValues; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -437,14 +449,7 @@ export class FieldMapping { "accounting/v1/remote-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -505,6 +510,14 @@ export class FieldMapping { private async __targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -513,14 +526,7 @@ export class FieldMapping { "accounting/v1/target-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/api/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index c4a2012c1..a1281ff59 100644 --- a/src/api/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/api/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,9 +14,7 @@ * } */ export interface CreateFieldMappingRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; /** The name of the target field you want this remote field to map to. */ targetFieldName: string; diff --git a/src/api/resources/accounting/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts b/src/api/resources/accounting/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts index 3ad738346..75ab57f7d 100644 --- a/src/api/resources/accounting/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface FieldMappingsRetrieveRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; } diff --git a/src/api/resources/accounting/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts b/src/api/resources/accounting/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts index ad8a5c5da..78cd89f35 100644 --- a/src/api/resources/accounting/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RemoteFieldsRetrieveRequest { - /** - * A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - */ + /** A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. */ commonModels?: string; - /** - * If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - */ + /** If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. */ includeExampleValues?: string; } diff --git a/src/api/resources/accounting/resources/forceResync/client/Client.ts b/src/api/resources/accounting/resources/forceResync/client/Client.ts index 6845babf6..06a8a1448 100644 --- a/src/api/resources/accounting/resources/forceResync/client/Client.ts +++ b/src/api/resources/accounting/resources/forceResync/client/Client.ts @@ -62,6 +62,14 @@ export class ForceResync { private async __syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class ForceResync { "accounting/v1/sync-status/resync", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts b/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts index 9ae7fa145..0cef84b1e 100644 --- a/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts +++ b/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts @@ -52,7 +52,9 @@ export class GeneralLedgerTransactions { * @param {GeneralLedgerTransactions.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.generalLedgerTransactions.list() + * await client.accounting.generalLedgerTransactions.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.GeneralLedgerTransactionsListRequest = {}, @@ -141,6 +143,14 @@ export class GeneralLedgerTransactions { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -149,14 +159,7 @@ export class GeneralLedgerTransactions { "accounting/v1/general-ledger-transactions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -242,6 +245,14 @@ export class GeneralLedgerTransactions { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -250,14 +261,7 @@ export class GeneralLedgerTransactions { `accounting/v1/general-ledger-transactions/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsListRequest.ts b/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsListRequest.ts index 6ac8ddb78..6a13c0100 100644 --- a/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsListRequest.ts +++ b/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface GeneralLedgerTransactionsListRequest { - /** - * If provided, will only return general ledger transactions for this company. - */ + /** If provided, will only return general ledger transactions for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.GeneralLedgerTransactionsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return objects posted after this datetime. - */ + /** If provided, will only return objects posted after this datetime. */ postedDateAfter?: Date; - /** - * If provided, will only return objects posted before this datetime. - */ + /** If provided, will only return objects posted before this datetime. */ postedDateBefore?: Date; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsRetrieveRequest.ts b/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsRetrieveRequest.ts index 6395b3969..03484b602 100644 --- a/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/generalLedgerTransactions/client/requests/GeneralLedgerTransactionsRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface GeneralLedgerTransactionsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.GeneralLedgerTransactionsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/generateKey/client/Client.ts b/src/api/resources/accounting/resources/generateKey/client/Client.ts index 61fd07f0a..2876ad225 100644 --- a/src/api/resources/accounting/resources/generateKey/client/Client.ts +++ b/src/api/resources/accounting/resources/generateKey/client/Client.ts @@ -67,6 +67,14 @@ export class GenerateKey { request: Merge.accounting.GenerateRemoteKeyRequest, requestOptions?: GenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class GenerateKey { "accounting/v1/generate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/accounting/resources/incomeStatements/client/Client.ts b/src/api/resources/accounting/resources/incomeStatements/client/Client.ts index c0d5fd3bb..0d455e4f9 100644 --- a/src/api/resources/accounting/resources/incomeStatements/client/Client.ts +++ b/src/api/resources/accounting/resources/incomeStatements/client/Client.ts @@ -52,7 +52,9 @@ export class IncomeStatements { * @param {IncomeStatements.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.incomeStatements.list() + * await client.accounting.incomeStatements.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.IncomeStatementsListRequest = {}, @@ -128,6 +130,14 @@ export class IncomeStatements { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class IncomeStatements { "accounting/v1/income-statements", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -226,6 +229,14 @@ export class IncomeStatements { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -234,14 +245,7 @@ export class IncomeStatements { `accounting/v1/income-statements/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsListRequest.ts b/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsListRequest.ts index df9f0471a..96f5753f8 100644 --- a/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsListRequest.ts +++ b/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface IncomeStatementsListRequest { - /** - * If provided, will only return income statements for this company. - */ + /** If provided, will only return income statements for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsRetrieveRequest.ts b/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsRetrieveRequest.ts index fb96baf16..f17e06e83 100644 --- a/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/incomeStatements/client/requests/IncomeStatementsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface IncomeStatementsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/invoices/client/Client.ts b/src/api/resources/accounting/resources/invoices/client/Client.ts index 5d52f5808..6b0ce78cb 100644 --- a/src/api/resources/accounting/resources/invoices/client/Client.ts +++ b/src/api/resources/accounting/resources/invoices/client/Client.ts @@ -52,7 +52,9 @@ export class Invoices { * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.invoices.list() + * await client.accounting.invoices.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.InvoicesListRequest = {}, @@ -179,6 +181,14 @@ export class Invoices { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -187,14 +197,7 @@ export class Invoices { "accounting/v1/invoices", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -272,6 +275,14 @@ export class Invoices { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -280,14 +291,7 @@ export class Invoices { "accounting/v1/invoices", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -386,6 +390,14 @@ export class Invoices { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -394,14 +406,7 @@ export class Invoices { `accounting/v1/invoices/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -480,6 +485,14 @@ export class Invoices { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -488,14 +501,7 @@ export class Invoices { `accounting/v1/invoices/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -551,7 +557,9 @@ export class Invoices { * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.invoices.lineItemsRemoteFieldClassesList() + * await client.accounting.invoices.lineItemsRemoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public lineItemsRemoteFieldClassesList( request: Merge.accounting.InvoicesLineItemsRemoteFieldClassesListRequest = {}, @@ -602,6 +610,14 @@ export class Invoices { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -610,14 +626,7 @@ export class Invoices { "accounting/v1/invoices/line-items/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -683,6 +692,14 @@ export class Invoices { id: string, requestOptions?: Invoices.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -691,14 +708,7 @@ export class Invoices { `accounting/v1/invoices/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -761,6 +771,14 @@ export class Invoices { private async __metaPostRetrieve( requestOptions?: Invoices.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -769,14 +787,7 @@ export class Invoices { "accounting/v1/invoices/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -829,7 +840,9 @@ export class Invoices { * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.invoices.remoteFieldClassesList() + * await client.accounting.invoices.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.accounting.InvoicesRemoteFieldClassesListRequest = {}, @@ -880,6 +893,14 @@ export class Invoices { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -888,14 +909,7 @@ export class Invoices { "accounting/v1/invoices/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts index 120195e41..849ae3553 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface InvoiceEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.InvoiceRequest; } diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesLineItemsRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesLineItemsRemoteFieldClassesListRequest.ts index f92a5e114..52478cede 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesLineItemsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesLineItemsRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface InvoicesLineItemsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts index 224baa750..1802bb916 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts @@ -6,84 +6,48 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface InvoicesListRequest { - /** - * If provided, will only return invoices for this company. - */ + /** If provided, will only return invoices for this company. */ companyId?: string; - /** - * If provided, will only return invoices for this contact. - */ + /** If provided, will only return invoices for this contact. */ contactId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.InvoicesListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ issueDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ issueDateBefore?: Date; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return Invoices with this number. - */ + /** If provided, will only return Invoices with this number. */ number?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "type"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "type"; /** * If provided, will only return Invoices with this status. diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRemoteFieldClassesListRequest.ts index 716d2e3c6..1e584df25 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface InvoicesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts index e0d4b6363..c1037edf9 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts @@ -9,28 +9,16 @@ import * as Merge from "../../../../../../index"; * {} */ export interface InvoicesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.InvoicesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "type"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "type"; } diff --git a/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts index f1491a807..dc7e64fb7 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedInvoiceEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.InvoiceRequest; } diff --git a/src/api/resources/accounting/resources/issues/client/Client.ts b/src/api/resources/accounting/resources/issues/client/Client.ts index 7dc1a968f..922a2e546 100644 --- a/src/api/resources/accounting/resources/issues/client/Client.ts +++ b/src/api/resources/accounting/resources/issues/client/Client.ts @@ -52,7 +52,9 @@ export class Issues { * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.issues.list() + * await client.accounting.issues.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.IssuesListRequest = {}, @@ -140,6 +142,14 @@ export class Issues { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Issues { "accounting/v1/issues", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class Issues { id: string, requestOptions?: Issues.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class Issues { `accounting/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts index 9bedc7b26..fc1279255 100644 --- a/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts @@ -6,51 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface IssuesListRequest { accountToken?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include issues whose most recent action occurred before this time - */ + /** If included, will only include issues whose most recent action occurred before this time */ endDate?: string; endUserOrganizationName?: string; - /** - * If provided, will only return issues whose first incident time was after this datetime. - */ + /** If provided, will only return issues whose first incident time was after this datetime. */ firstIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose first incident time was before this datetime. - */ + /** If provided, will only return issues whose first incident time was before this datetime. */ firstIncidentTimeBefore?: Date; - /** - * If true, will include muted issues - */ + /** If true, will include muted issues */ includeMuted?: string; integrationName?: string; - /** - * If provided, will only return issues whose last incident time was after this datetime. - */ + /** If provided, will only return issues whose last incident time was after this datetime. */ lastIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose last incident time was before this datetime. - */ + /** If provided, will only return issues whose last incident time was before this datetime. */ lastIncidentTimeBefore?: Date; - /** - * If provided, will only include issues pertaining to the linked account passed in. - */ + /** If provided, will only include issues pertaining to the linked account passed in. */ linkedAccountId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include issues whose most recent action occurred after this time - */ + /** If included, will only include issues whose most recent action occurred after this time */ startDate?: string; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/accounting/resources/items/client/Client.ts b/src/api/resources/accounting/resources/items/client/Client.ts index 9ba7868f1..62c093f90 100644 --- a/src/api/resources/accounting/resources/items/client/Client.ts +++ b/src/api/resources/accounting/resources/items/client/Client.ts @@ -52,7 +52,9 @@ export class Items { * @param {Items.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.items.list() + * await client.accounting.items.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.ItemsListRequest = {}, @@ -140,6 +142,14 @@ export class Items { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Items { "accounting/v1/items", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -231,6 +234,14 @@ export class Items { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -239,14 +250,7 @@ export class Items { "accounting/v1/items", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -340,6 +344,14 @@ export class Items { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -348,14 +360,7 @@ export class Items { `accounting/v1/items/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -434,6 +439,14 @@ export class Items { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -442,14 +455,7 @@ export class Items { `accounting/v1/items/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -518,6 +524,14 @@ export class Items { id: string, requestOptions?: Items.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -526,14 +540,7 @@ export class Items { `accounting/v1/items/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -596,6 +603,14 @@ export class Items { private async __metaPostRetrieve( requestOptions?: Items.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -604,14 +619,7 @@ export class Items { "accounting/v1/items/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/items/client/requests/ItemEndpointRequest.ts b/src/api/resources/accounting/resources/items/client/requests/ItemEndpointRequest.ts index ab6de9f00..c1a9f05d6 100644 --- a/src/api/resources/accounting/resources/items/client/requests/ItemEndpointRequest.ts +++ b/src/api/resources/accounting/resources/items/client/requests/ItemEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface ItemEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.ItemRequestRequest; } diff --git a/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts b/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts index 7fd7861b8..b0dbc89a2 100644 --- a/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts +++ b/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ItemsListRequest { - /** - * If provided, will only return items for this company. - */ + /** If provided, will only return items for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ItemsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts b/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts index 26fe31f94..e804a41c6 100644 --- a/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ItemsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ItemsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/accounting/resources/items/client/requests/PatchedItemEndpointRequest.ts b/src/api/resources/accounting/resources/items/client/requests/PatchedItemEndpointRequest.ts index a94be70e9..000821dd4 100644 --- a/src/api/resources/accounting/resources/items/client/requests/PatchedItemEndpointRequest.ts +++ b/src/api/resources/accounting/resources/items/client/requests/PatchedItemEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedItemEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.PatchedItemRequestRequest; } diff --git a/src/api/resources/accounting/resources/journalEntries/client/Client.ts b/src/api/resources/accounting/resources/journalEntries/client/Client.ts index 7917382ce..01e6df4dd 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/Client.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/Client.ts @@ -52,7 +52,9 @@ export class JournalEntries { * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.journalEntries.list() + * await client.accounting.journalEntries.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.JournalEntriesListRequest = {}, @@ -145,6 +147,14 @@ export class JournalEntries { _queryParams["transaction_date_before"] = transactionDateBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -153,14 +163,7 @@ export class JournalEntries { "accounting/v1/journal-entries", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -236,6 +239,14 @@ export class JournalEntries { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -244,14 +255,7 @@ export class JournalEntries { "accounting/v1/journal-entries", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -345,6 +349,14 @@ export class JournalEntries { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -353,14 +365,7 @@ export class JournalEntries { `accounting/v1/journal-entries/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -413,7 +418,9 @@ export class JournalEntries { * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.journalEntries.linesRemoteFieldClassesList() + * await client.accounting.journalEntries.linesRemoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public linesRemoteFieldClassesList( request: Merge.accounting.JournalEntriesLinesRemoteFieldClassesListRequest = {}, @@ -464,6 +471,14 @@ export class JournalEntries { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -472,14 +487,7 @@ export class JournalEntries { "accounting/v1/journal-entries/lines/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -542,6 +550,14 @@ export class JournalEntries { private async __metaPostRetrieve( requestOptions?: JournalEntries.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -550,14 +566,7 @@ export class JournalEntries { "accounting/v1/journal-entries/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -610,7 +619,9 @@ export class JournalEntries { * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.journalEntries.remoteFieldClassesList() + * await client.accounting.journalEntries.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.accounting.JournalEntriesRemoteFieldClassesListRequest = {}, @@ -661,6 +672,14 @@ export class JournalEntries { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -669,14 +688,7 @@ export class JournalEntries { "accounting/v1/journal-entries/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesLinesRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesLinesRemoteFieldClassesListRequest.ts index e91acfa9f..9ca9318f4 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesLinesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesLinesRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface JournalEntriesLinesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts index c577e1840..bea141944 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts @@ -6,67 +6,39 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface JournalEntriesListRequest { - /** - * If provided, will only return journal entries for this company. - */ + /** If provided, will only return journal entries for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.JournalEntriesListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ transactionDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ transactionDateBefore?: Date; } diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRemoteFieldClassesListRequest.ts index 0d24489cd..3f1b6f5ce 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface JournalEntriesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts index 48d9663e8..651e62503 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface JournalEntriesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.JournalEntriesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts index 4a3d2c852..92c2f1675 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface JournalEntryEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.JournalEntryRequest; } diff --git a/src/api/resources/accounting/resources/linkToken/client/Client.ts b/src/api/resources/accounting/resources/linkToken/client/Client.ts index 58339ba24..134d61921 100644 --- a/src/api/resources/accounting/resources/linkToken/client/Client.ts +++ b/src/api/resources/accounting/resources/linkToken/client/Client.ts @@ -70,6 +70,14 @@ export class LinkToken { request: Merge.accounting.EndUserDetailsRequest, requestOptions?: LinkToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -78,14 +86,7 @@ export class LinkToken { "accounting/v1/link-token", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts b/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts index 55f700d24..c20a5aa96 100644 --- a/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts @@ -52,7 +52,9 @@ export class LinkedAccounts { * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.linkedAccounts.list() + * await client.accounting.linkedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.LinkedAccountsListRequest = {}, @@ -135,6 +137,14 @@ export class LinkedAccounts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class LinkedAccounts { "accounting/v1/linked-accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 19e057c1c..797b16ae0 100644 --- a/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -6,7 +6,9 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LinkedAccountsListRequest { /** @@ -21,49 +23,27 @@ export interface LinkedAccountsListRequest { * * `filestorage` - filestorage */ category?: Merge.accounting.LinkedAccountsListRequestCategory; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return linked accounts associated with the given email address. - */ + /** If provided, will only return linked accounts associated with the given email address. */ endUserEmailAddress?: string; - /** - * If provided, will only return linked accounts associated with the given organization name. - */ + /** If provided, will only return linked accounts associated with the given organization name. */ endUserOrganizationName?: string; - /** - * If provided, will only return linked accounts associated with the given origin ID. - */ + /** If provided, will only return linked accounts associated with the given origin ID. */ endUserOriginId?: string; - /** - * Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - */ + /** Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. */ endUserOriginIds?: string; id?: string; - /** - * Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - */ + /** Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. */ ids?: string; - /** - * If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - */ + /** If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. */ includeDuplicates?: boolean; - /** - * If provided, will only return linked accounts associated with the given integration name. - */ + /** If provided, will only return linked accounts associated with the given integration name. */ integrationName?: string; - /** - * If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - */ + /** If included, will only include test linked accounts. If not included, will only include non-test linked accounts. */ isTestAccount?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - */ + /** Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` */ status?: string; } diff --git a/src/api/resources/accounting/resources/passthrough/client/Client.ts b/src/api/resources/accounting/resources/passthrough/client/Client.ts index b6ac9992d..4ed9c5077 100644 --- a/src/api/resources/accounting/resources/passthrough/client/Client.ts +++ b/src/api/resources/accounting/resources/passthrough/client/Client.ts @@ -68,6 +68,14 @@ export class Passthrough { request: Merge.accounting.DataPassthroughRequest, requestOptions?: Passthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class Passthrough { "accounting/v1/passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/accounting/resources/paymentMethods/client/Client.ts b/src/api/resources/accounting/resources/paymentMethods/client/Client.ts index 6acb66a30..3baaf5ece 100644 --- a/src/api/resources/accounting/resources/paymentMethods/client/Client.ts +++ b/src/api/resources/accounting/resources/paymentMethods/client/Client.ts @@ -52,7 +52,9 @@ export class PaymentMethods { * @param {PaymentMethods.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.paymentMethods.list() + * await client.accounting.paymentMethods.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.PaymentMethodsListRequest = {}, @@ -87,6 +89,14 @@ export class PaymentMethods { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -95,14 +105,7 @@ export class PaymentMethods { "accounting/v1/payment-methods", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -179,6 +182,14 @@ export class PaymentMethods { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -187,14 +198,7 @@ export class PaymentMethods { `accounting/v1/payment-methods/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsListRequest.ts b/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsListRequest.ts index 7b96053de..1ae2e5abc 100644 --- a/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsListRequest.ts +++ b/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsListRequest.ts @@ -4,27 +4,19 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PaymentMethodsListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsRetrieveRequest.ts b/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsRetrieveRequest.ts index 420c96882..c570b52a8 100644 --- a/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/paymentMethods/client/requests/PaymentMethodsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface PaymentMethodsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/paymentTerms/client/Client.ts b/src/api/resources/accounting/resources/paymentTerms/client/Client.ts index 2215e2784..959543040 100644 --- a/src/api/resources/accounting/resources/paymentTerms/client/Client.ts +++ b/src/api/resources/accounting/resources/paymentTerms/client/Client.ts @@ -52,7 +52,9 @@ export class PaymentTerms { * @param {PaymentTerms.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.paymentTerms.list() + * await client.accounting.paymentTerms.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.PaymentTermsListRequest = {}, @@ -91,6 +93,14 @@ export class PaymentTerms { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -99,14 +109,7 @@ export class PaymentTerms { "accounting/v1/payment-terms", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -187,6 +190,14 @@ export class PaymentTerms { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -195,14 +206,7 @@ export class PaymentTerms { `accounting/v1/payment-terms/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsListRequest.ts b/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsListRequest.ts index 06eabe9f9..e03365561 100644 --- a/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsListRequest.ts +++ b/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsListRequest.ts @@ -4,31 +4,21 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PaymentTermsListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsRetrieveRequest.ts b/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsRetrieveRequest.ts index 997d35876..4823c8af7 100644 --- a/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/paymentTerms/client/requests/PaymentTermsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface PaymentTermsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/payments/client/Client.ts b/src/api/resources/accounting/resources/payments/client/Client.ts index 79d2e3c33..e2fa2bb77 100644 --- a/src/api/resources/accounting/resources/payments/client/Client.ts +++ b/src/api/resources/accounting/resources/payments/client/Client.ts @@ -52,7 +52,9 @@ export class Payments { * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.payments.list() + * await client.accounting.payments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.PaymentsListRequest = {}, @@ -155,6 +157,14 @@ export class Payments { _queryParams["transaction_date_before"] = transactionDateBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -163,14 +173,7 @@ export class Payments { "accounting/v1/payments", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -246,6 +249,14 @@ export class Payments { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -254,14 +265,7 @@ export class Payments { "accounting/v1/payments", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -351,6 +355,14 @@ export class Payments { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -359,14 +371,7 @@ export class Payments { `accounting/v1/payments/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -445,6 +450,14 @@ export class Payments { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -453,14 +466,7 @@ export class Payments { `accounting/v1/payments/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -516,7 +522,9 @@ export class Payments { * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.payments.lineItemsRemoteFieldClassesList() + * await client.accounting.payments.lineItemsRemoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public lineItemsRemoteFieldClassesList( request: Merge.accounting.PaymentsLineItemsRemoteFieldClassesListRequest = {}, @@ -567,6 +575,14 @@ export class Payments { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -575,14 +591,7 @@ export class Payments { "accounting/v1/payments/line-items/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -648,6 +657,14 @@ export class Payments { id: string, requestOptions?: Payments.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -656,14 +673,7 @@ export class Payments { `accounting/v1/payments/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -726,6 +736,14 @@ export class Payments { private async __metaPostRetrieve( requestOptions?: Payments.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -734,14 +752,7 @@ export class Payments { "accounting/v1/payments/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -794,7 +805,9 @@ export class Payments { * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.payments.remoteFieldClassesList() + * await client.accounting.payments.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.accounting.PaymentsRemoteFieldClassesListRequest = {}, @@ -845,6 +858,14 @@ export class Payments { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -853,14 +874,7 @@ export class Payments { "accounting/v1/payments/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts index 3f9271fb3..6edbdf218 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedPaymentEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.PatchedPaymentRequest; } diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts index f03249a63..7bdabdc95 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PaymentEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.PaymentRequest; } diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentsLineItemsRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentsLineItemsRemoteFieldClassesListRequest.ts index 80ad52bb6..474ae55af 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentsLineItemsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentsLineItemsRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PaymentsLineItemsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts index 6035b1958..35ce62ca8 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts @@ -6,75 +6,43 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PaymentsListRequest { - /** - * If provided, will only return payments for this account. - */ + /** If provided, will only return payments for this account. */ accountId?: string; - /** - * If provided, will only return payments for this company. - */ + /** If provided, will only return payments for this company. */ companyId?: string; - /** - * If provided, will only return payments for this contact. - */ + /** If provided, will only return payments for this contact. */ contactId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.PaymentsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ transactionDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ transactionDateBefore?: Date; } diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentsRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentsRemoteFieldClassesListRequest.ts index 3f212e646..562ee525e 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentsRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PaymentsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts index 8aa18a11e..6d9b1e794 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface PaymentsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.PaymentsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts b/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts index 90b09af26..4caf591fb 100644 --- a/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts +++ b/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts @@ -78,6 +78,14 @@ export class PhoneNumbers { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -86,14 +94,7 @@ export class PhoneNumbers { `accounting/v1/phone-numbers/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/phoneNumbers/client/requests/PhoneNumbersRetrieveRequest.ts b/src/api/resources/accounting/resources/phoneNumbers/client/requests/PhoneNumbersRetrieveRequest.ts index 609222c7b..2816eeb1e 100644 --- a/src/api/resources/accounting/resources/phoneNumbers/client/requests/PhoneNumbersRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/phoneNumbers/client/requests/PhoneNumbersRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface PhoneNumbersRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/projects/client/Client.ts b/src/api/resources/accounting/resources/projects/client/Client.ts index 4b13d0733..2d2ac4c4d 100644 --- a/src/api/resources/accounting/resources/projects/client/Client.ts +++ b/src/api/resources/accounting/resources/projects/client/Client.ts @@ -52,7 +52,9 @@ export class Projects { * @param {Projects.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.projects.list() + * await client.accounting.projects.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.ProjectsListRequest = {}, @@ -130,6 +132,14 @@ export class Projects { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -138,14 +148,7 @@ export class Projects { "accounting/v1/projects", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -228,6 +231,14 @@ export class Projects { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -236,14 +247,7 @@ export class Projects { `accounting/v1/projects/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/projects/client/requests/ProjectsListRequest.ts b/src/api/resources/accounting/resources/projects/client/requests/ProjectsListRequest.ts index 4e6077e46..d151feb10 100644 --- a/src/api/resources/accounting/resources/projects/client/requests/ProjectsListRequest.ts +++ b/src/api/resources/accounting/resources/projects/client/requests/ProjectsListRequest.ts @@ -6,55 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ProjectsListRequest { - /** - * If provided, will only return projects for this company. - */ + /** If provided, will only return projects for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ProjectsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/projects/client/requests/ProjectsRetrieveRequest.ts b/src/api/resources/accounting/resources/projects/client/requests/ProjectsRetrieveRequest.ts index 2d8bf9714..adac3fc61 100644 --- a/src/api/resources/accounting/resources/projects/client/requests/ProjectsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/projects/client/requests/ProjectsRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ProjectsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.ProjectsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts b/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts index 1e7510aeb..4b7a67689 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts @@ -52,7 +52,9 @@ export class PurchaseOrders { * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.purchaseOrders.list() + * await client.accounting.purchaseOrders.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.PurchaseOrdersListRequest = {}, @@ -155,6 +157,14 @@ export class PurchaseOrders { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -163,14 +173,7 @@ export class PurchaseOrders { "accounting/v1/purchase-orders", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -246,6 +249,14 @@ export class PurchaseOrders { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -254,14 +265,7 @@ export class PurchaseOrders { "accounting/v1/purchase-orders", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -364,6 +368,14 @@ export class PurchaseOrders { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -372,14 +384,7 @@ export class PurchaseOrders { `accounting/v1/purchase-orders/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -432,7 +437,9 @@ export class PurchaseOrders { * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList() + * await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public lineItemsRemoteFieldClassesList( request: Merge.accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest = {}, @@ -483,6 +490,14 @@ export class PurchaseOrders { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -491,14 +506,7 @@ export class PurchaseOrders { "accounting/v1/purchase-orders/line-items/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -561,6 +569,14 @@ export class PurchaseOrders { private async __metaPostRetrieve( requestOptions?: PurchaseOrders.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -569,14 +585,7 @@ export class PurchaseOrders { "accounting/v1/purchase-orders/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -629,7 +638,9 @@ export class PurchaseOrders { * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.purchaseOrders.remoteFieldClassesList() + * await client.accounting.purchaseOrders.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.accounting.PurchaseOrdersRemoteFieldClassesListRequest = {}, @@ -680,6 +691,14 @@ export class PurchaseOrders { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -688,14 +707,7 @@ export class PurchaseOrders { "accounting/v1/purchase-orders/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts index 02f77ddcd..8f84e876a 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PurchaseOrderEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.PurchaseOrderRequest; } diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.ts index eb8915e6a..7252bf594 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PurchaseOrdersLineItemsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts index 7660bcf5f..7198d9394 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts @@ -6,75 +6,43 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PurchaseOrdersListRequest { - /** - * If provided, will only return purchase orders for this company. - */ + /** If provided, will only return purchase orders for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.PurchaseOrdersListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ issueDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ issueDateBefore?: Date; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRemoteFieldClassesListRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRemoteFieldClassesListRequest.ts index 68e95403e..065834031 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRemoteFieldClassesListRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRemoteFieldClassesListRequest.ts @@ -4,35 +4,23 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PurchaseOrdersRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts index 507058892..3437052c7 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts @@ -9,28 +9,16 @@ import * as Merge from "../../../../../../index"; * {} */ export interface PurchaseOrdersRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.PurchaseOrdersRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/accounting/resources/regenerateKey/client/Client.ts b/src/api/resources/accounting/resources/regenerateKey/client/Client.ts index 9008988fb..30610bef1 100644 --- a/src/api/resources/accounting/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/accounting/resources/regenerateKey/client/Client.ts @@ -67,6 +67,14 @@ export class RegenerateKey { request: Merge.accounting.RemoteKeyForRegenerationRequest, requestOptions?: RegenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class RegenerateKey { "accounting/v1/regenerate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/accounting/resources/scopes/client/Client.ts b/src/api/resources/accounting/resources/scopes/client/Client.ts index ba02152db..d83070872 100644 --- a/src/api/resources/accounting/resources/scopes/client/Client.ts +++ b/src/api/resources/accounting/resources/scopes/client/Client.ts @@ -62,6 +62,14 @@ export class Scopes { private async __defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class Scopes { "accounting/v1/default-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -138,6 +139,14 @@ export class Scopes { private async __linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +155,7 @@ export class Scopes { "accounting/v1/linked-account-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -242,6 +244,14 @@ export class Scopes { request: Merge.accounting.LinkedAccountCommonModelScopeDeserializerRequest, requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -250,14 +260,7 @@ export class Scopes { "accounting/v1/linked-account-scopes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/accounting/resources/syncStatus/client/Client.ts b/src/api/resources/accounting/resources/syncStatus/client/Client.ts index 202478fc1..239ab8b5c 100644 --- a/src/api/resources/accounting/resources/syncStatus/client/Client.ts +++ b/src/api/resources/accounting/resources/syncStatus/client/Client.ts @@ -52,7 +52,9 @@ export class SyncStatus { * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.syncStatus.list() + * await client.accounting.syncStatus.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.SyncStatusListRequest = {}, @@ -75,6 +77,14 @@ export class SyncStatus { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -83,14 +93,7 @@ export class SyncStatus { "accounting/v1/sync-status", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/syncStatus/client/requests/SyncStatusListRequest.ts b/src/api/resources/accounting/resources/syncStatus/client/requests/SyncStatusListRequest.ts index bcce714a8..3fb47f9e4 100644 --- a/src/api/resources/accounting/resources/syncStatus/client/requests/SyncStatusListRequest.ts +++ b/src/api/resources/accounting/resources/syncStatus/client/requests/SyncStatusListRequest.ts @@ -4,15 +4,13 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface SyncStatusListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/accounting/resources/taxRates/client/Client.ts b/src/api/resources/accounting/resources/taxRates/client/Client.ts index 9710320a1..5489fafd8 100644 --- a/src/api/resources/accounting/resources/taxRates/client/Client.ts +++ b/src/api/resources/accounting/resources/taxRates/client/Client.ts @@ -52,7 +52,9 @@ export class TaxRates { * @param {TaxRates.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.taxRates.list() + * await client.accounting.taxRates.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.TaxRatesListRequest = {}, @@ -133,6 +135,14 @@ export class TaxRates { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -141,14 +151,7 @@ export class TaxRates { "accounting/v1/tax-rates", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -229,6 +232,14 @@ export class TaxRates { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -237,14 +248,7 @@ export class TaxRates { `accounting/v1/tax-rates/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesListRequest.ts b/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesListRequest.ts index 6ba02c66f..629f9334b 100644 --- a/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesListRequest.ts +++ b/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesListRequest.ts @@ -4,59 +4,35 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TaxRatesListRequest { - /** - * If provided, will only return tax rates for this company. - */ + /** If provided, will only return tax rates for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return TaxRates with this name. - */ + /** If provided, will only return TaxRates with this name. */ name?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesRetrieveRequest.ts b/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesRetrieveRequest.ts index e3f1538f8..5b1a86fdd 100644 --- a/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/taxRates/client/requests/TaxRatesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface TaxRatesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/trackingCategories/client/Client.ts b/src/api/resources/accounting/resources/trackingCategories/client/Client.ts index 4ca7d7fa0..bedc8e369 100644 --- a/src/api/resources/accounting/resources/trackingCategories/client/Client.ts +++ b/src/api/resources/accounting/resources/trackingCategories/client/Client.ts @@ -52,7 +52,9 @@ export class TrackingCategories { * @param {TrackingCategories.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.trackingCategories.list() + * await client.accounting.trackingCategories.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.TrackingCategoriesListRequest = {}, @@ -153,6 +155,14 @@ export class TrackingCategories { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -161,14 +171,7 @@ export class TrackingCategories { "accounting/v1/tracking-categories", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -259,6 +262,14 @@ export class TrackingCategories { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -267,14 +278,7 @@ export class TrackingCategories { `accounting/v1/tracking-categories/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesListRequest.ts b/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesListRequest.ts index a7779080b..75e7ee7c5 100644 --- a/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesListRequest.ts +++ b/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesListRequest.ts @@ -4,75 +4,43 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TrackingCategoriesListRequest { - /** - * If provided, will only return tracking categories with this type. - */ + /** If provided, will only return tracking categories with this type. */ categoryType?: string; - /** - * If provided, will only return tracking categories for this company. - */ + /** If provided, will only return tracking categories for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return tracking categories with this name. - */ + /** If provided, will only return tracking categories with this name. */ name?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; - /** - * If provided, will only return tracking categories with this status. - */ + /** If provided, will only return tracking categories with this status. */ status?: string; } diff --git a/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesRetrieveRequest.ts b/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesRetrieveRequest.ts index 2cbf7d122..bbaf4602d 100644 --- a/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/trackingCategories/client/requests/TrackingCategoriesRetrieveRequest.ts @@ -7,24 +7,14 @@ * {} */ export interface TrackingCategoriesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "company"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/accounting/resources/transactions/client/Client.ts b/src/api/resources/accounting/resources/transactions/client/Client.ts index d58b5ee6d..ca0d04cf0 100644 --- a/src/api/resources/accounting/resources/transactions/client/Client.ts +++ b/src/api/resources/accounting/resources/transactions/client/Client.ts @@ -52,7 +52,9 @@ export class Transactions { * @param {Transactions.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.transactions.list() + * await client.accounting.transactions.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.TransactionsListRequest = {}, @@ -140,6 +142,14 @@ export class Transactions { _queryParams["transaction_date_before"] = transactionDateBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Transactions { "accounting/v1/transactions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -238,6 +241,14 @@ export class Transactions { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -246,14 +257,7 @@ export class Transactions { `accounting/v1/transactions/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts index fbc4d06c1..91833f0a2 100644 --- a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts +++ b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TransactionsListRequest { - /** - * If provided, will only return accounting transactions for this company. - */ + /** If provided, will only return accounting transactions for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.TransactionsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ transactionDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ transactionDateBefore?: Date; } diff --git a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts index 73388aa01..c2513332e 100644 --- a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface TransactionsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.TransactionsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/vendorCredits/client/Client.ts b/src/api/resources/accounting/resources/vendorCredits/client/Client.ts index 14369a1b4..7bdb368c0 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/Client.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/Client.ts @@ -52,7 +52,9 @@ export class VendorCredits { * @param {VendorCredits.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.accounting.vendorCredits.list() + * await client.accounting.vendorCredits.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.accounting.VendorCreditsListRequest = {}, @@ -140,6 +142,14 @@ export class VendorCredits { _queryParams["transaction_date_before"] = transactionDateBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class VendorCredits { "accounting/v1/vendor-credits", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -231,6 +234,14 @@ export class VendorCredits { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -239,14 +250,7 @@ export class VendorCredits { "accounting/v1/vendor-credits", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -334,6 +338,14 @@ export class VendorCredits { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -342,14 +354,7 @@ export class VendorCredits { `accounting/v1/vendor-credits/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -412,6 +417,14 @@ export class VendorCredits { private async __metaPostRetrieve( requestOptions?: VendorCredits.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -420,14 +433,7 @@ export class VendorCredits { "accounting/v1/vendor-credits/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts index 123ec5224..7089fbcb5 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface VendorCreditEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.accounting.VendorCreditRequest; } diff --git a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts index eeeae98fa..24d470bd8 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface VendorCreditsListRequest { - /** - * If provided, will only return vendor credits for this company. - */ + /** If provided, will only return vendor credits for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.VendorCreditsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ transactionDateAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ transactionDateBefore?: Date; } diff --git a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts index 27eff0694..17b4617c1 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface VendorCreditsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.accounting.VendorCreditsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts b/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts index 636711100..da76cf958 100644 --- a/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts @@ -62,6 +62,14 @@ export class WebhookReceivers { private async __list( requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class WebhookReceivers { "accounting/v1/webhook-receivers", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -146,6 +147,14 @@ export class WebhookReceivers { request: Merge.accounting.WebhookReceiverRequest, requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -154,14 +163,7 @@ export class WebhookReceivers { "accounting/v1/webhook-receivers", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ats/resources/accountDetails/client/Client.ts b/src/api/resources/ats/resources/accountDetails/client/Client.ts index 7f2ba490b..97deecdaa 100644 --- a/src/api/resources/ats/resources/accountDetails/client/Client.ts +++ b/src/api/resources/ats/resources/accountDetails/client/Client.ts @@ -62,6 +62,14 @@ export class AccountDetails { private async __retrieve( requestOptions?: AccountDetails.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AccountDetails { "ats/v1/account-details", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/accountToken/client/Client.ts b/src/api/resources/ats/resources/accountToken/client/Client.ts index 6421862be..e0678608f 100644 --- a/src/api/resources/ats/resources/accountToken/client/Client.ts +++ b/src/api/resources/ats/resources/accountToken/client/Client.ts @@ -65,6 +65,14 @@ export class AccountToken { publicToken: string, requestOptions?: AccountToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -73,14 +81,7 @@ export class AccountToken { `ats/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/activities/client/Client.ts b/src/api/resources/ats/resources/activities/client/Client.ts index 5d35a9ce6..830b437e5 100644 --- a/src/api/resources/ats/resources/activities/client/Client.ts +++ b/src/api/resources/ats/resources/activities/client/Client.ts @@ -52,7 +52,9 @@ export class Activities { * @param {Activities.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.activities.list() + * await client.ats.activities.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.ActivitiesListRequest = {}, @@ -144,6 +146,14 @@ export class Activities { _queryParams["user_id"] = userId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -152,14 +162,7 @@ export class Activities { "ats/v1/activities", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -236,6 +239,14 @@ export class Activities { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -244,14 +255,7 @@ export class Activities { "ats/v1/activities", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -349,6 +353,14 @@ export class Activities { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -357,14 +369,7 @@ export class Activities { `ats/v1/activities/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -425,6 +430,14 @@ export class Activities { private async __metaPostRetrieve( requestOptions?: Activities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -433,14 +446,7 @@ export class Activities { "ats/v1/activities/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts b/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts index 9d2d1535e..66634dfe4 100644 --- a/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts +++ b/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ActivitiesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "user"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.ats.ActivitiesListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.ats.ActivitiesListRequestShowEnumOrigins; - /** - * If provided, will only return activities done by this user. - */ + /** If provided, will only return activities done by this user. */ userId?: string; } diff --git a/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts b/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts index 4ebed8957..f96c0a4a7 100644 --- a/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts +++ b/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ActivitiesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "user"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.ats.ActivitiesRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.ats.ActivitiesRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts b/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts index cbf92e092..b99f08194 100644 --- a/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts +++ b/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts @@ -12,13 +12,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface ActivityEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ats.ActivityRequest; remoteUserId: string; diff --git a/src/api/resources/ats/resources/applications/client/Client.ts b/src/api/resources/ats/resources/applications/client/Client.ts index d16d5ad6d..0bff8f87d 100644 --- a/src/api/resources/ats/resources/applications/client/Client.ts +++ b/src/api/resources/ats/resources/applications/client/Client.ts @@ -52,7 +52,9 @@ export class Applications { * @param {Applications.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.applications.list() + * await client.ats.applications.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.ApplicationsListRequest = {}, @@ -155,6 +157,14 @@ export class Applications { _queryParams["source"] = source; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -163,14 +173,7 @@ export class Applications { "ats/v1/applications", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -250,6 +253,14 @@ export class Applications { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -258,14 +269,7 @@ export class Applications { "ats/v1/applications", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -351,6 +355,14 @@ export class Applications { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -359,14 +371,7 @@ export class Applications { `ats/v1/applications/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -443,6 +448,14 @@ export class Applications { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -451,14 +464,7 @@ export class Applications { `ats/v1/applications/${encodeURIComponent(id)}/change-stage`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -533,6 +539,14 @@ export class Applications { _queryParams["application_remote_template_id"] = applicationRemoteTemplateId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -541,14 +555,7 @@ export class Applications { "ats/v1/applications/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts b/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts index 6f4ed20cb..de9707c56 100644 --- a/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts @@ -12,13 +12,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface ApplicationEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ats.ApplicationRequest; remoteUserId: string; diff --git a/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts b/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts index 6cd79a7ac..69d0b380a 100644 --- a/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts @@ -6,75 +6,43 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ApplicationsListRequest { - /** - * If provided, will only return applications for this candidate. - */ + /** If provided, will only return applications for this candidate. */ candidateId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * If provided, will only return applications credited to this user. - */ + /** If provided, will only return applications credited to this user. */ creditedToId?: string; - /** - * If provided, will only return applications at this interview stage. - */ + /** If provided, will only return applications at this interview stage. */ currentStageId?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.ApplicationsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return applications for this job. - */ + /** If provided, will only return applications for this job. */ jobId?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return applications with this reject reason. - */ + /** If provided, will only return applications with this reject reason. */ rejectReasonId?: string; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return applications with this source. - */ + /** If provided, will only return applications with this source. */ source?: string; } diff --git a/src/api/resources/ats/resources/applications/client/requests/ApplicationsMetaPostRetrieveRequest.ts b/src/api/resources/ats/resources/applications/client/requests/ApplicationsMetaPostRetrieveRequest.ts index 0000c87e1..7a8575de8 100644 --- a/src/api/resources/ats/resources/applications/client/requests/ApplicationsMetaPostRetrieveRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/ApplicationsMetaPostRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface ApplicationsMetaPostRetrieveRequest { - /** - * The template ID associated with the nested application in the request. - */ + /** The template ID associated with the nested application in the request. */ applicationRemoteTemplateId?: string; } diff --git a/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts b/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts index ec7138a6c..513f1de9f 100644 --- a/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ApplicationsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.ApplicationsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts b/src/api/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts index f27055b3b..69e00a466 100644 --- a/src/api/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts @@ -7,13 +7,9 @@ * {} */ export interface UpdateApplicationStageRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; /** The interview stage to move the application to. */ jobInterviewStage?: string; diff --git a/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts b/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts index 89314f1cb..0d40af7fb 100644 --- a/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts @@ -68,6 +68,14 @@ export class AsyncPassthrough { request: Merge.ats.DataPassthroughRequest, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class AsyncPassthrough { "ats/v1/async-passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -150,6 +151,14 @@ export class AsyncPassthrough { asyncPassthroughReceiptId: string, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -158,14 +167,7 @@ export class AsyncPassthrough { `ats/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/attachments/client/Client.ts b/src/api/resources/ats/resources/attachments/client/Client.ts index 9022fdf1f..cb54a2730 100644 --- a/src/api/resources/ats/resources/attachments/client/Client.ts +++ b/src/api/resources/ats/resources/attachments/client/Client.ts @@ -52,7 +52,9 @@ export class Attachments { * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.attachments.list() + * await client.ats.attachments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.AttachmentsListRequest = {}, @@ -138,6 +140,14 @@ export class Attachments { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +156,7 @@ export class Attachments { "ats/v1/attachments", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -230,6 +233,14 @@ export class Attachments { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -238,14 +249,7 @@ export class Attachments { "ats/v1/attachments", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -337,6 +341,14 @@ export class Attachments { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -345,14 +357,7 @@ export class Attachments { `ats/v1/attachments/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -413,6 +418,14 @@ export class Attachments { private async __metaPostRetrieve( requestOptions?: Attachments.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -421,14 +434,7 @@ export class Attachments { "ats/v1/attachments/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts b/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts index dd9150979..6a237f579 100644 --- a/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts +++ b/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts @@ -12,13 +12,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface AttachmentEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ats.AttachmentRequest; remoteUserId: string; diff --git a/src/api/resources/ats/resources/attachments/client/requests/AttachmentsListRequest.ts b/src/api/resources/ats/resources/attachments/client/requests/AttachmentsListRequest.ts index 1c22c49d5..da4bc9c40 100644 --- a/src/api/resources/ats/resources/attachments/client/requests/AttachmentsListRequest.ts +++ b/src/api/resources/ats/resources/attachments/client/requests/AttachmentsListRequest.ts @@ -4,63 +4,37 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AttachmentsListRequest { - /** - * If provided, will only return attachments for this candidate. - */ + /** If provided, will only return attachments for this candidate. */ candidateId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "candidate"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "attachment_type"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "attachment_type"; } diff --git a/src/api/resources/ats/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts b/src/api/resources/ats/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts index e15b155be..ec8563989 100644 --- a/src/api/resources/ats/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts @@ -7,24 +7,14 @@ * {} */ export interface AttachmentsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "candidate"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "attachment_type"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "attachment_type"; } diff --git a/src/api/resources/ats/resources/auditTrail/client/Client.ts b/src/api/resources/ats/resources/auditTrail/client/Client.ts index 8fb65c3d3..ab76a2f72 100644 --- a/src/api/resources/ats/resources/auditTrail/client/Client.ts +++ b/src/api/resources/ats/resources/auditTrail/client/Client.ts @@ -52,7 +52,9 @@ export class AuditTrail { * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.auditTrail.list() + * await client.ats.auditTrail.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.AuditTrailListRequest = {}, @@ -91,6 +93,14 @@ export class AuditTrail { _queryParams["user_email"] = userEmail; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -99,14 +109,7 @@ export class AuditTrail { "ats/v1/audit-trail", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/auditTrail/client/requests/AuditTrailListRequest.ts b/src/api/resources/ats/resources/auditTrail/client/requests/AuditTrailListRequest.ts index 99ee8b1ad..351c48dc5 100644 --- a/src/api/resources/ats/resources/auditTrail/client/requests/AuditTrailListRequest.ts +++ b/src/api/resources/ats/resources/auditTrail/client/requests/AuditTrailListRequest.ts @@ -4,31 +4,21 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AuditTrailListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include audit trail events that occurred before this time - */ + /** If included, will only include audit trail events that occurred before this time */ endDate?: string; - /** - * If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - */ + /** If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` */ eventType?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include audit trail events that occurred after this time - */ + /** If included, will only include audit trail events that occurred after this time */ startDate?: string; - /** - * If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - */ + /** If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. */ userEmail?: string; } diff --git a/src/api/resources/ats/resources/availableActions/client/Client.ts b/src/api/resources/ats/resources/availableActions/client/Client.ts index b6dc1fa23..97d2ab1c4 100644 --- a/src/api/resources/ats/resources/availableActions/client/Client.ts +++ b/src/api/resources/ats/resources/availableActions/client/Client.ts @@ -62,6 +62,14 @@ export class AvailableActions { private async __retrieve( requestOptions?: AvailableActions.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AvailableActions { "ats/v1/available-actions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/candidates/client/Client.ts b/src/api/resources/ats/resources/candidates/client/Client.ts index 8a5225ae9..0d15a2555 100644 --- a/src/api/resources/ats/resources/candidates/client/Client.ts +++ b/src/api/resources/ats/resources/candidates/client/Client.ts @@ -52,7 +52,9 @@ export class Candidates { * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.candidates.list() + * await client.ats.candidates.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.CandidatesListRequest = {}, @@ -145,6 +147,14 @@ export class Candidates { _queryParams["tags"] = tags; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -153,14 +163,7 @@ export class Candidates { "ats/v1/candidates", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -237,6 +240,14 @@ export class Candidates { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -245,14 +256,7 @@ export class Candidates { "ats/v1/candidates", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -338,6 +342,14 @@ export class Candidates { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -346,14 +358,7 @@ export class Candidates { `ats/v1/candidates/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -433,6 +438,14 @@ export class Candidates { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -441,14 +454,7 @@ export class Candidates { `ats/v1/candidates/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -522,6 +528,14 @@ export class Candidates { request: Merge.ats.IgnoreCommonModelRequest, requestOptions?: Candidates.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -530,14 +544,7 @@ export class Candidates { `ats/v1/candidates/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -597,6 +604,14 @@ export class Candidates { id: string, requestOptions?: Candidates.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -605,14 +620,7 @@ export class Candidates { `ats/v1/candidates/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -675,6 +683,14 @@ export class Candidates { private async __metaPostRetrieve( requestOptions?: Candidates.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -683,14 +699,7 @@ export class Candidates { "ats/v1/candidates/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts index 9f236ed2b..e329bd97d 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts @@ -12,13 +12,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface CandidateEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ats.CandidateRequest; remoteUserId: string; diff --git a/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts index 35bd09fa6..0f18541e2 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts @@ -6,67 +6,39 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CandidatesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return candidates with these email addresses; multiple addresses can be separated by commas. - */ + /** If provided, will only return candidates with these email addresses; multiple addresses can be separated by commas. */ emailAddresses?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.CandidatesListRequestExpand; - /** - * If provided, will only return candidates with this first name. - */ + /** If provided, will only return candidates with this first name. */ firstName?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return candidates with this last name. - */ + /** If provided, will only return candidates with this last name. */ lastName?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return candidates with these tags; multiple tags can be separated by commas. - */ + /** If provided, will only return candidates with these tags; multiple tags can be separated by commas. */ tags?: string; } diff --git a/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts index 86e9977ee..ca084bb5f 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface CandidatesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.CandidatesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts index 1e7c3e2a3..d64645b54 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts @@ -12,13 +12,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedCandidateEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ats.PatchedCandidateRequest; remoteUserId: string; diff --git a/src/api/resources/ats/resources/deleteAccount/client/Client.ts b/src/api/resources/ats/resources/deleteAccount/client/Client.ts index b5d8aec9c..1ba41899f 100644 --- a/src/api/resources/ats/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/ats/resources/deleteAccount/client/Client.ts @@ -56,6 +56,14 @@ export class DeleteAccount { } private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -64,14 +72,7 @@ export class DeleteAccount { "ats/v1/delete-account", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/departments/client/Client.ts b/src/api/resources/ats/resources/departments/client/Client.ts index 6dcf7fb96..70e0098e4 100644 --- a/src/api/resources/ats/resources/departments/client/Client.ts +++ b/src/api/resources/ats/resources/departments/client/Client.ts @@ -52,7 +52,9 @@ export class Departments { * @param {Departments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.departments.list() + * await client.ats.departments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.DepartmentsListRequest = {}, @@ -118,6 +120,14 @@ export class Departments { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Departments { "ats/v1/departments", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Departments { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Departments { `ats/v1/departments/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/departments/client/requests/DepartmentsListRequest.ts b/src/api/resources/ats/resources/departments/client/requests/DepartmentsListRequest.ts index 1de96030b..37b443d74 100644 --- a/src/api/resources/ats/resources/departments/client/requests/DepartmentsListRequest.ts +++ b/src/api/resources/ats/resources/departments/client/requests/DepartmentsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface DepartmentsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ats/resources/departments/client/requests/DepartmentsRetrieveRequest.ts b/src/api/resources/ats/resources/departments/client/requests/DepartmentsRetrieveRequest.ts index 227bd42b2..621ef2437 100644 --- a/src/api/resources/ats/resources/departments/client/requests/DepartmentsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/departments/client/requests/DepartmentsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface DepartmentsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ats/resources/eeocs/client/Client.ts b/src/api/resources/ats/resources/eeocs/client/Client.ts index def3da43d..2d9094d5e 100644 --- a/src/api/resources/ats/resources/eeocs/client/Client.ts +++ b/src/api/resources/ats/resources/eeocs/client/Client.ts @@ -52,7 +52,9 @@ export class Eeocs { * @param {Eeocs.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.eeocs.list() + * await client.ats.eeocs.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.EeocsListRequest = {}, @@ -143,6 +145,14 @@ export class Eeocs { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -151,14 +161,7 @@ export class Eeocs { "ats/v1/eeocs", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -252,6 +255,14 @@ export class Eeocs { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -260,14 +271,7 @@ export class Eeocs { `ats/v1/eeocs/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts b/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts index 5bd04af0d..f8b0e1f87 100644 --- a/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts +++ b/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EeocsListRequest { - /** - * If provided, will only return EEOC info for this candidate. - */ + /** If provided, will only return EEOC info for this candidate. */ candidateId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "candidate"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.ats.EeocsListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.ats.EeocsListRequestShowEnumOrigins; } diff --git a/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts b/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts index 7bfb2c44c..2caf4e758 100644 --- a/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface EeocsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "candidate"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.ats.EeocsRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.ats.EeocsRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/ats/resources/fieldMapping/client/Client.ts b/src/api/resources/ats/resources/fieldMapping/client/Client.ts index b1207bf24..603682385 100644 --- a/src/api/resources/ats/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/ats/resources/fieldMapping/client/Client.ts @@ -71,6 +71,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -79,14 +87,7 @@ export class FieldMapping { "ats/v1/field-mappings", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -163,6 +164,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -171,14 +180,7 @@ export class FieldMapping { "ats/v1/field-mappings", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -245,6 +247,14 @@ export class FieldMapping { fieldMappingId: string, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -253,14 +263,7 @@ export class FieldMapping { `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -331,6 +334,14 @@ export class FieldMapping { request: Merge.ats.PatchedEditFieldMappingRequest = {}, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -339,14 +350,7 @@ export class FieldMapping { `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -427,6 +431,14 @@ export class FieldMapping { _queryParams["include_example_values"] = includeExampleValues; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -435,14 +447,7 @@ export class FieldMapping { "ats/v1/remote-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -503,6 +508,14 @@ export class FieldMapping { private async __targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -511,14 +524,7 @@ export class FieldMapping { "ats/v1/target-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/api/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index c4a2012c1..a1281ff59 100644 --- a/src/api/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/api/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,9 +14,7 @@ * } */ export interface CreateFieldMappingRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; /** The name of the target field you want this remote field to map to. */ targetFieldName: string; diff --git a/src/api/resources/ats/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts b/src/api/resources/ats/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts index 3ad738346..75ab57f7d 100644 --- a/src/api/resources/ats/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface FieldMappingsRetrieveRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; } diff --git a/src/api/resources/ats/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts b/src/api/resources/ats/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts index ad8a5c5da..78cd89f35 100644 --- a/src/api/resources/ats/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RemoteFieldsRetrieveRequest { - /** - * A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - */ + /** A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. */ commonModels?: string; - /** - * If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - */ + /** If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. */ includeExampleValues?: string; } diff --git a/src/api/resources/ats/resources/forceResync/client/Client.ts b/src/api/resources/ats/resources/forceResync/client/Client.ts index 2d8163b22..1a6c3930d 100644 --- a/src/api/resources/ats/resources/forceResync/client/Client.ts +++ b/src/api/resources/ats/resources/forceResync/client/Client.ts @@ -62,6 +62,14 @@ export class ForceResync { private async __syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class ForceResync { "ats/v1/sync-status/resync", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/generateKey/client/Client.ts b/src/api/resources/ats/resources/generateKey/client/Client.ts index d93825053..5276d742b 100644 --- a/src/api/resources/ats/resources/generateKey/client/Client.ts +++ b/src/api/resources/ats/resources/generateKey/client/Client.ts @@ -67,6 +67,14 @@ export class GenerateKey { request: Merge.ats.GenerateRemoteKeyRequest, requestOptions?: GenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class GenerateKey { "ats/v1/generate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ats/resources/interviews/client/Client.ts b/src/api/resources/ats/resources/interviews/client/Client.ts index b7b919b89..25043a97a 100644 --- a/src/api/resources/ats/resources/interviews/client/Client.ts +++ b/src/api/resources/ats/resources/interviews/client/Client.ts @@ -52,7 +52,9 @@ export class Interviews { * @param {Interviews.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.interviews.list() + * await client.ats.interviews.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.InterviewsListRequest = {}, @@ -155,6 +157,14 @@ export class Interviews { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -163,14 +173,7 @@ export class Interviews { "ats/v1/interviews", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -247,6 +250,14 @@ export class Interviews { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -255,14 +266,7 @@ export class Interviews { "ats/v1/interviews", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -358,6 +362,14 @@ export class Interviews { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -366,14 +378,7 @@ export class Interviews { `ats/v1/interviews/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -434,6 +439,14 @@ export class Interviews { private async __metaPostRetrieve( requestOptions?: Interviews.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -442,14 +455,7 @@ export class Interviews { "ats/v1/interviews/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts b/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts index b96ba620f..639e82faf 100644 --- a/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts +++ b/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts @@ -6,75 +6,43 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface InterviewsListRequest { - /** - * If provided, will only return interviews for this application. - */ + /** If provided, will only return interviews for this application. */ applicationId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.InterviewsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, wll only return interviews organized for this job. - */ + /** If provided, wll only return interviews organized for this job. */ jobId?: string; - /** - * If provided, will only return interviews at this stage. - */ + /** If provided, will only return interviews at this stage. */ jobInterviewStageId?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return interviews organized by this user. - */ + /** If provided, will only return interviews organized by this user. */ organizerId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts b/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts index bc7b2cab7..5925753e1 100644 --- a/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface InterviewsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.InterviewsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts b/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts index 063aa1813..891ac96b3 100644 --- a/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts +++ b/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts @@ -12,13 +12,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface ScheduledInterviewEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ats.ScheduledInterviewRequest; remoteUserId: string; diff --git a/src/api/resources/ats/resources/issues/client/Client.ts b/src/api/resources/ats/resources/issues/client/Client.ts index 22e551e3c..b6bc276c0 100644 --- a/src/api/resources/ats/resources/issues/client/Client.ts +++ b/src/api/resources/ats/resources/issues/client/Client.ts @@ -52,7 +52,9 @@ export class Issues { * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.issues.list() + * await client.ats.issues.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.IssuesListRequest = {}, @@ -140,6 +142,14 @@ export class Issues { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Issues { "ats/v1/issues", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -216,6 +219,14 @@ export class Issues { id: string, requestOptions?: Issues.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -224,14 +235,7 @@ export class Issues { `ats/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts index aec5b208b..6cbf1702c 100644 --- a/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts @@ -6,51 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface IssuesListRequest { accountToken?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include issues whose most recent action occurred before this time - */ + /** If included, will only include issues whose most recent action occurred before this time */ endDate?: string; endUserOrganizationName?: string; - /** - * If provided, will only return issues whose first incident time was after this datetime. - */ + /** If provided, will only return issues whose first incident time was after this datetime. */ firstIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose first incident time was before this datetime. - */ + /** If provided, will only return issues whose first incident time was before this datetime. */ firstIncidentTimeBefore?: Date; - /** - * If true, will include muted issues - */ + /** If true, will include muted issues */ includeMuted?: string; integrationName?: string; - /** - * If provided, will only return issues whose last incident time was after this datetime. - */ + /** If provided, will only return issues whose last incident time was after this datetime. */ lastIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose last incident time was before this datetime. - */ + /** If provided, will only return issues whose last incident time was before this datetime. */ lastIncidentTimeBefore?: Date; - /** - * If provided, will only include issues pertaining to the linked account passed in. - */ + /** If provided, will only include issues pertaining to the linked account passed in. */ linkedAccountId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include issues whose most recent action occurred after this time - */ + /** If included, will only include issues whose most recent action occurred after this time */ startDate?: string; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts b/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts index dd68b363a..cde6c12c3 100644 --- a/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts +++ b/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts @@ -52,7 +52,9 @@ export class JobInterviewStages { * @param {JobInterviewStages.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.jobInterviewStages.list() + * await client.ats.jobInterviewStages.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.JobInterviewStagesListRequest = {}, @@ -128,6 +130,14 @@ export class JobInterviewStages { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class JobInterviewStages { "ats/v1/job-interview-stages", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -224,6 +227,14 @@ export class JobInterviewStages { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -232,14 +243,7 @@ export class JobInterviewStages { `ats/v1/job-interview-stages/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesListRequest.ts b/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesListRequest.ts index 4acda2c03..d98f7978d 100644 --- a/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesListRequest.ts +++ b/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface JobInterviewStagesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "job"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return interview stages for this job. - */ + /** If provided, will only return interview stages for this job. */ jobId?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesRetrieveRequest.ts b/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesRetrieveRequest.ts index 33191967c..c3f46a48e 100644 --- a/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesRetrieveRequest.ts +++ b/src/api/resources/ats/resources/jobInterviewStages/client/requests/JobInterviewStagesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface JobInterviewStagesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "job"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ats/resources/jobPostings/client/Client.ts b/src/api/resources/ats/resources/jobPostings/client/Client.ts index 5f3e66055..929f4c1a1 100644 --- a/src/api/resources/ats/resources/jobPostings/client/Client.ts +++ b/src/api/resources/ats/resources/jobPostings/client/Client.ts @@ -52,7 +52,9 @@ export class JobPostings { * @param {JobPostings.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.jobPostings.list() + * await client.ats.jobPostings.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.JobPostingsListRequest = {}, @@ -130,6 +132,14 @@ export class JobPostings { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -138,14 +148,7 @@ export class JobPostings { "ats/v1/job-postings", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -226,6 +229,14 @@ export class JobPostings { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -234,14 +245,7 @@ export class JobPostings { `ats/v1/job-postings/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts b/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts index 9e20f3d5a..bc803d2b8 100644 --- a/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts +++ b/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts @@ -6,52 +6,32 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface JobPostingsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "job"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; /** * If provided, will only return Job Postings with this status. Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING') diff --git a/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsRetrieveRequest.ts b/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsRetrieveRequest.ts index 0551595cc..e2e405b4d 100644 --- a/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface JobPostingsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "job"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ats/resources/jobs/client/Client.ts b/src/api/resources/ats/resources/jobs/client/Client.ts index e706c6186..21905d1b0 100644 --- a/src/api/resources/ats/resources/jobs/client/Client.ts +++ b/src/api/resources/ats/resources/jobs/client/Client.ts @@ -52,7 +52,9 @@ export class Jobs { * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.jobs.list() + * await client.ats.jobs.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.JobsListRequest = {}, @@ -152,6 +154,14 @@ export class Jobs { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -160,14 +170,7 @@ export class Jobs { "ats/v1/jobs", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -258,6 +261,14 @@ export class Jobs { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -266,14 +277,7 @@ export class Jobs { `ats/v1/jobs/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -325,7 +329,9 @@ export class Jobs { * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.jobs.screeningQuestionsList("job_id") + * await client.ats.jobs.screeningQuestionsList("job_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public screeningQuestionsList( jobId: string, @@ -368,6 +374,14 @@ export class Jobs { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -376,14 +390,7 @@ export class Jobs { `ats/v1/jobs/${encodeURIComponent(jobId)}/screening-questions`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts b/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts index 55f78dd1e..ed87749de 100644 --- a/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts +++ b/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts @@ -6,68 +6,40 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface JobsListRequest { - /** - * If provided, will only return jobs with this code. - */ + /** If provided, will only return jobs with this code. */ code?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.JobsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return jobs for this office; multiple offices can be separated by commas. - */ + /** If provided, will only return jobs for this office; multiple offices can be separated by commas. */ offices?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; /** * If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') diff --git a/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts b/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts index 61a84447e..22e4b9d56 100644 --- a/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface JobsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.JobsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts b/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts index 0055fc971..d3d7b019b 100644 --- a/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts +++ b/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts @@ -6,31 +6,21 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface JobsScreeningQuestionsListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.JobsScreeningQuestionsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/ats/resources/linkToken/client/Client.ts b/src/api/resources/ats/resources/linkToken/client/Client.ts index 75138a8e8..07a6a0bff 100644 --- a/src/api/resources/ats/resources/linkToken/client/Client.ts +++ b/src/api/resources/ats/resources/linkToken/client/Client.ts @@ -70,6 +70,14 @@ export class LinkToken { request: Merge.ats.EndUserDetailsRequest, requestOptions?: LinkToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -78,14 +86,7 @@ export class LinkToken { "ats/v1/link-token", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ats/resources/linkedAccounts/client/Client.ts b/src/api/resources/ats/resources/linkedAccounts/client/Client.ts index 5806f1ab0..43032edf1 100644 --- a/src/api/resources/ats/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/ats/resources/linkedAccounts/client/Client.ts @@ -52,7 +52,9 @@ export class LinkedAccounts { * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.linkedAccounts.list() + * await client.ats.linkedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.LinkedAccountsListRequest = {}, @@ -135,6 +137,14 @@ export class LinkedAccounts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class LinkedAccounts { "ats/v1/linked-accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 4ac859bf5..f3bc60103 100644 --- a/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -6,7 +6,9 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LinkedAccountsListRequest { /** @@ -21,49 +23,27 @@ export interface LinkedAccountsListRequest { * * `filestorage` - filestorage */ category?: Merge.ats.LinkedAccountsListRequestCategory; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return linked accounts associated with the given email address. - */ + /** If provided, will only return linked accounts associated with the given email address. */ endUserEmailAddress?: string; - /** - * If provided, will only return linked accounts associated with the given organization name. - */ + /** If provided, will only return linked accounts associated with the given organization name. */ endUserOrganizationName?: string; - /** - * If provided, will only return linked accounts associated with the given origin ID. - */ + /** If provided, will only return linked accounts associated with the given origin ID. */ endUserOriginId?: string; - /** - * Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - */ + /** Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. */ endUserOriginIds?: string; id?: string; - /** - * Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - */ + /** Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. */ ids?: string; - /** - * If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - */ + /** If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. */ includeDuplicates?: boolean; - /** - * If provided, will only return linked accounts associated with the given integration name. - */ + /** If provided, will only return linked accounts associated with the given integration name. */ integrationName?: string; - /** - * If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - */ + /** If included, will only include test linked accounts. If not included, will only include non-test linked accounts. */ isTestAccount?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - */ + /** Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` */ status?: string; } diff --git a/src/api/resources/ats/resources/offers/client/Client.ts b/src/api/resources/ats/resources/offers/client/Client.ts index 90cb0d52c..0efd9355b 100644 --- a/src/api/resources/ats/resources/offers/client/Client.ts +++ b/src/api/resources/ats/resources/offers/client/Client.ts @@ -52,7 +52,9 @@ export class Offers { * @param {Offers.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.offers.list() + * await client.ats.offers.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.OffersListRequest = {}, @@ -145,6 +147,14 @@ export class Offers { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -153,14 +163,7 @@ export class Offers { "ats/v1/offers", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -251,6 +254,14 @@ export class Offers { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -259,14 +270,7 @@ export class Offers { `ats/v1/offers/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts b/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts index 9c2661604..ad8bede1d 100644 --- a/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts +++ b/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts @@ -6,67 +6,39 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface OffersListRequest { - /** - * If provided, will only return offers for this application. - */ + /** If provided, will only return offers for this application. */ applicationId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * If provided, will only return offers created by this user. - */ + /** If provided, will only return offers created by this user. */ creatorId?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.OffersListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts b/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts index 3c8c137f2..04c68b813 100644 --- a/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts +++ b/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface OffersRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.OffersRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/ats/resources/offices/client/Client.ts b/src/api/resources/ats/resources/offices/client/Client.ts index b38923025..5e9769677 100644 --- a/src/api/resources/ats/resources/offices/client/Client.ts +++ b/src/api/resources/ats/resources/offices/client/Client.ts @@ -52,7 +52,9 @@ export class Offices { * @param {Offices.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.offices.list() + * await client.ats.offices.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.OfficesListRequest = {}, @@ -118,6 +120,14 @@ export class Offices { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Offices { "ats/v1/offices", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Offices { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Offices { `ats/v1/offices/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/offices/client/requests/OfficesListRequest.ts b/src/api/resources/ats/resources/offices/client/requests/OfficesListRequest.ts index 22ebcc7ad..db6a9bbf9 100644 --- a/src/api/resources/ats/resources/offices/client/requests/OfficesListRequest.ts +++ b/src/api/resources/ats/resources/offices/client/requests/OfficesListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface OfficesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ats/resources/offices/client/requests/OfficesRetrieveRequest.ts b/src/api/resources/ats/resources/offices/client/requests/OfficesRetrieveRequest.ts index 99bdb3bd5..72d5cf089 100644 --- a/src/api/resources/ats/resources/offices/client/requests/OfficesRetrieveRequest.ts +++ b/src/api/resources/ats/resources/offices/client/requests/OfficesRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface OfficesRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ats/resources/passthrough/client/Client.ts b/src/api/resources/ats/resources/passthrough/client/Client.ts index a005727ea..cf9b3bf9b 100644 --- a/src/api/resources/ats/resources/passthrough/client/Client.ts +++ b/src/api/resources/ats/resources/passthrough/client/Client.ts @@ -68,6 +68,14 @@ export class Passthrough { request: Merge.ats.DataPassthroughRequest, requestOptions?: Passthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class Passthrough { "ats/v1/passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ats/resources/regenerateKey/client/Client.ts b/src/api/resources/ats/resources/regenerateKey/client/Client.ts index cda05c1e8..4cdf4d5a4 100644 --- a/src/api/resources/ats/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/ats/resources/regenerateKey/client/Client.ts @@ -67,6 +67,14 @@ export class RegenerateKey { request: Merge.ats.RemoteKeyForRegenerationRequest, requestOptions?: RegenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class RegenerateKey { "ats/v1/regenerate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ats/resources/rejectReasons/client/Client.ts b/src/api/resources/ats/resources/rejectReasons/client/Client.ts index 5572bc729..8950b1781 100644 --- a/src/api/resources/ats/resources/rejectReasons/client/Client.ts +++ b/src/api/resources/ats/resources/rejectReasons/client/Client.ts @@ -52,7 +52,9 @@ export class RejectReasons { * @param {RejectReasons.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.rejectReasons.list() + * await client.ats.rejectReasons.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.RejectReasonsListRequest = {}, @@ -118,6 +120,14 @@ export class RejectReasons { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class RejectReasons { "ats/v1/reject-reasons", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class RejectReasons { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class RejectReasons { `ats/v1/reject-reasons/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsListRequest.ts b/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsListRequest.ts index eec6d7c93..8e1d7c764 100644 --- a/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsListRequest.ts +++ b/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface RejectReasonsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsRetrieveRequest.ts b/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsRetrieveRequest.ts index 3a8c3e4ec..63a7d03c4 100644 --- a/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/rejectReasons/client/requests/RejectReasonsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RejectReasonsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ats/resources/scopes/client/Client.ts b/src/api/resources/ats/resources/scopes/client/Client.ts index 1d9d6a50d..133dfa7b1 100644 --- a/src/api/resources/ats/resources/scopes/client/Client.ts +++ b/src/api/resources/ats/resources/scopes/client/Client.ts @@ -62,6 +62,14 @@ export class Scopes { private async __defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class Scopes { "ats/v1/default-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -138,6 +139,14 @@ export class Scopes { private async __linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +155,7 @@ export class Scopes { "ats/v1/linked-account-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -240,6 +242,14 @@ export class Scopes { request: Merge.ats.LinkedAccountCommonModelScopeDeserializerRequest, requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -248,14 +258,7 @@ export class Scopes { "ats/v1/linked-account-scopes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ats/resources/scorecards/client/Client.ts b/src/api/resources/ats/resources/scorecards/client/Client.ts index 8c767c00c..aaa51538d 100644 --- a/src/api/resources/ats/resources/scorecards/client/Client.ts +++ b/src/api/resources/ats/resources/scorecards/client/Client.ts @@ -52,7 +52,9 @@ export class Scorecards { * @param {Scorecards.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.scorecards.list() + * await client.ats.scorecards.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.ScorecardsListRequest = {}, @@ -150,6 +152,14 @@ export class Scorecards { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -158,14 +168,7 @@ export class Scorecards { "ats/v1/scorecards", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -256,6 +259,14 @@ export class Scorecards { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -264,14 +275,7 @@ export class Scorecards { `ats/v1/scorecards/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts index 453e07851..867d8205e 100644 --- a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts +++ b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts @@ -6,71 +6,41 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ScorecardsListRequest { - /** - * If provided, will only return scorecards for this application. - */ + /** If provided, will only return scorecards for this application. */ applicationId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.ScorecardsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return scorecards for this interview. - */ + /** If provided, will only return scorecards for this interview. */ interviewId?: string; - /** - * If provided, will only return scorecards for this interviewer. - */ + /** If provided, will only return scorecards for this interviewer. */ interviewerId?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "overall_recommendation"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "overall_recommendation"; } diff --git a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts index b8562d81a..7d57463f7 100644 --- a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ScorecardsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ats.ScorecardsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "overall_recommendation"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "overall_recommendation"; } diff --git a/src/api/resources/ats/resources/syncStatus/client/Client.ts b/src/api/resources/ats/resources/syncStatus/client/Client.ts index eba4ea3bb..8fe8fa954 100644 --- a/src/api/resources/ats/resources/syncStatus/client/Client.ts +++ b/src/api/resources/ats/resources/syncStatus/client/Client.ts @@ -52,7 +52,9 @@ export class SyncStatus { * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.syncStatus.list() + * await client.ats.syncStatus.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.SyncStatusListRequest = {}, @@ -75,6 +77,14 @@ export class SyncStatus { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -83,14 +93,7 @@ export class SyncStatus { "ats/v1/sync-status", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/syncStatus/client/requests/SyncStatusListRequest.ts b/src/api/resources/ats/resources/syncStatus/client/requests/SyncStatusListRequest.ts index bcce714a8..3fb47f9e4 100644 --- a/src/api/resources/ats/resources/syncStatus/client/requests/SyncStatusListRequest.ts +++ b/src/api/resources/ats/resources/syncStatus/client/requests/SyncStatusListRequest.ts @@ -4,15 +4,13 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface SyncStatusListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/ats/resources/tags/client/Client.ts b/src/api/resources/ats/resources/tags/client/Client.ts index ef80c2698..c6e8beb1f 100644 --- a/src/api/resources/ats/resources/tags/client/Client.ts +++ b/src/api/resources/ats/resources/tags/client/Client.ts @@ -52,7 +52,9 @@ export class Tags { * @param {Tags.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.tags.list() + * await client.ats.tags.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.TagsListRequest = {}, @@ -118,6 +120,14 @@ export class Tags { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Tags { "ats/v1/tags", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/tags/client/requests/TagsListRequest.ts b/src/api/resources/ats/resources/tags/client/requests/TagsListRequest.ts index 513564ffa..d0f1724f3 100644 --- a/src/api/resources/ats/resources/tags/client/requests/TagsListRequest.ts +++ b/src/api/resources/ats/resources/tags/client/requests/TagsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TagsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ats/resources/users/client/Client.ts b/src/api/resources/ats/resources/users/client/Client.ts index 9d734078d..6af9db573 100644 --- a/src/api/resources/ats/resources/users/client/Client.ts +++ b/src/api/resources/ats/resources/users/client/Client.ts @@ -52,7 +52,9 @@ export class Users { * @param {Users.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ats.users.list() + * await client.ats.users.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ats.UsersListRequest = {}, @@ -133,6 +135,14 @@ export class Users { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -141,14 +151,7 @@ export class Users { "ats/v1/users", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -233,6 +236,14 @@ export class Users { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -241,14 +252,7 @@ export class Users { `ats/v1/users/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ats/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/ats/resources/users/client/requests/UsersListRequest.ts index 4f91a2cee..390af8d9e 100644 --- a/src/api/resources/ats/resources/users/client/requests/UsersListRequest.ts +++ b/src/api/resources/ats/resources/users/client/requests/UsersListRequest.ts @@ -4,59 +4,35 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface UsersListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return remote users with the given email address - */ + /** If provided, will only return remote users with the given email address */ email?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "access_role"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "access_role"; } diff --git a/src/api/resources/ats/resources/users/client/requests/UsersRetrieveRequest.ts b/src/api/resources/ats/resources/users/client/requests/UsersRetrieveRequest.ts index 31a1b78c6..426409991 100644 --- a/src/api/resources/ats/resources/users/client/requests/UsersRetrieveRequest.ts +++ b/src/api/resources/ats/resources/users/client/requests/UsersRetrieveRequest.ts @@ -7,20 +7,12 @@ * {} */ export interface UsersRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "access_role"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "access_role"; } diff --git a/src/api/resources/ats/resources/webhookReceivers/client/Client.ts b/src/api/resources/ats/resources/webhookReceivers/client/Client.ts index 9c467fd38..00896c2d4 100644 --- a/src/api/resources/ats/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/ats/resources/webhookReceivers/client/Client.ts @@ -62,6 +62,14 @@ export class WebhookReceivers { private async __list( requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class WebhookReceivers { "ats/v1/webhook-receivers", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -144,6 +145,14 @@ export class WebhookReceivers { request: Merge.ats.WebhookReceiverRequest, requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -152,14 +161,7 @@ export class WebhookReceivers { "ats/v1/webhook-receivers", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/crm/resources/accountDetails/client/Client.ts b/src/api/resources/crm/resources/accountDetails/client/Client.ts index d54097386..c44caf70f 100644 --- a/src/api/resources/crm/resources/accountDetails/client/Client.ts +++ b/src/api/resources/crm/resources/accountDetails/client/Client.ts @@ -62,6 +62,14 @@ export class AccountDetails { private async __retrieve( requestOptions?: AccountDetails.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AccountDetails { "crm/v1/account-details", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/accountToken/client/Client.ts b/src/api/resources/crm/resources/accountToken/client/Client.ts index 9976931e3..5a0f0a43a 100644 --- a/src/api/resources/crm/resources/accountToken/client/Client.ts +++ b/src/api/resources/crm/resources/accountToken/client/Client.ts @@ -65,6 +65,14 @@ export class AccountToken { publicToken: string, requestOptions?: AccountToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -73,14 +81,7 @@ export class AccountToken { `crm/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/accounts/client/Client.ts b/src/api/resources/crm/resources/accounts/client/Client.ts index 0f0dee215..d56bd8da1 100644 --- a/src/api/resources/crm/resources/accounts/client/Client.ts +++ b/src/api/resources/crm/resources/accounts/client/Client.ts @@ -52,7 +52,9 @@ export class Accounts { * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.accounts.list() + * await client.crm.accounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.AccountsListRequest = {}, @@ -138,6 +140,14 @@ export class Accounts { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +156,7 @@ export class Accounts { "crm/v1/accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -229,6 +232,14 @@ export class Accounts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -237,14 +248,7 @@ export class Accounts { "crm/v1/accounts", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -332,6 +336,14 @@ export class Accounts { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -340,14 +352,7 @@ export class Accounts { `crm/v1/accounts/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -426,6 +431,14 @@ export class Accounts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -434,14 +447,7 @@ export class Accounts { `crm/v1/accounts/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -510,6 +516,14 @@ export class Accounts { id: string, requestOptions?: Accounts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -518,14 +532,7 @@ export class Accounts { `crm/v1/accounts/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -588,6 +595,14 @@ export class Accounts { private async __metaPostRetrieve( requestOptions?: Accounts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -596,14 +611,7 @@ export class Accounts { "crm/v1/accounts/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -654,7 +662,9 @@ export class Accounts { * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.accounts.remoteFieldClassesList() + * await client.crm.accounts.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.AccountsRemoteFieldClassesListRequest = {}, @@ -710,6 +720,14 @@ export class Accounts { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -718,14 +736,7 @@ export class Accounts { "crm/v1/accounts/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/accounts/client/requests/AccountsListRequest.ts b/src/api/resources/crm/resources/accounts/client/requests/AccountsListRequest.ts index 5653da50e..cc765839c 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/AccountsListRequest.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/AccountsListRequest.ts @@ -4,63 +4,37 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AccountsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "owner"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return accounts with this name. - */ + /** If provided, will only return accounts with this name. */ name?: string; - /** - * If provided, will only return accounts with this owner. - */ + /** If provided, will only return accounts with this owner. */ ownerId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/accounts/client/requests/AccountsRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/accounts/client/requests/AccountsRemoteFieldClassesListRequest.ts index 27f4169e6..f610c9fe9 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/AccountsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/AccountsRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AccountsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/accounts/client/requests/AccountsRetrieveRequest.ts b/src/api/resources/crm/resources/accounts/client/requests/AccountsRetrieveRequest.ts index 312569d53..ac759d5c7 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/AccountsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/AccountsRetrieveRequest.ts @@ -7,20 +7,12 @@ * {} */ export interface AccountsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "owner"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts b/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts index 6f7a7c4e3..f65617b44 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface CrmAccountEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.AccountRequest; } diff --git a/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts b/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts index 40921bfa8..007125a77 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedCrmAccountEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.PatchedAccountRequest; } diff --git a/src/api/resources/crm/resources/associationTypes/client/Client.ts b/src/api/resources/crm/resources/associationTypes/client/Client.ts index 13ed841c9..27ca5afbf 100644 --- a/src/api/resources/crm/resources/associationTypes/client/Client.ts +++ b/src/api/resources/crm/resources/associationTypes/client/Client.ts @@ -53,7 +53,9 @@ export class AssociationTypes { * @param {AssociationTypes.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id") + * await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public customObjectClassesAssociationTypesList( customObjectClassId: string, @@ -128,6 +130,14 @@ export class AssociationTypes { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class AssociationTypes { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -236,6 +239,14 @@ export class AssociationTypes { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -244,14 +255,7 @@ export class AssociationTypes { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -344,6 +348,14 @@ export class AssociationTypes { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -352,14 +364,7 @@ export class AssociationTypes { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -427,6 +432,14 @@ export class AssociationTypes { customObjectClassId: string, requestOptions?: AssociationTypes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -435,14 +448,7 @@ export class AssociationTypes { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types/meta/post`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts b/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts index 6108ef693..b465f0bcd 100644 --- a/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts +++ b/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts @@ -21,13 +21,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface CrmAssociationTypeEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.AssociationTypeRequestRequest; } diff --git a/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesListRequest.ts b/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesListRequest.ts index e4705334e..31b3f878c 100644 --- a/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesListRequest.ts +++ b/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CustomObjectClassesAssociationTypesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "target_object_classes"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesRetrieveRequest.ts b/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesRetrieveRequest.ts index 0ca78e616..982bcecf1 100644 --- a/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/associationTypes/client/requests/CustomObjectClassesAssociationTypesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface CustomObjectClassesAssociationTypesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "target_object_classes"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/associations/client/Client.ts b/src/api/resources/crm/resources/associations/client/Client.ts index 89e3fafae..8ae2418a0 100644 --- a/src/api/resources/crm/resources/associations/client/Client.ts +++ b/src/api/resources/crm/resources/associations/client/Client.ts @@ -54,7 +54,9 @@ export class Associations { * @param {Associations.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id") + * await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public customObjectClassesCustomObjectsAssociationsList( customObjectClassId: string, @@ -141,6 +143,14 @@ export class Associations { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -149,14 +159,7 @@ export class Associations { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects/${encodeURIComponent(objectId)}/associations`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -257,6 +260,14 @@ export class Associations { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -265,14 +276,7 @@ export class Associations { `crm/v1/custom-object-classes/${encodeURIComponent(sourceClassId)}/custom-objects/${encodeURIComponent(sourceObjectId)}/associations/${encodeURIComponent(targetClassId)}/${encodeURIComponent(targetObjectId)}/${encodeURIComponent(associationTypeId)}`, ), method: "PUT", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.ts b/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.ts index 19fbfcfc8..3a2d28c44 100644 --- a/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.ts +++ b/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CustomObjectClassesCustomObjectsAssociationsListRequest { - /** - * If provided, will only return opportunities with this association_type. - */ + /** If provided, will only return opportunities with this association_type. */ associationTypeId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "association_type"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.ts b/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.ts index c78120bff..4ca195461 100644 --- a/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.ts +++ b/src/api/resources/crm/resources/associations/client/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface CustomObjectClassesCustomObjectsAssociationsUpdateRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; } diff --git a/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts b/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts index 045321282..b8682ebcc 100644 --- a/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts @@ -68,6 +68,14 @@ export class AsyncPassthrough { request: Merge.crm.DataPassthroughRequest, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class AsyncPassthrough { "crm/v1/async-passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -150,6 +151,14 @@ export class AsyncPassthrough { asyncPassthroughReceiptId: string, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -158,14 +167,7 @@ export class AsyncPassthrough { `crm/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/auditTrail/client/Client.ts b/src/api/resources/crm/resources/auditTrail/client/Client.ts index 1ace6b9aa..ab6114fc8 100644 --- a/src/api/resources/crm/resources/auditTrail/client/Client.ts +++ b/src/api/resources/crm/resources/auditTrail/client/Client.ts @@ -52,7 +52,9 @@ export class AuditTrail { * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.auditTrail.list() + * await client.crm.auditTrail.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.AuditTrailListRequest = {}, @@ -91,6 +93,14 @@ export class AuditTrail { _queryParams["user_email"] = userEmail; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -99,14 +109,7 @@ export class AuditTrail { "crm/v1/audit-trail", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/auditTrail/client/requests/AuditTrailListRequest.ts b/src/api/resources/crm/resources/auditTrail/client/requests/AuditTrailListRequest.ts index 99ee8b1ad..351c48dc5 100644 --- a/src/api/resources/crm/resources/auditTrail/client/requests/AuditTrailListRequest.ts +++ b/src/api/resources/crm/resources/auditTrail/client/requests/AuditTrailListRequest.ts @@ -4,31 +4,21 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AuditTrailListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include audit trail events that occurred before this time - */ + /** If included, will only include audit trail events that occurred before this time */ endDate?: string; - /** - * If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - */ + /** If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` */ eventType?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include audit trail events that occurred after this time - */ + /** If included, will only include audit trail events that occurred after this time */ startDate?: string; - /** - * If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - */ + /** If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. */ userEmail?: string; } diff --git a/src/api/resources/crm/resources/availableActions/client/Client.ts b/src/api/resources/crm/resources/availableActions/client/Client.ts index f409f5f8c..fc5a0d534 100644 --- a/src/api/resources/crm/resources/availableActions/client/Client.ts +++ b/src/api/resources/crm/resources/availableActions/client/Client.ts @@ -62,6 +62,14 @@ export class AvailableActions { private async __retrieve( requestOptions?: AvailableActions.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AvailableActions { "crm/v1/available-actions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/contacts/client/Client.ts b/src/api/resources/crm/resources/contacts/client/Client.ts index af9eb7435..f32349258 100644 --- a/src/api/resources/crm/resources/contacts/client/Client.ts +++ b/src/api/resources/crm/resources/contacts/client/Client.ts @@ -52,7 +52,9 @@ export class Contacts { * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.contacts.list() + * await client.crm.contacts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.ContactsListRequest = {}, @@ -145,6 +147,14 @@ export class Contacts { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -153,14 +163,7 @@ export class Contacts { "crm/v1/contacts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -236,6 +239,14 @@ export class Contacts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -244,14 +255,7 @@ export class Contacts { "crm/v1/contacts", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -341,6 +345,14 @@ export class Contacts { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -349,14 +361,7 @@ export class Contacts { `crm/v1/contacts/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -435,6 +440,14 @@ export class Contacts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -443,14 +456,7 @@ export class Contacts { `crm/v1/contacts/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -524,6 +530,14 @@ export class Contacts { request: Merge.crm.IgnoreCommonModelRequest, requestOptions?: Contacts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -532,14 +546,7 @@ export class Contacts { `crm/v1/contacts/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -599,6 +606,14 @@ export class Contacts { id: string, requestOptions?: Contacts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -607,14 +622,7 @@ export class Contacts { `crm/v1/contacts/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -677,6 +685,14 @@ export class Contacts { private async __metaPostRetrieve( requestOptions?: Contacts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -685,14 +701,7 @@ export class Contacts { "crm/v1/contacts/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -743,7 +752,9 @@ export class Contacts { * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.contacts.remoteFieldClassesList() + * await client.crm.contacts.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.ContactsRemoteFieldClassesListRequest = {}, @@ -799,6 +810,14 @@ export class Contacts { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -807,14 +826,7 @@ export class Contacts { "crm/v1/contacts/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts index e6fa46302..bc3ec7558 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts @@ -6,67 +6,39 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ContactsListRequest { - /** - * If provided, will only return contacts with this account. - */ + /** If provided, will only return contacts with this account. */ accountId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. - */ + /** If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. */ emailAddresses?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.ContactsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. - */ + /** If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. */ phoneNumbers?: string; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts index 9708598f0..9a5c63d04 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/ContactsRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ContactsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts index f0917b05b..918fab844 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface ContactsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.ContactsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts index 38e2bd667..f5e673c35 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface CrmContactEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.ContactRequest; } diff --git a/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts index f967c48ee..3b3c68b75 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedCrmContactEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.PatchedContactRequest; } diff --git a/src/api/resources/crm/resources/customObjectClasses/client/Client.ts b/src/api/resources/crm/resources/customObjectClasses/client/Client.ts index b37151899..93ad686c4 100644 --- a/src/api/resources/crm/resources/customObjectClasses/client/Client.ts +++ b/src/api/resources/crm/resources/customObjectClasses/client/Client.ts @@ -52,7 +52,9 @@ export class CustomObjectClasses { * @param {CustomObjectClasses.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.customObjectClasses.list() + * await client.crm.customObjectClasses.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.CustomObjectClassesListRequest = {}, @@ -123,6 +125,14 @@ export class CustomObjectClasses { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class CustomObjectClasses { "crm/v1/custom-object-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class CustomObjectClasses { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class CustomObjectClasses { `crm/v1/custom-object-classes/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesListRequest.ts b/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesListRequest.ts index 058ec83bd..c53e68d7c 100644 --- a/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesListRequest.ts +++ b/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CustomObjectClassesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "fields"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesRetrieveRequest.ts b/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesRetrieveRequest.ts index 80fc26b7b..1b2a34368 100644 --- a/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/customObjectClasses/client/requests/CustomObjectClassesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface CustomObjectClassesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "fields"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/customObjects/client/Client.ts b/src/api/resources/crm/resources/customObjects/client/Client.ts index 8b1562059..0be4562c8 100644 --- a/src/api/resources/crm/resources/customObjects/client/Client.ts +++ b/src/api/resources/crm/resources/customObjects/client/Client.ts @@ -53,7 +53,9 @@ export class CustomObjects { * @param {CustomObjects.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id") + * await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public customObjectClassesCustomObjectsList( customObjectClassId: string, @@ -128,6 +130,14 @@ export class CustomObjects { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class CustomObjects { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -230,6 +233,14 @@ export class CustomObjects { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -238,14 +249,7 @@ export class CustomObjects { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -338,6 +342,14 @@ export class CustomObjects { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -346,14 +358,7 @@ export class CustomObjects { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -421,6 +426,14 @@ export class CustomObjects { customObjectClassId: string, requestOptions?: CustomObjects.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -429,14 +442,7 @@ export class CustomObjects { `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects/meta/post`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -489,7 +495,9 @@ export class CustomObjects { * @param {CustomObjects.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList() + * await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public customObjectClassesCustomObjectsRemoteFieldClassesList( request: Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest = {}, @@ -547,6 +555,14 @@ export class CustomObjects { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -555,14 +571,7 @@ export class CustomObjects { "crm/v1/custom-object-classes/custom-objects/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts b/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts index e90f5d4b6..b7dc38053 100644 --- a/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts +++ b/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts @@ -15,13 +15,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface CrmCustomObjectEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.CustomObjectRequest; } diff --git a/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsListRequest.ts b/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsListRequest.ts index a80b7afc0..31afe0c37 100644 --- a/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsListRequest.ts +++ b/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CustomObjectClassesCustomObjectsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.ts index 95a3a52b2..a86be26f1 100644 --- a/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRetrieveRequest.ts b/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRetrieveRequest.ts index 619530493..8a737ddf2 100644 --- a/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/customObjects/client/requests/CustomObjectClassesCustomObjectsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface CustomObjectClassesCustomObjectsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/deleteAccount/client/Client.ts b/src/api/resources/crm/resources/deleteAccount/client/Client.ts index f6cdb42ae..4d85624b3 100644 --- a/src/api/resources/crm/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/crm/resources/deleteAccount/client/Client.ts @@ -56,6 +56,14 @@ export class DeleteAccount { } private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -64,14 +72,7 @@ export class DeleteAccount { "crm/v1/delete-account", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/engagementTypes/client/Client.ts b/src/api/resources/crm/resources/engagementTypes/client/Client.ts index 13ef01b3d..4766ef7e3 100644 --- a/src/api/resources/crm/resources/engagementTypes/client/Client.ts +++ b/src/api/resources/crm/resources/engagementTypes/client/Client.ts @@ -52,7 +52,9 @@ export class EngagementTypes { * @param {EngagementTypes.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.engagementTypes.list() + * await client.crm.engagementTypes.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.EngagementTypesListRequest = {}, @@ -123,6 +125,14 @@ export class EngagementTypes { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class EngagementTypes { "crm/v1/engagement-types", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class EngagementTypes { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class EngagementTypes { `crm/v1/engagement-types/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -285,7 +289,9 @@ export class EngagementTypes { * @param {EngagementTypes.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.engagementTypes.remoteFieldClassesList() + * await client.crm.engagementTypes.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.EngagementTypesRemoteFieldClassesListRequest = {}, @@ -341,6 +347,14 @@ export class EngagementTypes { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -349,14 +363,7 @@ export class EngagementTypes { "crm/v1/engagement-types/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesListRequest.ts b/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesListRequest.ts index 8f20954e2..b7f016ac2 100644 --- a/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesListRequest.ts +++ b/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EngagementTypesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRemoteFieldClassesListRequest.ts index 7f843911a..9626b0d2d 100644 --- a/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EngagementTypesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRetrieveRequest.ts b/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRetrieveRequest.ts index bb8b1046c..5eb40380a 100644 --- a/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/engagementTypes/client/requests/EngagementTypesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface EngagementTypesRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/engagements/client/Client.ts b/src/api/resources/crm/resources/engagements/client/Client.ts index c78a36d59..0428eee68 100644 --- a/src/api/resources/crm/resources/engagements/client/Client.ts +++ b/src/api/resources/crm/resources/engagements/client/Client.ts @@ -52,7 +52,9 @@ export class Engagements { * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.engagements.list() + * await client.crm.engagements.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.EngagementsListRequest = {}, @@ -140,6 +142,14 @@ export class Engagements { _queryParams["started_before"] = startedBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Engagements { "crm/v1/engagements", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -231,6 +234,14 @@ export class Engagements { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -239,14 +250,7 @@ export class Engagements { "crm/v1/engagements", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -336,6 +340,14 @@ export class Engagements { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -344,14 +356,7 @@ export class Engagements { `crm/v1/engagements/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -430,6 +435,14 @@ export class Engagements { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -438,14 +451,7 @@ export class Engagements { `crm/v1/engagements/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -514,6 +520,14 @@ export class Engagements { id: string, requestOptions?: Engagements.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -522,14 +536,7 @@ export class Engagements { `crm/v1/engagements/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -592,6 +599,14 @@ export class Engagements { private async __metaPostRetrieve( requestOptions?: Engagements.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -600,14 +615,7 @@ export class Engagements { "crm/v1/engagements/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -658,7 +666,9 @@ export class Engagements { * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.engagements.remoteFieldClassesList() + * await client.crm.engagements.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.EngagementsRemoteFieldClassesListRequest = {}, @@ -714,6 +724,14 @@ export class Engagements { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -722,14 +740,7 @@ export class Engagements { "crm/v1/engagements/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts index 581d0e1e3..c86b73835 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface EngagementEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.EngagementRequest; } diff --git a/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts index 3b5a3247a..7f97ca833 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EngagementsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.EngagementsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return engagements started after this datetime. - */ + /** If provided, will only return engagements started after this datetime. */ startedAfter?: Date; - /** - * If provided, will only return engagements started before this datetime. - */ + /** If provided, will only return engagements started before this datetime. */ startedBefore?: Date; } diff --git a/src/api/resources/crm/resources/engagements/client/requests/EngagementsRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/EngagementsRemoteFieldClassesListRequest.ts index 611d088b4..1341cf27b 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/EngagementsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/EngagementsRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EngagementsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts index e5c8147b4..0067396cd 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface EngagementsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.EngagementsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts index 1939d0033..74c95fb7c 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedEngagementEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.PatchedEngagementRequest; } diff --git a/src/api/resources/crm/resources/fieldMapping/client/Client.ts b/src/api/resources/crm/resources/fieldMapping/client/Client.ts index d90a77617..e403f0704 100644 --- a/src/api/resources/crm/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/crm/resources/fieldMapping/client/Client.ts @@ -71,6 +71,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -79,14 +87,7 @@ export class FieldMapping { "crm/v1/field-mappings", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -163,6 +164,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -171,14 +180,7 @@ export class FieldMapping { "crm/v1/field-mappings", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -245,6 +247,14 @@ export class FieldMapping { fieldMappingId: string, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -253,14 +263,7 @@ export class FieldMapping { `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -331,6 +334,14 @@ export class FieldMapping { request: Merge.crm.PatchedEditFieldMappingRequest = {}, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -339,14 +350,7 @@ export class FieldMapping { `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -427,6 +431,14 @@ export class FieldMapping { _queryParams["include_example_values"] = includeExampleValues; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -435,14 +447,7 @@ export class FieldMapping { "crm/v1/remote-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -503,6 +508,14 @@ export class FieldMapping { private async __targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -511,14 +524,7 @@ export class FieldMapping { "crm/v1/target-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/api/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index c4a2012c1..a1281ff59 100644 --- a/src/api/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/api/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,9 +14,7 @@ * } */ export interface CreateFieldMappingRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; /** The name of the target field you want this remote field to map to. */ targetFieldName: string; diff --git a/src/api/resources/crm/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts b/src/api/resources/crm/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts index 3ad738346..75ab57f7d 100644 --- a/src/api/resources/crm/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface FieldMappingsRetrieveRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; } diff --git a/src/api/resources/crm/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts b/src/api/resources/crm/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts index ad8a5c5da..78cd89f35 100644 --- a/src/api/resources/crm/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RemoteFieldsRetrieveRequest { - /** - * A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - */ + /** A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. */ commonModels?: string; - /** - * If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - */ + /** If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. */ includeExampleValues?: string; } diff --git a/src/api/resources/crm/resources/forceResync/client/Client.ts b/src/api/resources/crm/resources/forceResync/client/Client.ts index e4087af61..dbf4e1d78 100644 --- a/src/api/resources/crm/resources/forceResync/client/Client.ts +++ b/src/api/resources/crm/resources/forceResync/client/Client.ts @@ -62,6 +62,14 @@ export class ForceResync { private async __syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class ForceResync { "crm/v1/sync-status/resync", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/generateKey/client/Client.ts b/src/api/resources/crm/resources/generateKey/client/Client.ts index 5cd13c893..5eb8f4855 100644 --- a/src/api/resources/crm/resources/generateKey/client/Client.ts +++ b/src/api/resources/crm/resources/generateKey/client/Client.ts @@ -67,6 +67,14 @@ export class GenerateKey { request: Merge.crm.GenerateRemoteKeyRequest, requestOptions?: GenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class GenerateKey { "crm/v1/generate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/crm/resources/issues/client/Client.ts b/src/api/resources/crm/resources/issues/client/Client.ts index 53ad7b76c..1debdfa0a 100644 --- a/src/api/resources/crm/resources/issues/client/Client.ts +++ b/src/api/resources/crm/resources/issues/client/Client.ts @@ -52,7 +52,9 @@ export class Issues { * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.issues.list() + * await client.crm.issues.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.IssuesListRequest = {}, @@ -140,6 +142,14 @@ export class Issues { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Issues { "crm/v1/issues", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -216,6 +219,14 @@ export class Issues { id: string, requestOptions?: Issues.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -224,14 +235,7 @@ export class Issues { `crm/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts index f5a134d29..fde44e4b9 100644 --- a/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts @@ -6,51 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface IssuesListRequest { accountToken?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include issues whose most recent action occurred before this time - */ + /** If included, will only include issues whose most recent action occurred before this time */ endDate?: string; endUserOrganizationName?: string; - /** - * If provided, will only return issues whose first incident time was after this datetime. - */ + /** If provided, will only return issues whose first incident time was after this datetime. */ firstIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose first incident time was before this datetime. - */ + /** If provided, will only return issues whose first incident time was before this datetime. */ firstIncidentTimeBefore?: Date; - /** - * If true, will include muted issues - */ + /** If true, will include muted issues */ includeMuted?: string; integrationName?: string; - /** - * If provided, will only return issues whose last incident time was after this datetime. - */ + /** If provided, will only return issues whose last incident time was after this datetime. */ lastIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose last incident time was before this datetime. - */ + /** If provided, will only return issues whose last incident time was before this datetime. */ lastIncidentTimeBefore?: Date; - /** - * If provided, will only include issues pertaining to the linked account passed in. - */ + /** If provided, will only include issues pertaining to the linked account passed in. */ linkedAccountId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include issues whose most recent action occurred after this time - */ + /** If included, will only include issues whose most recent action occurred after this time */ startDate?: string; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/crm/resources/leads/client/Client.ts b/src/api/resources/crm/resources/leads/client/Client.ts index e15765fb7..698918a2c 100644 --- a/src/api/resources/crm/resources/leads/client/Client.ts +++ b/src/api/resources/crm/resources/leads/client/Client.ts @@ -52,7 +52,9 @@ export class Leads { * @param {Leads.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.leads.list() + * await client.crm.leads.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.LeadsListRequest = {}, @@ -155,6 +157,14 @@ export class Leads { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -163,14 +173,7 @@ export class Leads { "crm/v1/leads", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -246,6 +249,14 @@ export class Leads { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -254,14 +265,7 @@ export class Leads { "crm/v1/leads", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -351,6 +355,14 @@ export class Leads { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -359,14 +371,7 @@ export class Leads { `crm/v1/leads/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -425,6 +430,14 @@ export class Leads { private async __metaPostRetrieve( requestOptions?: Leads.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -433,14 +446,7 @@ export class Leads { "crm/v1/leads/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -491,7 +497,9 @@ export class Leads { * @param {Leads.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.leads.remoteFieldClassesList() + * await client.crm.leads.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.LeadsRemoteFieldClassesListRequest = {}, @@ -547,6 +555,14 @@ export class Leads { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -555,14 +571,7 @@ export class Leads { "crm/v1/leads/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts b/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts index e98a38ddd..7d566ec61 100644 --- a/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts +++ b/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface LeadEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.LeadRequest; } diff --git a/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts b/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts index a4fc22b26..2e8e8fdba 100644 --- a/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts +++ b/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts @@ -6,75 +6,43 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LeadsListRequest { - /** - * If provided, will only return leads with this account. - */ + /** If provided, will only return leads with this account. */ convertedAccountId?: string; - /** - * If provided, will only return leads with this contact. - */ + /** If provided, will only return leads with this contact. */ convertedContactId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. - */ + /** If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. */ emailAddresses?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.LeadsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return leads with this owner. - */ + /** If provided, will only return leads with this owner. */ ownerId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. - */ + /** If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. */ phoneNumbers?: string; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/leads/client/requests/LeadsRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/leads/client/requests/LeadsRemoteFieldClassesListRequest.ts index be72df760..15de122db 100644 --- a/src/api/resources/crm/resources/leads/client/requests/LeadsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/leads/client/requests/LeadsRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LeadsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts b/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts index 7d27cebd2..f81ecb45e 100644 --- a/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface LeadsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.LeadsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/linkToken/client/Client.ts b/src/api/resources/crm/resources/linkToken/client/Client.ts index 001306111..bc55e2f66 100644 --- a/src/api/resources/crm/resources/linkToken/client/Client.ts +++ b/src/api/resources/crm/resources/linkToken/client/Client.ts @@ -70,6 +70,14 @@ export class LinkToken { request: Merge.crm.EndUserDetailsRequest, requestOptions?: LinkToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -78,14 +86,7 @@ export class LinkToken { "crm/v1/link-token", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/crm/resources/linkedAccounts/client/Client.ts b/src/api/resources/crm/resources/linkedAccounts/client/Client.ts index f3c71f54a..d9a329a9f 100644 --- a/src/api/resources/crm/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/crm/resources/linkedAccounts/client/Client.ts @@ -52,7 +52,9 @@ export class LinkedAccounts { * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.linkedAccounts.list() + * await client.crm.linkedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.LinkedAccountsListRequest = {}, @@ -135,6 +137,14 @@ export class LinkedAccounts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class LinkedAccounts { "crm/v1/linked-accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 14f7af668..f8ea47633 100644 --- a/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -6,7 +6,9 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LinkedAccountsListRequest { /** @@ -21,49 +23,27 @@ export interface LinkedAccountsListRequest { * * `filestorage` - filestorage */ category?: Merge.crm.LinkedAccountsListRequestCategory; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return linked accounts associated with the given email address. - */ + /** If provided, will only return linked accounts associated with the given email address. */ endUserEmailAddress?: string; - /** - * If provided, will only return linked accounts associated with the given organization name. - */ + /** If provided, will only return linked accounts associated with the given organization name. */ endUserOrganizationName?: string; - /** - * If provided, will only return linked accounts associated with the given origin ID. - */ + /** If provided, will only return linked accounts associated with the given origin ID. */ endUserOriginId?: string; - /** - * Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - */ + /** Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. */ endUserOriginIds?: string; id?: string; - /** - * Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - */ + /** Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. */ ids?: string; - /** - * If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - */ + /** If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. */ includeDuplicates?: boolean; - /** - * If provided, will only return linked accounts associated with the given integration name. - */ + /** If provided, will only return linked accounts associated with the given integration name. */ integrationName?: string; - /** - * If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - */ + /** If included, will only include test linked accounts. If not included, will only include non-test linked accounts. */ isTestAccount?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - */ + /** Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` */ status?: string; } diff --git a/src/api/resources/crm/resources/notes/client/Client.ts b/src/api/resources/crm/resources/notes/client/Client.ts index 25bb0c15b..f0bca0b2f 100644 --- a/src/api/resources/crm/resources/notes/client/Client.ts +++ b/src/api/resources/crm/resources/notes/client/Client.ts @@ -52,7 +52,9 @@ export class Notes { * @param {Notes.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.notes.list() + * await client.crm.notes.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.NotesListRequest = {}, @@ -150,6 +152,14 @@ export class Notes { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -158,14 +168,7 @@ export class Notes { "crm/v1/notes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -241,6 +244,14 @@ export class Notes { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -249,14 +260,7 @@ export class Notes { "crm/v1/notes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -346,6 +350,14 @@ export class Notes { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -354,14 +366,7 @@ export class Notes { `crm/v1/notes/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -420,6 +425,14 @@ export class Notes { private async __metaPostRetrieve( requestOptions?: Notes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -428,14 +441,7 @@ export class Notes { "crm/v1/notes/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -486,7 +492,9 @@ export class Notes { * @param {Notes.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.notes.remoteFieldClassesList() + * await client.crm.notes.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.NotesRemoteFieldClassesListRequest = {}, @@ -542,6 +550,14 @@ export class Notes { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -550,14 +566,7 @@ export class Notes { "crm/v1/notes/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts b/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts index 90b3e30e7..7b38f8c75 100644 --- a/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts +++ b/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface NoteEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.NoteRequest; } diff --git a/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts b/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts index 8cc6fc71f..2ba16fae4 100644 --- a/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts +++ b/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts @@ -6,71 +6,41 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface NotesListRequest { - /** - * If provided, will only return notes with this account. - */ + /** If provided, will only return notes with this account. */ accountId?: string; - /** - * If provided, will only return notes with this contact. - */ + /** If provided, will only return notes with this contact. */ contactId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.NotesListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return notes with this opportunity. - */ + /** If provided, will only return notes with this opportunity. */ opportunityId?: string; - /** - * If provided, will only return notes with this owner. - */ + /** If provided, will only return notes with this owner. */ ownerId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/notes/client/requests/NotesRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/notes/client/requests/NotesRemoteFieldClassesListRequest.ts index b17a28240..b215df4b8 100644 --- a/src/api/resources/crm/resources/notes/client/requests/NotesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/notes/client/requests/NotesRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface NotesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts b/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts index a19031088..759667656 100644 --- a/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface NotesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.NotesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/opportunities/client/Client.ts b/src/api/resources/crm/resources/opportunities/client/Client.ts index 6b5078bb2..73d5bce7b 100644 --- a/src/api/resources/crm/resources/opportunities/client/Client.ts +++ b/src/api/resources/crm/resources/opportunities/client/Client.ts @@ -52,7 +52,9 @@ export class Opportunities { * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.opportunities.list() + * await client.crm.opportunities.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.OpportunitiesListRequest = {}, @@ -167,6 +169,14 @@ export class Opportunities { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -175,14 +185,7 @@ export class Opportunities { "crm/v1/opportunities", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -258,6 +261,14 @@ export class Opportunities { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -266,14 +277,7 @@ export class Opportunities { "crm/v1/opportunities", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -372,6 +376,14 @@ export class Opportunities { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -380,14 +392,7 @@ export class Opportunities { `crm/v1/opportunities/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -466,6 +471,14 @@ export class Opportunities { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -474,14 +487,7 @@ export class Opportunities { `crm/v1/opportunities/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -550,6 +556,14 @@ export class Opportunities { id: string, requestOptions?: Opportunities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -558,14 +572,7 @@ export class Opportunities { `crm/v1/opportunities/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -628,6 +635,14 @@ export class Opportunities { private async __metaPostRetrieve( requestOptions?: Opportunities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -636,14 +651,7 @@ export class Opportunities { "crm/v1/opportunities/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -696,7 +704,9 @@ export class Opportunities { * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.opportunities.remoteFieldClassesList() + * await client.crm.opportunities.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.OpportunitiesRemoteFieldClassesListRequest = {}, @@ -752,6 +762,14 @@ export class Opportunities { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -760,14 +778,7 @@ export class Opportunities { "crm/v1/opportunities/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts index 463444565..8ffb3931f 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts @@ -6,80 +6,46 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface OpportunitiesListRequest { - /** - * If provided, will only return opportunities with this account. - */ + /** If provided, will only return opportunities with this account. */ accountId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.OpportunitiesListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return opportunities with this owner. - */ + /** If provided, will only return opportunities with this owner. */ ownerId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return opportunities created in the third party platform after this datetime. - */ + /** If provided, will only return opportunities created in the third party platform after this datetime. */ remoteCreatedAfter?: Date; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; - /** - * If provided, will only return opportunities with this stage. - */ + /** If provided, will only return opportunities with this stage. */ stageId?: string; /** * If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') diff --git a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRemoteFieldClassesListRequest.ts index 179e9c73b..342030357 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface OpportunitiesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts index 078c3d9e3..77a6aed31 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts @@ -9,28 +9,16 @@ import * as Merge from "../../../../../../index"; * {} */ export interface OpportunitiesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.OpportunitiesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "status"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "status"; } diff --git a/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts index af7edcae0..37d8d75a8 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface OpportunityEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.OpportunityRequest; } diff --git a/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts index b108a2d01..eebee71f8 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedOpportunityEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.PatchedOpportunityRequest; } diff --git a/src/api/resources/crm/resources/passthrough/client/Client.ts b/src/api/resources/crm/resources/passthrough/client/Client.ts index a2c039894..46afc1927 100644 --- a/src/api/resources/crm/resources/passthrough/client/Client.ts +++ b/src/api/resources/crm/resources/passthrough/client/Client.ts @@ -68,6 +68,14 @@ export class Passthrough { request: Merge.crm.DataPassthroughRequest, requestOptions?: Passthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class Passthrough { "crm/v1/passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/crm/resources/regenerateKey/client/Client.ts b/src/api/resources/crm/resources/regenerateKey/client/Client.ts index dc315912f..ca7bb8402 100644 --- a/src/api/resources/crm/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/crm/resources/regenerateKey/client/Client.ts @@ -67,6 +67,14 @@ export class RegenerateKey { request: Merge.crm.RemoteKeyForRegenerationRequest, requestOptions?: RegenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class RegenerateKey { "crm/v1/regenerate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/crm/resources/scopes/client/Client.ts b/src/api/resources/crm/resources/scopes/client/Client.ts index fa2ee1e23..a8dd946ec 100644 --- a/src/api/resources/crm/resources/scopes/client/Client.ts +++ b/src/api/resources/crm/resources/scopes/client/Client.ts @@ -62,6 +62,14 @@ export class Scopes { private async __defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class Scopes { "crm/v1/default-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -138,6 +139,14 @@ export class Scopes { private async __linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +155,7 @@ export class Scopes { "crm/v1/linked-account-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -240,6 +242,14 @@ export class Scopes { request: Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest, requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -248,14 +258,7 @@ export class Scopes { "crm/v1/linked-account-scopes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/crm/resources/stages/client/Client.ts b/src/api/resources/crm/resources/stages/client/Client.ts index af8823785..6750462a1 100644 --- a/src/api/resources/crm/resources/stages/client/Client.ts +++ b/src/api/resources/crm/resources/stages/client/Client.ts @@ -52,7 +52,9 @@ export class Stages { * @param {Stages.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.stages.list() + * await client.crm.stages.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.StagesListRequest = {}, @@ -123,6 +125,14 @@ export class Stages { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class Stages { "crm/v1/stages", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class Stages { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class Stages { `crm/v1/stages/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -285,7 +289,9 @@ export class Stages { * @param {Stages.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.stages.remoteFieldClassesList() + * await client.crm.stages.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.StagesRemoteFieldClassesListRequest = {}, @@ -341,6 +347,14 @@ export class Stages { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -349,14 +363,7 @@ export class Stages { "crm/v1/stages/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/stages/client/requests/StagesListRequest.ts b/src/api/resources/crm/resources/stages/client/requests/StagesListRequest.ts index 1b5fd2d36..7756dba81 100644 --- a/src/api/resources/crm/resources/stages/client/requests/StagesListRequest.ts +++ b/src/api/resources/crm/resources/stages/client/requests/StagesListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface StagesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/stages/client/requests/StagesRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/stages/client/requests/StagesRemoteFieldClassesListRequest.ts index a01671919..92f5a54d6 100644 --- a/src/api/resources/crm/resources/stages/client/requests/StagesRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/stages/client/requests/StagesRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface StagesRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/stages/client/requests/StagesRetrieveRequest.ts b/src/api/resources/crm/resources/stages/client/requests/StagesRetrieveRequest.ts index f26c081f0..2fca541bd 100644 --- a/src/api/resources/crm/resources/stages/client/requests/StagesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/stages/client/requests/StagesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface StagesRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/syncStatus/client/Client.ts b/src/api/resources/crm/resources/syncStatus/client/Client.ts index 736519176..f8dec4a65 100644 --- a/src/api/resources/crm/resources/syncStatus/client/Client.ts +++ b/src/api/resources/crm/resources/syncStatus/client/Client.ts @@ -52,7 +52,9 @@ export class SyncStatus { * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.syncStatus.list() + * await client.crm.syncStatus.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.SyncStatusListRequest = {}, @@ -75,6 +77,14 @@ export class SyncStatus { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -83,14 +93,7 @@ export class SyncStatus { "crm/v1/sync-status", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/syncStatus/client/requests/SyncStatusListRequest.ts b/src/api/resources/crm/resources/syncStatus/client/requests/SyncStatusListRequest.ts index bcce714a8..3fb47f9e4 100644 --- a/src/api/resources/crm/resources/syncStatus/client/requests/SyncStatusListRequest.ts +++ b/src/api/resources/crm/resources/syncStatus/client/requests/SyncStatusListRequest.ts @@ -4,15 +4,13 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface SyncStatusListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/tasks/client/Client.ts b/src/api/resources/crm/resources/tasks/client/Client.ts index 70f0ce228..6c72b876b 100644 --- a/src/api/resources/crm/resources/tasks/client/Client.ts +++ b/src/api/resources/crm/resources/tasks/client/Client.ts @@ -52,7 +52,9 @@ export class Tasks { * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.tasks.list() + * await client.crm.tasks.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.TasksListRequest = {}, @@ -130,6 +132,14 @@ export class Tasks { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -138,14 +148,7 @@ export class Tasks { "crm/v1/tasks", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -221,6 +224,14 @@ export class Tasks { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -229,14 +240,7 @@ export class Tasks { "crm/v1/tasks", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -326,6 +330,14 @@ export class Tasks { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -334,14 +346,7 @@ export class Tasks { `crm/v1/tasks/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -420,6 +425,14 @@ export class Tasks { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -428,14 +441,7 @@ export class Tasks { `crm/v1/tasks/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -502,6 +508,14 @@ export class Tasks { id: string, requestOptions?: Tasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -510,14 +524,7 @@ export class Tasks { `crm/v1/tasks/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -576,6 +583,14 @@ export class Tasks { private async __metaPostRetrieve( requestOptions?: Tasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -584,14 +599,7 @@ export class Tasks { "crm/v1/tasks/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -642,7 +650,9 @@ export class Tasks { * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.tasks.remoteFieldClassesList() + * await client.crm.tasks.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.TasksRemoteFieldClassesListRequest = {}, @@ -698,6 +708,14 @@ export class Tasks { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -706,14 +724,7 @@ export class Tasks { "crm/v1/tasks/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts index cb81cff51..008512ca0 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedTaskEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.PatchedTaskRequest; } diff --git a/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts index 7ae2cf800..9bff10944 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface TaskEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.crm.TaskRequest; } diff --git a/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts index bf8ec1855..8217edd83 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts @@ -6,55 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TasksListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.TasksListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/tasks/client/requests/TasksRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/TasksRemoteFieldClassesListRequest.ts index af1633af6..8d3ad79bf 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/TasksRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/TasksRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TasksRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts index 3c6f9aebc..801bceccb 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface TasksRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.crm.TasksRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/users/client/Client.ts b/src/api/resources/crm/resources/users/client/Client.ts index 46490a5d8..80bb7fbfe 100644 --- a/src/api/resources/crm/resources/users/client/Client.ts +++ b/src/api/resources/crm/resources/users/client/Client.ts @@ -52,7 +52,9 @@ export class Users { * @param {Users.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.users.list() + * await client.crm.users.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.crm.UsersListRequest = {}, @@ -128,6 +130,14 @@ export class Users { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class Users { "crm/v1/users", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -224,6 +227,14 @@ export class Users { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -232,14 +243,7 @@ export class Users { `crm/v1/users/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -308,6 +312,14 @@ export class Users { request: Merge.crm.IgnoreCommonModelRequest, requestOptions?: Users.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -316,14 +328,7 @@ export class Users { `crm/v1/users/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -370,7 +375,9 @@ export class Users { * @param {Users.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.crm.users.remoteFieldClassesList() + * await client.crm.users.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.crm.UsersRemoteFieldClassesListRequest = {}, @@ -426,6 +433,14 @@ export class Users { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -434,14 +449,7 @@ export class Users { "crm/v1/users/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/crm/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/crm/resources/users/client/requests/UsersListRequest.ts index a638db513..434baa645 100644 --- a/src/api/resources/crm/resources/users/client/requests/UsersListRequest.ts +++ b/src/api/resources/crm/resources/users/client/requests/UsersListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface UsersListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return users with this email. - */ + /** If provided, will only return users with this email. */ email?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/crm/resources/users/client/requests/UsersRemoteFieldClassesListRequest.ts b/src/api/resources/crm/resources/users/client/requests/UsersRemoteFieldClassesListRequest.ts index 3c0dfc6a2..5a5996492 100644 --- a/src/api/resources/crm/resources/users/client/requests/UsersRemoteFieldClassesListRequest.ts +++ b/src/api/resources/crm/resources/users/client/requests/UsersRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface UsersRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/crm/resources/users/client/requests/UsersRetrieveRequest.ts b/src/api/resources/crm/resources/users/client/requests/UsersRetrieveRequest.ts index 291eb9859..1fe6f8299 100644 --- a/src/api/resources/crm/resources/users/client/requests/UsersRetrieveRequest.ts +++ b/src/api/resources/crm/resources/users/client/requests/UsersRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface UsersRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/crm/resources/webhookReceivers/client/Client.ts b/src/api/resources/crm/resources/webhookReceivers/client/Client.ts index 1677f1aeb..aaceba427 100644 --- a/src/api/resources/crm/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/crm/resources/webhookReceivers/client/Client.ts @@ -62,6 +62,14 @@ export class WebhookReceivers { private async __list( requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class WebhookReceivers { "crm/v1/webhook-receivers", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -144,6 +145,14 @@ export class WebhookReceivers { request: Merge.crm.WebhookReceiverRequest, requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -152,14 +161,7 @@ export class WebhookReceivers { "crm/v1/webhook-receivers", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/filestorage/resources/accountDetails/client/Client.ts b/src/api/resources/filestorage/resources/accountDetails/client/Client.ts index bc0e85a12..457d3c809 100644 --- a/src/api/resources/filestorage/resources/accountDetails/client/Client.ts +++ b/src/api/resources/filestorage/resources/accountDetails/client/Client.ts @@ -62,6 +62,14 @@ export class AccountDetails { private async __retrieve( requestOptions?: AccountDetails.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AccountDetails { "filestorage/v1/account-details", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/accountToken/client/Client.ts b/src/api/resources/filestorage/resources/accountToken/client/Client.ts index a446be89c..6e5a9f004 100644 --- a/src/api/resources/filestorage/resources/accountToken/client/Client.ts +++ b/src/api/resources/filestorage/resources/accountToken/client/Client.ts @@ -65,6 +65,14 @@ export class AccountToken { publicToken: string, requestOptions?: AccountToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -73,14 +81,7 @@ export class AccountToken { `filestorage/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts b/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts index a6f97e42a..1dfc59323 100644 --- a/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts @@ -68,6 +68,14 @@ export class AsyncPassthrough { request: Merge.filestorage.DataPassthroughRequest, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class AsyncPassthrough { "filestorage/v1/async-passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -154,6 +155,14 @@ export class AsyncPassthrough { asyncPassthroughReceiptId: string, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -162,14 +171,7 @@ export class AsyncPassthrough { `filestorage/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/auditTrail/client/Client.ts b/src/api/resources/filestorage/resources/auditTrail/client/Client.ts index d6999871f..a66b62957 100644 --- a/src/api/resources/filestorage/resources/auditTrail/client/Client.ts +++ b/src/api/resources/filestorage/resources/auditTrail/client/Client.ts @@ -52,7 +52,9 @@ export class AuditTrail { * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.auditTrail.list() + * await client.filestorage.auditTrail.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.AuditTrailListRequest = {}, @@ -91,6 +93,14 @@ export class AuditTrail { _queryParams["user_email"] = userEmail; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -99,14 +109,7 @@ export class AuditTrail { "filestorage/v1/audit-trail", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/auditTrail/client/requests/AuditTrailListRequest.ts b/src/api/resources/filestorage/resources/auditTrail/client/requests/AuditTrailListRequest.ts index 99ee8b1ad..351c48dc5 100644 --- a/src/api/resources/filestorage/resources/auditTrail/client/requests/AuditTrailListRequest.ts +++ b/src/api/resources/filestorage/resources/auditTrail/client/requests/AuditTrailListRequest.ts @@ -4,31 +4,21 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AuditTrailListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include audit trail events that occurred before this time - */ + /** If included, will only include audit trail events that occurred before this time */ endDate?: string; - /** - * If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - */ + /** If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` */ eventType?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include audit trail events that occurred after this time - */ + /** If included, will only include audit trail events that occurred after this time */ startDate?: string; - /** - * If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - */ + /** If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. */ userEmail?: string; } diff --git a/src/api/resources/filestorage/resources/availableActions/client/Client.ts b/src/api/resources/filestorage/resources/availableActions/client/Client.ts index 46db27bcf..c5be0f3e9 100644 --- a/src/api/resources/filestorage/resources/availableActions/client/Client.ts +++ b/src/api/resources/filestorage/resources/availableActions/client/Client.ts @@ -62,6 +62,14 @@ export class AvailableActions { private async __retrieve( requestOptions?: AvailableActions.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AvailableActions { "filestorage/v1/available-actions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts b/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts index 4395fe9ea..7a4315b68 100644 --- a/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts @@ -56,6 +56,14 @@ export class DeleteAccount { } private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -64,14 +72,7 @@ export class DeleteAccount { "filestorage/v1/delete-account", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/drives/client/Client.ts b/src/api/resources/filestorage/resources/drives/client/Client.ts index 529a85533..7fdc9be97 100644 --- a/src/api/resources/filestorage/resources/drives/client/Client.ts +++ b/src/api/resources/filestorage/resources/drives/client/Client.ts @@ -52,7 +52,9 @@ export class Drives { * @param {Drives.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.drives.list() + * await client.filestorage.drives.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.DrivesListRequest = {}, @@ -123,6 +125,14 @@ export class Drives { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class Drives { "filestorage/v1/drives", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -215,6 +218,14 @@ export class Drives { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -223,14 +234,7 @@ export class Drives { `filestorage/v1/drives/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/drives/client/requests/DrivesListRequest.ts b/src/api/resources/filestorage/resources/drives/client/requests/DrivesListRequest.ts index a285d1c1c..3451f5569 100644 --- a/src/api/resources/filestorage/resources/drives/client/requests/DrivesListRequest.ts +++ b/src/api/resources/filestorage/resources/drives/client/requests/DrivesListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface DrivesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return drives with this name. This performs an exact match. - */ + /** If provided, will only return drives with this name. This performs an exact match. */ name?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/filestorage/resources/drives/client/requests/DrivesRetrieveRequest.ts b/src/api/resources/filestorage/resources/drives/client/requests/DrivesRetrieveRequest.ts index 4f09493c6..e4d62c540 100644 --- a/src/api/resources/filestorage/resources/drives/client/requests/DrivesRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/drives/client/requests/DrivesRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface DrivesRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts b/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts index 462cad284..6df0424da 100644 --- a/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts @@ -71,6 +71,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -79,14 +87,7 @@ export class FieldMapping { "filestorage/v1/field-mappings", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -163,6 +164,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -171,14 +180,7 @@ export class FieldMapping { "filestorage/v1/field-mappings", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -249,6 +251,14 @@ export class FieldMapping { fieldMappingId: string, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -257,14 +267,7 @@ export class FieldMapping { `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -335,6 +338,14 @@ export class FieldMapping { request: Merge.filestorage.PatchedEditFieldMappingRequest = {}, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -343,14 +354,7 @@ export class FieldMapping { `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -431,6 +435,14 @@ export class FieldMapping { _queryParams["include_example_values"] = includeExampleValues; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -439,14 +451,7 @@ export class FieldMapping { "filestorage/v1/remote-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -507,6 +512,14 @@ export class FieldMapping { private async __targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -515,14 +528,7 @@ export class FieldMapping { "filestorage/v1/target-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/api/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index c4a2012c1..a1281ff59 100644 --- a/src/api/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/api/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,9 +14,7 @@ * } */ export interface CreateFieldMappingRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; /** The name of the target field you want this remote field to map to. */ targetFieldName: string; diff --git a/src/api/resources/filestorage/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts b/src/api/resources/filestorage/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts index 3ad738346..75ab57f7d 100644 --- a/src/api/resources/filestorage/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface FieldMappingsRetrieveRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; } diff --git a/src/api/resources/filestorage/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts b/src/api/resources/filestorage/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts index ad8a5c5da..78cd89f35 100644 --- a/src/api/resources/filestorage/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RemoteFieldsRetrieveRequest { - /** - * A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - */ + /** A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. */ commonModels?: string; - /** - * If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - */ + /** If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. */ includeExampleValues?: string; } diff --git a/src/api/resources/filestorage/resources/files/client/Client.ts b/src/api/resources/filestorage/resources/files/client/Client.ts index b8c3d4881..8790b2b14 100644 --- a/src/api/resources/filestorage/resources/files/client/Client.ts +++ b/src/api/resources/filestorage/resources/files/client/Client.ts @@ -53,7 +53,9 @@ export class Files { * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.files.list() + * await client.filestorage.files.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.FilesListRequest = {}, @@ -153,6 +155,14 @@ export class Files { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -161,14 +171,7 @@ export class Files { "filestorage/v1/files", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -244,6 +247,14 @@ export class Files { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -252,14 +263,7 @@ export class Files { "filestorage/v1/files", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -347,6 +351,14 @@ export class Files { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -355,14 +367,7 @@ export class Files { `filestorage/v1/files/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -432,6 +437,14 @@ export class Files { _queryParams["mime_type"] = mimeType; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -440,14 +453,7 @@ export class Files { `filestorage/v1/files/${encodeURIComponent(id)}/download`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, responseType: "streaming", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -514,6 +520,14 @@ export class Files { _queryParams["mime_type"] = mimeType; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -522,14 +536,7 @@ export class Files { `filestorage/v1/files/${encodeURIComponent(id)}/download/request-meta`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -582,7 +589,9 @@ export class Files { * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.files.downloadRequestMetaList() + * await client.filestorage.files.downloadRequestMetaList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public downloadRequestMetaList( request: Merge.filestorage.FilesDownloadRequestMetaListRequest = {}, @@ -646,6 +655,14 @@ export class Files { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -654,14 +671,7 @@ export class Files { "filestorage/v1/files/download/request-meta", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -724,6 +734,14 @@ export class Files { private async __metaPostRetrieve( requestOptions?: Files.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -732,14 +750,7 @@ export class Files { "filestorage/v1/files/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts index 08e585532..6420d007b 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface FileStorageFileEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.filestorage.FileRequest; } diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts index ef5dc5956..d8ebc5413 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts @@ -6,43 +6,27 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface FilesDownloadRequestMetaListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: string; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our export format help center article. - */ + /** A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our export format help center article. */ mimeTypes?: string; - /** - * If provided, will only return objects modified after this datetime. - */ + /** If provided, will only return objects modified after this datetime. */ modifiedAfter?: string; - /** - * If provided, will only return objects modified before this datetime. - */ + /** If provided, will only return objects modified before this datetime. */ modifiedBefore?: string; - /** - * Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. - */ + /** Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. */ orderBy?: Merge.filestorage.FilesDownloadRequestMetaListRequestOrderBy; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaRetrieveRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaRetrieveRequest.ts index cb112ce6b..4ffbbd0ca 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface FilesDownloadRequestMetaRetrieveRequest { - /** - * If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. - */ + /** If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. */ mimeType?: string; } diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts index 255d27419..9298c65bc 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts @@ -3,12 +3,8 @@ */ export interface FilesDownloadRetrieveRequest { - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. - */ + /** If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. */ mimeType?: string; } diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts index f972fbf38..a244bf092 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts @@ -6,71 +6,41 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface FilesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive. - */ + /** Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive. */ driveId?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.filestorage.FilesListRequestExpand; - /** - * Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory. - */ + /** Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory. */ folderId?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return files with these mime_types. Multiple values can be separated by commas. - */ + /** If provided, will only return files with these mime_types. Multiple values can be separated by commas. */ mimeType?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return files with this name. This performs an exact match. - */ + /** If provided, will only return files with this name. This performs an exact match. */ name?: string; - /** - * Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. - */ + /** Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. */ orderBy?: Merge.filestorage.FilesListRequestOrderBy; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts index 1c4ed03c5..9c3de132e 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface FilesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.filestorage.FilesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/filestorage/resources/folders/client/Client.ts b/src/api/resources/filestorage/resources/folders/client/Client.ts index 97950718b..25eb9263a 100644 --- a/src/api/resources/filestorage/resources/folders/client/Client.ts +++ b/src/api/resources/filestorage/resources/folders/client/Client.ts @@ -52,7 +52,9 @@ export class Folders { * @param {Folders.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.folders.list() + * await client.filestorage.folders.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.FoldersListRequest = {}, @@ -140,6 +142,14 @@ export class Folders { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Folders { "filestorage/v1/folders", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -231,6 +234,14 @@ export class Folders { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -239,14 +250,7 @@ export class Folders { "filestorage/v1/folders", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -334,6 +338,14 @@ export class Folders { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -342,14 +354,7 @@ export class Folders { `filestorage/v1/folders/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -410,6 +415,14 @@ export class Folders { private async __metaPostRetrieve( requestOptions?: Folders.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -418,14 +431,7 @@ export class Folders { "filestorage/v1/folders/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts b/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts index 965c541e4..b453bff5c 100644 --- a/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts +++ b/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface FileStorageFolderEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.filestorage.FolderRequest; } diff --git a/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts b/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts index 71b0a35b8..fd19d3acc 100644 --- a/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts +++ b/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts @@ -6,63 +6,37 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface FoldersListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return folders in this drive. - */ + /** If provided, will only return folders in this drive. */ driveId?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.filestorage.FoldersListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return folders with this name. This performs an exact match. - */ + /** If provided, will only return folders with this name. This performs an exact match. */ name?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return folders in this parent folder. If null, will return folders in root directory. - */ + /** If provided, will only return folders in this parent folder. If null, will return folders in root directory. */ parentFolderId?: string; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts b/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts index ffba419e7..73eecedd1 100644 --- a/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface FoldersRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.filestorage.FoldersRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/filestorage/resources/forceResync/client/Client.ts b/src/api/resources/filestorage/resources/forceResync/client/Client.ts index 2c23308fa..b80c8dbb6 100644 --- a/src/api/resources/filestorage/resources/forceResync/client/Client.ts +++ b/src/api/resources/filestorage/resources/forceResync/client/Client.ts @@ -62,6 +62,14 @@ export class ForceResync { private async __syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class ForceResync { "filestorage/v1/sync-status/resync", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/generateKey/client/Client.ts b/src/api/resources/filestorage/resources/generateKey/client/Client.ts index 180ec4156..7e1619a36 100644 --- a/src/api/resources/filestorage/resources/generateKey/client/Client.ts +++ b/src/api/resources/filestorage/resources/generateKey/client/Client.ts @@ -67,6 +67,14 @@ export class GenerateKey { request: Merge.filestorage.GenerateRemoteKeyRequest, requestOptions?: GenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class GenerateKey { "filestorage/v1/generate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/filestorage/resources/groups/client/Client.ts b/src/api/resources/filestorage/resources/groups/client/Client.ts index 00fc2fac4..f84783d81 100644 --- a/src/api/resources/filestorage/resources/groups/client/Client.ts +++ b/src/api/resources/filestorage/resources/groups/client/Client.ts @@ -52,7 +52,9 @@ export class Groups { * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.groups.list() + * await client.filestorage.groups.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.GroupsListRequest = {}, @@ -123,6 +125,14 @@ export class Groups { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class Groups { "filestorage/v1/groups", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class Groups { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class Groups { `filestorage/v1/groups/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/groups/client/requests/GroupsListRequest.ts b/src/api/resources/filestorage/resources/groups/client/requests/GroupsListRequest.ts index e28467966..c3f309aa9 100644 --- a/src/api/resources/filestorage/resources/groups/client/requests/GroupsListRequest.ts +++ b/src/api/resources/filestorage/resources/groups/client/requests/GroupsListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface GroupsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "child_groups"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/filestorage/resources/groups/client/requests/GroupsRetrieveRequest.ts b/src/api/resources/filestorage/resources/groups/client/requests/GroupsRetrieveRequest.ts index 590cf166e..03dedcbbe 100644 --- a/src/api/resources/filestorage/resources/groups/client/requests/GroupsRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/groups/client/requests/GroupsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface GroupsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "child_groups"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/filestorage/resources/issues/client/Client.ts b/src/api/resources/filestorage/resources/issues/client/Client.ts index 0d662fc91..7365ca1e7 100644 --- a/src/api/resources/filestorage/resources/issues/client/Client.ts +++ b/src/api/resources/filestorage/resources/issues/client/Client.ts @@ -52,7 +52,9 @@ export class Issues { * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.issues.list() + * await client.filestorage.issues.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.IssuesListRequest = {}, @@ -140,6 +142,14 @@ export class Issues { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Issues { "filestorage/v1/issues", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class Issues { id: string, requestOptions?: Issues.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class Issues { `filestorage/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts index aa641c700..69f10f59d 100644 --- a/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts @@ -6,51 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface IssuesListRequest { accountToken?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include issues whose most recent action occurred before this time - */ + /** If included, will only include issues whose most recent action occurred before this time */ endDate?: string; endUserOrganizationName?: string; - /** - * If provided, will only return issues whose first incident time was after this datetime. - */ + /** If provided, will only return issues whose first incident time was after this datetime. */ firstIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose first incident time was before this datetime. - */ + /** If provided, will only return issues whose first incident time was before this datetime. */ firstIncidentTimeBefore?: Date; - /** - * If true, will include muted issues - */ + /** If true, will include muted issues */ includeMuted?: string; integrationName?: string; - /** - * If provided, will only return issues whose last incident time was after this datetime. - */ + /** If provided, will only return issues whose last incident time was after this datetime. */ lastIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose last incident time was before this datetime. - */ + /** If provided, will only return issues whose last incident time was before this datetime. */ lastIncidentTimeBefore?: Date; - /** - * If provided, will only include issues pertaining to the linked account passed in. - */ + /** If provided, will only include issues pertaining to the linked account passed in. */ linkedAccountId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include issues whose most recent action occurred after this time - */ + /** If included, will only include issues whose most recent action occurred after this time */ startDate?: string; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/filestorage/resources/linkToken/client/Client.ts b/src/api/resources/filestorage/resources/linkToken/client/Client.ts index f3f0cdf41..9c15ce7ef 100644 --- a/src/api/resources/filestorage/resources/linkToken/client/Client.ts +++ b/src/api/resources/filestorage/resources/linkToken/client/Client.ts @@ -70,6 +70,14 @@ export class LinkToken { request: Merge.filestorage.EndUserDetailsRequest, requestOptions?: LinkToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -78,14 +86,7 @@ export class LinkToken { "filestorage/v1/link-token", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts b/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts index 95c6edca2..711bfbcbd 100644 --- a/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts @@ -52,7 +52,9 @@ export class LinkedAccounts { * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.linkedAccounts.list() + * await client.filestorage.linkedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.LinkedAccountsListRequest = {}, @@ -135,6 +137,14 @@ export class LinkedAccounts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class LinkedAccounts { "filestorage/v1/linked-accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 429d94888..dc7b59027 100644 --- a/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -6,7 +6,9 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LinkedAccountsListRequest { /** @@ -21,49 +23,27 @@ export interface LinkedAccountsListRequest { * * `filestorage` - filestorage */ category?: Merge.filestorage.LinkedAccountsListRequestCategory; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return linked accounts associated with the given email address. - */ + /** If provided, will only return linked accounts associated with the given email address. */ endUserEmailAddress?: string; - /** - * If provided, will only return linked accounts associated with the given organization name. - */ + /** If provided, will only return linked accounts associated with the given organization name. */ endUserOrganizationName?: string; - /** - * If provided, will only return linked accounts associated with the given origin ID. - */ + /** If provided, will only return linked accounts associated with the given origin ID. */ endUserOriginId?: string; - /** - * Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - */ + /** Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. */ endUserOriginIds?: string; id?: string; - /** - * Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - */ + /** Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. */ ids?: string; - /** - * If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - */ + /** If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. */ includeDuplicates?: boolean; - /** - * If provided, will only return linked accounts associated with the given integration name. - */ + /** If provided, will only return linked accounts associated with the given integration name. */ integrationName?: string; - /** - * If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - */ + /** If included, will only include test linked accounts. If not included, will only include non-test linked accounts. */ isTestAccount?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - */ + /** Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` */ status?: string; } diff --git a/src/api/resources/filestorage/resources/passthrough/client/Client.ts b/src/api/resources/filestorage/resources/passthrough/client/Client.ts index 2eb835bf7..471d7fe59 100644 --- a/src/api/resources/filestorage/resources/passthrough/client/Client.ts +++ b/src/api/resources/filestorage/resources/passthrough/client/Client.ts @@ -68,6 +68,14 @@ export class Passthrough { request: Merge.filestorage.DataPassthroughRequest, requestOptions?: Passthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class Passthrough { "filestorage/v1/passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts b/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts index d1be14672..371bd8075 100644 --- a/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts @@ -67,6 +67,14 @@ export class RegenerateKey { request: Merge.filestorage.RemoteKeyForRegenerationRequest, requestOptions?: RegenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class RegenerateKey { "filestorage/v1/regenerate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/filestorage/resources/scopes/client/Client.ts b/src/api/resources/filestorage/resources/scopes/client/Client.ts index 41d8e968e..64621a1f3 100644 --- a/src/api/resources/filestorage/resources/scopes/client/Client.ts +++ b/src/api/resources/filestorage/resources/scopes/client/Client.ts @@ -62,6 +62,14 @@ export class Scopes { private async __defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class Scopes { "filestorage/v1/default-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -138,6 +139,14 @@ export class Scopes { private async __linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +155,7 @@ export class Scopes { "filestorage/v1/linked-account-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -242,6 +244,14 @@ export class Scopes { request: Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest, requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -250,14 +260,7 @@ export class Scopes { "filestorage/v1/linked-account-scopes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/filestorage/resources/syncStatus/client/Client.ts b/src/api/resources/filestorage/resources/syncStatus/client/Client.ts index a60176f5a..3622f0ea1 100644 --- a/src/api/resources/filestorage/resources/syncStatus/client/Client.ts +++ b/src/api/resources/filestorage/resources/syncStatus/client/Client.ts @@ -52,7 +52,9 @@ export class SyncStatus { * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.syncStatus.list() + * await client.filestorage.syncStatus.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.SyncStatusListRequest = {}, @@ -75,6 +77,14 @@ export class SyncStatus { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -83,14 +93,7 @@ export class SyncStatus { "filestorage/v1/sync-status", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/syncStatus/client/requests/SyncStatusListRequest.ts b/src/api/resources/filestorage/resources/syncStatus/client/requests/SyncStatusListRequest.ts index bcce714a8..3fb47f9e4 100644 --- a/src/api/resources/filestorage/resources/syncStatus/client/requests/SyncStatusListRequest.ts +++ b/src/api/resources/filestorage/resources/syncStatus/client/requests/SyncStatusListRequest.ts @@ -4,15 +4,13 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface SyncStatusListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/filestorage/resources/users/client/Client.ts b/src/api/resources/filestorage/resources/users/client/Client.ts index 968312828..ae3196c35 100644 --- a/src/api/resources/filestorage/resources/users/client/Client.ts +++ b/src/api/resources/filestorage/resources/users/client/Client.ts @@ -52,7 +52,9 @@ export class Users { * @param {Users.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.filestorage.users.list() + * await client.filestorage.users.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.filestorage.UsersListRequest = {}, @@ -123,6 +125,14 @@ export class Users { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class Users { "filestorage/v1/users", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -215,6 +218,14 @@ export class Users { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -223,14 +234,7 @@ export class Users { `filestorage/v1/users/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/filestorage/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/filestorage/resources/users/client/requests/UsersListRequest.ts index b25bce04b..67968da21 100644 --- a/src/api/resources/filestorage/resources/users/client/requests/UsersListRequest.ts +++ b/src/api/resources/filestorage/resources/users/client/requests/UsersListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface UsersListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return the user object for requestor. - */ + /** If provided, will only return the user object for requestor. */ isMe?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/filestorage/resources/users/client/requests/UsersRetrieveRequest.ts b/src/api/resources/filestorage/resources/users/client/requests/UsersRetrieveRequest.ts index 613ccd92e..40b24ee5b 100644 --- a/src/api/resources/filestorage/resources/users/client/requests/UsersRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/users/client/requests/UsersRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface UsersRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts b/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts index 1d2390cb0..213ff8528 100644 --- a/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts @@ -62,6 +62,14 @@ export class WebhookReceivers { private async __list( requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class WebhookReceivers { "filestorage/v1/webhook-receivers", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -146,6 +147,14 @@ export class WebhookReceivers { request: Merge.filestorage.WebhookReceiverRequest, requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -154,14 +163,7 @@ export class WebhookReceivers { "filestorage/v1/webhook-receivers", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/hris/resources/accountDetails/client/Client.ts b/src/api/resources/hris/resources/accountDetails/client/Client.ts index 8aa2eebe4..e9934540f 100644 --- a/src/api/resources/hris/resources/accountDetails/client/Client.ts +++ b/src/api/resources/hris/resources/accountDetails/client/Client.ts @@ -62,6 +62,14 @@ export class AccountDetails { private async __retrieve( requestOptions?: AccountDetails.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AccountDetails { "hris/v1/account-details", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/accountToken/client/Client.ts b/src/api/resources/hris/resources/accountToken/client/Client.ts index 92de34b3d..7de31f238 100644 --- a/src/api/resources/hris/resources/accountToken/client/Client.ts +++ b/src/api/resources/hris/resources/accountToken/client/Client.ts @@ -65,6 +65,14 @@ export class AccountToken { publicToken: string, requestOptions?: AccountToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -73,14 +81,7 @@ export class AccountToken { `hris/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts b/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts index ba882ff32..4df1998c7 100644 --- a/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts @@ -68,6 +68,14 @@ export class AsyncPassthrough { request: Merge.hris.DataPassthroughRequest, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class AsyncPassthrough { "hris/v1/async-passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -150,6 +151,14 @@ export class AsyncPassthrough { asyncPassthroughReceiptId: string, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -158,14 +167,7 @@ export class AsyncPassthrough { `hris/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/auditTrail/client/Client.ts b/src/api/resources/hris/resources/auditTrail/client/Client.ts index 15ef088ec..02f5d136e 100644 --- a/src/api/resources/hris/resources/auditTrail/client/Client.ts +++ b/src/api/resources/hris/resources/auditTrail/client/Client.ts @@ -52,7 +52,9 @@ export class AuditTrail { * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.auditTrail.list() + * await client.hris.auditTrail.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.AuditTrailListRequest = {}, @@ -91,6 +93,14 @@ export class AuditTrail { _queryParams["user_email"] = userEmail; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -99,14 +109,7 @@ export class AuditTrail { "hris/v1/audit-trail", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/auditTrail/client/requests/AuditTrailListRequest.ts b/src/api/resources/hris/resources/auditTrail/client/requests/AuditTrailListRequest.ts index 99ee8b1ad..351c48dc5 100644 --- a/src/api/resources/hris/resources/auditTrail/client/requests/AuditTrailListRequest.ts +++ b/src/api/resources/hris/resources/auditTrail/client/requests/AuditTrailListRequest.ts @@ -4,31 +4,21 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AuditTrailListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include audit trail events that occurred before this time - */ + /** If included, will only include audit trail events that occurred before this time */ endDate?: string; - /** - * If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - */ + /** If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` */ eventType?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include audit trail events that occurred after this time - */ + /** If included, will only include audit trail events that occurred after this time */ startDate?: string; - /** - * If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - */ + /** If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. */ userEmail?: string; } diff --git a/src/api/resources/hris/resources/availableActions/client/Client.ts b/src/api/resources/hris/resources/availableActions/client/Client.ts index c164baaff..9b47e9162 100644 --- a/src/api/resources/hris/resources/availableActions/client/Client.ts +++ b/src/api/resources/hris/resources/availableActions/client/Client.ts @@ -62,6 +62,14 @@ export class AvailableActions { private async __retrieve( requestOptions?: AvailableActions.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AvailableActions { "hris/v1/available-actions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/bankInfo/client/Client.ts b/src/api/resources/hris/resources/bankInfo/client/Client.ts index deab7b87c..d00956632 100644 --- a/src/api/resources/hris/resources/bankInfo/client/Client.ts +++ b/src/api/resources/hris/resources/bankInfo/client/Client.ts @@ -52,7 +52,9 @@ export class BankInfo { * @param {BankInfo.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.bankInfo.list() + * await client.hris.bankInfo.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.BankInfoListRequest = {}, @@ -157,6 +159,14 @@ export class BankInfo { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -165,14 +175,7 @@ export class BankInfo { "hris/v1/bank-info", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -261,6 +264,14 @@ export class BankInfo { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -269,14 +280,7 @@ export class BankInfo { `hris/v1/bank-info/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts b/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts index a3798fc74..0ca56c952 100644 --- a/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts +++ b/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts @@ -6,7 +6,9 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface BankInfoListRequest { /** @@ -16,68 +18,36 @@ export interface BankInfoListRequest { * * `CHECKING` - CHECKING */ accountType?: Merge.hris.BankInfoListRequestAccountType; - /** - * If provided, will only return BankInfo's with this bank name. - */ + /** If provided, will only return BankInfo's with this bank name. */ bankName?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return bank accounts for this employee. - */ + /** If provided, will only return bank accounts for this employee. */ employeeId?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. - */ + /** Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. */ orderBy?: Merge.hris.BankInfoListRequestOrderBy; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "account_type"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "account_type"; } diff --git a/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoRetrieveRequest.ts b/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoRetrieveRequest.ts index 7685d9eb9..74bce3707 100644 --- a/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoRetrieveRequest.ts +++ b/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoRetrieveRequest.ts @@ -7,24 +7,14 @@ * {} */ export interface BankInfoRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "account_type"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "account_type"; } diff --git a/src/api/resources/hris/resources/benefits/client/Client.ts b/src/api/resources/hris/resources/benefits/client/Client.ts index 210a49290..cc7242b19 100644 --- a/src/api/resources/hris/resources/benefits/client/Client.ts +++ b/src/api/resources/hris/resources/benefits/client/Client.ts @@ -52,7 +52,9 @@ export class Benefits { * @param {Benefits.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.benefits.list() + * await client.hris.benefits.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.BenefitsListRequest = {}, @@ -128,6 +130,14 @@ export class Benefits { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class Benefits { "hris/v1/benefits", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -224,6 +227,14 @@ export class Benefits { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -232,14 +243,7 @@ export class Benefits { `hris/v1/benefits/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/benefits/client/requests/BenefitsListRequest.ts b/src/api/resources/hris/resources/benefits/client/requests/BenefitsListRequest.ts index 7cf99dfe8..fb8b0960b 100644 --- a/src/api/resources/hris/resources/benefits/client/requests/BenefitsListRequest.ts +++ b/src/api/resources/hris/resources/benefits/client/requests/BenefitsListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface BenefitsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will return the benefits associated with the employee. - */ + /** If provided, will return the benefits associated with the employee. */ employeeId?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/hris/resources/benefits/client/requests/BenefitsRetrieveRequest.ts b/src/api/resources/hris/resources/benefits/client/requests/BenefitsRetrieveRequest.ts index 9dc3d3a38..a58f5e38b 100644 --- a/src/api/resources/hris/resources/benefits/client/requests/BenefitsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/benefits/client/requests/BenefitsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface BenefitsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/companies/client/Client.ts b/src/api/resources/hris/resources/companies/client/Client.ts index 71463705d..4c248defb 100644 --- a/src/api/resources/hris/resources/companies/client/Client.ts +++ b/src/api/resources/hris/resources/companies/client/Client.ts @@ -52,7 +52,9 @@ export class Companies { * @param {Companies.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.companies.list() + * await client.hris.companies.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.CompaniesListRequest = {}, @@ -118,6 +120,14 @@ export class Companies { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Companies { "hris/v1/companies", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Companies { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Companies { `hris/v1/companies/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/companies/client/requests/CompaniesListRequest.ts b/src/api/resources/hris/resources/companies/client/requests/CompaniesListRequest.ts index 9645a4d5d..e21aedf5c 100644 --- a/src/api/resources/hris/resources/companies/client/requests/CompaniesListRequest.ts +++ b/src/api/resources/hris/resources/companies/client/requests/CompaniesListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CompaniesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/hris/resources/companies/client/requests/CompaniesRetrieveRequest.ts b/src/api/resources/hris/resources/companies/client/requests/CompaniesRetrieveRequest.ts index 47b6f6ba0..87dc8ef64 100644 --- a/src/api/resources/hris/resources/companies/client/requests/CompaniesRetrieveRequest.ts +++ b/src/api/resources/hris/resources/companies/client/requests/CompaniesRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface CompaniesRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/deleteAccount/client/Client.ts b/src/api/resources/hris/resources/deleteAccount/client/Client.ts index 9e0307df7..b11855a85 100644 --- a/src/api/resources/hris/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/hris/resources/deleteAccount/client/Client.ts @@ -56,6 +56,14 @@ export class DeleteAccount { } private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -64,14 +72,7 @@ export class DeleteAccount { "hris/v1/delete-account", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/dependents/client/Client.ts b/src/api/resources/hris/resources/dependents/client/Client.ts index 58775e7bf..a756fccf5 100644 --- a/src/api/resources/hris/resources/dependents/client/Client.ts +++ b/src/api/resources/hris/resources/dependents/client/Client.ts @@ -52,7 +52,9 @@ export class Dependents { * @param {Dependents.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.dependents.list() + * await client.hris.dependents.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.DependentsListRequest = {}, @@ -123,6 +125,14 @@ export class Dependents { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class Dependents { "hris/v1/dependents", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class Dependents { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class Dependents { `hris/v1/dependents/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts b/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts index 7ff5c4f86..2de9c81b5 100644 --- a/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts +++ b/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface DependentsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include sensitive fields (such as social security numbers) in the response. - */ + /** Whether to include sensitive fields (such as social security numbers) in the response. */ includeSensitiveFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/hris/resources/dependents/client/requests/DependentsRetrieveRequest.ts b/src/api/resources/hris/resources/dependents/client/requests/DependentsRetrieveRequest.ts index 5c176c53b..85bcde108 100644 --- a/src/api/resources/hris/resources/dependents/client/requests/DependentsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/dependents/client/requests/DependentsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface DependentsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include sensitive fields (such as social security numbers) in the response. - */ + /** Whether to include sensitive fields (such as social security numbers) in the response. */ includeSensitiveFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts index 5c08a04e2..3dde1d178 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts @@ -52,7 +52,9 @@ export class EmployeePayrollRuns { * @param {EmployeePayrollRuns.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.employeePayrollRuns.list() + * await client.hris.employeePayrollRuns.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.EmployeePayrollRunsListRequest = {}, @@ -155,6 +157,14 @@ export class EmployeePayrollRuns { _queryParams["started_before"] = startedBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -163,14 +173,7 @@ export class EmployeePayrollRuns { "hris/v1/employee-payroll-runs", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -253,6 +256,14 @@ export class EmployeePayrollRuns { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -261,14 +272,7 @@ export class EmployeePayrollRuns { `hris/v1/employee-payroll-runs/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts index 618fa06cc..e726f71b6 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts @@ -6,75 +6,43 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EmployeePayrollRunsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return employee payroll runs for this employee. - */ + /** If provided, will only return employee payroll runs for this employee. */ employeeId?: string; - /** - * If provided, will only return employee payroll runs ended after this datetime. - */ + /** If provided, will only return employee payroll runs ended after this datetime. */ endedAfter?: Date; - /** - * If provided, will only return employee payroll runs ended before this datetime. - */ + /** If provided, will only return employee payroll runs ended before this datetime. */ endedBefore?: Date; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.EmployeePayrollRunsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return employee payroll runs for this employee. - */ + /** If provided, will only return employee payroll runs for this employee. */ payrollRunId?: string; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return employee payroll runs started after this datetime. - */ + /** If provided, will only return employee payroll runs started after this datetime. */ startedAfter?: Date; - /** - * If provided, will only return employee payroll runs started before this datetime. - */ + /** If provided, will only return employee payroll runs started before this datetime. */ startedBefore?: Date; } diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts index 49ba9b37a..6650f16d0 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface EmployeePayrollRunsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.EmployeePayrollRunsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/employees/client/Client.ts b/src/api/resources/hris/resources/employees/client/Client.ts index c29becacd..72cab8c9f 100644 --- a/src/api/resources/hris/resources/employees/client/Client.ts +++ b/src/api/resources/hris/resources/employees/client/Client.ts @@ -52,7 +52,9 @@ export class Employees { * @param {Employees.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.employees.list() + * await client.hris.employees.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.EmployeesListRequest = {}, @@ -244,6 +246,14 @@ export class Employees { _queryParams["work_location_id"] = workLocationId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -252,14 +262,7 @@ export class Employees { "hris/v1/employees", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -335,6 +338,14 @@ export class Employees { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -343,14 +354,7 @@ export class Employees { "hris/v1/employees", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -455,6 +459,14 @@ export class Employees { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -463,14 +475,7 @@ export class Employees { `hris/v1/employees/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -539,6 +544,14 @@ export class Employees { request: Merge.hris.IgnoreCommonModelRequest, requestOptions?: Employees.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -547,14 +560,7 @@ export class Employees { `hris/v1/employees/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -611,6 +617,14 @@ export class Employees { private async __metaPostRetrieve( requestOptions?: Employees.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -619,14 +633,7 @@ export class Employees { "hris/v1/employees/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts b/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts index b892f6d65..6185c5944 100644 --- a/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface EmployeeEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.hris.EmployeeRequest; } diff --git a/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts b/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts index 22c54e6ff..542ec85e8 100644 --- a/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts @@ -6,28 +6,20 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EmployeesListRequest { - /** - * If provided, will only return employees for this company. - */ + /** If provided, will only return employees for this company. */ companyId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return employees with this display name. - */ + /** If provided, will only return employees with this display name. */ displayFullName?: string; /** * If provided, will only return employees with this employment status. @@ -37,112 +29,58 @@ export interface EmployeesListRequest { * * `INACTIVE` - INACTIVE */ employmentStatus?: Merge.hris.EmployeesListRequestEmploymentStatus; - /** - * If provided, will only return employees that have an employment of the specified employment_type. - */ + /** If provided, will only return employees that have an employment of the specified employment_type. */ employmentType?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.EmployeesListRequestExpand; - /** - * If provided, will only return employees with this first name. - */ + /** If provided, will only return employees with this first name. */ firstName?: string; - /** - * If provided, will only return employees matching the group ids; multiple groups can be separated by commas. - */ + /** If provided, will only return employees matching the group ids; multiple groups can be separated by commas. */ groups?: string; - /** - * If provided, will only return employees for this home location. - */ + /** If provided, will only return employees for this home location. */ homeLocationId?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include sensitive fields (such as social security numbers) in the response. - */ + /** Whether to include sensitive fields (such as social security numbers) in the response. */ includeSensitiveFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return employees that have an employment of the specified job_title. - */ + /** If provided, will only return employees that have an employment of the specified job_title. */ jobTitle?: string; - /** - * If provided, will only return employees with this last name. - */ + /** If provided, will only return employees with this last name. */ lastName?: string; - /** - * If provided, will only return employees for this manager. - */ + /** If provided, will only return employees for this manager. */ managerId?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return employees for this pay group - */ + /** If provided, will only return employees for this pay group */ payGroupId?: string; - /** - * If provided, will only return Employees with this personal email - */ + /** If provided, will only return Employees with this personal email */ personalEmail?: string; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.EmployeesListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.EmployeesListRequestShowEnumOrigins; - /** - * If provided, will only return employees that started after this datetime. - */ + /** If provided, will only return employees that started after this datetime. */ startedAfter?: Date; - /** - * If provided, will only return employees that started before this datetime. - */ + /** If provided, will only return employees that started before this datetime. */ startedBefore?: Date; - /** - * If provided, will only return employees for this team. - */ + /** If provided, will only return employees for this team. */ teamId?: string; - /** - * If provided, will only return employees that were terminated after this datetime. - */ + /** If provided, will only return employees that were terminated after this datetime. */ terminatedAfter?: Date; - /** - * If provided, will only return employees that were terminated before this datetime. - */ + /** If provided, will only return employees that were terminated before this datetime. */ terminatedBefore?: Date; - /** - * If provided, will only return Employees with this work email - */ + /** If provided, will only return Employees with this work email */ workEmail?: string; - /** - * If provided, will only return employees for this location. - */ + /** If provided, will only return employees for this location. */ workLocationId?: string; } diff --git a/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts b/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts index 480274cb4..6b5186570 100644 --- a/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts @@ -9,28 +9,16 @@ import * as Merge from "../../../../../../index"; * {} */ export interface EmployeesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.EmployeesRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include sensitive fields (such as social security numbers) in the response. - */ + /** Whether to include sensitive fields (such as social security numbers) in the response. */ includeSensitiveFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.EmployeesRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.EmployeesRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/hris/resources/employerBenefits/client/Client.ts b/src/api/resources/hris/resources/employerBenefits/client/Client.ts index b5ad4e529..678938fa5 100644 --- a/src/api/resources/hris/resources/employerBenefits/client/Client.ts +++ b/src/api/resources/hris/resources/employerBenefits/client/Client.ts @@ -52,7 +52,9 @@ export class EmployerBenefits { * @param {EmployerBenefits.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.employerBenefits.list() + * await client.hris.employerBenefits.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.EmployerBenefitsListRequest = {}, @@ -118,6 +120,14 @@ export class EmployerBenefits { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class EmployerBenefits { "hris/v1/employer-benefits", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class EmployerBenefits { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class EmployerBenefits { `hris/v1/employer-benefits/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsListRequest.ts b/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsListRequest.ts index 1379aa741..602378327 100644 --- a/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsListRequest.ts +++ b/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EmployerBenefitsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsRetrieveRequest.ts b/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsRetrieveRequest.ts index 9b2be5d89..0cc3a9747 100644 --- a/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/employerBenefits/client/requests/EmployerBenefitsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface EmployerBenefitsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/employments/client/Client.ts b/src/api/resources/hris/resources/employments/client/Client.ts index bec133908..fdb8affa0 100644 --- a/src/api/resources/hris/resources/employments/client/Client.ts +++ b/src/api/resources/hris/resources/employments/client/Client.ts @@ -52,7 +52,9 @@ export class Employments { * @param {Employments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.employments.list() + * await client.hris.employments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.EmploymentsListRequest = {}, @@ -153,6 +155,14 @@ export class Employments { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -161,14 +171,7 @@ export class Employments { "hris/v1/employments", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -265,6 +268,14 @@ export class Employments { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -273,14 +284,7 @@ export class Employments { `hris/v1/employments/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts b/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts index 44c6291df..ada9efeca 100644 --- a/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts +++ b/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts @@ -6,67 +6,39 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface EmploymentsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return employments for this employee. - */ + /** If provided, will only return employments for this employee. */ employeeId?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.EmploymentsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. - */ + /** Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. */ orderBy?: Merge.hris.EmploymentsListRequestOrderBy; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.EmploymentsListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.EmploymentsListRequestShowEnumOrigins; } diff --git a/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts b/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts index 8aa3110cc..7fb9899c5 100644 --- a/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface EmploymentsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.EmploymentsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.EmploymentsRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.EmploymentsRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/hris/resources/fieldMapping/client/Client.ts b/src/api/resources/hris/resources/fieldMapping/client/Client.ts index c6a9b693b..b6f2b4016 100644 --- a/src/api/resources/hris/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/hris/resources/fieldMapping/client/Client.ts @@ -71,6 +71,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -79,14 +87,7 @@ export class FieldMapping { "hris/v1/field-mappings", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -163,6 +164,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -171,14 +180,7 @@ export class FieldMapping { "hris/v1/field-mappings", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -245,6 +247,14 @@ export class FieldMapping { fieldMappingId: string, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -253,14 +263,7 @@ export class FieldMapping { `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -331,6 +334,14 @@ export class FieldMapping { request: Merge.hris.PatchedEditFieldMappingRequest = {}, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -339,14 +350,7 @@ export class FieldMapping { `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -427,6 +431,14 @@ export class FieldMapping { _queryParams["include_example_values"] = includeExampleValues; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -435,14 +447,7 @@ export class FieldMapping { "hris/v1/remote-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -503,6 +508,14 @@ export class FieldMapping { private async __targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -511,14 +524,7 @@ export class FieldMapping { "hris/v1/target-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/api/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index c4a2012c1..a1281ff59 100644 --- a/src/api/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/api/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,9 +14,7 @@ * } */ export interface CreateFieldMappingRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; /** The name of the target field you want this remote field to map to. */ targetFieldName: string; diff --git a/src/api/resources/hris/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts b/src/api/resources/hris/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts index 3ad738346..75ab57f7d 100644 --- a/src/api/resources/hris/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface FieldMappingsRetrieveRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; } diff --git a/src/api/resources/hris/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts b/src/api/resources/hris/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts index ad8a5c5da..78cd89f35 100644 --- a/src/api/resources/hris/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RemoteFieldsRetrieveRequest { - /** - * A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - */ + /** A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. */ commonModels?: string; - /** - * If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - */ + /** If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. */ includeExampleValues?: string; } diff --git a/src/api/resources/hris/resources/forceResync/client/Client.ts b/src/api/resources/hris/resources/forceResync/client/Client.ts index e59449858..92498bb97 100644 --- a/src/api/resources/hris/resources/forceResync/client/Client.ts +++ b/src/api/resources/hris/resources/forceResync/client/Client.ts @@ -62,6 +62,14 @@ export class ForceResync { private async __syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class ForceResync { "hris/v1/sync-status/resync", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/generateKey/client/Client.ts b/src/api/resources/hris/resources/generateKey/client/Client.ts index 21a5e6830..ffaba421b 100644 --- a/src/api/resources/hris/resources/generateKey/client/Client.ts +++ b/src/api/resources/hris/resources/generateKey/client/Client.ts @@ -67,6 +67,14 @@ export class GenerateKey { request: Merge.hris.GenerateRemoteKeyRequest, requestOptions?: GenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class GenerateKey { "hris/v1/generate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/hris/resources/groups/client/Client.ts b/src/api/resources/hris/resources/groups/client/Client.ts index 8ba307a12..6541b6886 100644 --- a/src/api/resources/hris/resources/groups/client/Client.ts +++ b/src/api/resources/hris/resources/groups/client/Client.ts @@ -52,7 +52,9 @@ export class Groups { * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.groups.list() + * await client.hris.groups.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.GroupsListRequest = {}, @@ -143,6 +145,14 @@ export class Groups { _queryParams["types"] = types; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -151,14 +161,7 @@ export class Groups { "hris/v1/groups", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -243,6 +246,14 @@ export class Groups { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -251,14 +262,7 @@ export class Groups { `hris/v1/groups/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/groups/client/requests/GroupsListRequest.ts b/src/api/resources/hris/resources/groups/client/requests/GroupsListRequest.ts index 49f9e3765..15ede514d 100644 --- a/src/api/resources/hris/resources/groups/client/requests/GroupsListRequest.ts +++ b/src/api/resources/hris/resources/groups/client/requests/GroupsListRequest.ts @@ -4,67 +4,39 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface GroupsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, specifies whether to return only Group objects which refer to a team in the third party platform. Note that this is an opinionated view based on how a team may be represented in the third party platform. - */ + /** If provided, specifies whether to return only Group objects which refer to a team in the third party platform. Note that this is an opinionated view based on how a team may be represented in the third party platform. */ isCommonlyUsedAsTeam?: string; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * If provided, will only return groups with these names. Multiple values can be separated by commas. - */ + /** If provided, will only return groups with these names. Multiple values can be separated by commas. */ names?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "type"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "type"; - /** - * If provided, will only return groups of these types. Multiple values can be separated by commas. - */ + /** If provided, will only return groups of these types. Multiple values can be separated by commas. */ types?: string; } diff --git a/src/api/resources/hris/resources/groups/client/requests/GroupsRetrieveRequest.ts b/src/api/resources/hris/resources/groups/client/requests/GroupsRetrieveRequest.ts index 3498f0daf..b29388df9 100644 --- a/src/api/resources/hris/resources/groups/client/requests/GroupsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/groups/client/requests/GroupsRetrieveRequest.ts @@ -7,20 +7,12 @@ * {} */ export interface GroupsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "type"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "type"; } diff --git a/src/api/resources/hris/resources/issues/client/Client.ts b/src/api/resources/hris/resources/issues/client/Client.ts index c0955cf80..5fb928e8d 100644 --- a/src/api/resources/hris/resources/issues/client/Client.ts +++ b/src/api/resources/hris/resources/issues/client/Client.ts @@ -52,7 +52,9 @@ export class Issues { * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.issues.list() + * await client.hris.issues.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.IssuesListRequest = {}, @@ -140,6 +142,14 @@ export class Issues { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Issues { "hris/v1/issues", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -216,6 +219,14 @@ export class Issues { id: string, requestOptions?: Issues.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -224,14 +235,7 @@ export class Issues { `hris/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts index 99f60918b..d78145a47 100644 --- a/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts @@ -6,51 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface IssuesListRequest { accountToken?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include issues whose most recent action occurred before this time - */ + /** If included, will only include issues whose most recent action occurred before this time */ endDate?: string; endUserOrganizationName?: string; - /** - * If provided, will only return issues whose first incident time was after this datetime. - */ + /** If provided, will only return issues whose first incident time was after this datetime. */ firstIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose first incident time was before this datetime. - */ + /** If provided, will only return issues whose first incident time was before this datetime. */ firstIncidentTimeBefore?: Date; - /** - * If true, will include muted issues - */ + /** If true, will include muted issues */ includeMuted?: string; integrationName?: string; - /** - * If provided, will only return issues whose last incident time was after this datetime. - */ + /** If provided, will only return issues whose last incident time was after this datetime. */ lastIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose last incident time was before this datetime. - */ + /** If provided, will only return issues whose last incident time was before this datetime. */ lastIncidentTimeBefore?: Date; - /** - * If provided, will only include issues pertaining to the linked account passed in. - */ + /** If provided, will only include issues pertaining to the linked account passed in. */ linkedAccountId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include issues whose most recent action occurred after this time - */ + /** If included, will only include issues whose most recent action occurred after this time */ startDate?: string; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/hris/resources/linkToken/client/Client.ts b/src/api/resources/hris/resources/linkToken/client/Client.ts index 148c9e890..f065c5c02 100644 --- a/src/api/resources/hris/resources/linkToken/client/Client.ts +++ b/src/api/resources/hris/resources/linkToken/client/Client.ts @@ -70,6 +70,14 @@ export class LinkToken { request: Merge.hris.EndUserDetailsRequest, requestOptions?: LinkToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -78,14 +86,7 @@ export class LinkToken { "hris/v1/link-token", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/hris/resources/linkedAccounts/client/Client.ts b/src/api/resources/hris/resources/linkedAccounts/client/Client.ts index b2a1cb99d..765d7747d 100644 --- a/src/api/resources/hris/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/hris/resources/linkedAccounts/client/Client.ts @@ -52,7 +52,9 @@ export class LinkedAccounts { * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.linkedAccounts.list() + * await client.hris.linkedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.LinkedAccountsListRequest = {}, @@ -135,6 +137,14 @@ export class LinkedAccounts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class LinkedAccounts { "hris/v1/linked-accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 0e0825895..deb2a41d8 100644 --- a/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -6,7 +6,9 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LinkedAccountsListRequest { /** @@ -21,49 +23,27 @@ export interface LinkedAccountsListRequest { * * `filestorage` - filestorage */ category?: Merge.hris.LinkedAccountsListRequestCategory; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return linked accounts associated with the given email address. - */ + /** If provided, will only return linked accounts associated with the given email address. */ endUserEmailAddress?: string; - /** - * If provided, will only return linked accounts associated with the given organization name. - */ + /** If provided, will only return linked accounts associated with the given organization name. */ endUserOrganizationName?: string; - /** - * If provided, will only return linked accounts associated with the given origin ID. - */ + /** If provided, will only return linked accounts associated with the given origin ID. */ endUserOriginId?: string; - /** - * Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - */ + /** Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. */ endUserOriginIds?: string; id?: string; - /** - * Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - */ + /** Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. */ ids?: string; - /** - * If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - */ + /** If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. */ includeDuplicates?: boolean; - /** - * If provided, will only return linked accounts associated with the given integration name. - */ + /** If provided, will only return linked accounts associated with the given integration name. */ integrationName?: string; - /** - * If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - */ + /** If included, will only include test linked accounts. If not included, will only include non-test linked accounts. */ isTestAccount?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - */ + /** Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` */ status?: string; } diff --git a/src/api/resources/hris/resources/locations/client/Client.ts b/src/api/resources/hris/resources/locations/client/Client.ts index 75c0a63ad..4c0ca86c9 100644 --- a/src/api/resources/hris/resources/locations/client/Client.ts +++ b/src/api/resources/hris/resources/locations/client/Client.ts @@ -52,7 +52,9 @@ export class Locations { * @param {Locations.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.locations.list() + * await client.hris.locations.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.LocationsListRequest = {}, @@ -142,6 +144,14 @@ export class Locations { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -150,14 +160,7 @@ export class Locations { "hris/v1/locations", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -248,6 +251,14 @@ export class Locations { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -256,14 +267,7 @@ export class Locations { `hris/v1/locations/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts b/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts index 45c8fc963..ff2ced7c4 100644 --- a/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts +++ b/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts @@ -6,32 +6,22 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LocationsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; /** * If provided, will only return locations with this location_type @@ -40,28 +30,16 @@ export interface LocationsListRequest { * * `WORK` - WORK */ locationType?: Merge.hris.LocationsListRequestLocationType; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.LocationsListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.LocationsListRequestShowEnumOrigins; } diff --git a/src/api/resources/hris/resources/locations/client/requests/LocationsRetrieveRequest.ts b/src/api/resources/hris/resources/locations/client/requests/LocationsRetrieveRequest.ts index 8a668ffbb..b842cfd30 100644 --- a/src/api/resources/hris/resources/locations/client/requests/LocationsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/locations/client/requests/LocationsRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface LocationsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.LocationsRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.LocationsRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/hris/resources/passthrough/client/Client.ts b/src/api/resources/hris/resources/passthrough/client/Client.ts index 5ee169c6d..46424269a 100644 --- a/src/api/resources/hris/resources/passthrough/client/Client.ts +++ b/src/api/resources/hris/resources/passthrough/client/Client.ts @@ -68,6 +68,14 @@ export class Passthrough { request: Merge.hris.DataPassthroughRequest, requestOptions?: Passthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class Passthrough { "hris/v1/passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/hris/resources/payGroups/client/Client.ts b/src/api/resources/hris/resources/payGroups/client/Client.ts index 6c30c377f..4036306c4 100644 --- a/src/api/resources/hris/resources/payGroups/client/Client.ts +++ b/src/api/resources/hris/resources/payGroups/client/Client.ts @@ -52,7 +52,9 @@ export class PayGroups { * @param {PayGroups.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.payGroups.list() + * await client.hris.payGroups.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.PayGroupsListRequest = {}, @@ -118,6 +120,14 @@ export class PayGroups { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class PayGroups { "hris/v1/pay-groups", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class PayGroups { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class PayGroups { `hris/v1/pay-groups/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsListRequest.ts b/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsListRequest.ts index 2ae92a797..2d38a0b23 100644 --- a/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsListRequest.ts +++ b/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PayGroupsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsRetrieveRequest.ts b/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsRetrieveRequest.ts index daa501a52..0f871c7a2 100644 --- a/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/payGroups/client/requests/PayGroupsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface PayGroupsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/payrollRuns/client/Client.ts b/src/api/resources/hris/resources/payrollRuns/client/Client.ts index 79be4f713..e96e97ebe 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/Client.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/Client.ts @@ -52,7 +52,9 @@ export class PayrollRuns { * @param {PayrollRuns.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.payrollRuns.list() + * await client.hris.payrollRuns.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.PayrollRunsListRequest = {}, @@ -161,6 +163,14 @@ export class PayrollRuns { _queryParams["started_before"] = startedBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -169,14 +179,7 @@ export class PayrollRuns { "hris/v1/payroll-runs", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -267,6 +270,14 @@ export class PayrollRuns { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -275,14 +286,7 @@ export class PayrollRuns { `hris/v1/payroll-runs/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts index 24c5fa536..fbfbf8162 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts @@ -6,60 +6,36 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface PayrollRunsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return payroll runs ended after this datetime. - */ + /** If provided, will only return payroll runs ended after this datetime. */ endedAfter?: Date; - /** - * If provided, will only return payroll runs ended before this datetime. - */ + /** If provided, will only return payroll runs ended before this datetime. */ endedBefore?: Date; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.PayrollRunsListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; /** * If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS') @@ -71,16 +47,10 @@ export interface PayrollRunsListRequest { * * `SIGN_ON_BONUS` - SIGN_ON_BONUS */ runType?: Merge.hris.PayrollRunsListRequestRunType; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.PayrollRunsListRequestShowEnumOrigins; - /** - * If provided, will only return payroll runs started after this datetime. - */ + /** If provided, will only return payroll runs started after this datetime. */ startedAfter?: Date; - /** - * If provided, will only return payroll runs started before this datetime. - */ + /** If provided, will only return payroll runs started before this datetime. */ startedBefore?: Date; } diff --git a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts index 9277673f4..70b7e2c11 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts @@ -9,20 +9,12 @@ import * as Merge from "../../../../../../index"; * {} */ export interface PayrollRunsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.PayrollRunsRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.PayrollRunsRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/hris/resources/regenerateKey/client/Client.ts b/src/api/resources/hris/resources/regenerateKey/client/Client.ts index 13c8a0d49..33a03416c 100644 --- a/src/api/resources/hris/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/hris/resources/regenerateKey/client/Client.ts @@ -67,6 +67,14 @@ export class RegenerateKey { request: Merge.hris.RemoteKeyForRegenerationRequest, requestOptions?: RegenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class RegenerateKey { "hris/v1/regenerate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/hris/resources/scopes/client/Client.ts b/src/api/resources/hris/resources/scopes/client/Client.ts index 7b3103897..f8cdf3a47 100644 --- a/src/api/resources/hris/resources/scopes/client/Client.ts +++ b/src/api/resources/hris/resources/scopes/client/Client.ts @@ -62,6 +62,14 @@ export class Scopes { private async __defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class Scopes { "hris/v1/default-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -138,6 +139,14 @@ export class Scopes { private async __linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +155,7 @@ export class Scopes { "hris/v1/linked-account-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -240,6 +242,14 @@ export class Scopes { request: Merge.hris.LinkedAccountCommonModelScopeDeserializerRequest, requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -248,14 +258,7 @@ export class Scopes { "hris/v1/linked-account-scopes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/hris/resources/syncStatus/client/Client.ts b/src/api/resources/hris/resources/syncStatus/client/Client.ts index dcfca43e1..bd3621b98 100644 --- a/src/api/resources/hris/resources/syncStatus/client/Client.ts +++ b/src/api/resources/hris/resources/syncStatus/client/Client.ts @@ -52,7 +52,9 @@ export class SyncStatus { * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.syncStatus.list() + * await client.hris.syncStatus.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.SyncStatusListRequest = {}, @@ -75,6 +77,14 @@ export class SyncStatus { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -83,14 +93,7 @@ export class SyncStatus { "hris/v1/sync-status", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/syncStatus/client/requests/SyncStatusListRequest.ts b/src/api/resources/hris/resources/syncStatus/client/requests/SyncStatusListRequest.ts index bcce714a8..3fb47f9e4 100644 --- a/src/api/resources/hris/resources/syncStatus/client/requests/SyncStatusListRequest.ts +++ b/src/api/resources/hris/resources/syncStatus/client/requests/SyncStatusListRequest.ts @@ -4,15 +4,13 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface SyncStatusListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/hris/resources/teams/client/Client.ts b/src/api/resources/hris/resources/teams/client/Client.ts index ed5ec36d3..779a6b70e 100644 --- a/src/api/resources/hris/resources/teams/client/Client.ts +++ b/src/api/resources/hris/resources/teams/client/Client.ts @@ -52,7 +52,9 @@ export class Teams { * @param {Teams.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.teams.list() + * await client.hris.teams.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.TeamsListRequest = {}, @@ -128,6 +130,14 @@ export class Teams { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -136,14 +146,7 @@ export class Teams { "hris/v1/teams", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -224,6 +227,14 @@ export class Teams { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -232,14 +243,7 @@ export class Teams { `hris/v1/teams/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/teams/client/requests/TeamsListRequest.ts b/src/api/resources/hris/resources/teams/client/requests/TeamsListRequest.ts index dd357aa20..dbde02ed0 100644 --- a/src/api/resources/hris/resources/teams/client/requests/TeamsListRequest.ts +++ b/src/api/resources/hris/resources/teams/client/requests/TeamsListRequest.ts @@ -4,55 +4,33 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TeamsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "parent_team"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return teams with this parent team. - */ + /** If provided, will only return teams with this parent team. */ parentTeamId?: string; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/hris/resources/teams/client/requests/TeamsRetrieveRequest.ts b/src/api/resources/hris/resources/teams/client/requests/TeamsRetrieveRequest.ts index 0395e83b0..9630bd69b 100644 --- a/src/api/resources/hris/resources/teams/client/requests/TeamsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/teams/client/requests/TeamsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface TeamsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "parent_team"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/timeOff/client/Client.ts b/src/api/resources/hris/resources/timeOff/client/Client.ts index 85625ff0a..a0feddc0b 100644 --- a/src/api/resources/hris/resources/timeOff/client/Client.ts +++ b/src/api/resources/hris/resources/timeOff/client/Client.ts @@ -52,7 +52,9 @@ export class TimeOff { * @param {TimeOff.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.timeOff.list() + * await client.hris.timeOff.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.TimeOffListRequest = {}, @@ -184,6 +186,14 @@ export class TimeOff { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -192,14 +202,7 @@ export class TimeOff { "hris/v1/time-off", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -275,6 +278,14 @@ export class TimeOff { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -283,14 +294,7 @@ export class TimeOff { "hris/v1/time-off", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -390,6 +394,14 @@ export class TimeOff { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -398,14 +410,7 @@ export class TimeOff { `hris/v1/time-off/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -466,6 +471,14 @@ export class TimeOff { private async __metaPostRetrieve( requestOptions?: TimeOff.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -474,14 +487,7 @@ export class TimeOff { "hris/v1/time-off/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts index 6fd3a69aa..6a44a116d 100644 --- a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts +++ b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface TimeOffEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.hris.TimeOffRequest; } diff --git a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts index 92f31f00f..41cd9dbb2 100644 --- a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts +++ b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts @@ -6,72 +6,42 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TimeOffListRequest { - /** - * If provided, will only return time off for this approver. - */ + /** If provided, will only return time off for this approver. */ approverId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return time off for this employee. - */ + /** If provided, will only return time off for this employee. */ employeeId?: string; - /** - * If provided, will only return employees that ended after this datetime. - */ + /** If provided, will only return employees that ended after this datetime. */ endedAfter?: Date; - /** - * If provided, will only return time-offs that ended before this datetime. - */ + /** If provided, will only return time-offs that ended before this datetime. */ endedBefore?: Date; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.TimeOffListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.TimeOffListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; /** * If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') @@ -84,17 +54,11 @@ export interface TimeOffListRequest { * * `BEREAVEMENT` - BEREAVEMENT */ requestType?: Merge.hris.TimeOffListRequestRequestType; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.TimeOffListRequestShowEnumOrigins; - /** - * If provided, will only return time-offs that started after this datetime. - */ + /** If provided, will only return time-offs that started after this datetime. */ startedAfter?: Date; - /** - * If provided, will only return time-offs that started before this datetime. - */ + /** If provided, will only return time-offs that started before this datetime. */ startedBefore?: Date; /** * If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') diff --git a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts index 4e2dab19f..649799c74 100644 --- a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts +++ b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts @@ -9,24 +9,14 @@ import * as Merge from "../../../../../../index"; * {} */ export interface TimeOffRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.hris.TimeOffRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.hris.TimeOffRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.hris.TimeOffRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/hris/resources/timeOffBalances/client/Client.ts b/src/api/resources/hris/resources/timeOffBalances/client/Client.ts index bc2783a9c..079cbaba1 100644 --- a/src/api/resources/hris/resources/timeOffBalances/client/Client.ts +++ b/src/api/resources/hris/resources/timeOffBalances/client/Client.ts @@ -52,7 +52,9 @@ export class TimeOffBalances { * @param {TimeOffBalances.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.timeOffBalances.list() + * await client.hris.timeOffBalances.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.TimeOffBalancesListRequest = {}, @@ -146,6 +148,14 @@ export class TimeOffBalances { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -154,14 +164,7 @@ export class TimeOffBalances { "hris/v1/time-off-balances", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -250,6 +253,14 @@ export class TimeOffBalances { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -258,14 +269,7 @@ export class TimeOffBalances { `hris/v1/time-off-balances/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts b/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts index 4a2fcc3d9..c1e068f72 100644 --- a/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts +++ b/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts @@ -6,52 +6,32 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TimeOffBalancesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return time off balances for this employee. - */ + /** If provided, will only return time off balances for this employee. */ employeeId?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; /** * If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') @@ -64,16 +44,10 @@ export interface TimeOffBalancesListRequest { * * `BEREAVEMENT` - BEREAVEMENT */ policyType?: Merge.hris.TimeOffBalancesListRequestPolicyType; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "policy_type"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "policy_type"; } diff --git a/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesRetrieveRequest.ts b/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesRetrieveRequest.ts index 4a8250761..d1bd13c22 100644 --- a/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesRetrieveRequest.ts +++ b/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesRetrieveRequest.ts @@ -7,24 +7,14 @@ * {} */ export interface TimeOffBalancesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "policy_type"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "policy_type"; } diff --git a/src/api/resources/hris/resources/timesheetEntries/client/Client.ts b/src/api/resources/hris/resources/timesheetEntries/client/Client.ts index f691f078d..f6b3e6987 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/Client.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/Client.ts @@ -52,7 +52,9 @@ export class TimesheetEntries { * @param {TimesheetEntries.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.hris.timesheetEntries.list() + * await client.hris.timesheetEntries.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.hris.TimesheetEntriesListRequest = {}, @@ -155,6 +157,14 @@ export class TimesheetEntries { _queryParams["started_before"] = startedBefore.toISOString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -163,14 +173,7 @@ export class TimesheetEntries { "hris/v1/timesheet-entries", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -246,6 +249,14 @@ export class TimesheetEntries { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -254,14 +265,7 @@ export class TimesheetEntries { "hris/v1/timesheet-entries", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -347,6 +351,14 @@ export class TimesheetEntries { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -355,14 +367,7 @@ export class TimesheetEntries { `hris/v1/timesheet-entries/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -425,6 +430,14 @@ export class TimesheetEntries { private async __metaPostRetrieve( requestOptions?: TimesheetEntries.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -433,14 +446,7 @@ export class TimesheetEntries { "hris/v1/timesheet-entries/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts index 954c4a028..437dd7e05 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts @@ -6,75 +6,43 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TimesheetEntriesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return timesheet entries for this employee. - */ + /** If provided, will only return timesheet entries for this employee. */ employeeId?: string; - /** - * If provided, will only return timesheet entries ended after this datetime. - */ + /** If provided, will only return timesheet entries ended after this datetime. */ endedAfter?: Date; - /** - * If provided, will only return timesheet entries ended before this datetime. - */ + /** If provided, will only return timesheet entries ended before this datetime. */ endedBefore?: Date; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. - */ + /** Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. */ orderBy?: Merge.hris.TimesheetEntriesListRequestOrderBy; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return timesheet entries started after this datetime. - */ + /** If provided, will only return timesheet entries started after this datetime. */ startedAfter?: Date; - /** - * If provided, will only return timesheet entries started before this datetime. - */ + /** If provided, will only return timesheet entries started before this datetime. */ startedBefore?: Date; } diff --git a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesRetrieveRequest.ts b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesRetrieveRequest.ts index 7a1ae9583..6cf1b8421 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesRetrieveRequest.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface TimesheetEntriesRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "employee"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts index a88139cb8..5dc16e007 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface TimesheetEntryEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.hris.TimesheetEntryRequest; } diff --git a/src/api/resources/hris/resources/webhookReceivers/client/Client.ts b/src/api/resources/hris/resources/webhookReceivers/client/Client.ts index a47b51ef3..4ca080da4 100644 --- a/src/api/resources/hris/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/hris/resources/webhookReceivers/client/Client.ts @@ -62,6 +62,14 @@ export class WebhookReceivers { private async __list( requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class WebhookReceivers { "hris/v1/webhook-receivers", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -144,6 +145,14 @@ export class WebhookReceivers { request: Merge.hris.WebhookReceiverRequest, requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -152,14 +161,7 @@ export class WebhookReceivers { "hris/v1/webhook-receivers", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ticketing/resources/accountDetails/client/Client.ts b/src/api/resources/ticketing/resources/accountDetails/client/Client.ts index d5674c25e..8d679650b 100644 --- a/src/api/resources/ticketing/resources/accountDetails/client/Client.ts +++ b/src/api/resources/ticketing/resources/accountDetails/client/Client.ts @@ -62,6 +62,14 @@ export class AccountDetails { private async __retrieve( requestOptions?: AccountDetails.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AccountDetails { "ticketing/v1/account-details", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/accountToken/client/Client.ts b/src/api/resources/ticketing/resources/accountToken/client/Client.ts index 89359e3af..dbee0af7b 100644 --- a/src/api/resources/ticketing/resources/accountToken/client/Client.ts +++ b/src/api/resources/ticketing/resources/accountToken/client/Client.ts @@ -65,6 +65,14 @@ export class AccountToken { publicToken: string, requestOptions?: AccountToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -73,14 +81,7 @@ export class AccountToken { `ticketing/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/accounts/client/Client.ts b/src/api/resources/ticketing/resources/accounts/client/Client.ts index a99acf5b7..c85e7871e 100644 --- a/src/api/resources/ticketing/resources/accounts/client/Client.ts +++ b/src/api/resources/ticketing/resources/accounts/client/Client.ts @@ -52,7 +52,9 @@ export class Accounts { * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.accounts.list() + * await client.ticketing.accounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.AccountsListRequest = {}, @@ -118,6 +120,14 @@ export class Accounts { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Accounts { "ticketing/v1/accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Accounts { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Accounts { `ticketing/v1/accounts/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/accounts/client/requests/AccountsListRequest.ts b/src/api/resources/ticketing/resources/accounts/client/requests/AccountsListRequest.ts index 35e42dbff..080b2b0af 100644 --- a/src/api/resources/ticketing/resources/accounts/client/requests/AccountsListRequest.ts +++ b/src/api/resources/ticketing/resources/accounts/client/requests/AccountsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AccountsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ticketing/resources/accounts/client/requests/AccountsRetrieveRequest.ts b/src/api/resources/ticketing/resources/accounts/client/requests/AccountsRetrieveRequest.ts index 6eb38ffe9..f23d3d5a4 100644 --- a/src/api/resources/ticketing/resources/accounts/client/requests/AccountsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/accounts/client/requests/AccountsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface AccountsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts b/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts index e710c0487..12304aa18 100644 --- a/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts @@ -68,6 +68,14 @@ export class AsyncPassthrough { request: Merge.ticketing.DataPassthroughRequest, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class AsyncPassthrough { "ticketing/v1/async-passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -154,6 +155,14 @@ export class AsyncPassthrough { asyncPassthroughReceiptId: string, requestOptions?: AsyncPassthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -162,14 +171,7 @@ export class AsyncPassthrough { `ticketing/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/attachments/client/Client.ts b/src/api/resources/ticketing/resources/attachments/client/Client.ts index 362bd77b2..4b6ea1391 100644 --- a/src/api/resources/ticketing/resources/attachments/client/Client.ts +++ b/src/api/resources/ticketing/resources/attachments/client/Client.ts @@ -53,7 +53,9 @@ export class Attachments { * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.attachments.list() + * await client.ticketing.attachments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.AttachmentsListRequest = {}, @@ -134,6 +136,14 @@ export class Attachments { _queryParams["ticket_id"] = ticketId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -142,14 +152,7 @@ export class Attachments { "ticketing/v1/attachments", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -225,6 +228,14 @@ export class Attachments { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -233,14 +244,7 @@ export class Attachments { "ticketing/v1/attachments", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -326,6 +330,14 @@ export class Attachments { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -334,14 +346,7 @@ export class Attachments { `ticketing/v1/attachments/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -411,6 +416,14 @@ export class Attachments { _queryParams["mime_type"] = mimeType; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -419,14 +432,7 @@ export class Attachments { `ticketing/v1/attachments/${encodeURIComponent(id)}/download`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, responseType: "streaming", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -481,6 +487,14 @@ export class Attachments { private async __metaPostRetrieve( requestOptions?: Attachments.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -489,14 +503,7 @@ export class Attachments { "ticketing/v1/attachments/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts index 39be3c309..2861599fe 100644 --- a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts @@ -3,12 +3,8 @@ */ export interface AttachmentsDownloadRetrieveRequest { - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. - */ + /** If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. */ mimeType?: string; } diff --git a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsListRequest.ts b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsListRequest.ts index 3febf9bb6..94c059834 100644 --- a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsListRequest.ts +++ b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsListRequest.ts @@ -4,59 +4,35 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AttachmentsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "ticket"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return attachments created in the third party platform after this datetime. - */ + /** If provided, will only return attachments created in the third party platform after this datetime. */ remoteCreatedAfter?: Date; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return comments for this ticket. - */ + /** If provided, will only return comments for this ticket. */ ticketId?: string; } diff --git a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts index 7ab475b08..f21e0f827 100644 --- a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface AttachmentsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "ticket"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts b/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts index 294e042c5..48a9fb7db 100644 --- a/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface TicketingAttachmentEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ticketing.AttachmentRequest; } diff --git a/src/api/resources/ticketing/resources/auditTrail/client/Client.ts b/src/api/resources/ticketing/resources/auditTrail/client/Client.ts index 0585e88b1..daa3c3a04 100644 --- a/src/api/resources/ticketing/resources/auditTrail/client/Client.ts +++ b/src/api/resources/ticketing/resources/auditTrail/client/Client.ts @@ -52,7 +52,9 @@ export class AuditTrail { * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.auditTrail.list() + * await client.ticketing.auditTrail.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.AuditTrailListRequest = {}, @@ -91,6 +93,14 @@ export class AuditTrail { _queryParams["user_email"] = userEmail; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -99,14 +109,7 @@ export class AuditTrail { "ticketing/v1/audit-trail", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/auditTrail/client/requests/AuditTrailListRequest.ts b/src/api/resources/ticketing/resources/auditTrail/client/requests/AuditTrailListRequest.ts index 99ee8b1ad..351c48dc5 100644 --- a/src/api/resources/ticketing/resources/auditTrail/client/requests/AuditTrailListRequest.ts +++ b/src/api/resources/ticketing/resources/auditTrail/client/requests/AuditTrailListRequest.ts @@ -4,31 +4,21 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface AuditTrailListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include audit trail events that occurred before this time - */ + /** If included, will only include audit trail events that occurred before this time */ endDate?: string; - /** - * If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - */ + /** If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` */ eventType?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include audit trail events that occurred after this time - */ + /** If included, will only include audit trail events that occurred after this time */ startDate?: string; - /** - * If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - */ + /** If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. */ userEmail?: string; } diff --git a/src/api/resources/ticketing/resources/availableActions/client/Client.ts b/src/api/resources/ticketing/resources/availableActions/client/Client.ts index 8073c4485..b99a88418 100644 --- a/src/api/resources/ticketing/resources/availableActions/client/Client.ts +++ b/src/api/resources/ticketing/resources/availableActions/client/Client.ts @@ -62,6 +62,14 @@ export class AvailableActions { private async __retrieve( requestOptions?: AvailableActions.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class AvailableActions { "ticketing/v1/available-actions", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/collections/client/Client.ts b/src/api/resources/ticketing/resources/collections/client/Client.ts index f024efcc7..0cf23d3f6 100644 --- a/src/api/resources/ticketing/resources/collections/client/Client.ts +++ b/src/api/resources/ticketing/resources/collections/client/Client.ts @@ -52,7 +52,9 @@ export class Collections { * @param {Collections.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.collections.list() + * await client.ticketing.collections.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.CollectionsListRequest = {}, @@ -143,6 +145,14 @@ export class Collections { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -151,14 +161,7 @@ export class Collections { "ticketing/v1/collections", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,7 +213,9 @@ export class Collections { * @param {Collections.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.collections.viewersList("collection_id") + * await client.ticketing.collections.viewersList("collection_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public viewersList( collectionId: string, @@ -253,6 +258,14 @@ export class Collections { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -261,14 +274,7 @@ export class Collections { `ticketing/v1/collections/${encodeURIComponent(collectionId)}/viewers`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -359,6 +365,14 @@ export class Collections { _queryParams["show_enum_origins"] = showEnumOrigins; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -367,14 +381,7 @@ export class Collections { `ticketing/v1/collections/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts index 8f32cfcdd..9cc4d690a 100644 --- a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts +++ b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts @@ -4,67 +4,39 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CollectionsListRequest { - /** - * If provided, will only return collections of the given type. - */ + /** If provided, will only return collections of the given type. */ collectionType?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "parent_collection"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return collections whose parent collection matches the given id. - */ + /** If provided, will only return collections whose parent collection matches the given id. */ parentCollectionId?: string; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "collection_type"; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "collection_type"; } diff --git a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsRetrieveRequest.ts b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsRetrieveRequest.ts index 0e87b944b..dfbe53f09 100644 --- a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsRetrieveRequest.ts @@ -7,24 +7,14 @@ * {} */ export interface CollectionsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "parent_collection"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: "collection_type"; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: "collection_type"; } diff --git a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsViewersListRequest.ts b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsViewersListRequest.ts index a068520b6..f22f26000 100644 --- a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsViewersListRequest.ts +++ b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsViewersListRequest.ts @@ -6,31 +6,21 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CollectionsViewersListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.CollectionsViewersListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/ticketing/resources/comments/client/Client.ts b/src/api/resources/ticketing/resources/comments/client/Client.ts index ddf3bb4a3..561f4f0bd 100644 --- a/src/api/resources/ticketing/resources/comments/client/Client.ts +++ b/src/api/resources/ticketing/resources/comments/client/Client.ts @@ -52,7 +52,9 @@ export class Comments { * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.comments.list() + * await client.ticketing.comments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.CommentsListRequest = {}, @@ -135,6 +137,14 @@ export class Comments { _queryParams["ticket_id"] = ticketId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class Comments { "ticketing/v1/comments", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -226,6 +229,14 @@ export class Comments { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -234,14 +245,7 @@ export class Comments { "ticketing/v1/comments", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -327,6 +331,14 @@ export class Comments { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -335,14 +347,7 @@ export class Comments { `ticketing/v1/comments/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -403,6 +408,14 @@ export class Comments { private async __metaPostRetrieve( requestOptions?: Comments.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -411,14 +424,7 @@ export class Comments { "ticketing/v1/comments/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts b/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts index 6df8becf7..ef147a13f 100644 --- a/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface CommentEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ticketing.CommentRequest; } diff --git a/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts b/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts index 2d20c345e..83a15ac27 100644 --- a/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts +++ b/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts @@ -6,59 +6,35 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface CommentsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.CommentsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return Comments created in the third party platform after this datetime. - */ + /** If provided, will only return Comments created in the third party platform after this datetime. */ remoteCreatedAfter?: Date; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return comments for this ticket. - */ + /** If provided, will only return comments for this ticket. */ ticketId?: string; } diff --git a/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts b/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts index 6770789eb..45717252c 100644 --- a/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface CommentsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.CommentsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/contacts/client/Client.ts b/src/api/resources/ticketing/resources/contacts/client/Client.ts index d0bf78bb2..7d62623c3 100644 --- a/src/api/resources/ticketing/resources/contacts/client/Client.ts +++ b/src/api/resources/ticketing/resources/contacts/client/Client.ts @@ -52,7 +52,9 @@ export class Contacts { * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.contacts.list() + * await client.ticketing.contacts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.ContactsListRequest = {}, @@ -123,6 +125,14 @@ export class Contacts { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -131,14 +141,7 @@ export class Contacts { "ticketing/v1/contacts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -214,6 +217,14 @@ export class Contacts { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -222,14 +233,7 @@ export class Contacts { "ticketing/v1/contacts", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -315,6 +319,14 @@ export class Contacts { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -323,14 +335,7 @@ export class Contacts { `ticketing/v1/contacts/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -391,6 +396,14 @@ export class Contacts { private async __metaPostRetrieve( requestOptions?: Contacts.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -399,14 +412,7 @@ export class Contacts { "ticketing/v1/contacts/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts b/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts index 23db13929..c3edf1fc0 100644 --- a/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts +++ b/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts @@ -4,51 +4,31 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ContactsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "account"; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ticketing/resources/contacts/client/requests/ContactsRetrieveRequest.ts b/src/api/resources/ticketing/resources/contacts/client/requests/ContactsRetrieveRequest.ts index 398c0ff51..23f589070 100644 --- a/src/api/resources/ticketing/resources/contacts/client/requests/ContactsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/contacts/client/requests/ContactsRetrieveRequest.ts @@ -7,16 +7,10 @@ * {} */ export interface ContactsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "account"; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts b/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts index a9cb7217e..771ce564b 100644 --- a/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface TicketingContactEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ticketing.ContactRequest; } diff --git a/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts b/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts index 44d7db595..d00632ee8 100644 --- a/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts @@ -56,6 +56,14 @@ export class DeleteAccount { } private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -64,14 +72,7 @@ export class DeleteAccount { "ticketing/v1/delete-account", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts b/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts index 10cbb2927..4adcabba1 100644 --- a/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts @@ -71,6 +71,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -79,14 +87,7 @@ export class FieldMapping { "ticketing/v1/field-mappings", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -163,6 +164,14 @@ export class FieldMapping { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -171,14 +180,7 @@ export class FieldMapping { "ticketing/v1/field-mappings", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -247,6 +249,14 @@ export class FieldMapping { fieldMappingId: string, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -255,14 +265,7 @@ export class FieldMapping { `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -333,6 +336,14 @@ export class FieldMapping { request: Merge.ticketing.PatchedEditFieldMappingRequest = {}, requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -341,14 +352,7 @@ export class FieldMapping { `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", @@ -429,6 +433,14 @@ export class FieldMapping { _queryParams["include_example_values"] = includeExampleValues; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -437,14 +449,7 @@ export class FieldMapping { "ticketing/v1/remote-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -505,6 +510,14 @@ export class FieldMapping { private async __targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -513,14 +526,7 @@ export class FieldMapping { "ticketing/v1/target-fields", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/api/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index c4a2012c1..a1281ff59 100644 --- a/src/api/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/api/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,9 +14,7 @@ * } */ export interface CreateFieldMappingRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; /** The name of the target field you want this remote field to map to. */ targetFieldName: string; diff --git a/src/api/resources/ticketing/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts b/src/api/resources/ticketing/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts index 3ad738346..75ab57f7d 100644 --- a/src/api/resources/ticketing/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts @@ -7,8 +7,6 @@ * {} */ export interface FieldMappingsRetrieveRequest { - /** - * If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - */ + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ excludeRemoteFieldMetadata?: boolean; } diff --git a/src/api/resources/ticketing/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts b/src/api/resources/ticketing/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts index ad8a5c5da..78cd89f35 100644 --- a/src/api/resources/ticketing/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RemoteFieldsRetrieveRequest { - /** - * A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - */ + /** A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. */ commonModels?: string; - /** - * If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - */ + /** If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. */ includeExampleValues?: string; } diff --git a/src/api/resources/ticketing/resources/forceResync/client/Client.ts b/src/api/resources/ticketing/resources/forceResync/client/Client.ts index 745751d03..82de82df3 100644 --- a/src/api/resources/ticketing/resources/forceResync/client/Client.ts +++ b/src/api/resources/ticketing/resources/forceResync/client/Client.ts @@ -62,6 +62,14 @@ export class ForceResync { private async __syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class ForceResync { "ticketing/v1/sync-status/resync", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/generateKey/client/Client.ts b/src/api/resources/ticketing/resources/generateKey/client/Client.ts index beb35e822..b87519b96 100644 --- a/src/api/resources/ticketing/resources/generateKey/client/Client.ts +++ b/src/api/resources/ticketing/resources/generateKey/client/Client.ts @@ -67,6 +67,14 @@ export class GenerateKey { request: Merge.ticketing.GenerateRemoteKeyRequest, requestOptions?: GenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class GenerateKey { "ticketing/v1/generate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ticketing/resources/issues/client/Client.ts b/src/api/resources/ticketing/resources/issues/client/Client.ts index c5e8aaad7..02f802778 100644 --- a/src/api/resources/ticketing/resources/issues/client/Client.ts +++ b/src/api/resources/ticketing/resources/issues/client/Client.ts @@ -52,7 +52,9 @@ export class Issues { * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.issues.list() + * await client.ticketing.issues.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.IssuesListRequest = {}, @@ -140,6 +142,14 @@ export class Issues { }); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -148,14 +158,7 @@ export class Issues { "ticketing/v1/issues", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -219,6 +222,14 @@ export class Issues { id: string, requestOptions?: Issues.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -227,14 +238,7 @@ export class Issues { `ticketing/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts index 008627139..12bd3a4eb 100644 --- a/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts @@ -6,51 +6,33 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface IssuesListRequest { accountToken?: string; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If included, will only include issues whose most recent action occurred before this time - */ + /** If included, will only include issues whose most recent action occurred before this time */ endDate?: string; endUserOrganizationName?: string; - /** - * If provided, will only return issues whose first incident time was after this datetime. - */ + /** If provided, will only return issues whose first incident time was after this datetime. */ firstIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose first incident time was before this datetime. - */ + /** If provided, will only return issues whose first incident time was before this datetime. */ firstIncidentTimeBefore?: Date; - /** - * If true, will include muted issues - */ + /** If true, will include muted issues */ includeMuted?: string; integrationName?: string; - /** - * If provided, will only return issues whose last incident time was after this datetime. - */ + /** If provided, will only return issues whose last incident time was after this datetime. */ lastIncidentTimeAfter?: Date; - /** - * If provided, will only return issues whose last incident time was before this datetime. - */ + /** If provided, will only return issues whose last incident time was before this datetime. */ lastIncidentTimeBefore?: Date; - /** - * If provided, will only include issues pertaining to the linked account passed in. - */ + /** If provided, will only include issues pertaining to the linked account passed in. */ linkedAccountId?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If included, will only include issues whose most recent action occurred after this time - */ + /** If included, will only include issues whose most recent action occurred after this time */ startDate?: string; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/ticketing/resources/linkToken/client/Client.ts b/src/api/resources/ticketing/resources/linkToken/client/Client.ts index cd338ae28..68888b669 100644 --- a/src/api/resources/ticketing/resources/linkToken/client/Client.ts +++ b/src/api/resources/ticketing/resources/linkToken/client/Client.ts @@ -70,6 +70,14 @@ export class LinkToken { request: Merge.ticketing.EndUserDetailsRequest, requestOptions?: LinkToken.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -78,14 +86,7 @@ export class LinkToken { "ticketing/v1/link-token", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts b/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts index 394fbce80..30b863712 100644 --- a/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts @@ -52,7 +52,9 @@ export class LinkedAccounts { * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.linkedAccounts.list() + * await client.ticketing.linkedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.LinkedAccountsListRequest = {}, @@ -135,6 +137,14 @@ export class LinkedAccounts { _queryParams["status"] = status; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class LinkedAccounts { "ticketing/v1/linked-accounts", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 7062453ce..afa08d439 100644 --- a/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -6,7 +6,9 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface LinkedAccountsListRequest { /** @@ -21,49 +23,27 @@ export interface LinkedAccountsListRequest { * * `filestorage` - filestorage */ category?: Merge.ticketing.LinkedAccountsListRequestCategory; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return linked accounts associated with the given email address. - */ + /** If provided, will only return linked accounts associated with the given email address. */ endUserEmailAddress?: string; - /** - * If provided, will only return linked accounts associated with the given organization name. - */ + /** If provided, will only return linked accounts associated with the given organization name. */ endUserOrganizationName?: string; - /** - * If provided, will only return linked accounts associated with the given origin ID. - */ + /** If provided, will only return linked accounts associated with the given origin ID. */ endUserOriginId?: string; - /** - * Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - */ + /** Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. */ endUserOriginIds?: string; id?: string; - /** - * Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - */ + /** Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. */ ids?: string; - /** - * If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - */ + /** If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. */ includeDuplicates?: boolean; - /** - * If provided, will only return linked accounts associated with the given integration name. - */ + /** If provided, will only return linked accounts associated with the given integration name. */ integrationName?: string; - /** - * If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - */ + /** If included, will only include test linked accounts. If not included, will only include non-test linked accounts. */ isTestAccount?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - */ + /** Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` */ status?: string; } diff --git a/src/api/resources/ticketing/resources/passthrough/client/Client.ts b/src/api/resources/ticketing/resources/passthrough/client/Client.ts index b8d737dd2..9d32ea059 100644 --- a/src/api/resources/ticketing/resources/passthrough/client/Client.ts +++ b/src/api/resources/ticketing/resources/passthrough/client/Client.ts @@ -68,6 +68,14 @@ export class Passthrough { request: Merge.ticketing.DataPassthroughRequest, requestOptions?: Passthrough.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -76,14 +84,7 @@ export class Passthrough { "ticketing/v1/passthrough", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ticketing/resources/projects/client/Client.ts b/src/api/resources/ticketing/resources/projects/client/Client.ts index 9d0e20fcf..7c804dd36 100644 --- a/src/api/resources/ticketing/resources/projects/client/Client.ts +++ b/src/api/resources/ticketing/resources/projects/client/Client.ts @@ -52,7 +52,9 @@ export class Projects { * @param {Projects.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.projects.list() + * await client.ticketing.projects.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.ProjectsListRequest = {}, @@ -118,6 +120,14 @@ export class Projects { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Projects { "ticketing/v1/projects", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Projects { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Projects { `ticketing/v1/projects/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -277,7 +281,9 @@ export class Projects { * @param {Projects.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.projects.usersList("parent_id") + * await client.ticketing.projects.usersList("parent_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public usersList( parentId: string, @@ -320,6 +326,14 @@ export class Projects { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -328,14 +342,7 @@ export class Projects { `ticketing/v1/projects/${encodeURIComponent(parentId)}/users`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsListRequest.ts b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsListRequest.ts index 3267915b1..0c2081cc8 100644 --- a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsListRequest.ts +++ b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ProjectsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsRetrieveRequest.ts b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsRetrieveRequest.ts index 1a2bf714b..199732fc9 100644 --- a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface ProjectsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts index 34e3b307c..5b16c485b 100644 --- a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts +++ b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts @@ -6,31 +6,21 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface ProjectsUsersListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.ProjectsUsersListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts b/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts index cef5a0a24..b5b04f94c 100644 --- a/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts @@ -67,6 +67,14 @@ export class RegenerateKey { request: Merge.ticketing.RemoteKeyForRegenerationRequest, requestOptions?: RegenerateKey.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -75,14 +83,7 @@ export class RegenerateKey { "ticketing/v1/regenerate-key", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ticketing/resources/roles/client/Client.ts b/src/api/resources/ticketing/resources/roles/client/Client.ts index 06de5eb08..4b50198a8 100644 --- a/src/api/resources/ticketing/resources/roles/client/Client.ts +++ b/src/api/resources/ticketing/resources/roles/client/Client.ts @@ -52,7 +52,9 @@ export class Roles { * @param {Roles.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.roles.list() + * await client.ticketing.roles.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.RolesListRequest = {}, @@ -118,6 +120,14 @@ export class Roles { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Roles { "ticketing/v1/roles", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Roles { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Roles { `ticketing/v1/roles/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/roles/client/requests/RolesListRequest.ts b/src/api/resources/ticketing/resources/roles/client/requests/RolesListRequest.ts index d4f551aaa..ec297190c 100644 --- a/src/api/resources/ticketing/resources/roles/client/requests/RolesListRequest.ts +++ b/src/api/resources/ticketing/resources/roles/client/requests/RolesListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface RolesListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ticketing/resources/roles/client/requests/RolesRetrieveRequest.ts b/src/api/resources/ticketing/resources/roles/client/requests/RolesRetrieveRequest.ts index 5630a95de..c3e8fd273 100644 --- a/src/api/resources/ticketing/resources/roles/client/requests/RolesRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/roles/client/requests/RolesRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface RolesRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/scopes/client/Client.ts b/src/api/resources/ticketing/resources/scopes/client/Client.ts index d6b42f7a1..018a47956 100644 --- a/src/api/resources/ticketing/resources/scopes/client/Client.ts +++ b/src/api/resources/ticketing/resources/scopes/client/Client.ts @@ -62,6 +62,14 @@ export class Scopes { private async __defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class Scopes { "ticketing/v1/default-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -138,6 +139,14 @@ export class Scopes { private async __linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -146,14 +155,7 @@ export class Scopes { "ticketing/v1/linked-account-scopes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -242,6 +244,14 @@ export class Scopes { request: Merge.ticketing.LinkedAccountCommonModelScopeDeserializerRequest, requestOptions?: Scopes.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -250,14 +260,7 @@ export class Scopes { "ticketing/v1/linked-account-scopes", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/api/resources/ticketing/resources/syncStatus/client/Client.ts b/src/api/resources/ticketing/resources/syncStatus/client/Client.ts index 03360f593..e7add1044 100644 --- a/src/api/resources/ticketing/resources/syncStatus/client/Client.ts +++ b/src/api/resources/ticketing/resources/syncStatus/client/Client.ts @@ -52,7 +52,9 @@ export class SyncStatus { * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.syncStatus.list() + * await client.ticketing.syncStatus.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.SyncStatusListRequest = {}, @@ -75,6 +77,14 @@ export class SyncStatus { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -83,14 +93,7 @@ export class SyncStatus { "ticketing/v1/sync-status", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/syncStatus/client/requests/SyncStatusListRequest.ts b/src/api/resources/ticketing/resources/syncStatus/client/requests/SyncStatusListRequest.ts index bcce714a8..3fb47f9e4 100644 --- a/src/api/resources/ticketing/resources/syncStatus/client/requests/SyncStatusListRequest.ts +++ b/src/api/resources/ticketing/resources/syncStatus/client/requests/SyncStatusListRequest.ts @@ -4,15 +4,13 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface SyncStatusListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/ticketing/resources/tags/client/Client.ts b/src/api/resources/ticketing/resources/tags/client/Client.ts index 306547839..9ff012692 100644 --- a/src/api/resources/ticketing/resources/tags/client/Client.ts +++ b/src/api/resources/ticketing/resources/tags/client/Client.ts @@ -52,7 +52,9 @@ export class Tags { * @param {Tags.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.tags.list() + * await client.ticketing.tags.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.TagsListRequest = {}, @@ -118,6 +120,14 @@ export class Tags { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Tags { "ticketing/v1/tags", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Tags { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Tags { `ticketing/v1/tags/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/tags/client/requests/TagsListRequest.ts b/src/api/resources/ticketing/resources/tags/client/requests/TagsListRequest.ts index 513564ffa..d0f1724f3 100644 --- a/src/api/resources/ticketing/resources/tags/client/requests/TagsListRequest.ts +++ b/src/api/resources/ticketing/resources/tags/client/requests/TagsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TagsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ticketing/resources/tags/client/requests/TagsRetrieveRequest.ts b/src/api/resources/ticketing/resources/tags/client/requests/TagsRetrieveRequest.ts index 198c2e758..babfb3de4 100644 --- a/src/api/resources/ticketing/resources/tags/client/requests/TagsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/tags/client/requests/TagsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface TagsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/teams/client/Client.ts b/src/api/resources/ticketing/resources/teams/client/Client.ts index fcd8dd220..b44d7da08 100644 --- a/src/api/resources/ticketing/resources/teams/client/Client.ts +++ b/src/api/resources/ticketing/resources/teams/client/Client.ts @@ -52,7 +52,9 @@ export class Teams { * @param {Teams.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.teams.list() + * await client.ticketing.teams.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.TeamsListRequest = {}, @@ -118,6 +120,14 @@ export class Teams { _queryParams["remote_id"] = remoteId; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -126,14 +136,7 @@ export class Teams { "ticketing/v1/teams", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -210,6 +213,14 @@ export class Teams { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -218,14 +229,7 @@ export class Teams { `ticketing/v1/teams/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/teams/client/requests/TeamsListRequest.ts b/src/api/resources/ticketing/resources/teams/client/requests/TeamsListRequest.ts index a656fb0c3..6e848217c 100644 --- a/src/api/resources/ticketing/resources/teams/client/requests/TeamsListRequest.ts +++ b/src/api/resources/ticketing/resources/teams/client/requests/TeamsListRequest.ts @@ -4,47 +4,29 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TeamsListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/ticketing/resources/teams/client/requests/TeamsRetrieveRequest.ts b/src/api/resources/ticketing/resources/teams/client/requests/TeamsRetrieveRequest.ts index 1f8434447..c5ad1af4e 100644 --- a/src/api/resources/ticketing/resources/teams/client/requests/TeamsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/teams/client/requests/TeamsRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface TeamsRetrieveRequest { - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/tickets/client/Client.ts b/src/api/resources/ticketing/resources/tickets/client/Client.ts index 6a58feb43..510e15eb2 100644 --- a/src/api/resources/ticketing/resources/tickets/client/Client.ts +++ b/src/api/resources/ticketing/resources/tickets/client/Client.ts @@ -52,7 +52,9 @@ export class Tickets { * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.tickets.list() + * await client.ticketing.tickets.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.TicketsListRequest = {}, @@ -238,6 +240,14 @@ export class Tickets { _queryParams["ticket_url"] = ticketUrl; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -246,14 +256,7 @@ export class Tickets { "ticketing/v1/tickets", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -329,6 +332,14 @@ export class Tickets { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -337,14 +348,7 @@ export class Tickets { "ticketing/v1/tickets", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -449,6 +453,14 @@ export class Tickets { ); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -457,14 +469,7 @@ export class Tickets { `ticketing/v1/tickets/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -543,6 +548,14 @@ export class Tickets { _queryParams["run_async"] = runAsync.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -551,14 +564,7 @@ export class Tickets { `ticketing/v1/tickets/${encodeURIComponent(id)}`, ), method: "PATCH", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", @@ -615,7 +621,9 @@ export class Tickets { * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.tickets.viewersList("ticket_id") + * await client.ticketing.tickets.viewersList("ticket_id", { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public viewersList( ticketId: string, @@ -658,6 +666,14 @@ export class Tickets { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -666,14 +682,7 @@ export class Tickets { `ticketing/v1/tickets/${encodeURIComponent(ticketId)}/viewers`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -739,6 +748,14 @@ export class Tickets { id: string, requestOptions?: Tickets.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -747,14 +764,7 @@ export class Tickets { `ticketing/v1/tickets/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -830,6 +840,14 @@ export class Tickets { _queryParams["ticket_type"] = ticketType; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -838,14 +856,7 @@ export class Tickets { "ticketing/v1/tickets/meta/post", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -898,7 +909,9 @@ export class Tickets { * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.tickets.remoteFieldClassesList() + * await client.ticketing.tickets.remoteFieldClassesList({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public remoteFieldClassesList( request: Merge.ticketing.TicketsRemoteFieldClassesListRequest = {}, @@ -954,6 +967,14 @@ export class Tickets { _queryParams["page_size"] = pageSize.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -962,14 +983,7 @@ export class Tickets { "ticketing/v1/tickets/remote-field-classes", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts index 73a934d99..1b96c8e93 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface PatchedTicketEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ticketing.PatchedTicketRequest; } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts index 55a32abde..a8c912aff 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts @@ -11,13 +11,9 @@ import * as Merge from "../../../../../../index"; * } */ export interface TicketEndpointRequest { - /** - * Whether to include debug fields (such as log file links) in the response. - */ + /** Whether to include debug fields (such as log file links) in the response. */ isDebugMode?: boolean; - /** - * Whether or not third-party updates should be run asynchronously. - */ + /** Whether or not third-party updates should be run asynchronously. */ runAsync?: boolean; model: Merge.ticketing.TicketRequest; } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts index de721ca8d..930084c0f 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts @@ -6,88 +6,50 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TicketsListRequest { - /** - * If provided, will only return tickets for this account. - */ + /** If provided, will only return tickets for this account. */ accountId?: string; - /** - * If provided, will only return tickets assigned to the assignee_ids; multiple assignee_ids can be separated by commas. - */ + /** If provided, will only return tickets assigned to the assignee_ids; multiple assignee_ids can be separated by commas. */ assigneeIds?: string; - /** - * If provided, will only return tickets assigned to the collection_ids; multiple collection_ids can be separated by commas. - */ + /** If provided, will only return tickets assigned to the collection_ids; multiple collection_ids can be separated by commas. */ collectionIds?: string; - /** - * If provided, will only return tickets completed after this datetime. - */ + /** If provided, will only return tickets completed after this datetime. */ completedAfter?: Date; - /** - * If provided, will only return tickets completed before this datetime. - */ + /** If provided, will only return tickets completed before this datetime. */ completedBefore?: Date; - /** - * If provided, will only return tickets for this contact. - */ + /** If provided, will only return tickets for this contact. */ contactId?: string; - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return tickets due after this datetime. - */ + /** If provided, will only return tickets due after this datetime. */ dueAfter?: Date; - /** - * If provided, will only return tickets due before this datetime. - */ + /** If provided, will only return tickets due before this datetime. */ dueBefore?: Date; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.TicketsListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * If provided, will only return sub tickets of the parent_ticket_id. - */ + /** If provided, will only return sub tickets of the parent_ticket_id. */ parentTicketId?: string; /** * If provided, will only return tickets of this priority. @@ -98,48 +60,26 @@ export interface TicketsListRequest { * * `LOW` - LOW */ priority?: Merge.ticketing.TicketsListRequestPriority; - /** - * If provided, will only return tickets created in the third party platform after this datetime. - */ + /** If provided, will only return tickets created in the third party platform after this datetime. */ remoteCreatedAfter?: Date; - /** - * If provided, will only return tickets created in the third party platform before this datetime. - */ + /** If provided, will only return tickets created in the third party platform before this datetime. */ remoteCreatedBefore?: Date; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.ticketing.TicketsListRequestRemoteFields; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return tickets updated in the third party platform after this datetime. - */ + /** If provided, will only return tickets updated in the third party platform after this datetime. */ remoteUpdatedAfter?: Date; - /** - * If provided, will only return tickets updated in the third party platform before this datetime. - */ + /** If provided, will only return tickets updated in the third party platform before this datetime. */ remoteUpdatedBefore?: Date; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.ticketing.TicketsListRequestShowEnumOrigins; - /** - * If provided, will only return tickets of this status. - */ + /** If provided, will only return tickets of this status. */ status?: string; - /** - * If provided, will only return tickets matching the tags; multiple tags can be separated by commas. - */ + /** If provided, will only return tickets matching the tags; multiple tags can be separated by commas. */ tags?: string; - /** - * If provided, will only return tickets of this type. - */ + /** If provided, will only return tickets of this type. */ ticketType?: string; - /** - * If provided, will only return tickets where the URL matches or contains the substring - */ + /** If provided, will only return tickets where the URL matches or contains the substring */ ticketUrl?: string; } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsMetaPostRetrieveRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsMetaPostRetrieveRequest.ts index 808f42b28..c2e5a23cf 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsMetaPostRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsMetaPostRetrieveRequest.ts @@ -7,12 +7,8 @@ * {} */ export interface TicketsMetaPostRetrieveRequest { - /** - * If provided, will only return tickets for this collection. - */ + /** If provided, will only return tickets for this collection. */ collectionId?: string; - /** - * If provided, will only return tickets for this ticket type. - */ + /** If provided, will only return tickets for this ticket type. */ ticketType?: string; } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRemoteFieldClassesListRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRemoteFieldClassesListRequest.ts index e047d35a0..6704931e9 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRemoteFieldClassesListRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRemoteFieldClassesListRequest.ts @@ -4,39 +4,25 @@ /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TicketsRemoteFieldClassesListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return remote field classes with the `ids` in this list - */ + /** If provided, will only return remote field classes with the `ids` in this list */ ids?: string; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, will only return remote field classes with this is_common_model_field value - */ + /** If provided, will only return remote field classes with this is_common_model_field value */ isCommonModelField?: boolean; - /** - * If provided, will only return remote fields classes with this is_custom value - */ + /** If provided, will only return remote fields classes with this is_custom value */ isCustom?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts index fb5942be7..2b568446f 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts @@ -9,28 +9,16 @@ import * as Merge from "../../../../../../index"; * {} */ export interface TicketsRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.TicketsRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - */ + /** Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. */ includeRemoteFields?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Deprecated. Use show_enum_origins. - */ + /** Deprecated. Use show_enum_origins. */ remoteFields?: Merge.ticketing.TicketsRetrieveRequestRemoteFields; - /** - * A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - */ + /** A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) */ showEnumOrigins?: Merge.ticketing.TicketsRetrieveRequestShowEnumOrigins; } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsViewersListRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsViewersListRequest.ts index 6400d1086..e8b8a9f0a 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsViewersListRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsViewersListRequest.ts @@ -6,31 +6,21 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface TicketsViewersListRequest { - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.TicketsViewersListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; } diff --git a/src/api/resources/ticketing/resources/users/client/Client.ts b/src/api/resources/ticketing/resources/users/client/Client.ts index f293d70ed..7bc60e135 100644 --- a/src/api/resources/ticketing/resources/users/client/Client.ts +++ b/src/api/resources/ticketing/resources/users/client/Client.ts @@ -52,7 +52,9 @@ export class Users { * @param {Users.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.ticketing.users.list() + * await client.ticketing.users.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) */ public list( request: Merge.ticketing.UsersListRequest = {}, @@ -135,6 +137,14 @@ export class Users { _queryParams["team"] = team; } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -143,14 +153,7 @@ export class Users { "ticketing/v1/users", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -233,6 +236,14 @@ export class Users { _queryParams["include_shell_data"] = includeShellData.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -241,14 +252,7 @@ export class Users { `ticketing/v1/users/${encodeURIComponent(id)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts index b0d6e705b..d0bab81a8 100644 --- a/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts +++ b/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts @@ -6,59 +6,35 @@ import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } */ export interface UsersListRequest { - /** - * If provided, will only return objects created after this datetime. - */ + /** If provided, will only return objects created after this datetime. */ createdAfter?: Date; - /** - * If provided, will only return objects created before this datetime. - */ + /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; - /** - * The pagination cursor value. - */ + /** The pagination cursor value. */ cursor?: string; - /** - * If provided, will only return users with emails equal to this value (case insensitive). - */ + /** If provided, will only return users with emails equal to this value (case insensitive). */ emailAddress?: string; - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.UsersListRequestExpand; - /** - * Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - */ + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; - /** - * If provided, only objects synced by Merge after this date time will be returned. - */ + /** If provided, only objects synced by Merge after this date time will be returned. */ modifiedAfter?: Date; - /** - * If provided, only objects synced by Merge before this date time will be returned. - */ + /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; - /** - * Number of results to return per page. - */ + /** Number of results to return per page. */ pageSize?: number; - /** - * The API provider's ID for the given object. - */ + /** The API provider's ID for the given object. */ remoteId?: string; - /** - * If provided, will only return users matching in this team. - */ + /** If provided, will only return users matching in this team. */ team?: string; } diff --git a/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts b/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts index ed589b88d..76f212ebb 100644 --- a/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts @@ -9,16 +9,10 @@ import * as Merge from "../../../../../../index"; * {} */ export interface UsersRetrieveRequest { - /** - * Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - */ + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: Merge.ticketing.UsersRetrieveRequestExpand; - /** - * Whether to include the original data Merge fetched from the third-party to produce these models. - */ + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ includeRemoteData?: boolean; - /** - * Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - */ + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ includeShellData?: boolean; } diff --git a/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts b/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts index 2b43bd011..360b9f687 100644 --- a/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts @@ -62,6 +62,14 @@ export class WebhookReceivers { private async __list( requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -70,14 +78,7 @@ export class WebhookReceivers { "ticketing/v1/webhook-receivers", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -146,6 +147,14 @@ export class WebhookReceivers { request: Merge.ticketing.WebhookReceiverRequest, requestOptions?: WebhookReceivers.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); const _response = await (this._options.fetcher ?? core.fetcher)({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -154,14 +163,7 @@ export class WebhookReceivers { "ticketing/v1/webhook-receivers", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "X-Account-Token": requestOptions?.accountToken, - }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", diff --git a/src/core/auth/AuthProvider.ts b/src/core/auth/AuthProvider.ts new file mode 100644 index 000000000..74661efad --- /dev/null +++ b/src/core/auth/AuthProvider.ts @@ -0,0 +1,5 @@ +import { AuthRequest } from "./AuthRequest"; + +export interface AuthProvider { + getAuthRequest(): Promise; +} diff --git a/src/core/auth/AuthRequest.ts b/src/core/auth/AuthRequest.ts new file mode 100644 index 000000000..f6218b422 --- /dev/null +++ b/src/core/auth/AuthRequest.ts @@ -0,0 +1,9 @@ +/** + * Request parameters for authentication requests. + */ +export interface AuthRequest { + /** + * The headers to be included in the request. + */ + headers: Record; +} diff --git a/src/core/auth/index.ts b/src/core/auth/index.ts index ee293b343..56011a766 100644 --- a/src/core/auth/index.ts +++ b/src/core/auth/index.ts @@ -1,2 +1,4 @@ +export { AuthProvider } from "./AuthProvider"; +export { type AuthRequest } from "./AuthRequest"; export { BasicAuth } from "./BasicAuth"; export { BearerToken } from "./BearerToken"; diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index 9af75fca1..d45de5579 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -1,14 +1,14 @@ import { toJson } from "../json"; import { APIResponse } from "./APIResponse"; -import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse"; -import { Supplier } from "./Supplier"; import { createRequestUrl } from "./createRequestUrl"; import { getErrorResponseBody } from "./getErrorResponseBody"; import { getFetchFn } from "./getFetchFn"; import { getRequestBody } from "./getRequestBody"; import { getResponseBody } from "./getResponseBody"; import { makeRequest } from "./makeRequest"; +import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse"; import { requestWithRetries } from "./requestWithRetries"; +import { Supplier } from "./Supplier"; export type FetchFunction = (args: Fetcher.Args) => Promise>; diff --git a/src/core/fetcher/index.ts b/src/core/fetcher/index.ts index 9fffe7494..f52f26faf 100644 --- a/src/core/fetcher/index.ts +++ b/src/core/fetcher/index.ts @@ -1,9 +1,9 @@ export type { APIResponse } from "./APIResponse"; -export { fetcher } from "./Fetcher"; +export type { BinaryResponse } from "./BinaryResponse"; export type { Fetcher, FetchFunction } from "./Fetcher"; +export { fetcher } from "./Fetcher"; export { getHeader } from "./getHeader"; -export { Supplier } from "./Supplier"; -export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse"; -export type { RawResponse, WithRawResponse } from "./RawResponse"; export { HttpResponsePromise } from "./HttpResponsePromise"; -export { BinaryResponse } from "./BinaryResponse"; +export type { RawResponse, WithRawResponse } from "./RawResponse"; +export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse"; +export { Supplier } from "./Supplier"; diff --git a/src/core/schemas/builders/lazy/index.ts b/src/core/schemas/builders/lazy/index.ts index 77420fb03..2221abd88 100644 --- a/src/core/schemas/builders/lazy/index.ts +++ b/src/core/schemas/builders/lazy/index.ts @@ -1,3 +1,3 @@ -export { lazy } from "./lazy"; export type { SchemaGetter } from "./lazy"; +export { lazy } from "./lazy"; export { lazyObject } from "./lazyObject"; diff --git a/src/core/schemas/builders/lazy/lazyObject.ts b/src/core/schemas/builders/lazy/lazyObject.ts index d8ee6ec5d..a93b6a73a 100644 --- a/src/core/schemas/builders/lazy/lazyObject.ts +++ b/src/core/schemas/builders/lazy/lazyObject.ts @@ -1,8 +1,8 @@ import { getObjectUtils } from "../object"; -import { getObjectLikeUtils } from "../object-like"; import { BaseObjectSchema, ObjectSchema } from "../object/types"; +import { getObjectLikeUtils } from "../object-like"; import { getSchemaUtils } from "../schema-utils"; -import { SchemaGetter, constructLazyBaseSchema, getMemoizedSchema } from "./lazy"; +import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy"; export function lazyObject(getter: SchemaGetter>): ObjectSchema { const baseSchema: BaseObjectSchema = { diff --git a/src/core/schemas/builders/literals/index.ts b/src/core/schemas/builders/literals/index.ts index d2bf08fc6..ae7389065 100644 --- a/src/core/schemas/builders/literals/index.ts +++ b/src/core/schemas/builders/literals/index.ts @@ -1,2 +1,2 @@ -export { stringLiteral } from "./stringLiteral"; export { booleanLiteral } from "./booleanLiteral"; +export { stringLiteral } from "./stringLiteral"; diff --git a/src/core/schemas/builders/object/index.ts b/src/core/schemas/builders/object/index.ts index e3f4388db..58ce0b48b 100644 --- a/src/core/schemas/builders/object/index.ts +++ b/src/core/schemas/builders/object/index.ts @@ -1,11 +1,11 @@ export { getObjectUtils, object } from "./object"; -export { objectWithoutOptionalProperties } from "./objectWithoutOptionalProperties"; export type { inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas, inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas, } from "./objectWithoutOptionalProperties"; -export { isProperty, property } from "./property"; +export { objectWithoutOptionalProperties } from "./objectWithoutOptionalProperties"; export type { Property } from "./property"; +export { isProperty, property } from "./property"; export type { BaseObjectSchema, inferObjectSchemaFromPropertySchemas, diff --git a/src/core/schemas/builders/object/object.ts b/src/core/schemas/builders/object/object.ts index 05fbca8a1..0e4bbed9c 100644 --- a/src/core/schemas/builders/object/object.ts +++ b/src/core/schemas/builders/object/object.ts @@ -11,12 +11,12 @@ import { getSchemaUtils } from "../schema-utils"; import { isProperty } from "./property"; import { BaseObjectSchema, - ObjectSchema, - ObjectUtils, - PropertySchemas, inferObjectSchemaFromPropertySchemas, inferParsedObjectFromPropertySchemas, inferRawObjectFromPropertySchemas, + ObjectSchema, + ObjectUtils, + PropertySchemas, } from "./types"; interface ObjectPropertyWithRawKey { diff --git a/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts b/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts index ce4d3edca..4dfafa01b 100644 --- a/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts +++ b/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts @@ -1,5 +1,5 @@ import { object } from "./object"; -import { ObjectSchema, PropertySchemas, inferParsedPropertySchema, inferRawObjectFromPropertySchemas } from "./types"; +import { inferParsedPropertySchema, inferRawObjectFromPropertySchemas, ObjectSchema, PropertySchemas } from "./types"; export function objectWithoutOptionalProperties>( schemas: T, diff --git a/src/core/schemas/builders/object/types.ts b/src/core/schemas/builders/object/types.ts index b4f49c884..301864396 100644 --- a/src/core/schemas/builders/object/types.ts +++ b/src/core/schemas/builders/object/types.ts @@ -1,4 +1,4 @@ -import { BaseSchema, Schema, inferParsed, inferRaw } from "../../Schema"; +import { BaseSchema, inferParsed, inferRaw, Schema } from "../../Schema"; import { addQuestionMarksToNullableProperties } from "../../utils/addQuestionMarksToNullableProperties"; import { ObjectLikeUtils } from "../object-like"; import { SchemaUtils } from "../schema-utils"; diff --git a/src/core/schemas/builders/schema-utils/index.ts b/src/core/schemas/builders/schema-utils/index.ts index aa04e051d..9d0eed7ae 100644 --- a/src/core/schemas/builders/schema-utils/index.ts +++ b/src/core/schemas/builders/schema-utils/index.ts @@ -1,4 +1,4 @@ -export { getSchemaUtils, optional, transform } from "./getSchemaUtils"; export type { SchemaUtils } from "./getSchemaUtils"; +export { getSchemaUtils, optional, transform } from "./getSchemaUtils"; export { JsonError } from "./JsonError"; export { ParseError } from "./ParseError"; diff --git a/src/core/schemas/builders/undiscriminated-union/types.ts b/src/core/schemas/builders/undiscriminated-union/types.ts index 4f0888aaf..43e7108a0 100644 --- a/src/core/schemas/builders/undiscriminated-union/types.ts +++ b/src/core/schemas/builders/undiscriminated-union/types.ts @@ -1,4 +1,4 @@ -import { Schema, inferParsed, inferRaw } from "../../Schema"; +import { inferParsed, inferRaw, Schema } from "../../Schema"; export type UndiscriminatedUnionSchema = Schema< inferRawUnidiscriminatedUnionSchema, diff --git a/src/core/schemas/builders/union/index.ts b/src/core/schemas/builders/union/index.ts index 85fc008a2..22289b667 100644 --- a/src/core/schemas/builders/union/index.ts +++ b/src/core/schemas/builders/union/index.ts @@ -1,5 +1,5 @@ -export { discriminant } from "./discriminant"; export type { Discriminant } from "./discriminant"; +export { discriminant } from "./discriminant"; export type { inferParsedDiscriminant, inferParsedUnion, diff --git a/src/core/schemas/builders/union/types.ts b/src/core/schemas/builders/union/types.ts index 7ac9d16d6..002523559 100644 --- a/src/core/schemas/builders/union/types.ts +++ b/src/core/schemas/builders/union/types.ts @@ -1,4 +1,4 @@ -import { ObjectSchema, inferParsedObject, inferRawObject } from "../object"; +import { inferParsedObject, inferRawObject, ObjectSchema } from "../object"; import { Discriminant } from "./discriminant"; export type UnionSubtypes = { diff --git a/src/core/schemas/builders/union/union.ts b/src/core/schemas/builders/union/union.ts index afdd5a1f5..0089437fb 100644 --- a/src/core/schemas/builders/union/union.ts +++ b/src/core/schemas/builders/union/union.ts @@ -5,10 +5,10 @@ import { keys } from "../../utils/keys"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { enum_ } from "../enum"; import { ObjectSchema } from "../object"; -import { ObjectLikeSchema, getObjectLikeUtils } from "../object-like"; +import { getObjectLikeUtils, ObjectLikeSchema } from "../object-like"; import { getSchemaUtils } from "../schema-utils"; import { Discriminant } from "./discriminant"; -import { UnionSubtypes, inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion } from "./types"; +import { inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion, UnionSubtypes } from "./types"; export function union, U extends UnionSubtypes>( discriminant: D, diff --git a/src/core/schemas/utils/createIdentitySchemaCreator.ts b/src/core/schemas/utils/createIdentitySchemaCreator.ts index 4db71be4a..1857560b8 100644 --- a/src/core/schemas/utils/createIdentitySchemaCreator.ts +++ b/src/core/schemas/utils/createIdentitySchemaCreator.ts @@ -1,5 +1,5 @@ -import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType } from "../Schema"; import { getSchemaUtils } from "../builders/schema-utils"; +import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType } from "../Schema"; import { maybeSkipValidation } from "./maybeSkipValidation"; export function createIdentitySchemaCreator( diff --git a/src/version.ts b/src/version.ts index 3c989022c..b057ce51a 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "2.1.2"; +export const SDK_VERSION = "2.1.3"; diff --git a/tests/mock-server/mockEndpointBuilder.ts b/tests/mock-server/mockEndpointBuilder.ts index 76ed83cbf..0b069b2dc 100644 --- a/tests/mock-server/mockEndpointBuilder.ts +++ b/tests/mock-server/mockEndpointBuilder.ts @@ -128,6 +128,9 @@ class RequestBuilder implements MethodStage, RequestHeadersStage, RequestBodySta } jsonBody(body: unknown): ResponseStage { + if (body === undefined) { + throw new Error("Undefined is not valid JSON. Do not call jsonBody if you want an empty body."); + } this.predicates.push((resolver) => withJson(body, resolver)); return this; } @@ -179,6 +182,9 @@ class ResponseBuilder implements ResponseStatusStage, ResponseHeaderStage, Respo } public jsonBody(body: unknown): BuildStage { + if (body === undefined) { + throw new Error("Undefined is not valid JSON. Do not call jsonBody if you expect an empty body."); + } this.responseBody = toJson(body); return this; } diff --git a/tests/mock-server/withJson.ts b/tests/mock-server/withJson.ts index 44e3eb832..03f585de7 100644 --- a/tests/mock-server/withJson.ts +++ b/tests/mock-server/withJson.ts @@ -12,17 +12,23 @@ export function withJson(expectedBody: unknown, resolver: HttpResponseResolver): const { request } = args; let clonedRequest: Request; + let bodyText: string | undefined; let actualBody: unknown; try { clonedRequest = request.clone(); - actualBody = fromJson(await clonedRequest.text()); + bodyText = await clonedRequest.text(); + if (bodyText === "") { + console.error("Request body is empty, expected a JSON object."); + return passthrough(); + } + actualBody = fromJson(bodyText); } catch (error) { - console.error("Error processing request body:", error); + console.error(`Error processing request body:\n\tError: ${error}\n\tBody: ${bodyText}`); return passthrough(); } const mismatches = findMismatches(actualBody, expectedBody); - if (Object.keys(mismatches).length > 0) { + if (Object.keys(mismatches).filter((key) => !key.startsWith("pagination.")).length > 0) { console.error("JSON body mismatch:", toJson(mismatches, undefined, 2)); return passthrough(); } diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts index 847c018bc..5739377a7 100644 --- a/tests/unit/fetcher/Fetcher.test.ts +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -3,7 +3,7 @@ import stream from "stream"; import { join } from "path"; import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; -import { BinaryResponse } from "../../../src/core"; +import type { BinaryResponse } from "../../../src/core"; describe("Test fetcherImpl", () => { it("should handle successful request", async () => { diff --git a/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts index 5752c8af5..56cba3462 100644 --- a/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts +++ b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts @@ -1,7 +1,7 @@ +import { chooseStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper"; import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper"; import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper"; -import { chooseStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; import { RUNTIME } from "../../../../src/core/runtime"; describe("chooseStreamWrapper", () => { diff --git a/tests/unit/schemas/lazy/lazy.test.ts b/tests/unit/schemas/lazy/lazy.test.ts index 3a5a338d6..bc2b71288 100644 --- a/tests/unit/schemas/lazy/lazy.test.ts +++ b/tests/unit/schemas/lazy/lazy.test.ts @@ -1,5 +1,5 @@ -import { Schema } from "../../../../src/core/schemas/Schema"; import { lazy, list, object, string } from "../../../../src/core/schemas/builders"; +import { Schema } from "../../../../src/core/schemas/Schema"; import { itSchemaIdentity } from "../utils/itSchema"; describe("lazy", () => { diff --git a/tests/wire/accounting/accountingPeriods.test.ts b/tests/wire/accounting/accountingPeriods.test.ts index 8cfafb3a9..33fe13d7b 100644 --- a/tests/wire/accounting/accountingPeriods.test.ts +++ b/tests/wire/accounting/accountingPeriods.test.ts @@ -39,7 +39,9 @@ describe("AccountingPeriods", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.accountingPeriods.list(); + const response = await client.accounting.accountingPeriods.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/accounts.test.ts b/tests/wire/accounting/accounts.test.ts index e26eb780a..0248a1b08 100644 --- a/tests/wire/accounting/accounts.test.ts +++ b/tests/wire/accounting/accounts.test.ts @@ -47,7 +47,9 @@ describe("Accounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.accounts.list(); + const response = await client.accounting.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/attachments.test.ts b/tests/wire/accounting/attachments.test.ts index 02ca220fb..8ec72a885 100644 --- a/tests/wire/accounting/attachments.test.ts +++ b/tests/wire/accounting/attachments.test.ts @@ -39,7 +39,9 @@ describe("Attachments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.attachments.list(); + const response = await client.accounting.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/auditTrail.test.ts b/tests/wire/accounting/auditTrail.test.ts index 8d8e89b57..c0a0948bc 100644 --- a/tests/wire/accounting/auditTrail.test.ts +++ b/tests/wire/accounting/auditTrail.test.ts @@ -35,7 +35,9 @@ describe("AuditTrail", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.auditTrail.list(); + const response = await client.accounting.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/balanceSheets.test.ts b/tests/wire/accounting/balanceSheets.test.ts index c7005262e..9a235d90b 100644 --- a/tests/wire/accounting/balanceSheets.test.ts +++ b/tests/wire/accounting/balanceSheets.test.ts @@ -81,7 +81,9 @@ describe("BalanceSheets", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.balanceSheets.list(); + const response = await client.accounting.balanceSheets.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/bankFeedAccounts.test.ts b/tests/wire/accounting/bankFeedAccounts.test.ts index 729e946d4..ec1787650 100644 --- a/tests/wire/accounting/bankFeedAccounts.test.ts +++ b/tests/wire/accounting/bankFeedAccounts.test.ts @@ -45,7 +45,9 @@ describe("BankFeedAccounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.bankFeedAccounts.list(); + const response = await client.accounting.bankFeedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/bankFeedTransactions.test.ts b/tests/wire/accounting/bankFeedTransactions.test.ts index 8d384cc07..06ef5f621 100644 --- a/tests/wire/accounting/bankFeedTransactions.test.ts +++ b/tests/wire/accounting/bankFeedTransactions.test.ts @@ -41,7 +41,9 @@ describe("BankFeedTransactions", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.bankFeedTransactions.list(); + const response = await client.accounting.bankFeedTransactions.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/cashFlowStatements.test.ts b/tests/wire/accounting/cashFlowStatements.test.ts index 0f07e9925..0334bae62 100644 --- a/tests/wire/accounting/cashFlowStatements.test.ts +++ b/tests/wire/accounting/cashFlowStatements.test.ts @@ -90,7 +90,9 @@ describe("CashFlowStatements", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.cashFlowStatements.list(); + const response = await client.accounting.cashFlowStatements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/companyInfo.test.ts b/tests/wire/accounting/companyInfo.test.ts index ebc4d1ac0..bce3e1537 100644 --- a/tests/wire/accounting/companyInfo.test.ts +++ b/tests/wire/accounting/companyInfo.test.ts @@ -56,7 +56,9 @@ describe("CompanyInfo", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.companyInfo.list(); + const response = await client.accounting.companyInfo.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/contacts.test.ts b/tests/wire/accounting/contacts.test.ts index d4800f596..0f4d93caa 100644 --- a/tests/wire/accounting/contacts.test.ts +++ b/tests/wire/accounting/contacts.test.ts @@ -55,7 +55,9 @@ describe("Contacts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.contacts.list(); + const response = await client.accounting.contacts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -802,7 +804,9 @@ describe("Contacts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.contacts.remoteFieldClassesList(); + const response = await client.accounting.contacts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/creditNotes.test.ts b/tests/wire/accounting/creditNotes.test.ts index 092ddb1f9..20478ba35 100644 --- a/tests/wire/accounting/creditNotes.test.ts +++ b/tests/wire/accounting/creditNotes.test.ts @@ -91,7 +91,9 @@ describe("CreditNotes", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.creditNotes.list(); + const response = await client.accounting.creditNotes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -431,7 +433,6 @@ describe("CreditNotes", () => { unit_price: "5.0", tax_rate: "8d9fd929-436c-4fd4-a48b-0c61f68d6178", total_line_amount: "5.0", - tracking_category: "tracking_category", tracking_categories: [ "8d9fd929-436c-4fd4-a48b-0c61f68d6178", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -510,7 +511,6 @@ describe("CreditNotes", () => { unitPrice: "5.0", taxRate: "8d9fd929-436c-4fd4-a48b-0c61f68d6178", totalLineAmount: "5.0", - trackingCategory: "tracking_category", trackingCategories: [ "8d9fd929-436c-4fd4-a48b-0c61f68d6178", "9b840d2-686a-465a-8a8e-7b028498f8e4", diff --git a/tests/wire/accounting/employees.test.ts b/tests/wire/accounting/employees.test.ts index 7404650a7..ce4f12b0f 100644 --- a/tests/wire/accounting/employees.test.ts +++ b/tests/wire/accounting/employees.test.ts @@ -43,7 +43,9 @@ describe("Employees", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.employees.list(); + const response = await client.accounting.employees.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/expenseReports.test.ts b/tests/wire/accounting/expenseReports.test.ts index 3e68d8e5e..52a737602 100644 --- a/tests/wire/accounting/expenseReports.test.ts +++ b/tests/wire/accounting/expenseReports.test.ts @@ -77,7 +77,9 @@ describe("ExpenseReports", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.expenseReports.list(); + const response = await client.accounting.expenseReports.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -395,7 +397,9 @@ describe("ExpenseReports", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.expenseReports.linesList("expense_report_id"); + const response = await client.accounting.expenseReports.linesList("expense_report_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -601,7 +605,9 @@ describe("ExpenseReports", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.expenseReports.linesRemoteFieldClassesList(); + const response = await client.accounting.expenseReports.linesRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1068,7 +1074,9 @@ describe("ExpenseReports", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.expenseReports.remoteFieldClassesList(); + const response = await client.accounting.expenseReports.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/expenses.test.ts b/tests/wire/accounting/expenses.test.ts index 48afb0b28..8905f105c 100644 --- a/tests/wire/accounting/expenses.test.ts +++ b/tests/wire/accounting/expenses.test.ts @@ -95,7 +95,9 @@ describe("Expenses", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.expenses.list(); + const response = await client.accounting.expenses.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -453,7 +455,6 @@ describe("Expenses", () => { modified_at: "2021-10-16T00:00:00Z", item: "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", net_amount: 25.54, - tracking_category: "tracking_category", tracking_categories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -477,7 +478,6 @@ describe("Expenses", () => { modified_at: "2021-10-16T00:00:00Z", item: "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", net_amount: 10, - tracking_category: "tracking_category", tracking_categories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -544,7 +544,6 @@ describe("Expenses", () => { modifiedAt: new Date("2021-10-16T00:00:00.000Z"), item: "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", netAmount: 25.54, - trackingCategory: "tracking_category", trackingCategories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -568,7 +567,6 @@ describe("Expenses", () => { modifiedAt: new Date("2021-10-16T00:00:00.000Z"), item: "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", netAmount: 10, - trackingCategory: "tracking_category", trackingCategories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -648,7 +646,9 @@ describe("Expenses", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.expenses.linesRemoteFieldClassesList(); + const response = await client.accounting.expenses.linesRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1115,7 +1115,9 @@ describe("Expenses", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.expenses.remoteFieldClassesList(); + const response = await client.accounting.expenses.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/generalLedgerTransactions.test.ts b/tests/wire/accounting/generalLedgerTransactions.test.ts index 0fac3e996..3f80365d6 100644 --- a/tests/wire/accounting/generalLedgerTransactions.test.ts +++ b/tests/wire/accounting/generalLedgerTransactions.test.ts @@ -74,7 +74,9 @@ describe("GeneralLedgerTransactions", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.generalLedgerTransactions.list(); + const response = await client.accounting.generalLedgerTransactions.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/incomeStatements.test.ts b/tests/wire/accounting/incomeStatements.test.ts index 6270cd916..2e859793b 100644 --- a/tests/wire/accounting/incomeStatements.test.ts +++ b/tests/wire/accounting/incomeStatements.test.ts @@ -93,7 +93,9 @@ describe("IncomeStatements", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.incomeStatements.list(); + const response = await client.accounting.incomeStatements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/invoices.test.ts b/tests/wire/accounting/invoices.test.ts index e5de55649..7ba7b48d5 100644 --- a/tests/wire/accounting/invoices.test.ts +++ b/tests/wire/accounting/invoices.test.ts @@ -114,7 +114,9 @@ describe("Invoices", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.invoices.list(); + const response = await client.accounting.invoices.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -558,7 +560,6 @@ describe("Invoices", () => { item: "5b3c1341-a20f-4e51-b72c-f3830a16c97b", account: "cd0f32d4-a493-11ec-b909-0242ac120002", tax_rate: "a12e7c20-1922-9df7-s75n-edfeewnn7384", - tracking_category: "tracking_category", tracking_categories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -668,7 +669,6 @@ describe("Invoices", () => { item: "5b3c1341-a20f-4e51-b72c-f3830a16c97b", account: "cd0f32d4-a493-11ec-b909-0242ac120002", taxRate: "a12e7c20-1922-9df7-s75n-edfeewnn7384", - trackingCategory: "tracking_category", trackingCategories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -1043,7 +1043,9 @@ describe("Invoices", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.invoices.lineItemsRemoteFieldClassesList(); + const response = await client.accounting.invoices.lineItemsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1926,7 +1928,9 @@ describe("Invoices", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.invoices.remoteFieldClassesList(); + const response = await client.accounting.invoices.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/issues.test.ts b/tests/wire/accounting/issues.test.ts index 9e4dfc76b..c4de95dfe 100644 --- a/tests/wire/accounting/issues.test.ts +++ b/tests/wire/accounting/issues.test.ts @@ -34,7 +34,9 @@ describe("Issues", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.issues.list(); + const response = await client.accounting.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/items.test.ts b/tests/wire/accounting/items.test.ts index 28edf35b5..bd01d7c39 100644 --- a/tests/wire/accounting/items.test.ts +++ b/tests/wire/accounting/items.test.ts @@ -47,7 +47,9 @@ describe("Items", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.items.list(); + const response = await client.accounting.items.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/journalEntries.test.ts b/tests/wire/accounting/journalEntries.test.ts index b88711b32..74e27013b 100644 --- a/tests/wire/accounting/journalEntries.test.ts +++ b/tests/wire/accounting/journalEntries.test.ts @@ -86,7 +86,9 @@ describe("JournalEntries", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.journalEntries.list(); + const response = await client.accounting.journalEntries.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -412,7 +414,6 @@ describe("JournalEntries", () => { modified_at: "2021-10-16T00:00:00Z", account: "9d892439-5fab-4dbb-8bd8-34f7f96c7912", net_amount: 25.54, - tracking_category: "tracking_category", tracking_categories: [ "d25d609b-945f-4762-b55a-1c8fb220c43c", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -436,7 +437,6 @@ describe("JournalEntries", () => { modified_at: "2021-10-16T00:00:00Z", account: "f963f34d-3d2f-4f77-b557-cf36bc7e6498", net_amount: 10, - tracking_category: "tracking_category", tracking_categories: [ "d25d609b-945f-4762-b55a-1c8fb220c43c", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -502,7 +502,6 @@ describe("JournalEntries", () => { modifiedAt: new Date("2021-10-16T00:00:00.000Z"), account: "9d892439-5fab-4dbb-8bd8-34f7f96c7912", netAmount: 25.54, - trackingCategory: "tracking_category", trackingCategories: [ "d25d609b-945f-4762-b55a-1c8fb220c43c", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -530,7 +529,6 @@ describe("JournalEntries", () => { modifiedAt: new Date("2021-10-16T00:00:00.000Z"), account: "f963f34d-3d2f-4f77-b557-cf36bc7e6498", netAmount: 10, - trackingCategory: "tracking_category", trackingCategories: [ "d25d609b-945f-4762-b55a-1c8fb220c43c", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -618,7 +616,9 @@ describe("JournalEntries", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.journalEntries.linesRemoteFieldClassesList(); + const response = await client.accounting.journalEntries.linesRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1085,7 +1085,9 @@ describe("JournalEntries", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.journalEntries.remoteFieldClassesList(); + const response = await client.accounting.journalEntries.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/linkedAccounts.test.ts b/tests/wire/accounting/linkedAccounts.test.ts index 767c941d4..f24bdd1db 100644 --- a/tests/wire/accounting/linkedAccounts.test.ts +++ b/tests/wire/accounting/linkedAccounts.test.ts @@ -54,7 +54,9 @@ describe("LinkedAccounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.linkedAccounts.list(); + const response = await client.accounting.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/paymentMethods.test.ts b/tests/wire/accounting/paymentMethods.test.ts index 90e5458da..aca1a6621 100644 --- a/tests/wire/accounting/paymentMethods.test.ts +++ b/tests/wire/accounting/paymentMethods.test.ts @@ -39,7 +39,9 @@ describe("PaymentMethods", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.paymentMethods.list(); + const response = await client.accounting.paymentMethods.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/paymentTerms.test.ts b/tests/wire/accounting/paymentTerms.test.ts index f7fdf56cb..649508acb 100644 --- a/tests/wire/accounting/paymentTerms.test.ts +++ b/tests/wire/accounting/paymentTerms.test.ts @@ -41,7 +41,9 @@ describe("PaymentTerms", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.paymentTerms.list(); + const response = await client.accounting.paymentTerms.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/payments.test.ts b/tests/wire/accounting/payments.test.ts index 2e8131b3d..e50742214 100644 --- a/tests/wire/accounting/payments.test.ts +++ b/tests/wire/accounting/payments.test.ts @@ -75,7 +75,9 @@ describe("Payments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.payments.list(); + const response = await client.accounting.payments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -701,7 +703,9 @@ describe("Payments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.payments.lineItemsRemoteFieldClassesList(); + const response = await client.accounting.payments.lineItemsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1584,7 +1588,9 @@ describe("Payments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.payments.remoteFieldClassesList(); + const response = await client.accounting.payments.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/projects.test.ts b/tests/wire/accounting/projects.test.ts index 7add94ca5..01fc28236 100644 --- a/tests/wire/accounting/projects.test.ts +++ b/tests/wire/accounting/projects.test.ts @@ -39,7 +39,9 @@ describe("Projects", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.projects.list(); + const response = await client.accounting.projects.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/purchaseOrders.test.ts b/tests/wire/accounting/purchaseOrders.test.ts index 0f44ad168..9798f76e7 100644 --- a/tests/wire/accounting/purchaseOrders.test.ts +++ b/tests/wire/accounting/purchaseOrders.test.ts @@ -99,7 +99,9 @@ describe("PurchaseOrders", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.purchaseOrders.list(); + const response = await client.accounting.purchaseOrders.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -472,7 +474,6 @@ describe("PurchaseOrders", () => { quantity: 10, item: "0958cbc6-6040-430a-848e-aafacbadf4ae", account: "account", - tracking_category: "tracking_category", tracking_categories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -497,7 +498,6 @@ describe("PurchaseOrders", () => { quantity: 10, item: "249c9faa-3045-4a31-953b-8f22d3613301", account: "account", - tracking_category: "tracking_category", tracking_categories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -568,7 +568,6 @@ describe("PurchaseOrders", () => { quantity: 10, item: "0958cbc6-6040-430a-848e-aafacbadf4ae", account: "account", - trackingCategory: "tracking_category", trackingCategories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -597,7 +596,6 @@ describe("PurchaseOrders", () => { quantity: 10, item: "249c9faa-3045-4a31-953b-8f22d3613301", account: "account", - trackingCategory: "tracking_category", trackingCategories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -682,7 +680,9 @@ describe("PurchaseOrders", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList(); + const response = await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1149,7 +1149,9 @@ describe("PurchaseOrders", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.purchaseOrders.remoteFieldClassesList(); + const response = await client.accounting.purchaseOrders.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/syncStatus.test.ts b/tests/wire/accounting/syncStatus.test.ts index 8fc69b33d..cb3599437 100644 --- a/tests/wire/accounting/syncStatus.test.ts +++ b/tests/wire/accounting/syncStatus.test.ts @@ -35,7 +35,9 @@ describe("SyncStatus", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.syncStatus.list(); + const response = await client.accounting.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/taxRates.test.ts b/tests/wire/accounting/taxRates.test.ts index 17baa647d..a1a834204 100644 --- a/tests/wire/accounting/taxRates.test.ts +++ b/tests/wire/accounting/taxRates.test.ts @@ -56,7 +56,9 @@ describe("TaxRates", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.taxRates.list(); + const response = await client.accounting.taxRates.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/trackingCategories.test.ts b/tests/wire/accounting/trackingCategories.test.ts index 0e33eb8d2..30db7755f 100644 --- a/tests/wire/accounting/trackingCategories.test.ts +++ b/tests/wire/accounting/trackingCategories.test.ts @@ -40,7 +40,9 @@ describe("TrackingCategories", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.trackingCategories.list(); + const response = await client.accounting.trackingCategories.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/accounting/transactions.test.ts b/tests/wire/accounting/transactions.test.ts index 700eb2724..198efd9b7 100644 --- a/tests/wire/accounting/transactions.test.ts +++ b/tests/wire/accounting/transactions.test.ts @@ -93,7 +93,9 @@ describe("Transactions", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.transactions.list(); + const response = await client.accounting.transactions.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -215,7 +217,6 @@ describe("Transactions", () => { quantity: "10.0", item: "0958cbc6-6040-430a-848e-aafacbadf4ae", account: "2b38c085-2620-4269-b5ec-75dd9095ed2c", - tracking_category: "tracking_category", tracking_categories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -238,7 +239,6 @@ describe("Transactions", () => { quantity: "10.0", item: "249c9faa-3045-4a31-953b-8f22d3613301", account: "3e442c5d-8f51-4103-b5c9-dcee39c30a08", - tracking_category: "tracking_category", tracking_categories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -300,7 +300,6 @@ describe("Transactions", () => { quantity: "10.0", item: "0958cbc6-6040-430a-848e-aafacbadf4ae", account: "2b38c085-2620-4269-b5ec-75dd9095ed2c", - trackingCategory: "tracking_category", trackingCategories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -323,7 +322,6 @@ describe("Transactions", () => { quantity: "10.0", item: "249c9faa-3045-4a31-953b-8f22d3613301", account: "3e442c5d-8f51-4103-b5c9-dcee39c30a08", - trackingCategory: "tracking_category", trackingCategories: [ "f1214c24-2702-4617-b74b-3ddecfc0d384", "9b840d2-686a-465a-8a8e-7b028498f8e4", diff --git a/tests/wire/accounting/vendorCredits.test.ts b/tests/wire/accounting/vendorCredits.test.ts index 734dcb7d8..1d8c4a812 100644 --- a/tests/wire/accounting/vendorCredits.test.ts +++ b/tests/wire/accounting/vendorCredits.test.ts @@ -95,7 +95,9 @@ describe("VendorCredits", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.accounting.vendorCredits.list(); + const response = await client.accounting.vendorCredits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -439,7 +441,6 @@ describe("VendorCredits", () => { created_at: "2021-09-15T00:00:00Z", modified_at: "2021-10-16T00:00:00Z", net_amount: 25.54, - tracking_category: "tracking_category", tracking_categories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -460,7 +461,6 @@ describe("VendorCredits", () => { created_at: "2021-09-15T00:00:00Z", modified_at: "2021-10-16T00:00:00Z", net_amount: 10, - tracking_category: "tracking_category", tracking_categories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -529,7 +529,6 @@ describe("VendorCredits", () => { createdAt: new Date("2021-09-15T00:00:00.000Z"), modifiedAt: new Date("2021-10-16T00:00:00.000Z"), netAmount: 25.54, - trackingCategory: "tracking_category", trackingCategories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", @@ -550,7 +549,6 @@ describe("VendorCredits", () => { createdAt: new Date("2021-09-15T00:00:00.000Z"), modifiedAt: new Date("2021-10-16T00:00:00.000Z"), netAmount: 10, - trackingCategory: "tracking_category", trackingCategories: [ "b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", diff --git a/tests/wire/ats/activities.test.ts b/tests/wire/ats/activities.test.ts index 1e6ddbc43..f4cf8c5d5 100644 --- a/tests/wire/ats/activities.test.ts +++ b/tests/wire/ats/activities.test.ts @@ -37,7 +37,9 @@ describe("Activities", () => { }; server.mockEndpoint().get("/ats/v1/activities").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.activities.list(); + const response = await client.ats.activities.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/applications.test.ts b/tests/wire/ats/applications.test.ts index 27fe11b1e..d5ed504ca 100644 --- a/tests/wire/ats/applications.test.ts +++ b/tests/wire/ats/applications.test.ts @@ -46,7 +46,9 @@ describe("Applications", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.applications.list(); + const response = await client.ats.applications.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/attachments.test.ts b/tests/wire/ats/attachments.test.ts index 308db6efc..7059b37aa 100644 --- a/tests/wire/ats/attachments.test.ts +++ b/tests/wire/ats/attachments.test.ts @@ -40,7 +40,9 @@ describe("Attachments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.attachments.list(); + const response = await client.ats.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/auditTrail.test.ts b/tests/wire/ats/auditTrail.test.ts index cee599dbf..778dde927 100644 --- a/tests/wire/ats/auditTrail.test.ts +++ b/tests/wire/ats/auditTrail.test.ts @@ -35,7 +35,9 @@ describe("AuditTrail", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.auditTrail.list(); + const response = await client.ats.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/candidates.test.ts b/tests/wire/ats/candidates.test.ts index 6c3b07e55..ff959347e 100644 --- a/tests/wire/ats/candidates.test.ts +++ b/tests/wire/ats/candidates.test.ts @@ -71,7 +71,9 @@ describe("Candidates", () => { }; server.mockEndpoint().get("/ats/v1/candidates").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.candidates.list(); + const response = await client.ats.candidates.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/departments.test.ts b/tests/wire/ats/departments.test.ts index b6c9aac47..a321b447f 100644 --- a/tests/wire/ats/departments.test.ts +++ b/tests/wire/ats/departments.test.ts @@ -37,7 +37,9 @@ describe("Departments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.departments.list(); + const response = await client.ats.departments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/eeocs.test.ts b/tests/wire/ats/eeocs.test.ts index d53563969..9f092a05d 100644 --- a/tests/wire/ats/eeocs.test.ts +++ b/tests/wire/ats/eeocs.test.ts @@ -36,7 +36,9 @@ describe("Eeocs", () => { }; server.mockEndpoint().get("/ats/v1/eeocs").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.eeocs.list(); + const response = await client.ats.eeocs.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/interviews.test.ts b/tests/wire/ats/interviews.test.ts index e7503650d..5588db9a9 100644 --- a/tests/wire/ats/interviews.test.ts +++ b/tests/wire/ats/interviews.test.ts @@ -40,7 +40,9 @@ describe("Interviews", () => { }; server.mockEndpoint().get("/ats/v1/interviews").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.interviews.list(); + const response = await client.ats.interviews.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/issues.test.ts b/tests/wire/ats/issues.test.ts index 660419fe5..41f41564a 100644 --- a/tests/wire/ats/issues.test.ts +++ b/tests/wire/ats/issues.test.ts @@ -28,7 +28,9 @@ describe("Issues", () => { }; server.mockEndpoint().get("/ats/v1/issues").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.issues.list(); + const response = await client.ats.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/jobInterviewStages.test.ts b/tests/wire/ats/jobInterviewStages.test.ts index d17c917ad..88e430b23 100644 --- a/tests/wire/ats/jobInterviewStages.test.ts +++ b/tests/wire/ats/jobInterviewStages.test.ts @@ -39,7 +39,9 @@ describe("JobInterviewStages", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.jobInterviewStages.list(); + const response = await client.ats.jobInterviewStages.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/jobPostings.test.ts b/tests/wire/ats/jobPostings.test.ts index 4ad4ab936..ec963ed22 100644 --- a/tests/wire/ats/jobPostings.test.ts +++ b/tests/wire/ats/jobPostings.test.ts @@ -51,7 +51,9 @@ describe("JobPostings", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.jobPostings.list(); + const response = await client.ats.jobPostings.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/jobs.test.ts b/tests/wire/ats/jobs.test.ts index 90e1823f6..c4c7e1621 100644 --- a/tests/wire/ats/jobs.test.ts +++ b/tests/wire/ats/jobs.test.ts @@ -51,7 +51,9 @@ describe("Jobs", () => { }; server.mockEndpoint().get("/ats/v1/jobs").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.jobs.list(); + const response = await client.ats.jobs.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -223,7 +225,9 @@ describe("Jobs", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.jobs.screeningQuestionsList("job_id"); + const response = await client.ats.jobs.screeningQuestionsList("job_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/linkedAccounts.test.ts b/tests/wire/ats/linkedAccounts.test.ts index d9ce0ec8f..0efe2cafe 100644 --- a/tests/wire/ats/linkedAccounts.test.ts +++ b/tests/wire/ats/linkedAccounts.test.ts @@ -54,7 +54,9 @@ describe("LinkedAccounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.linkedAccounts.list(); + const response = await client.ats.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/offers.test.ts b/tests/wire/ats/offers.test.ts index d54f3f6c1..fef412f9a 100644 --- a/tests/wire/ats/offers.test.ts +++ b/tests/wire/ats/offers.test.ts @@ -37,7 +37,9 @@ describe("Offers", () => { }; server.mockEndpoint().get("/ats/v1/offers").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.offers.list(); + const response = await client.ats.offers.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/offices.test.ts b/tests/wire/ats/offices.test.ts index 41aa69346..a93ca4eaf 100644 --- a/tests/wire/ats/offices.test.ts +++ b/tests/wire/ats/offices.test.ts @@ -32,7 +32,9 @@ describe("Offices", () => { }; server.mockEndpoint().get("/ats/v1/offices").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.offices.list(); + const response = await client.ats.offices.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/rejectReasons.test.ts b/tests/wire/ats/rejectReasons.test.ts index f612c29a0..77cd23fab 100644 --- a/tests/wire/ats/rejectReasons.test.ts +++ b/tests/wire/ats/rejectReasons.test.ts @@ -37,7 +37,9 @@ describe("RejectReasons", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.rejectReasons.list(); + const response = await client.ats.rejectReasons.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/scorecards.test.ts b/tests/wire/ats/scorecards.test.ts index 57ff48048..8d75084a9 100644 --- a/tests/wire/ats/scorecards.test.ts +++ b/tests/wire/ats/scorecards.test.ts @@ -36,7 +36,9 @@ describe("Scorecards", () => { }; server.mockEndpoint().get("/ats/v1/scorecards").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.scorecards.list(); + const response = await client.ats.scorecards.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/syncStatus.test.ts b/tests/wire/ats/syncStatus.test.ts index 6ec6e9d57..27df878d1 100644 --- a/tests/wire/ats/syncStatus.test.ts +++ b/tests/wire/ats/syncStatus.test.ts @@ -35,7 +35,9 @@ describe("SyncStatus", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ats.syncStatus.list(); + const response = await client.ats.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/tags.test.ts b/tests/wire/ats/tags.test.ts index ed2ec5226..5f3194db1 100644 --- a/tests/wire/ats/tags.test.ts +++ b/tests/wire/ats/tags.test.ts @@ -30,7 +30,9 @@ describe("Tags", () => { }; server.mockEndpoint().get("/ats/v1/tags").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.tags.list(); + const response = await client.ats.tags.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ats/users.test.ts b/tests/wire/ats/users.test.ts index 9dc8f7bed..02de3cabe 100644 --- a/tests/wire/ats/users.test.ts +++ b/tests/wire/ats/users.test.ts @@ -36,7 +36,9 @@ describe("Users", () => { }; server.mockEndpoint().get("/ats/v1/users").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ats.users.list(); + const response = await client.ats.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/accounts.test.ts b/tests/wire/crm/accounts.test.ts index f38ac3fee..9cb681608 100644 --- a/tests/wire/crm/accounts.test.ts +++ b/tests/wire/crm/accounts.test.ts @@ -61,7 +61,9 @@ describe("Accounts", () => { }; server.mockEndpoint().get("/crm/v1/accounts").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.accounts.list(); + const response = await client.crm.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1463,7 +1465,9 @@ describe("Accounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.accounts.remoteFieldClassesList(); + const response = await client.crm.accounts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/associationTypes.test.ts b/tests/wire/crm/associationTypes.test.ts index 5aebc16f8..6eafaeb2e 100644 --- a/tests/wire/crm/associationTypes.test.ts +++ b/tests/wire/crm/associationTypes.test.ts @@ -36,8 +36,12 @@ describe("AssociationTypes", () => { .jsonBody(rawResponseBody) .build(); - const response = - await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id"); + const response = await client.crm.associationTypes.customObjectClassesAssociationTypesList( + "custom_object_class_id", + { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }, + ); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/associations.test.ts b/tests/wire/crm/associations.test.ts index 511596187..61dcaddeb 100644 --- a/tests/wire/crm/associations.test.ts +++ b/tests/wire/crm/associations.test.ts @@ -34,6 +34,9 @@ describe("Associations", () => { const response = await client.crm.associations.customObjectClassesCustomObjectsAssociationsList( "custom_object_class_id", "object_id", + { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }, ); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", diff --git a/tests/wire/crm/auditTrail.test.ts b/tests/wire/crm/auditTrail.test.ts index d1d0e6890..7ff138f75 100644 --- a/tests/wire/crm/auditTrail.test.ts +++ b/tests/wire/crm/auditTrail.test.ts @@ -35,7 +35,9 @@ describe("AuditTrail", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.auditTrail.list(); + const response = await client.crm.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/contacts.test.ts b/tests/wire/crm/contacts.test.ts index 0f1e10afb..68279c564 100644 --- a/tests/wire/crm/contacts.test.ts +++ b/tests/wire/crm/contacts.test.ts @@ -66,7 +66,9 @@ describe("Contacts", () => { }; server.mockEndpoint().get("/crm/v1/contacts").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.contacts.list(); + const response = await client.crm.contacts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1522,7 +1524,9 @@ describe("Contacts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.contacts.remoteFieldClassesList(); + const response = await client.crm.contacts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/customObjectClasses.test.ts b/tests/wire/crm/customObjectClasses.test.ts index 5c6497260..e9e7ca434 100644 --- a/tests/wire/crm/customObjectClasses.test.ts +++ b/tests/wire/crm/customObjectClasses.test.ts @@ -63,7 +63,9 @@ describe("CustomObjectClasses", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.customObjectClasses.list(); + const response = await client.crm.customObjectClasses.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/customObjects.test.ts b/tests/wire/crm/customObjects.test.ts index beb28264d..e21f113e4 100644 --- a/tests/wire/crm/customObjects.test.ts +++ b/tests/wire/crm/customObjects.test.ts @@ -33,7 +33,9 @@ describe("CustomObjects", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id"); + const response = await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -666,7 +668,9 @@ describe("CustomObjects", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList(); + const response = await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/engagementTypes.test.ts b/tests/wire/crm/engagementTypes.test.ts index 39716b499..b8566c400 100644 --- a/tests/wire/crm/engagementTypes.test.ts +++ b/tests/wire/crm/engagementTypes.test.ts @@ -33,7 +33,9 @@ describe("EngagementTypes", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.engagementTypes.list(); + const response = await client.crm.engagementTypes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -125,7 +127,9 @@ describe("EngagementTypes", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.engagementTypes.remoteFieldClassesList(); + const response = await client.crm.engagementTypes.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/engagements.test.ts b/tests/wire/crm/engagements.test.ts index c417515f1..b46fd7bd1 100644 --- a/tests/wire/crm/engagements.test.ts +++ b/tests/wire/crm/engagements.test.ts @@ -46,7 +46,9 @@ describe("Engagements", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.engagements.list(); + const response = await client.crm.engagements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1301,7 +1303,9 @@ describe("Engagements", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.engagements.remoteFieldClassesList(); + const response = await client.crm.engagements.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/issues.test.ts b/tests/wire/crm/issues.test.ts index 9d9473d55..cddfa62b4 100644 --- a/tests/wire/crm/issues.test.ts +++ b/tests/wire/crm/issues.test.ts @@ -28,7 +28,9 @@ describe("Issues", () => { }; server.mockEndpoint().get("/crm/v1/issues").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.issues.list(); + const response = await client.crm.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/leads.test.ts b/tests/wire/crm/leads.test.ts index b9edde656..5ce065f36 100644 --- a/tests/wire/crm/leads.test.ts +++ b/tests/wire/crm/leads.test.ts @@ -71,7 +71,9 @@ describe("Leads", () => { }; server.mockEndpoint().get("/crm/v1/leads").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.leads.list(); + const response = await client.crm.leads.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -922,7 +924,9 @@ describe("Leads", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.leads.remoteFieldClassesList(); + const response = await client.crm.leads.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/linkedAccounts.test.ts b/tests/wire/crm/linkedAccounts.test.ts index fda753bd5..88c8352f5 100644 --- a/tests/wire/crm/linkedAccounts.test.ts +++ b/tests/wire/crm/linkedAccounts.test.ts @@ -53,7 +53,9 @@ describe("LinkedAccounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.linkedAccounts.list(); + const response = await client.crm.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/notes.test.ts b/tests/wire/crm/notes.test.ts index 540c3b6a8..1121472e0 100644 --- a/tests/wire/crm/notes.test.ts +++ b/tests/wire/crm/notes.test.ts @@ -38,7 +38,9 @@ describe("Notes", () => { }; server.mockEndpoint().get("/crm/v1/notes").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.notes.list(); + const response = await client.crm.notes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -724,7 +726,9 @@ describe("Notes", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.notes.remoteFieldClassesList(); + const response = await client.crm.notes.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/opportunities.test.ts b/tests/wire/crm/opportunities.test.ts index 412a979cb..1eccb87aa 100644 --- a/tests/wire/crm/opportunities.test.ts +++ b/tests/wire/crm/opportunities.test.ts @@ -47,7 +47,9 @@ describe("Opportunities", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.opportunities.list(); + const response = await client.crm.opportunities.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1309,7 +1311,9 @@ describe("Opportunities", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.opportunities.remoteFieldClassesList(); + const response = await client.crm.opportunities.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/stages.test.ts b/tests/wire/crm/stages.test.ts index 726675284..61958e1a6 100644 --- a/tests/wire/crm/stages.test.ts +++ b/tests/wire/crm/stages.test.ts @@ -32,7 +32,9 @@ describe("Stages", () => { }; server.mockEndpoint().get("/crm/v1/stages").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.stages.list(); + const response = await client.crm.stages.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -151,7 +153,9 @@ describe("Stages", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.stages.remoteFieldClassesList(); + const response = await client.crm.stages.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/syncStatus.test.ts b/tests/wire/crm/syncStatus.test.ts index 15ac6ea54..82f7f86ba 100644 --- a/tests/wire/crm/syncStatus.test.ts +++ b/tests/wire/crm/syncStatus.test.ts @@ -35,7 +35,9 @@ describe("SyncStatus", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.syncStatus.list(); + const response = await client.crm.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/tasks.test.ts b/tests/wire/crm/tasks.test.ts index 311f576e3..4623226e0 100644 --- a/tests/wire/crm/tasks.test.ts +++ b/tests/wire/crm/tasks.test.ts @@ -39,7 +39,9 @@ describe("Tasks", () => { }; server.mockEndpoint().get("/crm/v1/tasks").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.tasks.list(); + const response = await client.crm.tasks.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1281,7 +1283,9 @@ describe("Tasks", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.tasks.remoteFieldClassesList(); + const response = await client.crm.tasks.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/crm/users.test.ts b/tests/wire/crm/users.test.ts index 1bfa4ae36..869df22e2 100644 --- a/tests/wire/crm/users.test.ts +++ b/tests/wire/crm/users.test.ts @@ -34,7 +34,9 @@ describe("Users", () => { }; server.mockEndpoint().get("/crm/v1/users").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.crm.users.list(); + const response = await client.crm.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -178,7 +180,9 @@ describe("Users", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.crm.users.remoteFieldClassesList(); + const response = await client.crm.users.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/auditTrail.test.ts b/tests/wire/filestorage/auditTrail.test.ts index 078d85e73..ddddbc2d3 100644 --- a/tests/wire/filestorage/auditTrail.test.ts +++ b/tests/wire/filestorage/auditTrail.test.ts @@ -35,7 +35,9 @@ describe("AuditTrail", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.auditTrail.list(); + const response = await client.filestorage.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/drives.test.ts b/tests/wire/filestorage/drives.test.ts index b784c2298..8e9b4e802 100644 --- a/tests/wire/filestorage/drives.test.ts +++ b/tests/wire/filestorage/drives.test.ts @@ -39,7 +39,9 @@ describe("Drives", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.drives.list(); + const response = await client.filestorage.drives.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/files.test.ts b/tests/wire/filestorage/files.test.ts index bc441502d..b09078e21 100644 --- a/tests/wire/filestorage/files.test.ts +++ b/tests/wire/filestorage/files.test.ts @@ -51,7 +51,9 @@ describe("Files", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.files.list(); + const response = await client.filestorage.files.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -370,7 +372,9 @@ describe("Files", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.files.downloadRequestMetaList(); + const response = await client.filestorage.files.downloadRequestMetaList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/folders.test.ts b/tests/wire/filestorage/folders.test.ts index b661fd363..1470e13ba 100644 --- a/tests/wire/filestorage/folders.test.ts +++ b/tests/wire/filestorage/folders.test.ts @@ -45,7 +45,9 @@ describe("Folders", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.folders.list(); + const response = await client.filestorage.folders.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/groups.test.ts b/tests/wire/filestorage/groups.test.ts index 87f5c9a19..b220ce899 100644 --- a/tests/wire/filestorage/groups.test.ts +++ b/tests/wire/filestorage/groups.test.ts @@ -39,7 +39,9 @@ describe("Groups", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.groups.list(); + const response = await client.filestorage.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/issues.test.ts b/tests/wire/filestorage/issues.test.ts index 1f0891301..b4459adb0 100644 --- a/tests/wire/filestorage/issues.test.ts +++ b/tests/wire/filestorage/issues.test.ts @@ -34,7 +34,9 @@ describe("Issues", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.issues.list(); + const response = await client.filestorage.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/linkedAccounts.test.ts b/tests/wire/filestorage/linkedAccounts.test.ts index 0a4da4704..af4595315 100644 --- a/tests/wire/filestorage/linkedAccounts.test.ts +++ b/tests/wire/filestorage/linkedAccounts.test.ts @@ -54,7 +54,9 @@ describe("LinkedAccounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.linkedAccounts.list(); + const response = await client.filestorage.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/syncStatus.test.ts b/tests/wire/filestorage/syncStatus.test.ts index f0c3e268a..394eaaef0 100644 --- a/tests/wire/filestorage/syncStatus.test.ts +++ b/tests/wire/filestorage/syncStatus.test.ts @@ -35,7 +35,9 @@ describe("SyncStatus", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.syncStatus.list(); + const response = await client.filestorage.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/filestorage/users.test.ts b/tests/wire/filestorage/users.test.ts index 26687b022..4013e6f92 100644 --- a/tests/wire/filestorage/users.test.ts +++ b/tests/wire/filestorage/users.test.ts @@ -39,7 +39,9 @@ describe("Users", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.filestorage.users.list(); + const response = await client.filestorage.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/auditTrail.test.ts b/tests/wire/hris/auditTrail.test.ts index b2f031be1..a808f4751 100644 --- a/tests/wire/hris/auditTrail.test.ts +++ b/tests/wire/hris/auditTrail.test.ts @@ -35,7 +35,9 @@ describe("AuditTrail", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.auditTrail.list(); + const response = await client.hris.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/bankInfo.test.ts b/tests/wire/hris/bankInfo.test.ts index 8895a81ab..25bc6bc0c 100644 --- a/tests/wire/hris/bankInfo.test.ts +++ b/tests/wire/hris/bankInfo.test.ts @@ -36,7 +36,9 @@ describe("BankInfo", () => { }; server.mockEndpoint().get("/hris/v1/bank-info").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.bankInfo.list(); + const response = await client.hris.bankInfo.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/benefits.test.ts b/tests/wire/hris/benefits.test.ts index 288f2a905..460e68c36 100644 --- a/tests/wire/hris/benefits.test.ts +++ b/tests/wire/hris/benefits.test.ts @@ -21,7 +21,6 @@ describe("Benefits", () => { modified_at: "2021-10-16T00:00:00Z", employee: "employee", provider_name: "Blue Shield of California", - benefit_plan_type: "benefit_plan_type", employee_contribution: 23.65, company_contribution: 150, start_date: "2020-11-15T00:59:25Z", @@ -38,7 +37,9 @@ describe("Benefits", () => { }; server.mockEndpoint().get("/hris/v1/benefits").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.benefits.list(); + const response = await client.hris.benefits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -50,7 +51,6 @@ describe("Benefits", () => { modifiedAt: new Date("2021-10-16T00:00:00.000Z"), employee: "employee", providerName: "Blue Shield of California", - benefitPlanType: "benefit_plan_type", employeeContribution: 23.65, companyContribution: 150, startDate: new Date("2020-11-15T00:59:25.000Z"), @@ -87,7 +87,6 @@ describe("Benefits", () => { modified_at: "2021-10-16T00:00:00Z", employee: "employee", provider_name: "Blue Shield of California", - benefit_plan_type: "benefit_plan_type", employee_contribution: 23.65, company_contribution: 150, start_date: "2020-11-15T00:59:25Z", @@ -116,7 +115,6 @@ describe("Benefits", () => { modifiedAt: new Date("2021-10-16T00:00:00.000Z"), employee: "employee", providerName: "Blue Shield of California", - benefitPlanType: "benefit_plan_type", employeeContribution: 23.65, companyContribution: 150, startDate: new Date("2020-11-15T00:59:25.000Z"), diff --git a/tests/wire/hris/companies.test.ts b/tests/wire/hris/companies.test.ts index 4d9671018..03685b8d9 100644 --- a/tests/wire/hris/companies.test.ts +++ b/tests/wire/hris/companies.test.ts @@ -33,7 +33,9 @@ describe("Companies", () => { }; server.mockEndpoint().get("/hris/v1/companies").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.companies.list(); + const response = await client.hris.companies.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/dependents.test.ts b/tests/wire/hris/dependents.test.ts index 2333d0fb1..3bb6ed651 100644 --- a/tests/wire/hris/dependents.test.ts +++ b/tests/wire/hris/dependents.test.ts @@ -47,7 +47,9 @@ describe("Dependents", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.dependents.list(); + const response = await client.hris.dependents.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/employeePayrollRuns.test.ts b/tests/wire/hris/employeePayrollRuns.test.ts index 1f0aebad1..8bbd6517d 100644 --- a/tests/wire/hris/employeePayrollRuns.test.ts +++ b/tests/wire/hris/employeePayrollRuns.test.ts @@ -83,7 +83,9 @@ describe("EmployeePayrollRuns", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.employeePayrollRuns.list(); + const response = await client.hris.employeePayrollRuns.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/employees.test.ts b/tests/wire/hris/employees.test.ts index a760e2d03..50dfbef32 100644 --- a/tests/wire/hris/employees.test.ts +++ b/tests/wire/hris/employees.test.ts @@ -34,14 +34,12 @@ describe("Employees", () => { home_location: "home_location", work_location: "work_location", manager: "manager", - team: "team", pay_group: "pay_group", ssn: "1234567890", gender: "MALE", ethnicity: "AMERICAN_INDIAN_OR_ALASKA_NATIVE", marital_status: "SINGLE", date_of_birth: "1990-11-10T00:00:00Z", - hire_date: "2020-10-10T00:00:00Z", start_date: "2020-10-11T00:00:00Z", remote_created_at: "2020-10-11T00:00:00Z", employment_status: "ACTIVE", @@ -59,7 +57,9 @@ describe("Employees", () => { }; server.mockEndpoint().get("/hris/v1/employees").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.employees.list(); + const response = await client.hris.employees.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -84,14 +84,12 @@ describe("Employees", () => { homeLocation: "home_location", workLocation: "work_location", manager: "manager", - team: "team", payGroup: "pay_group", ssn: "1234567890", gender: "MALE", ethnicity: "AMERICAN_INDIAN_OR_ALASKA_NATIVE", maritalStatus: "SINGLE", dateOfBirth: new Date("1990-11-10T00:00:00.000Z"), - hireDate: new Date("2020-10-10T00:00:00.000Z"), startDate: new Date("2020-10-11T00:00:00.000Z"), remoteCreatedAt: new Date("2020-10-11T00:00:00.000Z"), employmentStatus: "ACTIVE", @@ -145,14 +143,12 @@ describe("Employees", () => { home_location: "home_location", work_location: "work_location", manager: "manager", - team: "team", pay_group: "pay_group", ssn: "1234567890", gender: "MALE", ethnicity: "AMERICAN_INDIAN_OR_ALASKA_NATIVE", marital_status: "SINGLE", date_of_birth: "1990-11-10T00:00:00Z", - hire_date: "2020-10-10T00:00:00Z", start_date: "2020-10-11T00:00:00Z", remote_created_at: "2020-10-11T00:00:00Z", employment_status: "ACTIVE", @@ -227,14 +223,12 @@ describe("Employees", () => { homeLocation: "home_location", workLocation: "work_location", manager: "manager", - team: "team", payGroup: "pay_group", ssn: "1234567890", gender: "MALE", ethnicity: "AMERICAN_INDIAN_OR_ALASKA_NATIVE", maritalStatus: "SINGLE", dateOfBirth: new Date("1990-11-10T00:00:00.000Z"), - hireDate: new Date("2020-10-10T00:00:00.000Z"), startDate: new Date("2020-10-11T00:00:00.000Z"), remoteCreatedAt: new Date("2020-10-11T00:00:00.000Z"), employmentStatus: "ACTIVE", @@ -317,14 +311,12 @@ describe("Employees", () => { home_location: "home_location", work_location: "work_location", manager: "manager", - team: "team", pay_group: "pay_group", ssn: "1234567890", gender: "MALE", ethnicity: "AMERICAN_INDIAN_OR_ALASKA_NATIVE", marital_status: "SINGLE", date_of_birth: "1990-11-10T00:00:00Z", - hire_date: "2020-10-10T00:00:00Z", start_date: "2020-10-11T00:00:00Z", remote_created_at: "2020-10-11T00:00:00Z", employment_status: "ACTIVE", @@ -367,14 +359,12 @@ describe("Employees", () => { homeLocation: "home_location", workLocation: "work_location", manager: "manager", - team: "team", payGroup: "pay_group", ssn: "1234567890", gender: "MALE", ethnicity: "AMERICAN_INDIAN_OR_ALASKA_NATIVE", maritalStatus: "SINGLE", dateOfBirth: new Date("1990-11-10T00:00:00.000Z"), - hireDate: new Date("2020-10-10T00:00:00.000Z"), startDate: new Date("2020-10-11T00:00:00.000Z"), remoteCreatedAt: new Date("2020-10-11T00:00:00.000Z"), employmentStatus: "ACTIVE", diff --git a/tests/wire/hris/employerBenefits.test.ts b/tests/wire/hris/employerBenefits.test.ts index f67b73447..e124b1db8 100644 --- a/tests/wire/hris/employerBenefits.test.ts +++ b/tests/wire/hris/employerBenefits.test.ts @@ -40,7 +40,9 @@ describe("EmployerBenefits", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.employerBenefits.list(); + const response = await client.hris.employerBenefits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/employments.test.ts b/tests/wire/hris/employments.test.ts index 9b0498975..f874ef214 100644 --- a/tests/wire/hris/employments.test.ts +++ b/tests/wire/hris/employments.test.ts @@ -46,7 +46,9 @@ describe("Employments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.employments.list(); + const response = await client.hris.employments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/groups.test.ts b/tests/wire/hris/groups.test.ts index 251cb0337..660f06695 100644 --- a/tests/wire/hris/groups.test.ts +++ b/tests/wire/hris/groups.test.ts @@ -34,7 +34,9 @@ describe("Groups", () => { }; server.mockEndpoint().get("/hris/v1/groups").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.groups.list(); + const response = await client.hris.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/issues.test.ts b/tests/wire/hris/issues.test.ts index 795ad7e72..398c80537 100644 --- a/tests/wire/hris/issues.test.ts +++ b/tests/wire/hris/issues.test.ts @@ -28,7 +28,9 @@ describe("Issues", () => { }; server.mockEndpoint().get("/hris/v1/issues").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.issues.list(); + const response = await client.hris.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/linkedAccounts.test.ts b/tests/wire/hris/linkedAccounts.test.ts index 75e55a7ef..75ddd6d5f 100644 --- a/tests/wire/hris/linkedAccounts.test.ts +++ b/tests/wire/hris/linkedAccounts.test.ts @@ -54,7 +54,9 @@ describe("LinkedAccounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.linkedAccounts.list(); + const response = await client.hris.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/locations.test.ts b/tests/wire/hris/locations.test.ts index e429c7efe..900c50bc5 100644 --- a/tests/wire/hris/locations.test.ts +++ b/tests/wire/hris/locations.test.ts @@ -39,7 +39,9 @@ describe("Locations", () => { }; server.mockEndpoint().get("/hris/v1/locations").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.locations.list(); + const response = await client.hris.locations.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/payGroups.test.ts b/tests/wire/hris/payGroups.test.ts index 8c2e3f22c..65669bf2c 100644 --- a/tests/wire/hris/payGroups.test.ts +++ b/tests/wire/hris/payGroups.test.ts @@ -37,7 +37,9 @@ describe("PayGroups", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.payGroups.list(); + const response = await client.hris.payGroups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/payrollRuns.test.ts b/tests/wire/hris/payrollRuns.test.ts index 64939c7f5..e31c212c1 100644 --- a/tests/wire/hris/payrollRuns.test.ts +++ b/tests/wire/hris/payrollRuns.test.ts @@ -41,7 +41,9 @@ describe("PayrollRuns", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.payrollRuns.list(); + const response = await client.hris.payrollRuns.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/syncStatus.test.ts b/tests/wire/hris/syncStatus.test.ts index e67c60abc..51826b373 100644 --- a/tests/wire/hris/syncStatus.test.ts +++ b/tests/wire/hris/syncStatus.test.ts @@ -35,7 +35,9 @@ describe("SyncStatus", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.syncStatus.list(); + const response = await client.hris.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/teams.test.ts b/tests/wire/hris/teams.test.ts index 6e5a13048..aaa1d0324 100644 --- a/tests/wire/hris/teams.test.ts +++ b/tests/wire/hris/teams.test.ts @@ -32,7 +32,9 @@ describe("Teams", () => { }; server.mockEndpoint().get("/hris/v1/teams").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.teams.list(); + const response = await client.hris.teams.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/timeOff.test.ts b/tests/wire/hris/timeOff.test.ts index c66e06008..a2815fbe5 100644 --- a/tests/wire/hris/timeOff.test.ts +++ b/tests/wire/hris/timeOff.test.ts @@ -39,7 +39,9 @@ describe("TimeOff", () => { }; server.mockEndpoint().get("/hris/v1/time-off").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hris.timeOff.list(); + const response = await client.hris.timeOff.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/timeOffBalances.test.ts b/tests/wire/hris/timeOffBalances.test.ts index f659b9bfb..e739d52d4 100644 --- a/tests/wire/hris/timeOffBalances.test.ts +++ b/tests/wire/hris/timeOffBalances.test.ts @@ -40,7 +40,9 @@ describe("TimeOffBalances", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.timeOffBalances.list(); + const response = await client.hris.timeOffBalances.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/hris/timesheetEntries.test.ts b/tests/wire/hris/timesheetEntries.test.ts index e23a6d262..383ce3c26 100644 --- a/tests/wire/hris/timesheetEntries.test.ts +++ b/tests/wire/hris/timesheetEntries.test.ts @@ -40,7 +40,9 @@ describe("TimesheetEntries", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.hris.timesheetEntries.list(); + const response = await client.hris.timesheetEntries.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/accounts.test.ts b/tests/wire/ticketing/accounts.test.ts index 5a982a731..1ae6a9966 100644 --- a/tests/wire/ticketing/accounts.test.ts +++ b/tests/wire/ticketing/accounts.test.ts @@ -38,7 +38,9 @@ describe("Accounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.accounts.list(); + const response = await client.ticketing.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/attachments.test.ts b/tests/wire/ticketing/attachments.test.ts index c511eb0f4..a35128d51 100644 --- a/tests/wire/ticketing/attachments.test.ts +++ b/tests/wire/ticketing/attachments.test.ts @@ -42,7 +42,9 @@ describe("Attachments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.attachments.list(); + const response = await client.ticketing.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/auditTrail.test.ts b/tests/wire/ticketing/auditTrail.test.ts index 28d8f609b..4d5c26778 100644 --- a/tests/wire/ticketing/auditTrail.test.ts +++ b/tests/wire/ticketing/auditTrail.test.ts @@ -35,7 +35,9 @@ describe("AuditTrail", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.auditTrail.list(); + const response = await client.ticketing.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/collections.test.ts b/tests/wire/ticketing/collections.test.ts index b3e6d72e5..a17087fc2 100644 --- a/tests/wire/ticketing/collections.test.ts +++ b/tests/wire/ticketing/collections.test.ts @@ -41,7 +41,9 @@ describe("Collections", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.collections.list(); + const response = await client.ticketing.collections.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -101,7 +103,9 @@ describe("Collections", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.collections.viewersList("collection_id"); + const response = await client.ticketing.collections.viewersList("collection_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/comments.test.ts b/tests/wire/ticketing/comments.test.ts index a368a2b19..06bd65dae 100644 --- a/tests/wire/ticketing/comments.test.ts +++ b/tests/wire/ticketing/comments.test.ts @@ -43,7 +43,9 @@ describe("Comments", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.comments.list(); + const response = await client.ticketing.comments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/contacts.test.ts b/tests/wire/ticketing/contacts.test.ts index 3b0fe0f4a..678566bd6 100644 --- a/tests/wire/ticketing/contacts.test.ts +++ b/tests/wire/ticketing/contacts.test.ts @@ -41,7 +41,9 @@ describe("Contacts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.contacts.list(); + const response = await client.ticketing.contacts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/issues.test.ts b/tests/wire/ticketing/issues.test.ts index 42dd167c1..9aa2bcd70 100644 --- a/tests/wire/ticketing/issues.test.ts +++ b/tests/wire/ticketing/issues.test.ts @@ -34,7 +34,9 @@ describe("Issues", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.issues.list(); + const response = await client.ticketing.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/linkedAccounts.test.ts b/tests/wire/ticketing/linkedAccounts.test.ts index 9654ac267..edb11eb93 100644 --- a/tests/wire/ticketing/linkedAccounts.test.ts +++ b/tests/wire/ticketing/linkedAccounts.test.ts @@ -54,7 +54,9 @@ describe("LinkedAccounts", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.linkedAccounts.list(); + const response = await client.ticketing.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/projects.test.ts b/tests/wire/ticketing/projects.test.ts index 040fca1d5..af4b67fe8 100644 --- a/tests/wire/ticketing/projects.test.ts +++ b/tests/wire/ticketing/projects.test.ts @@ -38,7 +38,9 @@ describe("Projects", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.projects.list(); + const response = await client.ticketing.projects.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -159,7 +161,9 @@ describe("Projects", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.projects.usersList("parent_id"); + const response = await client.ticketing.projects.usersList("parent_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/roles.test.ts b/tests/wire/ticketing/roles.test.ts index cfad30b66..8d622d051 100644 --- a/tests/wire/ticketing/roles.test.ts +++ b/tests/wire/ticketing/roles.test.ts @@ -39,7 +39,9 @@ describe("Roles", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.roles.list(); + const response = await client.ticketing.roles.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/syncStatus.test.ts b/tests/wire/ticketing/syncStatus.test.ts index 56275f437..9009975c1 100644 --- a/tests/wire/ticketing/syncStatus.test.ts +++ b/tests/wire/ticketing/syncStatus.test.ts @@ -35,7 +35,9 @@ describe("SyncStatus", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.syncStatus.list(); + const response = await client.ticketing.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/tags.test.ts b/tests/wire/ticketing/tags.test.ts index dfe594e29..4596bd9e4 100644 --- a/tests/wire/ticketing/tags.test.ts +++ b/tests/wire/ticketing/tags.test.ts @@ -31,7 +31,9 @@ describe("Tags", () => { }; server.mockEndpoint().get("/ticketing/v1/tags").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.ticketing.tags.list(); + const response = await client.ticketing.tags.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/teams.test.ts b/tests/wire/ticketing/teams.test.ts index fd78a12d9..f2e32833d 100644 --- a/tests/wire/ticketing/teams.test.ts +++ b/tests/wire/ticketing/teams.test.ts @@ -38,7 +38,9 @@ describe("Teams", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.teams.list(); + const response = await client.ticketing.teams.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/tickets.test.ts b/tests/wire/ticketing/tickets.test.ts index 01fd2a04e..465ffd659 100644 --- a/tests/wire/ticketing/tickets.test.ts +++ b/tests/wire/ticketing/tickets.test.ts @@ -58,7 +58,9 @@ describe("Tickets", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.tickets.list(); + const response = await client.ticketing.tickets.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -560,7 +562,9 @@ describe("Tickets", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.tickets.viewersList("ticket_id"); + const response = await client.ticketing.tickets.viewersList("ticket_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", @@ -1439,7 +1443,9 @@ describe("Tickets", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.tickets.remoteFieldClassesList(); + const response = await client.ticketing.tickets.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/tests/wire/ticketing/users.test.ts b/tests/wire/ticketing/users.test.ts index 0cbaad7aa..40f5f9961 100644 --- a/tests/wire/ticketing/users.test.ts +++ b/tests/wire/ticketing/users.test.ts @@ -42,7 +42,9 @@ describe("Users", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.ticketing.users.list(); + const response = await client.ticketing.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); expect(response).toEqual({ next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", diff --git a/yarn.lock b/yarn.lock index d7b1c1fe9..20472489a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1123,12 +1123,12 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0: - version "4.25.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.3.tgz#9167c9cbb40473f15f75f85189290678b99b16c5" - integrity sha512-cDGv1kkDI4/0e5yON9yM5G/0A5u8sf5TnmdX5C9qHzI9PPu++sQ9zjm1k9NiOrf3riY4OkK0zSGqfvJyJsgCBQ== + version "4.25.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.4.tgz#ebdd0e1d1cf3911834bab3a6cd7b917d9babf5af" + integrity sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg== dependencies: - caniuse-lite "^1.0.30001735" - electron-to-chromium "^1.5.204" + caniuse-lite "^1.0.30001737" + electron-to-chromium "^1.5.211" node-releases "^2.0.19" update-browserslist-db "^1.1.3" @@ -1182,7 +1182,7 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001735: +caniuse-lite@^1.0.30001737: version "1.0.30001737" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001737.tgz#8292bb7591932ff09e9a765f12fdf5629a241ccc" integrity sha512-BiloLiXtQNrY5UyF0+1nSJLXUENuhka2pzy2Fx5pGxqavdrxSCW4U6Pn/PoG3Efspi2frRbHpBV2XsrPE6EDlw== @@ -1379,7 +1379,7 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.204: +electron-to-chromium@^1.5.211: version "1.5.211" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.211.tgz#749317bf9cf894c06f67980940cf8074e5eb08ca" integrity sha512-IGBvimJkotaLzFnwIVgW9/UD/AOJ2tByUmeOrtqBfACSbAw5b1G0XpvdaieKyc7ULmbwXVx+4e4Be8pOPBrYkw==