diff --git a/.fernignore b/.fernignore index 96ee8684..aa3041cf 100644 --- a/.fernignore +++ b/.fernignore @@ -9,4 +9,4 @@ LICENSE.md # Files that avoid breaking changes due to renames. src/merge/resources/accounting/types/currency_enum.py -tests/integration/test_filestorage.py \ No newline at end of file +tests/integration/* \ No newline at end of file diff --git a/.mock/definition/accounting/accountDetails.yml b/.mock/definition/accounting/accountDetails.yml index 300d24e0..8421eef1 100644 --- a/.mock/definition/accounting/accountDetails.yml +++ b/.mock/definition/accounting/accountDetails.yml @@ -7,7 +7,8 @@ service: retrieve: path: /accounting/v1/account-details method: GET - auth: true + auth: + - tokenAuth: [] docs: Get details for a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/accountToken.yml b/.mock/definition/accounting/accountToken.yml index 0f3134f8..24072266 100644 --- a/.mock/definition/accounting/accountToken.yml +++ b/.mock/definition/accounting/accountToken.yml @@ -7,7 +7,8 @@ service: retrieve: path: /accounting/v1/account-token/{public_token} method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns the account token for the end user with the provided public token. diff --git a/.mock/definition/accounting/accountingPeriods.yml b/.mock/definition/accounting/accountingPeriods.yml index 4adc5e1b..06d76c72 100644 --- a/.mock/definition/accounting/accountingPeriods.yml +++ b/.mock/definition/accounting/accountingPeriods.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/accounting-periods method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `AccountingPeriod` objects. source: openapi: openapi/openapi.yml @@ -45,6 +46,10 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -72,7 +77,8 @@ service: retrieve: path: /accounting/v1/accounting-periods/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `AccountingPeriod` object with the given `id`. source: openapi: openapi/openapi.yml @@ -98,6 +104,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/accounts.yml b/.mock/definition/accounting/accounts.yml index 7f5c1aac..f9db17b5 100644 --- a/.mock/definition/accounting/accounts.yml +++ b/.mock/definition/accounting/accounts.yml @@ -1,4 +1,15 @@ types: + AccountsListRequestClassification: + enum: + - value: '' + name: EMPTY + - ASSET + - EQUITY + - EXPENSE + - LIABILITY + - REVENUE + source: + openapi: openapi/openapi.yml AccountsListRequestRemoteFields: enum: - classification @@ -15,6 +26,15 @@ types: - status source: openapi: openapi/openapi.yml + AccountsListRequestStatus: + enum: + - value: '' + name: EMPTY + - ACTIVE + - INACTIVE + - PENDING + source: + openapi: openapi/openapi.yml AccountsRetrieveRequestRemoteFields: enum: - classification @@ -40,7 +60,8 @@ service: list: path: /accounting/v1/accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Account` objects. source: openapi: openapi/openapi.yml @@ -51,7 +72,7 @@ service: type: optional docs: If provided, will only return accounts with the passed in enum. classification: - type: optional + type: optional docs: If provided, will only return accounts with this classification. company_id: type: optional @@ -120,7 +141,7 @@ service: enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) status: - type: optional + type: optional docs: If provided, will only return accounts with this status. response: docs: '' @@ -128,7 +149,24 @@ service: status-code: 200 examples: - query-parameters: + account_type: account_type + classification: '' + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + remote_fields: classification + remote_id: remote_id + show_enum_origins: classification + status: '' headers: X-Account-Token: X-Account-Token response: @@ -164,7 +202,8 @@ service: create: path: /accounting/v1/accounts method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Account` object with the given values. source: openapi: openapi/openapi.yml @@ -188,7 +227,10 @@ service: type: root.AccountResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -243,7 +285,8 @@ service: retrieve: path: /accounting/v1/accounts/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Account` object with the given `id`. source: openapi: openapi/openapi.yml @@ -284,6 +327,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true + remote_fields: classification + show_enum_origins: classification headers: X-Account-Token: X-Account-Token response: @@ -316,7 +365,8 @@ service: metaPostRetrieve: path: /accounting/v1/accounts/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Account` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/addresses.yml b/.mock/definition/accounting/addresses.yml index c8ae7626..5317c7fe 100644 --- a/.mock/definition/accounting/addresses.yml +++ b/.mock/definition/accounting/addresses.yml @@ -7,7 +7,8 @@ service: retrieve: path: /accounting/v1/addresses/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Address` object with the given `id`. source: openapi: openapi/openapi.yml @@ -43,6 +44,11 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true + remote_fields: type + show_enum_origins: type headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/asyncPassthrough.yml b/.mock/definition/accounting/asyncPassthrough.yml index 2a665ed2..5898b8f9 100644 --- a/.mock/definition/accounting/asyncPassthrough.yml +++ b/.mock/definition/accounting/asyncPassthrough.yml @@ -7,7 +7,8 @@ service: create: path: /accounting/v1/async-passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Asynchronously pull data from an endpoint not currently supported by Merge. @@ -32,7 +33,8 @@ service: retrieve: path: /accounting/v1/async-passthrough/{async_passthrough_receipt_id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Retrieves data from earlier async-passthrough POST request source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/asyncTasks.yml b/.mock/definition/accounting/asyncTasks.yml index ae58d998..6cc811ed 100644 --- a/.mock/definition/accounting/asyncTasks.yml +++ b/.mock/definition/accounting/asyncTasks.yml @@ -7,7 +7,8 @@ service: retrieve: path: /accounting/v1/async-tasks/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `AsyncPostTask` object with the given `id`. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/attachments.yml b/.mock/definition/accounting/attachments.yml index 2487a3cf..a5e3ab7f 100644 --- a/.mock/definition/accounting/attachments.yml +++ b/.mock/definition/accounting/attachments.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/attachments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `AccountingAttachment` objects. source: openapi: openapi/openapi.yml @@ -70,7 +71,17 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -99,7 +110,8 @@ service: create: path: /accounting/v1/attachments method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `AccountingAttachment` object with the given values. source: openapi: openapi/openapi.yml @@ -123,7 +135,10 @@ service: type: root.AccountingAttachmentResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -171,7 +186,8 @@ service: retrieve: path: /accounting/v1/attachments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `AccountingAttachment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -197,6 +213,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -222,7 +241,8 @@ service: metaPostRetrieve: path: /accounting/v1/attachments/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `AccountingAttachment` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/auditTrail.yml b/.mock/definition/accounting/auditTrail.yml index 0dcfb086..258796aa 100644 --- a/.mock/definition/accounting/auditTrail.yml +++ b/.mock/definition/accounting/auditTrail.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/audit-trail method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets a list of audit trail events. source: openapi: openapi/openapi.yml @@ -77,6 +78,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/accounting/availableActions.yml b/.mock/definition/accounting/availableActions.yml index e7a930de..eecb06ef 100644 --- a/.mock/definition/accounting/availableActions.yml +++ b/.mock/definition/accounting/availableActions.yml @@ -7,7 +7,8 @@ service: retrieve: path: /accounting/v1/available-actions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of models and actions available for an account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/balanceSheets.yml b/.mock/definition/accounting/balanceSheets.yml index 28152b37..03e23bd0 100644 --- a/.mock/definition/accounting/balanceSheets.yml +++ b/.mock/definition/accounting/balanceSheets.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/balance-sheets method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `BalanceSheet` objects. source: openapi: openapi/openapi.yml @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -141,7 +153,8 @@ service: retrieve: path: /accounting/v1/balance-sheets/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `BalanceSheet` object with the given `id`. source: openapi: openapi/openapi.yml @@ -172,6 +185,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/bankFeedAccounts.yml b/.mock/definition/accounting/bankFeedAccounts.yml index a5d6ed06..ed4b02c6 100644 --- a/.mock/definition/accounting/bankFeedAccounts.yml +++ b/.mock/definition/accounting/bankFeedAccounts.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/bank-feed-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `BankFeedAccount` objects. source: openapi: openapi/openapi.yml @@ -45,6 +46,10 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -72,10 +77,13 @@ service: custom_key: custom_value linked_account_defined_targets: custom_key: custom_value + remote_data: + - null create: path: /accounting/v1/bank-feed-accounts method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `BankFeedAccount` object with the given values. source: openapi: openapi/openapi.yml @@ -99,7 +107,10 @@ service: type: root.BankFeedAccountResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -151,7 +162,8 @@ service: retrieve: path: /accounting/v1/bank-feed-accounts/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `BankFeedAccount` object with the given `id`. source: openapi: openapi/openapi.yml @@ -177,6 +189,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -206,7 +221,8 @@ service: metaPostRetrieve: path: /accounting/v1/bank-feed-accounts/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `BankFeedAccount` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/bankFeedTransactions.yml b/.mock/definition/accounting/bankFeedTransactions.yml index 7a1d41c9..ef795146 100644 --- a/.mock/definition/accounting/bankFeedTransactions.yml +++ b/.mock/definition/accounting/bankFeedTransactions.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/bank-feed-transactions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `BankFeedTransaction` objects. source: openapi: openapi/openapi.yml @@ -75,7 +76,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: bank_feed_account + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_processed: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -101,7 +113,8 @@ service: create: path: /accounting/v1/bank-feed-transactions method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `BankFeedTransaction` object with the given values. source: openapi: openapi/openapi.yml @@ -125,7 +138,10 @@ service: type: root.BankFeedTransactionResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -170,7 +186,8 @@ service: retrieve: path: /accounting/v1/bank-feed-transactions/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `BankFeedTransaction` object with the given `id`. source: openapi: openapi/openapi.yml @@ -201,6 +218,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: bank_feed_account + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -223,7 +244,8 @@ service: metaPostRetrieve: path: /accounting/v1/bank-feed-transactions/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `BankFeedTransaction` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/cashFlowStatements.yml b/.mock/definition/accounting/cashFlowStatements.yml index 2db3914f..ddd3ef42 100644 --- a/.mock/definition/accounting/cashFlowStatements.yml +++ b/.mock/definition/accounting/cashFlowStatements.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/cash-flow-statements method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `CashFlowStatement` objects. source: openapi: openapi/openapi.yml @@ -75,7 +76,18 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -142,7 +154,8 @@ service: retrieve: path: /accounting/v1/cash-flow-statements/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `CashFlowStatement` object with the given `id`. source: openapi: openapi/openapi.yml @@ -173,6 +186,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/companyInfo.yml b/.mock/definition/accounting/companyInfo.yml index 33953306..5d2f4331 100644 --- a/.mock/definition/accounting/companyInfo.yml +++ b/.mock/definition/accounting/companyInfo.yml @@ -24,7 +24,8 @@ service: list: path: /accounting/v1/company-info method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `CompanyInfo` objects. source: openapi: openapi/openapi.yml @@ -87,7 +88,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: addresses + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -106,6 +117,8 @@ service: fiscal_year_end_day: 31 currency: XUA remote_created_at: '2020-03-31T00:00:00Z' + urls: + - null addresses: - created_at: '2021-09-15T00:00:00Z' modified_at: '2021-10-16T00:00:00Z' @@ -131,7 +144,8 @@ service: retrieve: path: /accounting/v1/company-info/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `CompanyInfo` object with the given `id`. source: openapi: openapi/openapi.yml @@ -162,6 +176,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: addresses + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/contacts.yml b/.mock/definition/accounting/contacts.yml index c03c5880..da1b9fa1 100644 --- a/.mock/definition/accounting/contacts.yml +++ b/.mock/definition/accounting/contacts.yml @@ -14,6 +14,14 @@ types: name: PhoneNumbersCompany source: openapi: openapi/openapi.yml + ContactsListRequestStatus: + enum: + - value: '' + name: EMPTY + - ACTIVE + - ARCHIVED + source: + openapi: openapi/openapi.yml ContactsRetrieveRequestExpand: enum: - addresses @@ -38,7 +46,8 @@ service: list: path: /accounting/v1/contacts method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Contact` objects. source: openapi: openapi/openapi.yml @@ -130,7 +139,7 @@ service: enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) status: - type: optional + type: optional docs: If provided, will only return Contacts that match this status. response: docs: '' @@ -138,7 +147,26 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email_address: email_address + expand: addresses + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_customer: is_customer + is_supplier: is_supplier + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status + status: '' headers: X-Account-Token: X-Account-Token response: @@ -182,7 +210,8 @@ service: create: path: /accounting/v1/contacts method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Contact` object with the given values. source: openapi: openapi/openapi.yml @@ -206,7 +235,10 @@ service: type: root.ContactResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -269,7 +301,8 @@ service: retrieve: path: /accounting/v1/contacts/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Contact` object with the given `id`. source: openapi: openapi/openapi.yml @@ -315,6 +348,13 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: addresses + include_remote_data: true + include_remote_fields: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -357,7 +397,8 @@ service: partialUpdate: path: /accounting/v1/contacts/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates a `Contact` object with the given `id`. source: openapi: openapi/openapi.yml @@ -385,6 +426,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -448,7 +492,8 @@ service: metaPatchRetrieve: path: /accounting/v1/contacts/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Contact` PATCHs. source: openapi: openapi/openapi.yml @@ -637,7 +682,8 @@ service: metaPostRetrieve: path: /accounting/v1/contacts/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Contact` POSTs. source: openapi: openapi/openapi.yml @@ -822,7 +868,8 @@ service: remoteFieldClassesList: path: /accounting/v1/contacts/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -870,6 +917,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/creditNotes.yml b/.mock/definition/accounting/creditNotes.yml index 880ab247..e4c5b38c 100644 --- a/.mock/definition/accounting/creditNotes.yml +++ b/.mock/definition/accounting/creditNotes.yml @@ -576,7 +576,8 @@ service: list: path: /accounting/v1/credit-notes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `CreditNote` objects. source: openapi: openapi/openapi.yml @@ -660,7 +661,22 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: accounting_period + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status + transaction_date_after: '2024-01-15T09:30:00Z' + transaction_date_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -734,7 +750,8 @@ service: create: path: /accounting/v1/credit-notes method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `CreditNote` object with the given values. source: openapi: openapi/openapi.yml @@ -758,7 +775,10 @@ service: type: root.CreditNoteResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -851,7 +871,8 @@ service: retrieve: path: /accounting/v1/credit-notes/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `CreditNote` object with the given `id`. source: openapi: openapi/openapi.yml @@ -892,6 +913,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: accounting_period + include_remote_data: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -964,7 +991,8 @@ service: metaPostRetrieve: path: /accounting/v1/credit-notes/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `CreditNote` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/deleteAccount.yml b/.mock/definition/accounting/deleteAccount.yml index dd6432e8..ff8a426f 100644 --- a/.mock/definition/accounting/deleteAccount.yml +++ b/.mock/definition/accounting/deleteAccount.yml @@ -5,7 +5,8 @@ service: delete: path: /accounting/v1/delete-account method: POST - auth: true + auth: + - tokenAuth: [] docs: Delete a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/employees.yml b/.mock/definition/accounting/employees.yml index d77b43e3..92905f0c 100644 --- a/.mock/definition/accounting/employees.yml +++ b/.mock/definition/accounting/employees.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/employees method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Employee` objects. source: openapi: openapi/openapi.yml @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -105,7 +117,8 @@ service: retrieve: path: /accounting/v1/employees/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Employee` object with the given `id`. source: openapi: openapi/openapi.yml @@ -136,6 +149,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/expenseReports.yml b/.mock/definition/accounting/expenseReports.yml index 66977e4f..b21b57f0 100644 --- a/.mock/definition/accounting/expenseReports.yml +++ b/.mock/definition/accounting/expenseReports.yml @@ -192,7 +192,8 @@ service: list: path: /accounting/v1/expense-reports method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `ExpenseReport` objects. source: openapi: openapi/openapi.yml @@ -263,7 +264,19 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: accounting_period + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -328,7 +341,8 @@ service: create: path: /accounting/v1/expense-reports method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `ExpenseReport` object with the given values. source: openapi: openapi/openapi.yml @@ -352,7 +366,10 @@ service: type: root.ExpenseReportResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: @@ -439,7 +456,8 @@ service: linesList: path: /accounting/v1/expense-reports/{expense_report_id}/lines method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns a list of `ExpenseReportLine` objects that point to a `ExpenseReport` with the given id. @@ -493,6 +511,12 @@ service: expense_report_id: expense_report_id query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -530,7 +554,8 @@ service: retrieve: path: /accounting/v1/expense-reports/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `ExpenseReport` object with the given `id`. source: openapi: openapi/openapi.yml @@ -566,6 +591,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: accounting_period + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -631,7 +661,8 @@ service: linesRemoteFieldClassesList: path: /accounting/v1/expense-reports/lines/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -679,6 +710,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -700,7 +737,8 @@ service: metaPostRetrieve: path: /accounting/v1/expense-reports/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `ExpenseReport` POSTs. source: openapi: openapi/openapi.yml @@ -885,7 +923,8 @@ service: remoteFieldClassesList: path: /accounting/v1/expense-reports/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -933,6 +972,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/expenses.yml b/.mock/definition/accounting/expenses.yml index 4a409f71..4b3cf6f3 100644 --- a/.mock/definition/accounting/expenses.yml +++ b/.mock/definition/accounting/expenses.yml @@ -256,7 +256,8 @@ service: list: path: /accounting/v1/expenses method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Expense` objects. source: openapi: openapi/openapi.yml @@ -335,7 +336,21 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + transaction_date_after: '2024-01-15T09:30:00Z' + transaction_date_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -412,7 +427,8 @@ service: create: path: /accounting/v1/expenses method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Expense` object with the given values. source: openapi: openapi/openapi.yml @@ -436,7 +452,10 @@ service: type: root.ExpenseResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -532,7 +551,8 @@ service: retrieve: path: /accounting/v1/expenses/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Expense` object with the given `id`. source: openapi: openapi/openapi.yml @@ -568,6 +588,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -652,7 +677,8 @@ service: linesRemoteFieldClassesList: path: /accounting/v1/expenses/lines/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -700,6 +726,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -721,7 +753,8 @@ service: metaPostRetrieve: path: /accounting/v1/expenses/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Expense` POSTs. source: openapi: openapi/openapi.yml @@ -906,7 +939,8 @@ service: remoteFieldClassesList: path: /accounting/v1/expenses/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -954,6 +988,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/fieldMapping.yml b/.mock/definition/accounting/fieldMapping.yml index 70f7267f..4a6bf178 100644 --- a/.mock/definition/accounting/fieldMapping.yml +++ b/.mock/definition/accounting/fieldMapping.yml @@ -7,7 +7,8 @@ service: field_mappings_retrieve: path: /accounting/v1/field-mappings method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge @@ -30,7 +31,9 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token response: body: @@ -453,7 +456,8 @@ service: field_mappings_create: path: /accounting/v1/field-mappings method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to @@ -518,7 +522,9 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name @@ -569,7 +575,8 @@ service: field_mappings_destroy: path: /accounting/v1/field-mappings/{field_mapping_id} method: DELETE - auth: true + auth: + - tokenAuth: [] docs: >- Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after @@ -629,7 +636,8 @@ service: field_mappings_partial_update: path: /accounting/v1/field-mappings/{field_mapping_id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: >- Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the @@ -713,7 +721,8 @@ service: remote_fields_retrieve: path: /accounting/v1/remote-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data @@ -741,7 +750,10 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: X-Account-Token: X-Account-Token response: body: @@ -1098,7 +1110,8 @@ service: target_fields_retrieve: path: /accounting/v1/target-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields diff --git a/.mock/definition/accounting/forceResync.yml b/.mock/definition/accounting/forceResync.yml index 23d80d64..6da3f197 100644 --- a/.mock/definition/accounting/forceResync.yml +++ b/.mock/definition/accounting/forceResync.yml @@ -7,7 +7,8 @@ service: sync_status_resync_create: path: /accounting/v1/sync-status/resync method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or diff --git a/.mock/definition/accounting/generalLedgerTransactions.yml b/.mock/definition/accounting/generalLedgerTransactions.yml index 5e43d543..e771a4b9 100644 --- a/.mock/definition/accounting/generalLedgerTransactions.yml +++ b/.mock/definition/accounting/generalLedgerTransactions.yml @@ -70,7 +70,8 @@ service: list: path: /accounting/v1/general-ledger-transactions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `GeneralLedgerTransaction` objects. source: openapi: openapi/openapi.yml @@ -144,7 +145,20 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: accounting_period + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + posted_date_after: '2024-01-15T09:30:00Z' + posted_date_before: '2024-01-15T09:30:00Z' + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -200,7 +214,8 @@ service: retrieve: path: /accounting/v1/general-ledger-transactions/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `GeneralLedgerTransaction` object with the given `id`. source: openapi: openapi/openapi.yml @@ -231,6 +246,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: accounting_period + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/generateKey.yml b/.mock/definition/accounting/generateKey.yml index 7ec4bf68..a2c022dd 100644 --- a/.mock/definition/accounting/generateKey.yml +++ b/.mock/definition/accounting/generateKey.yml @@ -7,7 +7,8 @@ service: create: path: /accounting/v1/generate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Create a remote key. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/incomeStatements.yml b/.mock/definition/accounting/incomeStatements.yml index f1da1a7b..cb1a1ace 100644 --- a/.mock/definition/accounting/incomeStatements.yml +++ b/.mock/definition/accounting/incomeStatements.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/income-statements method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `IncomeStatement` objects. source: openapi: openapi/openapi.yml @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -155,7 +167,8 @@ service: retrieve: path: /accounting/v1/income-statements/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `IncomeStatement` object with the given `id`. source: openapi: openapi/openapi.yml @@ -186,6 +199,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/invoices.yml b/.mock/definition/accounting/invoices.yml index 963f67bb..b5fd903c 100644 --- a/.mock/definition/accounting/invoices.yml +++ b/.mock/definition/accounting/invoices.yml @@ -26964,7 +26964,8 @@ service: list: path: /accounting/v1/invoices method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Invoice` objects. source: openapi: openapi/openapi.yml @@ -27077,7 +27078,27 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + contact_id: contact_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: accounting_period + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + issue_date_after: '2024-01-15T09:30:00Z' + issue_date_before: '2024-01-15T09:30:00Z' + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + number: number + page_size: 1 + remote_fields: type + remote_id: remote_id + show_enum_origins: type + status: DRAFT + type: ACCOUNTS_PAYABLE headers: X-Account-Token: X-Account-Token response: @@ -27171,7 +27192,8 @@ service: create: path: /accounting/v1/invoices method: POST - auth: true + auth: + - tokenAuth: [] docs: |- Creates an `Invoice` object with the given values. Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s). @@ -27198,7 +27220,10 @@ service: type: root.InvoiceResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -27311,7 +27336,8 @@ service: retrieve: path: /accounting/v1/invoices/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Invoice` object with the given `id`. source: openapi: openapi/openapi.yml @@ -27357,6 +27383,13 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: accounting_period + include_remote_data: true + include_remote_fields: true + include_shell_data: true + remote_fields: type + show_enum_origins: type headers: X-Account-Token: X-Account-Token response: @@ -27461,7 +27494,8 @@ service: partialUpdate: path: /accounting/v1/invoices/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates an `Invoice` object with the given `id`. source: openapi: openapi/openapi.yml @@ -27489,6 +27523,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -27602,7 +27639,8 @@ service: lineItemsRemoteFieldClassesList: path: /accounting/v1/invoices/line-items/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -27650,6 +27688,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -27671,7 +27715,8 @@ service: metaPatchRetrieve: path: /accounting/v1/invoices/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Invoice` PATCHs. source: openapi: openapi/openapi.yml @@ -27860,7 +27905,8 @@ service: metaPostRetrieve: path: /accounting/v1/invoices/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Invoice` POSTs. source: openapi: openapi/openapi.yml @@ -28045,7 +28091,8 @@ service: remoteFieldClassesList: path: /accounting/v1/invoices/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -28093,6 +28140,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/issues.yml b/.mock/definition/accounting/issues.yml index f7568739..db618fd8 100644 --- a/.mock/definition/accounting/issues.yml +++ b/.mock/definition/accounting/issues.yml @@ -14,7 +14,8 @@ service: list: path: /accounting/v1/issues method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets all issues for Organization. source: openapi: openapi/openapi.yml @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + account_token: account_token cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING headers: X-Account-Token: '[object Object]' response: @@ -103,7 +117,8 @@ service: retrieve: path: /accounting/v1/issues/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Get a specific issue. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/items.yml b/.mock/definition/accounting/items.yml index 67a784e9..00b46665 100644 --- a/.mock/definition/accounting/items.yml +++ b/.mock/definition/accounting/items.yml @@ -132,7 +132,8 @@ service: list: path: /accounting/v1/items method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Item` objects. source: openapi: openapi/openapi.yml @@ -208,7 +209,20 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -244,7 +258,8 @@ service: create: path: /accounting/v1/items method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Item` object with the given values. source: openapi: openapi/openapi.yml @@ -268,7 +283,10 @@ service: type: root.ItemResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -323,7 +341,8 @@ service: retrieve: path: /accounting/v1/items/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Item` object with the given `id`. source: openapi: openapi/openapi.yml @@ -364,6 +383,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -396,7 +421,8 @@ service: partialUpdate: path: /accounting/v1/items/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates an `Item` object with the given `id`. source: openapi: openapi/openapi.yml @@ -424,6 +450,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -479,7 +508,8 @@ service: metaPatchRetrieve: path: /accounting/v1/items/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Item` PATCHs. source: openapi: openapi/openapi.yml @@ -668,7 +698,8 @@ service: metaPostRetrieve: path: /accounting/v1/items/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Item` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/journalEntries.yml b/.mock/definition/accounting/journalEntries.yml index e471027d..163555c7 100644 --- a/.mock/definition/accounting/journalEntries.yml +++ b/.mock/definition/accounting/journalEntries.yml @@ -260,7 +260,8 @@ service: list: path: /accounting/v1/journal-entries method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `JournalEntry` objects. source: openapi: openapi/openapi.yml @@ -339,7 +340,21 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: accounting_period + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + transaction_date_after: '2024-01-15T09:30:00Z' + transaction_date_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -410,7 +425,8 @@ service: create: path: /accounting/v1/journal-entries method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `JournalEntry` object with the given values. source: openapi: openapi/openapi.yml @@ -434,7 +450,10 @@ service: type: root.JournalEntryResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -524,7 +543,8 @@ service: retrieve: path: /accounting/v1/journal-entries/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `JournalEntry` object with the given `id`. source: openapi: openapi/openapi.yml @@ -560,6 +580,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: accounting_period + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -647,7 +672,8 @@ service: linesRemoteFieldClassesList: path: /accounting/v1/journal-entries/lines/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -695,6 +721,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -716,7 +748,8 @@ service: metaPostRetrieve: path: /accounting/v1/journal-entries/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `JournalEntry` POSTs. source: openapi: openapi/openapi.yml @@ -901,7 +934,8 @@ service: remoteFieldClassesList: path: /accounting/v1/journal-entries/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -949,6 +983,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/linkToken.yml b/.mock/definition/accounting/linkToken.yml index 1d7aa0a0..0772db0f 100644 --- a/.mock/definition/accounting/linkToken.yml +++ b/.mock/definition/accounting/linkToken.yml @@ -24,7 +24,8 @@ service: create: path: /accounting/v1/link-token method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a link token to be used when linking a new end user. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/linkedAccounts.yml b/.mock/definition/accounting/linkedAccounts.yml index a831126a..561db84a 100644 --- a/.mock/definition/accounting/linkedAccounts.yml +++ b/.mock/definition/accounting/linkedAccounts.yml @@ -19,7 +19,8 @@ service: list: path: /accounting/v1/linked-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: List linked accounts for your organization. source: openapi: openapi/openapi.yml @@ -108,7 +109,19 @@ service: status-code: 200 examples: - query-parameters: + category: accounting cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/accounting/passthrough.yml b/.mock/definition/accounting/passthrough.yml index db79aa9e..c50e8282 100644 --- a/.mock/definition/accounting/passthrough.yml +++ b/.mock/definition/accounting/passthrough.yml @@ -7,7 +7,8 @@ service: create: path: /accounting/v1/passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: Pull data from an endpoint not currently supported by Merge. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/paymentMethods.yml b/.mock/definition/accounting/paymentMethods.yml index 844d0b85..ecea7f83 100644 --- a/.mock/definition/accounting/paymentMethods.yml +++ b/.mock/definition/accounting/paymentMethods.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/payment-methods method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `PaymentMethod` objects. source: openapi: openapi/openapi.yml @@ -45,6 +46,10 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -72,7 +77,8 @@ service: retrieve: path: /accounting/v1/payment-methods/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `PaymentMethod` object with the given `id`. source: openapi: openapi/openapi.yml @@ -98,6 +104,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/paymentTerms.yml b/.mock/definition/accounting/paymentTerms.yml index edf23455..7659b91a 100644 --- a/.mock/definition/accounting/paymentTerms.yml +++ b/.mock/definition/accounting/paymentTerms.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/payment-terms method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `PaymentTerm` objects. source: openapi: openapi/openapi.yml @@ -50,6 +51,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -79,7 +85,8 @@ service: retrieve: path: /accounting/v1/payment-terms/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `PaymentTerm` object with the given `id`. source: openapi: openapi/openapi.yml @@ -110,6 +117,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/payments.yml b/.mock/definition/accounting/payments.yml index 8a628d65..9992cedd 100644 --- a/.mock/definition/accounting/payments.yml +++ b/.mock/definition/accounting/payments.yml @@ -540,7 +540,8 @@ service: list: path: /accounting/v1/payments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Payment` objects. source: openapi: openapi/openapi.yml @@ -625,7 +626,23 @@ service: status-code: 200 examples: - query-parameters: + account_id: account_id + company_id: company_id + contact_id: contact_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + transaction_date_after: '2024-01-15T09:30:00Z' + transaction_date_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -684,7 +701,8 @@ service: create: path: /accounting/v1/payments method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Payment` object with the given values. source: openapi: openapi/openapi.yml @@ -708,7 +726,10 @@ service: type: root.PaymentResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -786,7 +807,8 @@ service: retrieve: path: /accounting/v1/payments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Payment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -822,6 +844,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -879,7 +906,8 @@ service: partialUpdate: path: /accounting/v1/payments/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates a `Payment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -907,6 +935,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -985,7 +1016,8 @@ service: lineItemsRemoteFieldClassesList: path: /accounting/v1/payments/line-items/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -1033,6 +1065,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -1054,7 +1092,8 @@ service: metaPatchRetrieve: path: /accounting/v1/payments/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Payment` PATCHs. source: openapi: openapi/openapi.yml @@ -1243,7 +1282,8 @@ service: metaPostRetrieve: path: /accounting/v1/payments/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Payment` POSTs. source: openapi: openapi/openapi.yml @@ -1428,7 +1468,8 @@ service: remoteFieldClassesList: path: /accounting/v1/payments/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -1476,6 +1517,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/phoneNumbers.yml b/.mock/definition/accounting/phoneNumbers.yml index 75ad3e16..9bb476ce 100644 --- a/.mock/definition/accounting/phoneNumbers.yml +++ b/.mock/definition/accounting/phoneNumbers.yml @@ -7,7 +7,8 @@ service: retrieve: path: /accounting/v1/phone-numbers/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `AccountingPhoneNumber` object with the given `id`. source: openapi: openapi/openapi.yml @@ -33,6 +34,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/projects.yml b/.mock/definition/accounting/projects.yml index add59523..bc5566aa 100644 --- a/.mock/definition/accounting/projects.yml +++ b/.mock/definition/accounting/projects.yml @@ -24,7 +24,8 @@ service: list: path: /accounting/v1/projects method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Project` objects. source: openapi: openapi/openapi.yml @@ -90,7 +91,18 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -118,7 +130,8 @@ service: retrieve: path: /accounting/v1/projects/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Project` object with the given `id`. source: openapi: openapi/openapi.yml @@ -149,6 +162,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/purchaseOrders.yml b/.mock/definition/accounting/purchaseOrders.yml index bc57e698..4de1b4fa 100644 --- a/.mock/definition/accounting/purchaseOrders.yml +++ b/.mock/definition/accounting/purchaseOrders.yml @@ -546,7 +546,8 @@ service: list: path: /accounting/v1/purchase-orders method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `PurchaseOrder` objects. source: openapi: openapi/openapi.yml @@ -635,7 +636,23 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: accounting_period + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + issue_date_after: '2024-01-15T09:30:00Z' + issue_date_before: '2024-01-15T09:30:00Z' + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -716,7 +733,8 @@ service: create: path: /accounting/v1/purchase-orders method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `PurchaseOrder` object with the given values. source: openapi: openapi/openapi.yml @@ -740,7 +758,10 @@ service: type: root.PurchaseOrderResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -840,7 +861,8 @@ service: retrieve: path: /accounting/v1/purchase-orders/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `PurchaseOrder` object with the given `id`. source: openapi: openapi/openapi.yml @@ -886,6 +908,13 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: accounting_period + include_remote_data: true + include_remote_fields: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -977,7 +1006,8 @@ service: lineItemsRemoteFieldClassesList: path: /accounting/v1/purchase-orders/line-items/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -1025,6 +1055,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -1046,7 +1082,8 @@ service: metaPostRetrieve: path: /accounting/v1/purchase-orders/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `PurchaseOrder` POSTs. source: openapi: openapi/openapi.yml @@ -1231,7 +1268,8 @@ service: remoteFieldClassesList: path: /accounting/v1/purchase-orders/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -1279,6 +1317,12 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/regenerateKey.yml b/.mock/definition/accounting/regenerateKey.yml index fa714152..c9b7d9bd 100644 --- a/.mock/definition/accounting/regenerateKey.yml +++ b/.mock/definition/accounting/regenerateKey.yml @@ -7,7 +7,8 @@ service: create: path: /accounting/v1/regenerate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Exchange remote keys. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/scopes.yml b/.mock/definition/accounting/scopes.yml index 4c990463..d5c89507 100644 --- a/.mock/definition/accounting/scopes.yml +++ b/.mock/definition/accounting/scopes.yml @@ -7,7 +7,8 @@ service: default_scopes_retrieve: path: /accounting/v1/default-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn @@ -50,7 +51,8 @@ service: linked_account_scopes_retrieve: path: /accounting/v1/linked-account-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn @@ -93,7 +95,8 @@ service: linked_account_scopes_create: path: /accounting/v1/linked-account-scopes method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the diff --git a/.mock/definition/accounting/syncStatus.yml b/.mock/definition/accounting/syncStatus.yml index 2a5e4eb4..7bcade2e 100644 --- a/.mock/definition/accounting/syncStatus.yml +++ b/.mock/definition/accounting/syncStatus.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/sync-status method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. @@ -38,6 +39,7 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/taxRates.yml b/.mock/definition/accounting/taxRates.yml index c2695fb6..e7ee060c 100644 --- a/.mock/definition/accounting/taxRates.yml +++ b/.mock/definition/accounting/taxRates.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/tax-rates method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `TaxRate` objects. source: openapi: openapi/openapi.yml @@ -76,7 +77,19 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -118,7 +131,8 @@ service: retrieve: path: /accounting/v1/tax-rates/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `TaxRate` object with the given `id`. source: openapi: openapi/openapi.yml @@ -149,6 +163,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/trackingCategories.yml b/.mock/definition/accounting/trackingCategories.yml index b63996f9..4c3ee839 100644 --- a/.mock/definition/accounting/trackingCategories.yml +++ b/.mock/definition/accounting/trackingCategories.yml @@ -1,3 +1,20 @@ +types: + TrackingCategoriesListRequestCategoryType: + enum: + - value: '' + name: EMPTY + - CLASS + - DEPARTMENT + source: + openapi: openapi/openapi.yml + TrackingCategoriesListRequestStatus: + enum: + - value: '' + name: EMPTY + - ACTIVE + - ARCHIVED + source: + openapi: openapi/openapi.yml imports: root: __package__.yml service: @@ -7,7 +24,8 @@ service: list: path: /accounting/v1/tracking-categories method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `TrackingCategory` objects. source: openapi: openapi/openapi.yml @@ -15,7 +33,7 @@ service: name: TrackingCategoriesListRequest query-parameters: category_type: - type: optional + type: optional docs: If provided, will only return tracking categories with this type. company_id: type: optional @@ -86,7 +104,7 @@ service: enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) status: - type: optional + type: optional docs: >- If provided, will only return tracking categories with this status. @@ -96,7 +114,23 @@ service: status-code: 200 examples: - query-parameters: + category_type: '' + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: company + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status + status: '' headers: X-Account-Token: X-Account-Token response: @@ -122,7 +156,8 @@ service: retrieve: path: /accounting/v1/tracking-categories/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `TrackingCategory` object with the given `id`. source: openapi: openapi/openapi.yml @@ -163,6 +198,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/transactions.yml b/.mock/definition/accounting/transactions.yml index 672ad121..d58c6842 100644 --- a/.mock/definition/accounting/transactions.yml +++ b/.mock/definition/accounting/transactions.yml @@ -258,7 +258,8 @@ service: list: path: /accounting/v1/transactions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Transaction` objects. source: openapi: openapi/openapi.yml @@ -334,7 +335,20 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + transaction_date_after: '2024-01-15T09:30:00Z' + transaction_date_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -408,7 +422,8 @@ service: retrieve: path: /accounting/v1/transactions/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Transaction` object with the given `id`. source: openapi: openapi/openapi.yml @@ -439,6 +454,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/accounting/vendorCredits.yml b/.mock/definition/accounting/vendorCredits.yml index b8507e7c..2b9b8bdb 100644 --- a/.mock/definition/accounting/vendorCredits.yml +++ b/.mock/definition/accounting/vendorCredits.yml @@ -130,7 +130,8 @@ service: list: path: /accounting/v1/vendor-credits method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `VendorCredit` objects. source: openapi: openapi/openapi.yml @@ -204,7 +205,20 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: accounting_period + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + transaction_date_after: '2024-01-15T09:30:00Z' + transaction_date_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -277,7 +291,8 @@ service: create: path: /accounting/v1/vendor-credits method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `VendorCredit` object with the given values. source: openapi: openapi/openapi.yml @@ -301,7 +316,10 @@ service: type: root.VendorCreditResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -393,7 +411,8 @@ service: retrieve: path: /accounting/v1/vendor-credits/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `VendorCredit` object with the given `id`. source: openapi: openapi/openapi.yml @@ -424,6 +443,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: accounting_period + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -501,7 +524,8 @@ service: metaPostRetrieve: path: /accounting/v1/vendor-credits/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `VendorCredit` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/webhookReceivers.yml b/.mock/definition/accounting/webhookReceivers.yml index c7bb86ce..c1ded67c 100644 --- a/.mock/definition/accounting/webhookReceivers.yml +++ b/.mock/definition/accounting/webhookReceivers.yml @@ -7,7 +7,8 @@ service: list: path: /accounting/v1/webhook-receivers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `WebhookReceiver` objects. source: openapi: openapi/openapi.yml @@ -26,7 +27,8 @@ service: create: path: /accounting/v1/webhook-receivers method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `WebhookReceiver` object with the given values. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/accountDetails.yml b/.mock/definition/ats/accountDetails.yml index a09c4849..9426b764 100644 --- a/.mock/definition/ats/accountDetails.yml +++ b/.mock/definition/ats/accountDetails.yml @@ -7,7 +7,8 @@ service: retrieve: path: /ats/v1/account-details method: GET - auth: true + auth: + - tokenAuth: [] docs: Get details for a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/accountToken.yml b/.mock/definition/ats/accountToken.yml index 3c055421..0e6f0c37 100644 --- a/.mock/definition/ats/accountToken.yml +++ b/.mock/definition/ats/accountToken.yml @@ -7,7 +7,8 @@ service: retrieve: path: /ats/v1/account-token/{public_token} method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns the account token for the end user with the provided public token. diff --git a/.mock/definition/ats/activities.yml b/.mock/definition/ats/activities.yml index 2ed08a54..d81536c1 100644 --- a/.mock/definition/ats/activities.yml +++ b/.mock/definition/ats/activities.yml @@ -40,7 +40,8 @@ service: list: path: /ats/v1/activities method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Activity` objects. source: openapi: openapi/openapi.yml @@ -116,7 +117,20 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: user + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: activity_type + remote_id: remote_id + show_enum_origins: activity_type + user_id: user_id headers: X-Account-Token: X-Account-Token response: @@ -148,7 +162,8 @@ service: create: path: /ats/v1/activities method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Activity` object with the given values. source: openapi: openapi/openapi.yml @@ -173,7 +188,10 @@ service: type: root.ActivityResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -225,7 +243,8 @@ service: retrieve: path: /ats/v1/activities/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Activity` object with the given `id`. source: openapi: openapi/openapi.yml @@ -266,6 +285,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: user + include_remote_data: true + include_shell_data: true + remote_fields: activity_type + show_enum_origins: activity_type headers: X-Account-Token: X-Account-Token response: @@ -294,7 +319,8 @@ service: metaPostRetrieve: path: /ats/v1/activities/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Activity` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/applications.yml b/.mock/definition/ats/applications.yml index a6c86947..a54cd377 100644 --- a/.mock/definition/ats/applications.yml +++ b/.mock/definition/ats/applications.yml @@ -1342,7 +1342,8 @@ service: list: path: /ats/v1/applications method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Application` objects. source: openapi: openapi/openapi.yml @@ -1427,7 +1428,23 @@ service: status-code: 200 examples: - query-parameters: + candidate_id: candidate_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' + credited_to_id: credited_to_id + current_stage_id: current_stage_id cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: candidate + include_deleted_data: true + include_remote_data: true + include_shell_data: true + job_id: job_id + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + reject_reason_id: reject_reason_id + remote_id: remote_id + source: source headers: X-Account-Token: X-Account-Token response: @@ -1465,7 +1482,8 @@ service: create: path: /ats/v1/applications method: POST - auth: true + auth: + - tokenAuth: [] docs: > Creates an `Application` object with the given values. @@ -1501,7 +1519,10 @@ service: type: root.ApplicationResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -1559,7 +1580,8 @@ service: retrieve: path: /ats/v1/applications/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Application` object with the given `id`. source: openapi: openapi/openapi.yml @@ -1590,6 +1612,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: candidate + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -1624,7 +1650,8 @@ service: changeStageCreate: path: /ats/v1/applications/{id}/change-stage method: POST - auth: true + auth: + - tokenAuth: [] docs: Updates the `current_stage` field of an `Application` object source: openapi: openapi/openapi.yml @@ -1660,6 +1687,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: {} @@ -1716,7 +1746,8 @@ service: metaPostRetrieve: path: /ats/v1/applications/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Application` POSTs. source: openapi: openapi/openapi.yml @@ -1733,7 +1764,9 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: + - query-parameters: + application_remote_template_id: application_remote_template_id + headers: X-Account-Token: X-Account-Token response: body: diff --git a/.mock/definition/ats/asyncPassthrough.yml b/.mock/definition/ats/asyncPassthrough.yml index 1ab045cf..44039152 100644 --- a/.mock/definition/ats/asyncPassthrough.yml +++ b/.mock/definition/ats/asyncPassthrough.yml @@ -7,7 +7,8 @@ service: create: path: /ats/v1/async-passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Asynchronously pull data from an endpoint not currently supported by Merge. @@ -32,7 +33,8 @@ service: retrieve: path: /ats/v1/async-passthrough/{async_passthrough_receipt_id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Retrieves data from earlier async-passthrough POST request source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/attachments.yml b/.mock/definition/ats/attachments.yml index 901d2eac..95cde4bb 100644 --- a/.mock/definition/ats/attachments.yml +++ b/.mock/definition/ats/attachments.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/attachments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Attachment` objects. source: openapi: openapi/openapi.yml @@ -83,7 +84,20 @@ service: status-code: 200 examples: - query-parameters: + candidate_id: candidate_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: candidate + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: attachment_type + remote_id: remote_id + show_enum_origins: attachment_type headers: X-Account-Token: X-Account-Token response: @@ -112,7 +126,8 @@ service: create: path: /ats/v1/attachments method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Attachment` object with the given values. source: openapi: openapi/openapi.yml @@ -137,7 +152,10 @@ service: type: root.AttachmentResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -186,7 +204,8 @@ service: retrieve: path: /ats/v1/attachments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Attachment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -227,6 +246,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: candidate + include_remote_data: true + include_shell_data: true + remote_fields: attachment_type + show_enum_origins: attachment_type headers: X-Account-Token: X-Account-Token response: @@ -252,7 +277,8 @@ service: metaPostRetrieve: path: /ats/v1/attachments/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Attachment` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/auditTrail.yml b/.mock/definition/ats/auditTrail.yml index d5a8c615..95a9228d 100644 --- a/.mock/definition/ats/auditTrail.yml +++ b/.mock/definition/ats/auditTrail.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/audit-trail method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets a list of audit trail events. source: openapi: openapi/openapi.yml @@ -77,6 +78,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/ats/availableActions.yml b/.mock/definition/ats/availableActions.yml index 2f7515df..ec10eae5 100644 --- a/.mock/definition/ats/availableActions.yml +++ b/.mock/definition/ats/availableActions.yml @@ -7,7 +7,8 @@ service: retrieve: path: /ats/v1/available-actions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of models and actions available for an account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/candidates.yml b/.mock/definition/ats/candidates.yml index e38f44e9..07b5bb14 100644 --- a/.mock/definition/ats/candidates.yml +++ b/.mock/definition/ats/candidates.yml @@ -32,7 +32,8 @@ service: list: path: /ats/v1/candidates method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Candidate` objects. source: openapi: openapi/openapi.yml @@ -111,7 +112,21 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email_addresses: email_addresses + expand: applications + first_name: first_name + include_deleted_data: true + include_remote_data: true + include_shell_data: true + last_name: last_name + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + tags: tags headers: X-Account-Token: X-Account-Token response: @@ -172,7 +187,8 @@ service: create: path: /ats/v1/candidates method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Candidate` object with the given values. source: openapi: openapi/openapi.yml @@ -197,7 +213,10 @@ service: type: root.CandidateResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -278,7 +297,8 @@ service: retrieve: path: /ats/v1/candidates/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Candidate` object with the given `id`. source: openapi: openapi/openapi.yml @@ -309,6 +329,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: applications + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -369,7 +393,8 @@ service: partialUpdate: path: /ats/v1/candidates/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates a `Candidate` object with the given `id`. source: openapi: openapi/openapi.yml @@ -398,6 +423,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -479,7 +507,8 @@ service: ignoreCreate: path: /ats/v1/candidates/ignore/{model_id} method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in @@ -510,7 +539,8 @@ service: metaPatchRetrieve: path: /ats/v1/candidates/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Candidate` PATCHs. source: openapi: openapi/openapi.yml @@ -699,7 +729,8 @@ service: metaPostRetrieve: path: /ats/v1/candidates/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Candidate` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/deleteAccount.yml b/.mock/definition/ats/deleteAccount.yml index 9ffe1a71..9c0d80ec 100644 --- a/.mock/definition/ats/deleteAccount.yml +++ b/.mock/definition/ats/deleteAccount.yml @@ -5,7 +5,8 @@ service: delete: path: /ats/v1/delete-account method: POST - auth: true + auth: + - tokenAuth: [] docs: Delete a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/departments.yml b/.mock/definition/ats/departments.yml index ec1c4fa0..7a09ebf7 100644 --- a/.mock/definition/ats/departments.yml +++ b/.mock/definition/ats/departments.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/departments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Department` objects. source: openapi: openapi/openapi.yml @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -91,7 +101,8 @@ service: retrieve: path: /ats/v1/departments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Department` object with the given `id`. source: openapi: openapi/openapi.yml @@ -117,6 +128,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/eeocs.yml b/.mock/definition/ats/eeocs.yml index b14f676d..3359cffc 100644 --- a/.mock/definition/ats/eeocs.yml +++ b/.mock/definition/ats/eeocs.yml @@ -128,7 +128,8 @@ service: list: path: /ats/v1/eeocs method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `EEOC` objects. source: openapi: openapi/openapi.yml @@ -204,7 +205,20 @@ service: status-code: 200 examples: - query-parameters: + candidate_id: candidate_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: candidate + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: disability_status + remote_id: remote_id + show_enum_origins: disability_status headers: X-Account-Token: X-Account-Token response: @@ -235,7 +249,8 @@ service: retrieve: path: /ats/v1/eeocs/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `EEOC` object with the given `id`. source: openapi: openapi/openapi.yml @@ -276,6 +291,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: candidate + include_remote_data: true + include_shell_data: true + remote_fields: disability_status + show_enum_origins: disability_status headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/fieldMapping.yml b/.mock/definition/ats/fieldMapping.yml index 949a75b5..772cee31 100644 --- a/.mock/definition/ats/fieldMapping.yml +++ b/.mock/definition/ats/fieldMapping.yml @@ -7,7 +7,8 @@ service: field_mappings_retrieve: path: /ats/v1/field-mappings method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge @@ -30,7 +31,9 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token response: body: @@ -293,7 +296,8 @@ service: field_mappings_create: path: /ats/v1/field-mappings method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to @@ -358,7 +362,9 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name @@ -409,7 +415,8 @@ service: field_mappings_destroy: path: /ats/v1/field-mappings/{field_mapping_id} method: DELETE - auth: true + auth: + - tokenAuth: [] docs: >- Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after @@ -469,7 +476,8 @@ service: field_mappings_partial_update: path: /ats/v1/field-mappings/{field_mapping_id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: >- Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the @@ -553,7 +561,8 @@ service: remote_fields_retrieve: path: /ats/v1/remote-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data @@ -581,7 +590,10 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: X-Account-Token: X-Account-Token response: body: @@ -812,7 +824,8 @@ service: target_fields_retrieve: path: /ats/v1/target-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields diff --git a/.mock/definition/ats/forceResync.yml b/.mock/definition/ats/forceResync.yml index b939eabe..406b93df 100644 --- a/.mock/definition/ats/forceResync.yml +++ b/.mock/definition/ats/forceResync.yml @@ -7,7 +7,8 @@ service: sync_status_resync_create: path: /ats/v1/sync-status/resync method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or diff --git a/.mock/definition/ats/generateKey.yml b/.mock/definition/ats/generateKey.yml index c7da4da8..b1517ad3 100644 --- a/.mock/definition/ats/generateKey.yml +++ b/.mock/definition/ats/generateKey.yml @@ -7,7 +7,8 @@ service: create: path: /ats/v1/generate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Create a remote key. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/interviews.yml b/.mock/definition/ats/interviews.yml index 0d25c536..95d002e2 100644 --- a/.mock/definition/ats/interviews.yml +++ b/.mock/definition/ats/interviews.yml @@ -68,7 +68,8 @@ service: list: path: /ats/v1/interviews method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `ScheduledInterview` objects. source: openapi: openapi/openapi.yml @@ -153,7 +154,23 @@ service: status-code: 200 examples: - query-parameters: + application_id: application_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: application + include_deleted_data: true + include_remote_data: true + include_shell_data: true + job_id: job_id + job_interview_stage_id: job_interview_stage_id + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + organizer_id: organizer_id + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -190,7 +207,8 @@ service: create: path: /ats/v1/interviews method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `ScheduledInterview` object with the given values. source: openapi: openapi/openapi.yml @@ -215,7 +233,10 @@ service: type: root.ScheduledInterviewResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -272,7 +293,8 @@ service: retrieve: path: /ats/v1/interviews/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `ScheduledInterview` object with the given `id`. source: openapi: openapi/openapi.yml @@ -313,6 +335,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: application + include_remote_data: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -346,7 +374,8 @@ service: metaPostRetrieve: path: /ats/v1/interviews/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `ScheduledInterview` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/issues.yml b/.mock/definition/ats/issues.yml index 51de2a7d..fed0895a 100644 --- a/.mock/definition/ats/issues.yml +++ b/.mock/definition/ats/issues.yml @@ -14,7 +14,8 @@ service: list: path: /ats/v1/issues method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets all issues for Organization. source: openapi: openapi/openapi.yml @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + account_token: account_token cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING headers: X-Account-Token: '[object Object]' response: @@ -103,7 +117,8 @@ service: retrieve: path: /ats/v1/issues/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Get a specific issue. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/jobInterviewStages.yml b/.mock/definition/ats/jobInterviewStages.yml index d1a7f9fd..37a16498 100644 --- a/.mock/definition/ats/jobInterviewStages.yml +++ b/.mock/definition/ats/jobInterviewStages.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/job-interview-stages method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `JobInterviewStage` objects. source: openapi: openapi/openapi.yml @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: job + include_deleted_data: true + include_remote_data: true + include_shell_data: true + job_id: job_id + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -101,7 +113,8 @@ service: retrieve: path: /ats/v1/job-interview-stages/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `JobInterviewStage` object with the given `id`. source: openapi: openapi/openapi.yml @@ -132,6 +145,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: job + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/jobPostings.yml b/.mock/definition/ats/jobPostings.yml index c888c890..7870d4ab 100644 --- a/.mock/definition/ats/jobPostings.yml +++ b/.mock/definition/ats/jobPostings.yml @@ -17,7 +17,8 @@ service: list: path: /ats/v1/job-postings method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `JobPosting` objects. source: openapi: openapi/openapi.yml @@ -96,7 +97,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: job + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + status: CLOSED headers: X-Account-Token: X-Account-Token response: @@ -133,7 +145,8 @@ service: retrieve: path: /ats/v1/job-postings/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `JobPosting` object with the given `id`. source: openapi: openapi/openapi.yml @@ -164,6 +177,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: job + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/jobs.yml b/.mock/definition/ats/jobs.yml index b5f780af..82601ff7 100644 --- a/.mock/definition/ats/jobs.yml +++ b/.mock/definition/ats/jobs.yml @@ -147,7 +147,8 @@ service: list: path: /ats/v1/jobs method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Job` objects. source: openapi: openapi/openapi.yml @@ -244,7 +245,22 @@ service: status-code: 200 examples: - query-parameters: + code: code + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: departments + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + offices: offices + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status + status: ARCHIVED headers: X-Account-Token: X-Account-Token response: @@ -296,7 +312,8 @@ service: retrieve: path: /ats/v1/jobs/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Job` object with the given `id`. source: openapi: openapi/openapi.yml @@ -337,6 +354,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: departments + include_remote_data: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -386,7 +409,8 @@ service: screeningQuestionsList: path: /ats/v1/jobs/{job_id}/screening-questions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `ScreeningQuestion` objects. source: openapi: openapi/openapi.yml @@ -433,6 +457,11 @@ service: job_id: job_id query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: job + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/linkToken.yml b/.mock/definition/ats/linkToken.yml index a6b77072..41074ef9 100644 --- a/.mock/definition/ats/linkToken.yml +++ b/.mock/definition/ats/linkToken.yml @@ -24,7 +24,8 @@ service: create: path: /ats/v1/link-token method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a link token to be used when linking a new end user. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/linkedAccounts.yml b/.mock/definition/ats/linkedAccounts.yml index 1f942677..3d4de11c 100644 --- a/.mock/definition/ats/linkedAccounts.yml +++ b/.mock/definition/ats/linkedAccounts.yml @@ -19,7 +19,8 @@ service: list: path: /ats/v1/linked-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: List linked accounts for your organization. source: openapi: openapi/openapi.yml @@ -108,7 +109,19 @@ service: status-code: 200 examples: - query-parameters: + category: accounting cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/ats/offers.yml b/.mock/definition/ats/offers.yml index bfbc9bb7..ff7f228d 100644 --- a/.mock/definition/ats/offers.yml +++ b/.mock/definition/ats/offers.yml @@ -24,7 +24,8 @@ service: list: path: /ats/v1/offers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Offer` objects. source: openapi: openapi/openapi.yml @@ -103,7 +104,21 @@ service: status-code: 200 examples: - query-parameters: + application_id: application_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' + creator_id: creator_id cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: application + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: status + remote_id: remote_id + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -135,7 +150,8 @@ service: retrieve: path: /ats/v1/offers/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Offer` object with the given `id`. source: openapi: openapi/openapi.yml @@ -176,6 +192,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: application + include_remote_data: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/offices.yml b/.mock/definition/ats/offices.yml index d8009929..fd1815b8 100644 --- a/.mock/definition/ats/offices.yml +++ b/.mock/definition/ats/offices.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/offices method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Office` objects. source: openapi: openapi/openapi.yml @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -92,7 +102,8 @@ service: retrieve: path: /ats/v1/offices/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Office` object with the given `id`. source: openapi: openapi/openapi.yml @@ -118,6 +129,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/passthrough.yml b/.mock/definition/ats/passthrough.yml index a3dff513..1379f58a 100644 --- a/.mock/definition/ats/passthrough.yml +++ b/.mock/definition/ats/passthrough.yml @@ -7,7 +7,8 @@ service: create: path: /ats/v1/passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: Pull data from an endpoint not currently supported by Merge. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/regenerateKey.yml b/.mock/definition/ats/regenerateKey.yml index 5db09f20..a69ee1fb 100644 --- a/.mock/definition/ats/regenerateKey.yml +++ b/.mock/definition/ats/regenerateKey.yml @@ -7,7 +7,8 @@ service: create: path: /ats/v1/regenerate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Exchange remote keys. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/rejectReasons.yml b/.mock/definition/ats/rejectReasons.yml index fc100819..38a95e61 100644 --- a/.mock/definition/ats/rejectReasons.yml +++ b/.mock/definition/ats/rejectReasons.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/reject-reasons method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RejectReason` objects. source: openapi: openapi/openapi.yml @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -91,7 +101,8 @@ service: retrieve: path: /ats/v1/reject-reasons/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `RejectReason` object with the given `id`. source: openapi: openapi/openapi.yml @@ -117,6 +128,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/scopes.yml b/.mock/definition/ats/scopes.yml index bdaf6ed0..57249fbd 100644 --- a/.mock/definition/ats/scopes.yml +++ b/.mock/definition/ats/scopes.yml @@ -7,7 +7,8 @@ service: default_scopes_retrieve: path: /ats/v1/default-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn @@ -50,7 +51,8 @@ service: linked_account_scopes_retrieve: path: /ats/v1/linked-account-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn @@ -93,7 +95,8 @@ service: linked_account_scopes_create: path: /ats/v1/linked-account-scopes method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the diff --git a/.mock/definition/ats/scorecards.yml b/.mock/definition/ats/scorecards.yml index a5f93514..1d2753eb 100644 --- a/.mock/definition/ats/scorecards.yml +++ b/.mock/definition/ats/scorecards.yml @@ -38,7 +38,8 @@ service: list: path: /ats/v1/scorecards method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Scorecard` objects. source: openapi: openapi/openapi.yml @@ -120,7 +121,22 @@ service: status-code: 200 examples: - query-parameters: + application_id: application_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: application + include_deleted_data: true + include_remote_data: true + include_shell_data: true + interview_id: interview_id + interviewer_id: interviewer_id + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: overall_recommendation + remote_id: remote_id + show_enum_origins: overall_recommendation headers: X-Account-Token: X-Account-Token response: @@ -151,7 +167,8 @@ service: retrieve: path: /ats/v1/scorecards/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Scorecard` object with the given `id`. source: openapi: openapi/openapi.yml @@ -192,6 +209,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: application + include_remote_data: true + include_shell_data: true + remote_fields: overall_recommendation + show_enum_origins: overall_recommendation headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/syncStatus.yml b/.mock/definition/ats/syncStatus.yml index 81b1fa9c..3f953418 100644 --- a/.mock/definition/ats/syncStatus.yml +++ b/.mock/definition/ats/syncStatus.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/sync-status method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. @@ -38,6 +39,7 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/tags.yml b/.mock/definition/ats/tags.yml index 106e5cf9..c40208f8 100644 --- a/.mock/definition/ats/tags.yml +++ b/.mock/definition/ats/tags.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/tags method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Tag` objects. source: openapi: openapi/openapi.yml @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/users.yml b/.mock/definition/ats/users.yml index 90a2bb54..3e7e6662 100644 --- a/.mock/definition/ats/users.yml +++ b/.mock/definition/ats/users.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/users method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteUser` objects. source: openapi: openapi/openapi.yml @@ -82,7 +83,19 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email: email + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: access_role + remote_id: remote_id + show_enum_origins: access_role headers: X-Account-Token: X-Account-Token response: @@ -113,7 +126,8 @@ service: retrieve: path: /ats/v1/users/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `RemoteUser` object with the given `id`. source: openapi: openapi/openapi.yml @@ -149,6 +163,11 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true + remote_fields: access_role + show_enum_origins: access_role headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ats/webhookReceivers.yml b/.mock/definition/ats/webhookReceivers.yml index 76339c9f..efaac1ef 100644 --- a/.mock/definition/ats/webhookReceivers.yml +++ b/.mock/definition/ats/webhookReceivers.yml @@ -7,7 +7,8 @@ service: list: path: /ats/v1/webhook-receivers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `WebhookReceiver` objects. source: openapi: openapi/openapi.yml @@ -26,7 +27,8 @@ service: create: path: /ats/v1/webhook-receivers method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `WebhookReceiver` object with the given values. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/__package__.yml b/.mock/definition/chat/__package__.yml new file mode 100644 index 00000000..c8391721 --- /dev/null +++ b/.mock/definition/chat/__package__.yml @@ -0,0 +1,1797 @@ +types: + AccountDetailsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + integration_specific_fields: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + - knowledgebase + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + - knowledgebase + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + CompletedAccountInitialScreenEnum: + type: literal<"SELECTIVE_SYNC"> + docs: '* `SELECTIVE_SYNC` - SELECTIVE_SYNC' + ConversationType: + discriminated: false + docs: |- + The type of the conversation. + + * `PRIVATE_INTERNAL` - PRIVATE_INTERNAL + * `PRIVATE_EXTERNAL` - PRIVATE_EXTERNAL + * `PUBLIC_INTERNAL` - PUBLIC_INTERNAL + * `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL + union: + - TypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + Conversation: + docs: >- + # The Conversation Object + + ### Description + + The `Conversation` object is used to represent a conversation within the + Chat account. + + + ### Usage Example + + Fetch from the `GET /api/chat/v1/conversations` endpoint and view their + conversations. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The name of the conversation + validation: + maxLength: 80 + description: + type: optional + docs: The description of the conversation. + url: + type: optional + docs: The url of the conversation. + validation: + format: uri + maxLength: 2000 + type: + type: optional + docs: |- + The type of the conversation. + + * `PRIVATE_INTERNAL` - PRIVATE_INTERNAL + * `PRIVATE_EXTERNAL` - PRIVATE_EXTERNAL + * `PUBLIC_INTERNAL` - PUBLIC_INTERNAL + * `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL + members: optional>> + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + DataPassthroughRequestMethod: + discriminated: false + union: + - MethodEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + DataPassthroughRequestRequestFormat: + discriminated: false + union: + - RequestFormatEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: DataPassthroughRequestMethod + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + block_merge_link: optional + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - 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 + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + User: optional> + Group: optional> + Conversation: optional> + Member: optional> + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + jmes_path: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + User: optional> + Group: optional> + Conversation: optional> + Member: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + Group: + docs: |- + # The Group Object + ### Description + The `Group` object is used to represent any subset of `Users`. + ### Usage Example + Fetch from the `GET /api/chat/v1/groups` endpoint and view their groups. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The name of the Group + validation: + maxLength: 254 + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + Member: + docs: |- + # The Member Object + ### Description + The `Member` object is used to represent a member within the Chat account. + + ### Usage Example + Fetch from the `GET /api/chat/v1/members` endpoint and view their members. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: + type: optional + docs: >- + The user that is a member of the conversation. Only populated if the + member is a user. + validation: + format: uuid + group: + type: optional + docs: >- + The group that is a member of the conversation. Only populated if the + member is a group. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + Message: + docs: >- + # The Message Object + + ### Description + + The `Message` object is used to represent a message within the Chat + account. + + ### Usage Example + + Fetch from the `GET /api/chat/v1/messages` endpoint and view their + message. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user_id: + type: optional + docs: The user that sent the message. + validation: + format: uuid + conversation_id: + type: optional + docs: The conversation this message belongs to. + validation: + format: uuid + body: + type: optional + docs: The body of the message. + subject_line: + type: optional + docs: The subject line of the message. + root_message_id: + type: optional + docs: The root message this message belongs to. + validation: + format: uuid + url: + type: optional + docs: The url of the message. + validation: + format: uri + maxLength: 500 + remote_was_deleted: + type: optional + docs: >- + 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/). + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequestEncoding: + discriminated: false + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + union: + - EncodingEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedConversationList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedMemberList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedMessageList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldApiAdvancedMetadata: + discriminated: false + union: + - AdvancedMetadata + - string + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + User: optional> + Group: optional> + Conversation: optional> + Member: optional> + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponseResponseType: + discriminated: false + union: + - ResponseTypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: openapi/openapi.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + TypeEnum: + enum: + - PRIVATE_INTERNAL + - PRIVATE_EXTERNAL + - PUBLIC_INTERNAL + - PUBLIC_EXTERNAL + docs: |- + * `PRIVATE_INTERNAL` - PRIVATE_INTERNAL + * `PRIVATE_EXTERNAL` - PRIVATE_EXTERNAL + * `PUBLIC_INTERNAL` - PUBLIC_INTERNAL + * `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL + source: + openapi: openapi/openapi.yml + User: + docs: |- + # The User Object + ### Description + The `User` object is used to represent a user within the Chat account. + + ### Usage Example + Fetch from the `GET /api/chat/v1/users` endpoint and view their users. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + username: + type: optional + docs: Username or handle + validation: + maxLength: 254 + display_name: + type: optional + docs: Full name or display name + validation: + maxLength: 254 + first_name: + type: optional + docs: The user's first name + validation: + maxLength: 254 + last_name: + type: optional + docs: The user's last name + validation: + maxLength: 254 + is_bot: + type: optional + docs: Returns true if the user is a bot + groups: optional>> + avatar: + type: optional + docs: The user's avatar image + validation: + format: uri + maxLength: 2000 + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + block_merge_link: optional + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/accountDetails.yml b/.mock/definition/chat/accountDetails.yml new file mode 100644 index 00000000..da7d6585 --- /dev/null +++ b/.mock/definition/chat/accountDetails.yml @@ -0,0 +1,38 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /chat/v1/account-details + method: GET + auth: + - tokenAuth: [] + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/accountToken.yml b/.mock/definition/chat/accountToken.yml new file mode 100644 index 00000000..a42d768e --- /dev/null +++ b/.mock/definition/chat/accountToken.yml @@ -0,0 +1,47 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /chat/v1/account-token/{public_token} + method: GET + auth: + - tokenAuth: [] + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + headers: + X-Account-Token: '[object Object]' + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/asyncPassthrough.yml b/.mock/definition/chat/asyncPassthrough.yml new file mode 100644 index 00000000..5a5db1aa --- /dev/null +++ b/.mock/definition/chat/asyncPassthrough.yml @@ -0,0 +1,74 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /chat/v1/async-passthrough + method: POST + auth: + - tokenAuth: [] + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /chat/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: + - tokenAuth: [] + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: + X-Account-Token: X-Account-Token + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/auditTrail.yml b/.mock/definition/chat/auditTrail.yml new file mode 100644 index 00000000..da2e97f9 --- /dev/null +++ b/.mock/definition/chat/auditTrail.yml @@ -0,0 +1,104 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/audit-trail + method: GET + auth: + - tokenAuth: [] + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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` + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + 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. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email + headers: + X-Account-Token: '[object Object]' + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/availableActions.yml b/.mock/definition/chat/availableActions.yml new file mode 100644 index 00000000..81e859f7 --- /dev/null +++ b/.mock/definition/chat/availableActions.yml @@ -0,0 +1,52 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /chat/v1/available-actions + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/conversations.yml b/.mock/definition/chat/conversations.yml new file mode 100644 index 00000000..50209f74 --- /dev/null +++ b/.mock/definition/chat/conversations.yml @@ -0,0 +1,264 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/conversations + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `Conversation` objects. + source: + openapi: openapi/openapi.yml + request: + name: ConversationsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedConversationList + status-code: 200 + examples: + - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: members + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c2f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: conv-001 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: General Discussion + description: A channel for general chat. + url: https://example.com/conversations/conv-001 + type: PRIVATE_INTERNAL + members: + - null + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /conversations + data: + platform_specific: example + membersList: + path: /chat/v1/conversations/{conversation_id}/members + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `Member` objects. + source: + openapi: openapi/openapi.yml + path-parameters: + conversation_id: string + request: + name: ConversationsMembersListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + response: + docs: '' + type: root.PaginatedMemberList + status-code: 200 + examples: + - path-parameters: + conversation_id: conversation_id + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: group + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: m1f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: mem-001 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: a1234567-89ab-cdef-0123-456789abcdef + group: group + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /members + data: + platform_specific: example + retrieve: + path: /chat/v1/conversations/{id} + method: GET + auth: + - tokenAuth: [] + docs: Returns a `Conversation` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ConversationsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Conversation + status-code: 200 + examples: + - path-parameters: + id: id + query-parameters: + expand: members + include_remote_data: true + include_shell_data: true + headers: + X-Account-Token: X-Account-Token + response: + body: + id: c2f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: conv-001 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: General Discussion + description: A channel for general chat. + url: https://example.com/conversations/conv-001 + type: PRIVATE_INTERNAL + members: + - members + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /conversations + data: + platform_specific: example + source: + openapi: openapi/openapi.yml +types: + ConversationsMembersListRequestExpand: + enum: + - group + - user + - value: user,group + name: UserGroup + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/deleteAccount.yml b/.mock/definition/chat/deleteAccount.yml new file mode 100644 index 00000000..ec128034 --- /dev/null +++ b/.mock/definition/chat/deleteAccount.yml @@ -0,0 +1,17 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /chat/v1/delete-account + method: POST + auth: + - tokenAuth: [] + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: + X-Account-Token: X-Account-Token + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/fieldMapping.yml b/.mock/definition/chat/fieldMapping.yml new file mode 100644 index 00000000..65836017 --- /dev/null +++ b/.mock/definition/chat/fieldMapping.yml @@ -0,0 +1,530 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /chat/v1/field-mappings + method: GET + auth: + - tokenAuth: [] + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - query-parameters: + exclude_remote_field_metadata: true + headers: + X-Account-Token: X-Account-Token + response: + body: + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + Group: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + Conversation: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + Member: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + field_mappings_create: + path: /chat/v1/field-mappings + method: POST + auth: + - tokenAuth: [] + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - query-parameters: + exclude_remote_field_metadata: true + 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 + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + block_merge_link: true + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + block_merge_link: true + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /chat/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: + - tokenAuth: [] + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: + X-Account-Token: X-Account-Token + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + block_merge_link: true + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + block_merge_link: true + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /chat/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: + - tokenAuth: [] + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: + X-Account-Token: X-Account-Token + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + block_merge_link: true + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + block_merge_link: true + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /chat/v1/remote-fields + method: GET + auth: + - tokenAuth: [] + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + 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. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: + X-Account-Token: X-Account-Token + response: + body: + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Group: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Conversation: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Member: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /chat/v1/target-fields + method: GET + auth: + - tokenAuth: [] + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Group: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Conversation: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Member: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/forceResync.yml b/.mock/definition/chat/forceResync.yml new file mode 100644 index 00000000..9a539742 --- /dev/null +++ b/.mock/definition/chat/forceResync.yml @@ -0,0 +1,39 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /chat/v1/sync-status/resync + method: POST + auth: + - tokenAuth: [] + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + - model_name: Candidate + model_id: ats.Candidate + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/generateKey.yml b/.mock/definition/chat/generateKey.yml new file mode 100644 index 00000000..6747c305 --- /dev/null +++ b/.mock/definition/chat/generateKey.yml @@ -0,0 +1,39 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /chat/v1/generate-key + method: POST + auth: + - tokenAuth: [] + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - headers: + X-Account-Token: '[object Object]' + request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/groups.yml b/.mock/definition/chat/groups.yml new file mode 100644 index 00000000..a6683848 --- /dev/null +++ b/.mock/definition/chat/groups.yml @@ -0,0 +1,154 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/groups + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `Group` objects. + source: + openapi: openapi/openapi.yml + request: + name: GroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedGroupList + status-code: 200 + examples: + - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c1f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + platform_specific: example + retrieve: + path: /chat/v1/groups/{id} + method: GET + auth: + - tokenAuth: [] + docs: Returns a `Group` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: GroupsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Group + status-code: 200 + examples: + - path-parameters: + id: id + query-parameters: + include_remote_data: true + include_shell_data: true + headers: + X-Account-Token: X-Account-Token + response: + body: + id: c1f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + platform_specific: example + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/issues.yml b/.mock/definition/chat/issues.yml new file mode 100644 index 00000000..321fdc1d --- /dev/null +++ b/.mock/definition/chat/issues.yml @@ -0,0 +1,150 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/issues + method: GET + auth: + - tokenAuth: [] + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - query-parameters: + account_token: account_token + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING + headers: + X-Account-Token: '[object Object]' + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /chat/v1/issues/{id} + method: GET + auth: + - tokenAuth: [] + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: '[object Object]' + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/linkToken.yml b/.mock/definition/chat/linkToken.yml new file mode 100644 index 00000000..cddf6967 --- /dev/null +++ b/.mock/definition/chat/linkToken.yml @@ -0,0 +1,177 @@ +imports: + root: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - root.LanguageEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + EndUserDetailsRequestCompletedAccountInitialScreen: + discriminated: false + docs: >- + When creating a Link token, you can specifiy the initial screen of Linking + Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + union: + - root.CompletedAccountInitialScreenEnum + - string + source: + openapi: openapi/openapi.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /chat/v1/link-token + method: POST + auth: + - tokenAuth: [] + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + completed_account_initial_screen: + type: optional + docs: >- + When creating a Link token, you can specifiy the initial screen + of Linking Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - 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' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/linkedAccounts.yml b/.mock/definition/chat/linkedAccounts.yml new file mode 100644 index 00000000..710478c4 --- /dev/null +++ b/.mock/definition/chat/linkedAccounts.yml @@ -0,0 +1,173 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - chat + - crm + - filestorage + - hris + - knowledgebase + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/linked-accounts + method: GET + auth: + - tokenAuth: [] + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `knowledgebase`, `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + + * `knowledgebase` - knowledgebase + + * `chat` - chat + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + 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. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - query-parameters: + category: accounting + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status + headers: + X-Account-Token: '[object Object]' + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + integration_specific_fields: + integration_specific_field: Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/messages.yml b/.mock/definition/chat/messages.yml new file mode 100644 index 00000000..ee4c5b13 --- /dev/null +++ b/.mock/definition/chat/messages.yml @@ -0,0 +1,214 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/messages + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `Message` objects. + source: + openapi: openapi/openapi.yml + request: + name: MessagesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedMessageList + status-code: 200 + examples: + - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: m1f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: mem-001 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user_id: a1234567-89ab-cdef-0123-456789abcdef + conversation_id: a1234567-89ab-cdef-0123-456789abcdef + body: Hello World + subject_line: Hello World + root_message_id: a1234567-89ab-cdef-0123-456789abcdef + url: https://example.com/messages/mem-001 + remote_was_deleted: true + retrieve: + path: /chat/v1/messages/{id} + method: GET + auth: + - tokenAuth: [] + docs: Returns a `Message` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: MessagesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Message + status-code: 200 + examples: + - path-parameters: + id: id + query-parameters: + include_remote_data: true + include_shell_data: true + headers: + X-Account-Token: X-Account-Token + response: + body: + id: m1f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: mem-001 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user_id: a1234567-89ab-cdef-0123-456789abcdef + conversation_id: a1234567-89ab-cdef-0123-456789abcdef + body: Hello World + subject_line: Hello World + root_message_id: a1234567-89ab-cdef-0123-456789abcdef + url: https://example.com/messages/mem-001 + remote_was_deleted: true + repliesList: + path: /chat/v1/messages/{message_id}/replies + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `Message` objects. + source: + openapi: openapi/openapi.yml + path-parameters: + message_id: string + request: + name: MessagesRepliesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + response: + docs: '' + type: root.PaginatedMessageList + status-code: 200 + examples: + - path-parameters: + message_id: message_id + query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: m1f2d8a4-9f7a-4e2b-8e2f-123456789abc + remote_id: mem-001 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user_id: a1234567-89ab-cdef-0123-456789abcdef + conversation_id: a1234567-89ab-cdef-0123-456789abcdef + body: Hello World + subject_line: Hello World + root_message_id: a1234567-89ab-cdef-0123-456789abcdef + url: https://example.com/messages/mem-001 + remote_was_deleted: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/passthrough.yml b/.mock/definition/chat/passthrough.yml new file mode 100644 index 00000000..a8dfd8f9 --- /dev/null +++ b/.mock/definition/chat/passthrough.yml @@ -0,0 +1,42 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /chat/v1/passthrough + method: POST + auth: + - tokenAuth: [] + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/regenerateKey.yml b/.mock/definition/chat/regenerateKey.yml new file mode 100644 index 00000000..2e39c1a7 --- /dev/null +++ b/.mock/definition/chat/regenerateKey.yml @@ -0,0 +1,39 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /chat/v1/regenerate-key + method: POST + auth: + - tokenAuth: [] + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - headers: + X-Account-Token: '[object Object]' + request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/scopes.yml b/.mock/definition/chat/scopes.yml new file mode 100644 index 00000000..3f2b2c22 --- /dev/null +++ b/.mock/definition/chat/scopes.yml @@ -0,0 +1,167 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /chat/v1/default-scopes + method: GET + auth: + - tokenAuth: [] + docs: >- + Get the default permissions for Merge Common Models and fields across + all Linked Accounts of a given category. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: + X-Account-Token: '[object Object]' + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /chat/v1/linked-account-scopes + method: GET + auth: + - tokenAuth: [] + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /chat/v1/linked-account-scopes + method: POST + auth: + - tokenAuth: [] + docs: >- + Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the + default Scopes. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/syncStatus.yml b/.mock/definition/chat/syncStatus.yml new file mode 100644 index 00000000..caff545c --- /dev/null +++ b/.mock/definition/chat/syncStatus.yml @@ -0,0 +1,60 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/sync-status + method: GET + auth: + - tokenAuth: [] + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Candidate + model_id: ats.Candidate + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/users.yml b/.mock/definition/chat/users.yml new file mode 100644 index 00000000..b3415a86 --- /dev/null +++ b/.mock/definition/chat/users.yml @@ -0,0 +1,180 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/users + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `User` objects. + source: + openapi: openapi/openapi.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. The maximum limit is 100. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedUserList + status-code: 200 + examples: + - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: groups + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: a1234567-89ab-cdef-0123-456789abcdef + remote_id: '77431241242' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + username: alice + display_name: Alice Smith + first_name: Alice + last_name: Smith + is_bot: true + groups: + - groups + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + platform_specific: example + retrieve: + path: /chat/v1/users/{id} + method: GET + auth: + - tokenAuth: [] + docs: Returns a `User` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.User + status-code: 200 + examples: + - path-parameters: + id: id + query-parameters: + expand: groups + include_remote_data: true + include_shell_data: true + headers: + X-Account-Token: X-Account-Token + response: + body: + id: a1234567-89ab-cdef-0123-456789abcdef + remote_id: '77431241242' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + username: alice + display_name: Alice Smith + first_name: Alice + last_name: Smith + is_bot: true + groups: + - groups + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + platform_specific: example + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/webhookReceivers.yml b/.mock/definition/chat/webhookReceivers.yml new file mode 100644 index 00000000..202bfb88 --- /dev/null +++ b/.mock/definition/chat/webhookReceivers.yml @@ -0,0 +1,65 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /chat/v1/webhook-receivers + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + - event: event + is_active: true + key: key + create: + path: /chat/v1/webhook-receivers + method: POST + auth: + - tokenAuth: [] + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/accountDetails.yml b/.mock/definition/crm/accountDetails.yml index 2d2405a1..23aefe1d 100644 --- a/.mock/definition/crm/accountDetails.yml +++ b/.mock/definition/crm/accountDetails.yml @@ -7,7 +7,8 @@ service: retrieve: path: /crm/v1/account-details method: GET - auth: true + auth: + - tokenAuth: [] docs: Get details for a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/accountToken.yml b/.mock/definition/crm/accountToken.yml index a47b83c3..502ad970 100644 --- a/.mock/definition/crm/accountToken.yml +++ b/.mock/definition/crm/accountToken.yml @@ -7,7 +7,8 @@ service: retrieve: path: /crm/v1/account-token/{public_token} method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns the account token for the end user with the provided public token. diff --git a/.mock/definition/crm/accounts.yml b/.mock/definition/crm/accounts.yml index 2e936825..4c1d6b27 100644 --- a/.mock/definition/crm/accounts.yml +++ b/.mock/definition/crm/accounts.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Account` objects. source: openapi: openapi/openapi.yml @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: owner + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + owner_id: owner_id + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -132,7 +146,8 @@ service: create: path: /crm/v1/accounts method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Account` object with the given values. source: openapi: openapi/openapi.yml @@ -156,7 +171,10 @@ service: type: root.CrmAccountResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -226,7 +244,8 @@ service: retrieve: path: /crm/v1/accounts/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Account` object with the given `id`. source: openapi: openapi/openapi.yml @@ -262,6 +281,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: owner + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -311,7 +335,8 @@ service: partialUpdate: path: /crm/v1/accounts/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates an `Account` object with the given `id`. source: openapi: openapi/openapi.yml @@ -339,6 +364,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -409,7 +437,8 @@ service: metaPatchRetrieve: path: /crm/v1/accounts/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `CRMAccount` PATCHs. source: openapi: openapi/openapi.yml @@ -598,7 +627,8 @@ service: metaPostRetrieve: path: /crm/v1/accounts/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `CRMAccount` POSTs. source: openapi: openapi/openapi.yml @@ -783,7 +813,8 @@ service: remoteFieldClassesList: path: /crm/v1/accounts/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -836,6 +867,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/associationTypes.yml b/.mock/definition/crm/associationTypes.yml index 44da88c3..d10ec92b 100644 --- a/.mock/definition/crm/associationTypes.yml +++ b/.mock/definition/crm/associationTypes.yml @@ -7,7 +7,8 @@ service: custom_object_classes_association_types_list: path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `AssociationType` objects. source: openapi: openapi/openapi.yml @@ -74,7 +75,17 @@ service: - path-parameters: custom_object_class_id: custom_object_class_id query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: target_object_classes + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -99,7 +110,8 @@ service: custom_object_classes_association_types_create: path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `AssociationType` object with the given values. source: openapi: openapi/openapi.yml @@ -127,6 +139,9 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -179,7 +194,8 @@ service: path: >- /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `AssociationType` object with the given `id`. source: openapi: openapi/openapi.yml @@ -212,6 +228,10 @@ service: - path-parameters: custom_object_class_id: custom_object_class_id id: id + query-parameters: + expand: target_object_classes + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -236,7 +256,8 @@ service: path: >- /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `CRMAssociationType` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/associations.yml b/.mock/definition/crm/associations.yml index 983b55fe..65ff619c 100644 --- a/.mock/definition/crm/associations.yml +++ b/.mock/definition/crm/associations.yml @@ -8,7 +8,8 @@ service: path: >- /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Association` objects. source: openapi: openapi/openapi.yml @@ -82,7 +83,18 @@ service: custom_object_class_id: custom_object_class_id object_id: object_id query-parameters: + association_type_id: association_type_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: association_type + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -99,18 +111,19 @@ service: path: >- /crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id} method: PUT - auth: true + auth: + - tokenAuth: [] docs: >- Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. source: openapi: openapi/openapi.yml path-parameters: - association_type_id: string source_class_id: string source_object_id: string target_class_id: string target_object_id: string + association_type_id: string request: name: CustomObjectClassesCustomObjectsAssociationsUpdateRequest query-parameters: @@ -128,11 +141,14 @@ service: status-code: 200 examples: - path-parameters: - association_type_id: association_type_id source_class_id: source_class_id source_object_id: source_object_id target_class_id: target_class_id target_object_id: target_object_id + association_type_id: association_type_id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/asyncPassthrough.yml b/.mock/definition/crm/asyncPassthrough.yml index 2fc106c9..1f1698d8 100644 --- a/.mock/definition/crm/asyncPassthrough.yml +++ b/.mock/definition/crm/asyncPassthrough.yml @@ -7,7 +7,8 @@ service: create: path: /crm/v1/async-passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Asynchronously pull data from an endpoint not currently supported by Merge. @@ -32,7 +33,8 @@ service: retrieve: path: /crm/v1/async-passthrough/{async_passthrough_receipt_id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Retrieves data from earlier async-passthrough POST request source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/auditTrail.yml b/.mock/definition/crm/auditTrail.yml index be883e26..66ae0d31 100644 --- a/.mock/definition/crm/auditTrail.yml +++ b/.mock/definition/crm/auditTrail.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/audit-trail method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets a list of audit trail events. source: openapi: openapi/openapi.yml @@ -77,6 +78,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/crm/availableActions.yml b/.mock/definition/crm/availableActions.yml index 71b5d890..47b05a6b 100644 --- a/.mock/definition/crm/availableActions.yml +++ b/.mock/definition/crm/availableActions.yml @@ -7,7 +7,8 @@ service: retrieve: path: /crm/v1/available-actions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of models and actions available for an account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/contacts.yml b/.mock/definition/crm/contacts.yml index 3fbcf9cd..dbeb1b5f 100644 --- a/.mock/definition/crm/contacts.yml +++ b/.mock/definition/crm/contacts.yml @@ -24,7 +24,8 @@ service: list: path: /crm/v1/contacts method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Contact` objects. source: openapi: openapi/openapi.yml @@ -105,7 +106,21 @@ service: status-code: 200 examples: - query-parameters: + account_id: account_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email_addresses: email_addresses + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + phone_numbers: phone_numbers + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -158,7 +173,8 @@ service: create: path: /crm/v1/contacts method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Contact` object with the given values. source: openapi: openapi/openapi.yml @@ -182,7 +198,10 @@ service: type: root.CrmContactResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -254,7 +273,8 @@ service: retrieve: path: /crm/v1/contacts/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Contact` object with the given `id`. source: openapi: openapi/openapi.yml @@ -290,6 +310,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -341,7 +366,8 @@ service: partialUpdate: path: /crm/v1/contacts/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates a `Contact` object with the given `id`. source: openapi: openapi/openapi.yml @@ -369,6 +395,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -441,7 +470,8 @@ service: ignoreCreate: path: /crm/v1/contacts/ignore/{model_id} method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in @@ -464,7 +494,8 @@ service: metaPatchRetrieve: path: /crm/v1/contacts/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `CRMContact` PATCHs. source: openapi: openapi/openapi.yml @@ -653,7 +684,8 @@ service: metaPostRetrieve: path: /crm/v1/contacts/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `CRMContact` POSTs. source: openapi: openapi/openapi.yml @@ -838,7 +870,8 @@ service: remoteFieldClassesList: path: /crm/v1/contacts/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -891,6 +924,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/customObjectClasses.yml b/.mock/definition/crm/customObjectClasses.yml index 87b54cad..145bc579 100644 --- a/.mock/definition/crm/customObjectClasses.yml +++ b/.mock/definition/crm/customObjectClasses.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/custom-object-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `CustomObjectClass` objects. source: openapi: openapi/openapi.yml @@ -70,7 +71,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: fields + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -96,6 +107,10 @@ service: field_format: string field_choices: - {} + item_schema: + item_type: null + item_format: null + item_choices: null - display_name: Order Quantity remote_key_name: order_quantity description: The number of items ordered. @@ -104,6 +119,10 @@ service: field_format: number field_choices: - {} + item_schema: + item_type: null + item_format: null + item_choices: null - display_name: Customer Type remote_key_name: customer_type description: The type of customer. @@ -118,7 +137,8 @@ service: retrieve: path: /crm/v1/custom-object-classes/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `CustomObjectClass` object with the given `id`. source: openapi: openapi/openapi.yml @@ -149,6 +169,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: fields + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -173,6 +197,10 @@ service: field_format: string field_choices: - {} + item_schema: + item_type: null + item_format: null + item_choices: null - created_at: '2024-01-15T09:30:00Z' modified_at: '2024-01-15T09:30:00Z' display_name: Order Quantity @@ -183,6 +211,10 @@ service: field_format: number field_choices: - {} + item_schema: + item_type: null + item_format: null + item_choices: null - created_at: '2024-01-15T09:30:00Z' modified_at: '2024-01-15T09:30:00Z' display_name: Customer Type diff --git a/.mock/definition/crm/customObjects.yml b/.mock/definition/crm/customObjects.yml index 275d59c9..4a3dac8c 100644 --- a/.mock/definition/crm/customObjects.yml +++ b/.mock/definition/crm/customObjects.yml @@ -7,7 +7,8 @@ service: custom_object_classes_custom_objects_list: path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `CustomObject` objects. source: openapi: openapi/openapi.yml @@ -74,7 +75,17 @@ service: - path-parameters: custom_object_class_id: custom_object_class_id query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -96,7 +107,8 @@ service: custom_object_classes_custom_objects_create: path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `CustomObject` object with the given values. source: openapi: openapi/openapi.yml @@ -124,6 +136,9 @@ service: examples: - path-parameters: custom_object_class_id: custom_object_class_id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -168,7 +183,8 @@ service: path: >- /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `CustomObject` object with the given `id`. source: openapi: openapi/openapi.yml @@ -201,6 +217,10 @@ service: - path-parameters: custom_object_class_id: custom_object_class_id id: id + query-parameters: + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -222,7 +242,8 @@ service: path: >- /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `CRMCustomObject` POSTs. source: openapi: openapi/openapi.yml @@ -411,7 +432,8 @@ service: custom_object_classes_custom_objects_remote_field_classes_list: path: /crm/v1/custom-object-classes/custom-objects/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -464,6 +486,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/deleteAccount.yml b/.mock/definition/crm/deleteAccount.yml index 9a343bd8..21ae6d44 100644 --- a/.mock/definition/crm/deleteAccount.yml +++ b/.mock/definition/crm/deleteAccount.yml @@ -5,7 +5,8 @@ service: delete: path: /crm/v1/delete-account method: POST - auth: true + auth: + - tokenAuth: [] docs: Delete a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/engagementTypes.yml b/.mock/definition/crm/engagementTypes.yml index 025fe8e8..23a484a9 100644 --- a/.mock/definition/crm/engagementTypes.yml +++ b/.mock/definition/crm/engagementTypes.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/engagement-types method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `EngagementType` objects. source: openapi: openapi/openapi.yml @@ -70,7 +71,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -89,7 +100,8 @@ service: retrieve: path: /crm/v1/engagement-types/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `EngagementType` object with the given `id`. source: openapi: openapi/openapi.yml @@ -120,6 +132,10 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -137,7 +153,8 @@ service: remoteFieldClassesList: path: /crm/v1/engagement-types/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -190,6 +207,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/engagements.yml b/.mock/definition/crm/engagements.yml index 0812685b..384459c5 100644 --- a/.mock/definition/crm/engagements.yml +++ b/.mock/definition/crm/engagements.yml @@ -68,7 +68,8 @@ service: list: path: /crm/v1/engagements method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Engagement` objects. source: openapi: openapi/openapi.yml @@ -146,7 +147,20 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + started_after: '2024-01-15T09:30:00Z' + started_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -183,7 +197,8 @@ service: create: path: /crm/v1/engagements method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Engagement` object with the given values. source: openapi: openapi/openapi.yml @@ -207,7 +222,10 @@ service: type: root.EngagementResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -263,7 +281,8 @@ service: retrieve: path: /crm/v1/engagements/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Engagement` object with the given `id`. source: openapi: openapi/openapi.yml @@ -299,6 +318,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -334,7 +358,8 @@ service: partialUpdate: path: /crm/v1/engagements/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates an `Engagement` object with the given `id`. source: openapi: openapi/openapi.yml @@ -362,6 +387,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -418,7 +446,8 @@ service: metaPatchRetrieve: path: /crm/v1/engagements/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Engagement` PATCHs. source: openapi: openapi/openapi.yml @@ -607,7 +636,8 @@ service: metaPostRetrieve: path: /crm/v1/engagements/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Engagement` POSTs. source: openapi: openapi/openapi.yml @@ -792,7 +822,8 @@ service: remoteFieldClassesList: path: /crm/v1/engagements/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -845,6 +876,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/fieldMapping.yml b/.mock/definition/crm/fieldMapping.yml index 81c29c9c..ed9ccb2f 100644 --- a/.mock/definition/crm/fieldMapping.yml +++ b/.mock/definition/crm/fieldMapping.yml @@ -7,7 +7,8 @@ service: field_mappings_retrieve: path: /crm/v1/field-mappings method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge @@ -30,7 +31,9 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token response: body: @@ -181,7 +184,8 @@ service: field_mappings_create: path: /crm/v1/field-mappings method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to @@ -246,7 +250,9 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name @@ -297,7 +303,8 @@ service: field_mappings_destroy: path: /crm/v1/field-mappings/{field_mapping_id} method: DELETE - auth: true + auth: + - tokenAuth: [] docs: >- Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after @@ -357,7 +364,8 @@ service: field_mappings_partial_update: path: /crm/v1/field-mappings/{field_mapping_id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: >- Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the @@ -441,7 +449,8 @@ service: remote_fields_retrieve: path: /crm/v1/remote-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data @@ -469,7 +478,10 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: X-Account-Token: X-Account-Token response: body: @@ -602,7 +614,8 @@ service: target_fields_retrieve: path: /crm/v1/target-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields diff --git a/.mock/definition/crm/forceResync.yml b/.mock/definition/crm/forceResync.yml index 32a995cb..a3e43359 100644 --- a/.mock/definition/crm/forceResync.yml +++ b/.mock/definition/crm/forceResync.yml @@ -7,7 +7,8 @@ service: sync_status_resync_create: path: /crm/v1/sync-status/resync method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or diff --git a/.mock/definition/crm/generateKey.yml b/.mock/definition/crm/generateKey.yml index c913f239..6102dccd 100644 --- a/.mock/definition/crm/generateKey.yml +++ b/.mock/definition/crm/generateKey.yml @@ -7,7 +7,8 @@ service: create: path: /crm/v1/generate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Create a remote key. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/issues.yml b/.mock/definition/crm/issues.yml index 85deddd4..8bd83561 100644 --- a/.mock/definition/crm/issues.yml +++ b/.mock/definition/crm/issues.yml @@ -14,7 +14,8 @@ service: list: path: /crm/v1/issues method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets all issues for Organization. source: openapi: openapi/openapi.yml @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + account_token: account_token cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING headers: X-Account-Token: '[object Object]' response: @@ -103,7 +117,8 @@ service: retrieve: path: /crm/v1/issues/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Get a specific issue. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/leads.yml b/.mock/definition/crm/leads.yml index f6cc37af..871da7f7 100644 --- a/.mock/definition/crm/leads.yml +++ b/.mock/definition/crm/leads.yml @@ -38,7 +38,8 @@ service: list: path: /crm/v1/leads method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Lead` objects. source: openapi: openapi/openapi.yml @@ -125,7 +126,23 @@ service: status-code: 200 examples: - query-parameters: + converted_account_id: converted_account_id + converted_contact_id: converted_contact_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email_addresses: email_addresses + expand: converted_account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + owner_id: owner_id + page_size: 1 + phone_numbers: phone_numbers + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -183,7 +200,8 @@ service: create: path: /crm/v1/leads method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Lead` object with the given values. source: openapi: openapi/openapi.yml @@ -207,7 +225,10 @@ service: type: root.LeadResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -284,7 +305,8 @@ service: retrieve: path: /crm/v1/leads/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Lead` object with the given `id`. source: openapi: openapi/openapi.yml @@ -320,6 +342,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: converted_account + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -376,7 +403,8 @@ service: metaPostRetrieve: path: /crm/v1/leads/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Lead` POSTs. source: openapi: openapi/openapi.yml @@ -561,7 +589,8 @@ service: remoteFieldClassesList: path: /crm/v1/leads/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -614,6 +643,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/linkToken.yml b/.mock/definition/crm/linkToken.yml index d01d1d24..814bf71f 100644 --- a/.mock/definition/crm/linkToken.yml +++ b/.mock/definition/crm/linkToken.yml @@ -24,7 +24,8 @@ service: create: path: /crm/v1/link-token method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a link token to be used when linking a new end user. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/linkedAccounts.yml b/.mock/definition/crm/linkedAccounts.yml index d2bf12d2..ecfef7c0 100644 --- a/.mock/definition/crm/linkedAccounts.yml +++ b/.mock/definition/crm/linkedAccounts.yml @@ -19,7 +19,8 @@ service: list: path: /crm/v1/linked-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: List linked accounts for your organization. source: openapi: openapi/openapi.yml @@ -108,7 +109,19 @@ service: status-code: 200 examples: - query-parameters: + category: accounting cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/crm/notes.yml b/.mock/definition/crm/notes.yml index ac7d94d1..f655ff38 100644 --- a/.mock/definition/crm/notes.yml +++ b/.mock/definition/crm/notes.yml @@ -68,7 +68,8 @@ service: list: path: /crm/v1/notes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Note` objects. source: openapi: openapi/openapi.yml @@ -148,7 +149,22 @@ service: status-code: 200 examples: - query-parameters: + account_id: account_id + contact_id: contact_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + opportunity_id: opportunity_id + owner_id: owner_id + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -182,7 +198,8 @@ service: create: path: /crm/v1/notes method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Note` object with the given values. source: openapi: openapi/openapi.yml @@ -206,7 +223,10 @@ service: type: root.NoteResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -259,7 +279,8 @@ service: retrieve: path: /crm/v1/notes/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Note` object with the given `id`. source: openapi: openapi/openapi.yml @@ -295,6 +316,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -327,7 +353,8 @@ service: metaPostRetrieve: path: /crm/v1/notes/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Note` POSTs. source: openapi: openapi/openapi.yml @@ -512,7 +539,8 @@ service: remoteFieldClassesList: path: /crm/v1/notes/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -565,6 +593,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/opportunities.yml b/.mock/definition/crm/opportunities.yml index 3aaaa4d0..7485a78e 100644 --- a/.mock/definition/crm/opportunities.yml +++ b/.mock/definition/crm/opportunities.yml @@ -45,7 +45,8 @@ service: list: path: /crm/v1/opportunities method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Opportunity` objects. source: openapi: openapi/openapi.yml @@ -149,7 +150,25 @@ service: status-code: 200 examples: - query-parameters: + account_id: account_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + owner_id: owner_id + page_size: 1 + remote_created_after: '2024-01-15T09:30:00Z' + remote_fields: status + remote_id: remote_id + show_enum_origins: status + stage_id: stage_id + status: LOST headers: X-Account-Token: X-Account-Token response: @@ -186,7 +205,8 @@ service: create: path: /crm/v1/opportunities method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Opportunity` object with the given values. source: openapi: openapi/openapi.yml @@ -210,7 +230,10 @@ service: type: root.OpportunityResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -266,7 +289,8 @@ service: retrieve: path: /crm/v1/opportunities/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Opportunity` object with the given `id`. source: openapi: openapi/openapi.yml @@ -312,6 +336,13 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true + remote_fields: status + show_enum_origins: status headers: X-Account-Token: X-Account-Token response: @@ -347,7 +378,8 @@ service: partialUpdate: path: /crm/v1/opportunities/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates an `Opportunity` object with the given `id`. source: openapi: openapi/openapi.yml @@ -375,6 +407,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -431,7 +466,8 @@ service: metaPatchRetrieve: path: /crm/v1/opportunities/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Opportunity` PATCHs. source: openapi: openapi/openapi.yml @@ -620,7 +656,8 @@ service: metaPostRetrieve: path: /crm/v1/opportunities/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Opportunity` POSTs. source: openapi: openapi/openapi.yml @@ -805,7 +842,8 @@ service: remoteFieldClassesList: path: /crm/v1/opportunities/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -858,6 +896,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/passthrough.yml b/.mock/definition/crm/passthrough.yml index a0a04015..147b406c 100644 --- a/.mock/definition/crm/passthrough.yml +++ b/.mock/definition/crm/passthrough.yml @@ -7,7 +7,8 @@ service: create: path: /crm/v1/passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: Pull data from an endpoint not currently supported by Merge. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/regenerateKey.yml b/.mock/definition/crm/regenerateKey.yml index d807b273..ff185eb4 100644 --- a/.mock/definition/crm/regenerateKey.yml +++ b/.mock/definition/crm/regenerateKey.yml @@ -7,7 +7,8 @@ service: create: path: /crm/v1/regenerate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Exchange remote keys. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/scopes.yml b/.mock/definition/crm/scopes.yml index 7069f300..212f7889 100644 --- a/.mock/definition/crm/scopes.yml +++ b/.mock/definition/crm/scopes.yml @@ -7,7 +7,8 @@ service: default_scopes_retrieve: path: /crm/v1/default-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn @@ -50,7 +51,8 @@ service: linked_account_scopes_retrieve: path: /crm/v1/linked-account-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn @@ -93,7 +95,8 @@ service: linked_account_scopes_create: path: /crm/v1/linked-account-scopes method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the diff --git a/.mock/definition/crm/stages.yml b/.mock/definition/crm/stages.yml index 126f73c6..4d871422 100644 --- a/.mock/definition/crm/stages.yml +++ b/.mock/definition/crm/stages.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/stages method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Stage` objects. source: openapi: openapi/openapi.yml @@ -70,7 +71,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -98,7 +109,8 @@ service: retrieve: path: /crm/v1/stages/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Stage` object with the given `id`. source: openapi: openapi/openapi.yml @@ -129,6 +141,10 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -155,7 +171,8 @@ service: remoteFieldClassesList: path: /crm/v1/stages/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -208,6 +225,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/syncStatus.yml b/.mock/definition/crm/syncStatus.yml index 8e3a610c..8e6349e1 100644 --- a/.mock/definition/crm/syncStatus.yml +++ b/.mock/definition/crm/syncStatus.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/sync-status method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. @@ -38,6 +39,7 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/tasks.yml b/.mock/definition/crm/tasks.yml index e5b9f3b8..f7df5e71 100644 --- a/.mock/definition/crm/tasks.yml +++ b/.mock/definition/crm/tasks.yml @@ -38,7 +38,8 @@ service: list: path: /crm/v1/tasks method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Task` objects. source: openapi: openapi/openapi.yml @@ -106,7 +107,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -141,7 +153,8 @@ service: create: path: /crm/v1/tasks method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Task` object with the given values. source: openapi: openapi/openapi.yml @@ -165,7 +178,10 @@ service: type: root.TaskResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -219,7 +235,8 @@ service: retrieve: path: /crm/v1/tasks/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Task` object with the given `id`. source: openapi: openapi/openapi.yml @@ -255,6 +272,11 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -288,7 +310,8 @@ service: partialUpdate: path: /crm/v1/tasks/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates a `Task` object with the given `id`. source: openapi: openapi/openapi.yml @@ -316,6 +339,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -370,7 +396,8 @@ service: metaPatchRetrieve: path: /crm/v1/tasks/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Task` PATCHs. source: openapi: openapi/openapi.yml @@ -559,7 +586,8 @@ service: metaPostRetrieve: path: /crm/v1/tasks/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Task` POSTs. source: openapi: openapi/openapi.yml @@ -744,7 +772,8 @@ service: remoteFieldClassesList: path: /crm/v1/tasks/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -797,6 +826,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/users.yml b/.mock/definition/crm/users.yml index ba9863c8..97b21b6e 100644 --- a/.mock/definition/crm/users.yml +++ b/.mock/definition/crm/users.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/users method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `User` objects. source: openapi: openapi/openapi.yml @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email: email + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -103,7 +115,8 @@ service: retrieve: path: /crm/v1/users/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `User` object with the given `id`. source: openapi: openapi/openapi.yml @@ -134,6 +147,10 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_remote_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -162,7 +179,8 @@ service: ignoreCreate: path: /crm/v1/users/ignore/{model_id} method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in @@ -185,7 +203,8 @@ service: remoteFieldClassesList: path: /crm/v1/users/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -238,6 +257,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/crm/webhookReceivers.yml b/.mock/definition/crm/webhookReceivers.yml index e01c1645..38b51e05 100644 --- a/.mock/definition/crm/webhookReceivers.yml +++ b/.mock/definition/crm/webhookReceivers.yml @@ -7,7 +7,8 @@ service: list: path: /crm/v1/webhook-receivers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `WebhookReceiver` objects. source: openapi: openapi/openapi.yml @@ -26,7 +27,8 @@ service: create: path: /crm/v1/webhook-receivers method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `WebhookReceiver` object with the given values. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/accountDetails.yml b/.mock/definition/filestorage/accountDetails.yml index 944a422b..8ea27e0c 100644 --- a/.mock/definition/filestorage/accountDetails.yml +++ b/.mock/definition/filestorage/accountDetails.yml @@ -7,7 +7,8 @@ service: retrieve: path: /filestorage/v1/account-details method: GET - auth: true + auth: + - tokenAuth: [] docs: Get details for a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/accountToken.yml b/.mock/definition/filestorage/accountToken.yml index e5400279..83bf005a 100644 --- a/.mock/definition/filestorage/accountToken.yml +++ b/.mock/definition/filestorage/accountToken.yml @@ -7,7 +7,8 @@ service: retrieve: path: /filestorage/v1/account-token/{public_token} method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns the account token for the end user with the provided public token. diff --git a/.mock/definition/filestorage/asyncPassthrough.yml b/.mock/definition/filestorage/asyncPassthrough.yml index 1408e056..7a336038 100644 --- a/.mock/definition/filestorage/asyncPassthrough.yml +++ b/.mock/definition/filestorage/asyncPassthrough.yml @@ -7,7 +7,8 @@ service: create: path: /filestorage/v1/async-passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Asynchronously pull data from an endpoint not currently supported by Merge. @@ -32,7 +33,8 @@ service: retrieve: path: /filestorage/v1/async-passthrough/{async_passthrough_receipt_id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Retrieves data from earlier async-passthrough POST request source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/auditTrail.yml b/.mock/definition/filestorage/auditTrail.yml index c9fb17ce..6b4801b7 100644 --- a/.mock/definition/filestorage/auditTrail.yml +++ b/.mock/definition/filestorage/auditTrail.yml @@ -7,7 +7,8 @@ service: list: path: /filestorage/v1/audit-trail method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets a list of audit trail events. source: openapi: openapi/openapi.yml @@ -77,6 +78,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/filestorage/availableActions.yml b/.mock/definition/filestorage/availableActions.yml index b60bd0c8..e6be99ad 100644 --- a/.mock/definition/filestorage/availableActions.yml +++ b/.mock/definition/filestorage/availableActions.yml @@ -7,7 +7,8 @@ service: retrieve: path: /filestorage/v1/available-actions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of models and actions available for an account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/deleteAccount.yml b/.mock/definition/filestorage/deleteAccount.yml index cb9280c2..eb9eeb78 100644 --- a/.mock/definition/filestorage/deleteAccount.yml +++ b/.mock/definition/filestorage/deleteAccount.yml @@ -5,7 +5,8 @@ service: delete: path: /filestorage/v1/delete-account method: POST - auth: true + auth: + - tokenAuth: [] docs: Delete a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/drives.yml b/.mock/definition/filestorage/drives.yml index 8053831f..3c8f5209 100644 --- a/.mock/definition/filestorage/drives.yml +++ b/.mock/definition/filestorage/drives.yml @@ -7,7 +7,8 @@ service: list: path: /filestorage/v1/drives method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Drive` objects. source: openapi: openapi/openapi.yml @@ -70,7 +71,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -98,7 +109,8 @@ service: retrieve: path: /filestorage/v1/drives/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Drive` object with the given `id`. source: openapi: openapi/openapi.yml @@ -124,6 +136,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/filestorage/fieldMapping.yml b/.mock/definition/filestorage/fieldMapping.yml index 73378990..68f88d84 100644 --- a/.mock/definition/filestorage/fieldMapping.yml +++ b/.mock/definition/filestorage/fieldMapping.yml @@ -7,7 +7,8 @@ service: field_mappings_retrieve: path: /filestorage/v1/field-mappings method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge @@ -30,7 +31,9 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token response: body: @@ -117,7 +120,8 @@ service: field_mappings_create: path: /filestorage/v1/field-mappings method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to @@ -182,7 +186,9 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name @@ -233,7 +239,8 @@ service: field_mappings_destroy: path: /filestorage/v1/field-mappings/{field_mapping_id} method: DELETE - auth: true + auth: + - tokenAuth: [] docs: >- Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after @@ -293,7 +300,8 @@ service: field_mappings_partial_update: path: /filestorage/v1/field-mappings/{field_mapping_id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: >- Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the @@ -377,7 +385,8 @@ service: remote_fields_retrieve: path: /filestorage/v1/remote-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data @@ -405,7 +414,10 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: X-Account-Token: X-Account-Token response: body: @@ -482,7 +494,8 @@ service: target_fields_retrieve: path: /filestorage/v1/target-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields diff --git a/.mock/definition/filestorage/files.yml b/.mock/definition/filestorage/files.yml index 90bb68bd..c8289181 100644 --- a/.mock/definition/filestorage/files.yml +++ b/.mock/definition/filestorage/files.yml @@ -62,7 +62,8 @@ service: list: path: /filestorage/v1/files method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `File` objects. source: openapi: openapi/openapi.yml @@ -161,7 +162,24 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + drive_id: drive_id + expand: drive + folder_id: folder_id + include_deleted_data: true + include_remote_data: true + include_shell_data: true + mime_type: mime_type + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + order_by: '-created_at' + page_size: 1 + remote_created_after: '2024-01-15T09:30:00Z' + remote_created_before: '2024-01-15T09:30:00Z' + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -204,7 +222,8 @@ service: create: path: /filestorage/v1/files method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `File` object with the given values. source: openapi: openapi/openapi.yml @@ -228,7 +247,10 @@ service: type: root.FileStorageFileResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -290,7 +312,8 @@ service: retrieve: path: /filestorage/v1/files/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `File` object with the given `id`. source: openapi: openapi/openapi.yml @@ -321,6 +344,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: drive + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -360,7 +387,8 @@ service: downloadRetrieve: path: /filestorage/v1/files/{id}/download method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns the `File` content with the given `id` as a stream of bytes. source: openapi: openapi/openapi.yml @@ -389,7 +417,8 @@ service: downloadRequestMetaRetrieve: path: /filestorage/v1/files/{id}/download/request-meta method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the @@ -416,6 +445,8 @@ service: examples: - path-parameters: id: id + query-parameters: + mime_type: mime_type headers: X-Account-Token: X-Account-Token response: @@ -428,7 +459,8 @@ service: downloadRequestMetaList: path: /filestorage/v1/files/download/request-meta method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party. @@ -496,7 +528,15 @@ service: status-code: 200 examples: - query-parameters: + created_after: created_after + created_before: created_before cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + mime_types: mime_types + modified_after: modified_after + modified_before: modified_before + order_by: '-created_at' + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -512,7 +552,8 @@ service: metaPostRetrieve: path: /filestorage/v1/files/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `FileStorageFile` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/folders.yml b/.mock/definition/filestorage/folders.yml index 5ad69d06..6fadb73f 100644 --- a/.mock/definition/filestorage/folders.yml +++ b/.mock/definition/filestorage/folders.yml @@ -38,7 +38,8 @@ service: list: path: /filestorage/v1/folders method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Folder` objects. source: openapi: openapi/openapi.yml @@ -114,7 +115,20 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + drive_id: drive_id + expand: drive + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + parent_folder_id: parent_folder_id + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -148,7 +162,8 @@ service: create: path: /filestorage/v1/folders method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Folder` object with the given values. source: openapi: openapi/openapi.yml @@ -172,7 +187,10 @@ service: type: root.FileStorageFolderResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -225,7 +243,8 @@ service: retrieve: path: /filestorage/v1/folders/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Folder` object with the given `id`. source: openapi: openapi/openapi.yml @@ -256,6 +275,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: drive + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -286,7 +309,8 @@ service: metaPostRetrieve: path: /filestorage/v1/folders/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `FileStorageFolder` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/forceResync.yml b/.mock/definition/filestorage/forceResync.yml index 6dc20ca9..6a46c7b9 100644 --- a/.mock/definition/filestorage/forceResync.yml +++ b/.mock/definition/filestorage/forceResync.yml @@ -7,7 +7,8 @@ service: sync_status_resync_create: path: /filestorage/v1/sync-status/resync method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or diff --git a/.mock/definition/filestorage/generateKey.yml b/.mock/definition/filestorage/generateKey.yml index 06b1c8d7..c2a08d9b 100644 --- a/.mock/definition/filestorage/generateKey.yml +++ b/.mock/definition/filestorage/generateKey.yml @@ -7,7 +7,8 @@ service: create: path: /filestorage/v1/generate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Create a remote key. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/groups.yml b/.mock/definition/filestorage/groups.yml index 75e3efbd..e50af5bb 100644 --- a/.mock/definition/filestorage/groups.yml +++ b/.mock/definition/filestorage/groups.yml @@ -7,7 +7,8 @@ service: list: path: /filestorage/v1/groups method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Group` objects. source: openapi: openapi/openapi.yml @@ -70,7 +71,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: child_groups + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -100,7 +111,8 @@ service: retrieve: path: /filestorage/v1/groups/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Group` object with the given `id`. source: openapi: openapi/openapi.yml @@ -131,6 +143,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: child_groups + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/filestorage/issues.yml b/.mock/definition/filestorage/issues.yml index 19a40bd9..1c1129eb 100644 --- a/.mock/definition/filestorage/issues.yml +++ b/.mock/definition/filestorage/issues.yml @@ -14,7 +14,8 @@ service: list: path: /filestorage/v1/issues method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets all issues for Organization. source: openapi: openapi/openapi.yml @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + account_token: account_token cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING headers: X-Account-Token: '[object Object]' response: @@ -103,7 +117,8 @@ service: retrieve: path: /filestorage/v1/issues/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Get a specific issue. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/linkToken.yml b/.mock/definition/filestorage/linkToken.yml index 96af04e8..545dde39 100644 --- a/.mock/definition/filestorage/linkToken.yml +++ b/.mock/definition/filestorage/linkToken.yml @@ -7,7 +7,8 @@ service: create: path: /filestorage/v1/link-token method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a link token to be used when linking a new end user. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/linkedAccounts.yml b/.mock/definition/filestorage/linkedAccounts.yml index 3c656510..a8c4c6ee 100644 --- a/.mock/definition/filestorage/linkedAccounts.yml +++ b/.mock/definition/filestorage/linkedAccounts.yml @@ -19,7 +19,8 @@ service: list: path: /filestorage/v1/linked-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: List linked accounts for your organization. source: openapi: openapi/openapi.yml @@ -108,7 +109,19 @@ service: status-code: 200 examples: - query-parameters: + category: accounting cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/filestorage/passthrough.yml b/.mock/definition/filestorage/passthrough.yml index 71b42437..dc993de1 100644 --- a/.mock/definition/filestorage/passthrough.yml +++ b/.mock/definition/filestorage/passthrough.yml @@ -7,7 +7,8 @@ service: create: path: /filestorage/v1/passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: Pull data from an endpoint not currently supported by Merge. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/regenerateKey.yml b/.mock/definition/filestorage/regenerateKey.yml index b251851a..ea98ac99 100644 --- a/.mock/definition/filestorage/regenerateKey.yml +++ b/.mock/definition/filestorage/regenerateKey.yml @@ -7,7 +7,8 @@ service: create: path: /filestorage/v1/regenerate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Exchange remote keys. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/scopes.yml b/.mock/definition/filestorage/scopes.yml index b6b40f3e..3c5b4483 100644 --- a/.mock/definition/filestorage/scopes.yml +++ b/.mock/definition/filestorage/scopes.yml @@ -7,7 +7,8 @@ service: default_scopes_retrieve: path: /filestorage/v1/default-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn @@ -50,7 +51,8 @@ service: linked_account_scopes_retrieve: path: /filestorage/v1/linked-account-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn @@ -93,7 +95,8 @@ service: linked_account_scopes_create: path: /filestorage/v1/linked-account-scopes method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the diff --git a/.mock/definition/filestorage/syncStatus.yml b/.mock/definition/filestorage/syncStatus.yml index a35bc7c6..636862fc 100644 --- a/.mock/definition/filestorage/syncStatus.yml +++ b/.mock/definition/filestorage/syncStatus.yml @@ -7,7 +7,8 @@ service: list: path: /filestorage/v1/sync-status method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. @@ -38,6 +39,7 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/filestorage/users.yml b/.mock/definition/filestorage/users.yml index 38b7714c..907ac0c2 100644 --- a/.mock/definition/filestorage/users.yml +++ b/.mock/definition/filestorage/users.yml @@ -7,7 +7,8 @@ service: list: path: /filestorage/v1/users method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `User` objects. source: openapi: openapi/openapi.yml @@ -68,7 +69,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_me: is_me + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -96,7 +107,8 @@ service: retrieve: path: /filestorage/v1/users/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `User` object with the given `id`. source: openapi: openapi/openapi.yml @@ -122,6 +134,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/filestorage/webhookReceivers.yml b/.mock/definition/filestorage/webhookReceivers.yml index 6b965003..3173552d 100644 --- a/.mock/definition/filestorage/webhookReceivers.yml +++ b/.mock/definition/filestorage/webhookReceivers.yml @@ -7,7 +7,8 @@ service: list: path: /filestorage/v1/webhook-receivers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `WebhookReceiver` objects. source: openapi: openapi/openapi.yml @@ -26,7 +27,8 @@ service: create: path: /filestorage/v1/webhook-receivers method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `WebhookReceiver` object with the given values. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/__package__.yml b/.mock/definition/hris/__package__.yml index 2491e3f2..2b2ae989 100644 --- a/.mock/definition/hris/__package__.yml +++ b/.mock/definition/hris/__package__.yml @@ -64,6 +64,14 @@ types: source: openapi: openapi/openapi.yml inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: openapi/openapi.yml + inline: true AccountDetailsAndActions: docs: >- # The LinkedAccount Object @@ -80,7 +88,7 @@ types: properties: id: string category: optional - status: AccountDetailsAndActionsStatusEnum + status: AccountDetailsAndActionsStatus status_detail: optional end_user_origin_id: optional end_user_organization_name: string @@ -838,6 +846,9 @@ types: access: read-only source: openapi: openapi/openapi.yml + CompletedAccountInitialScreenEnum: + type: literal<"SELECTIVE_SYNC"> + docs: '* `SELECTIVE_SYNC` - SELECTIVE_SYNC' CountryEnum: enum: - AF @@ -4367,6 +4378,9 @@ types: remote_field: type: optional access: read-only + jmes_path: + type: optional + access: read-only source: openapi: openapi/openapi.yml FieldMappingApiInstanceResponse: diff --git a/.mock/definition/hris/accountDetails.yml b/.mock/definition/hris/accountDetails.yml index 140409e5..633c7600 100644 --- a/.mock/definition/hris/accountDetails.yml +++ b/.mock/definition/hris/accountDetails.yml @@ -7,7 +7,8 @@ service: retrieve: path: /hris/v1/account-details method: GET - auth: true + auth: + - tokenAuth: [] docs: Get details for a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/accountToken.yml b/.mock/definition/hris/accountToken.yml index 022851f2..ac90a13e 100644 --- a/.mock/definition/hris/accountToken.yml +++ b/.mock/definition/hris/accountToken.yml @@ -7,7 +7,8 @@ service: retrieve: path: /hris/v1/account-token/{public_token} method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns the account token for the end user with the provided public token. diff --git a/.mock/definition/hris/asyncPassthrough.yml b/.mock/definition/hris/asyncPassthrough.yml index 9cb0b941..faed6335 100644 --- a/.mock/definition/hris/asyncPassthrough.yml +++ b/.mock/definition/hris/asyncPassthrough.yml @@ -7,7 +7,8 @@ service: create: path: /hris/v1/async-passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Asynchronously pull data from an endpoint not currently supported by Merge. @@ -32,7 +33,8 @@ service: retrieve: path: /hris/v1/async-passthrough/{async_passthrough_receipt_id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Retrieves data from earlier async-passthrough POST request source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/auditTrail.yml b/.mock/definition/hris/auditTrail.yml index 684b7e5d..153cf6f4 100644 --- a/.mock/definition/hris/auditTrail.yml +++ b/.mock/definition/hris/auditTrail.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/audit-trail method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets a list of audit trail events. source: openapi: openapi/openapi.yml @@ -77,6 +78,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/hris/availableActions.yml b/.mock/definition/hris/availableActions.yml index e03e84f2..f486ef90 100644 --- a/.mock/definition/hris/availableActions.yml +++ b/.mock/definition/hris/availableActions.yml @@ -7,7 +7,8 @@ service: retrieve: path: /hris/v1/available-actions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of models and actions available for an account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/bankInfo.yml b/.mock/definition/hris/bankInfo.yml index 872097f9..c4dc4653 100644 --- a/.mock/definition/hris/bankInfo.yml +++ b/.mock/definition/hris/bankInfo.yml @@ -22,7 +22,8 @@ service: list: path: /hris/v1/bank-info method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `BankInfo` objects. source: openapi: openapi/openapi.yml @@ -96,7 +97,7 @@ service: include: remote_created_at, -remote_created_at. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_fields: type: optional> docs: Deprecated. Use show_enum_origins. @@ -116,7 +117,23 @@ service: status-code: 200 examples: - query-parameters: + account_type: CHECKING + bank_name: bank_name + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + expand: employee + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + order_by: '-remote_created_at' + page_size: 1 + remote_fields: account_type + remote_id: remote_id + show_enum_origins: account_type headers: X-Account-Token: X-Account-Token response: @@ -147,7 +164,8 @@ service: retrieve: path: /hris/v1/bank-info/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `BankInfo` object with the given `id`. source: openapi: openapi/openapi.yml @@ -188,6 +206,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: employee + include_remote_data: true + include_shell_data: true + remote_fields: account_type + show_enum_origins: account_type headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/benefits.yml b/.mock/definition/hris/benefits.yml index 2802723b..37cf5f21 100644 --- a/.mock/definition/hris/benefits.yml +++ b/.mock/definition/hris/benefits.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/benefits method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Benefit` objects. source: openapi: openapi/openapi.yml @@ -65,7 +66,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -75,7 +76,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + expand: employee + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -107,7 +119,8 @@ service: retrieve: path: /hris/v1/benefits/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Benefit` object with the given `id`. source: openapi: openapi/openapi.yml @@ -138,6 +151,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: employee + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/companies.yml b/.mock/definition/hris/companies.yml index cb3881df..952c18e7 100644 --- a/.mock/definition/hris/companies.yml +++ b/.mock/definition/hris/companies.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/companies method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Company` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -96,7 +106,8 @@ service: retrieve: path: /hris/v1/companies/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Company` object with the given `id`. source: openapi: openapi/openapi.yml @@ -122,6 +133,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/deleteAccount.yml b/.mock/definition/hris/deleteAccount.yml index fb59bf5f..7f8e7934 100644 --- a/.mock/definition/hris/deleteAccount.yml +++ b/.mock/definition/hris/deleteAccount.yml @@ -5,7 +5,8 @@ service: delete: path: /hris/v1/delete-account method: POST - auth: true + auth: + - tokenAuth: [] docs: Delete a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/dependents.yml b/.mock/definition/hris/dependents.yml index 75cac5b7..fd6bc666 100644 --- a/.mock/definition/hris/dependents.yml +++ b/.mock/definition/hris/dependents.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/dependents method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Dependent` objects. source: openapi: openapi/openapi.yml @@ -63,7 +64,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + include_deleted_data: true + include_remote_data: true + include_sensitive_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -109,7 +121,8 @@ service: retrieve: path: /hris/v1/dependents/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Dependent` object with the given `id`. source: openapi: openapi/openapi.yml @@ -140,6 +153,10 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_sensitive_fields: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/employeePayrollRuns.yml b/.mock/definition/hris/employeePayrollRuns.yml index f6f53b28..08989deb 100644 --- a/.mock/definition/hris/employeePayrollRuns.yml +++ b/.mock/definition/hris/employeePayrollRuns.yml @@ -24,7 +24,8 @@ service: list: path: /hris/v1/employee-payroll-runs method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `EmployeePayrollRun` objects. source: openapi: openapi/openapi.yml @@ -92,7 +93,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. payroll_run_id: type: optional docs: >- @@ -117,7 +118,23 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + ended_after: '2024-01-15T09:30:00Z' + ended_before: '2024-01-15T09:30:00Z' + expand: employee + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + payroll_run_id: payroll_run_id + remote_id: remote_id + started_after: '2024-01-15T09:30:00Z' + started_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -178,7 +195,8 @@ service: retrieve: path: /hris/v1/employee-payroll-runs/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `EmployeePayrollRun` object with the given `id`. source: openapi: openapi/openapi.yml @@ -209,6 +227,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: employee + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/employees.yml b/.mock/definition/hris/employees.yml index 04d39059..fff5dc2f 100644 --- a/.mock/definition/hris/employees.yml +++ b/.mock/definition/hris/employees.yml @@ -1159,7 +1159,8 @@ service: list: path: /hris/v1/employees method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Employee` objects. source: openapi: openapi/openapi.yml @@ -1202,7 +1203,7 @@ service: type: optional docs: >- If provided, will only return employees that have an employment of - the specified employment_type. + the specified employment type. expand: type: optional docs: >- @@ -1246,7 +1247,7 @@ service: type: optional docs: >- If provided, will only return employees that have an employment of - the specified job_title. + the specified job title. last_name: type: optional docs: If provided, will only return employees with this last name. @@ -1324,7 +1325,40 @@ service: status-code: 200 examples: - query-parameters: + company_id: company_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + display_full_name: display_full_name + employee_number: employee_number + employment_status: ACTIVE + employment_type: employment_type + expand: company + first_name: first_name + groups: groups + home_location_id: home_location_id + include_deleted_data: true + include_remote_data: true + include_sensitive_fields: true + include_shell_data: true + job_title: job_title + last_name: last_name + manager_id: manager_id + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + pay_group_id: pay_group_id + personal_email: personal_email + remote_fields: employment_status + remote_id: remote_id + show_enum_origins: employment_status + started_after: '2024-01-15T09:30:00Z' + started_before: '2024-01-15T09:30:00Z' + team_id: team_id + terminated_after: '2024-01-15T09:30:00Z' + terminated_before: '2024-01-15T09:30:00Z' + work_email: work_email + work_location_id: work_location_id headers: X-Account-Token: X-Account-Token response: @@ -1379,7 +1413,8 @@ service: create: path: /hris/v1/employees method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Employee` object with the given values. source: openapi: openapi/openapi.yml @@ -1403,7 +1438,10 @@ service: type: root.EmployeeResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -1477,7 +1515,8 @@ service: retrieve: path: /hris/v1/employees/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Employee` object with the given `id`. source: openapi: openapi/openapi.yml @@ -1523,6 +1562,13 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: company + include_remote_data: true + include_sensitive_fields: true + include_shell_data: true + remote_fields: employment_status + show_enum_origins: employment_status headers: X-Account-Token: X-Account-Token response: @@ -1574,7 +1620,8 @@ service: ignoreCreate: path: /hris/v1/employees/ignore/{model_id} method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in @@ -1605,7 +1652,8 @@ service: metaPostRetrieve: path: /hris/v1/employees/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Employee` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/employerBenefits.yml b/.mock/definition/hris/employerBenefits.yml index c8b0023c..5d9d4137 100644 --- a/.mock/definition/hris/employerBenefits.yml +++ b/.mock/definition/hris/employerBenefits.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/employer-benefits method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `EmployerBenefit` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -92,7 +102,8 @@ service: retrieve: path: /hris/v1/employer-benefits/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `EmployerBenefit` object with the given `id`. source: openapi: openapi/openapi.yml @@ -118,6 +129,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/employments.yml b/.mock/definition/hris/employments.yml index d653306f..4a4c9029 100644 --- a/.mock/definition/hris/employments.yml +++ b/.mock/definition/hris/employments.yml @@ -152,7 +152,8 @@ service: list: path: /hris/v1/employments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Employment` objects. source: openapi: openapi/openapi.yml @@ -213,7 +214,7 @@ service: include: effective_date, -effective_date. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_fields: type: optional docs: Deprecated. Use show_enum_origins. @@ -233,7 +234,21 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + expand: employee + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + order_by: '-effective_date' + page_size: 1 + remote_fields: employment_type + remote_id: remote_id + show_enum_origins: employment_type headers: X-Account-Token: X-Account-Token response: @@ -268,7 +283,8 @@ service: retrieve: path: /hris/v1/employments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Employment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -309,6 +325,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: employee + include_remote_data: true + include_shell_data: true + remote_fields: employment_type + show_enum_origins: employment_type headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/fieldMapping.yml b/.mock/definition/hris/fieldMapping.yml index 1a222f9f..715db56d 100644 --- a/.mock/definition/hris/fieldMapping.yml +++ b/.mock/definition/hris/fieldMapping.yml @@ -7,7 +7,8 @@ service: field_mappings_retrieve: path: /hris/v1/field-mappings method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge @@ -30,7 +31,9 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token response: body: @@ -50,6 +53,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' EmployerBenefit: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -66,6 +70,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Company: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -82,6 +87,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' EmployeePayrollRun: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -98,6 +104,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Employee: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -114,6 +121,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Employment: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -130,6 +138,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Location: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -146,6 +155,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' PayrollRun: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -162,6 +172,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Team: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -178,6 +189,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' TimeOff: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -194,6 +206,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' TimeOffBalance: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -210,6 +223,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' BankInfo: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -226,6 +240,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' PayGroup: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -242,6 +257,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Group: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -258,6 +274,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Dependent: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -274,6 +291,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' TimesheetEntry: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -290,10 +308,12 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' field_mappings_create: path: /hris/v1/field-mappings method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to @@ -352,13 +372,22 @@ service: to in a given category. validation: minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 content-type: application/json response: docs: '' type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name @@ -386,6 +415,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' warnings: - source: pointer: pointer @@ -409,7 +439,8 @@ service: field_mappings_destroy: path: /hris/v1/field-mappings/{field_mapping_id} method: DELETE - auth: true + auth: + - tokenAuth: [] docs: >- Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after @@ -446,6 +477,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' warnings: - source: pointer: pointer @@ -469,7 +501,8 @@ service: field_mappings_partial_update: path: /hris/v1/field-mappings/{field_mapping_id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: >- Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the @@ -501,6 +534,13 @@ service: from. validation: minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 content-type: application/json response: docs: '' @@ -530,6 +570,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' warnings: - source: pointer: pointer @@ -553,7 +594,8 @@ service: remote_fields_retrieve: path: /hris/v1/remote-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data @@ -581,7 +623,10 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: X-Account-Token: X-Account-Token response: body: @@ -812,7 +857,8 @@ service: target_fields_retrieve: path: /hris/v1/target-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields diff --git a/.mock/definition/hris/forceResync.yml b/.mock/definition/hris/forceResync.yml index 3871daeb..948d6f1f 100644 --- a/.mock/definition/hris/forceResync.yml +++ b/.mock/definition/hris/forceResync.yml @@ -7,7 +7,8 @@ service: sync_status_resync_create: path: /hris/v1/sync-status/resync method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or diff --git a/.mock/definition/hris/generateKey.yml b/.mock/definition/hris/generateKey.yml index 18c4f7c3..2deb432a 100644 --- a/.mock/definition/hris/generateKey.yml +++ b/.mock/definition/hris/generateKey.yml @@ -7,7 +7,8 @@ service: create: path: /hris/v1/generate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Create a remote key. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/groups.yml b/.mock/definition/hris/groups.yml index a9bc5589..a4b84abe 100644 --- a/.mock/definition/hris/groups.yml +++ b/.mock/definition/hris/groups.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/groups method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Group` objects. source: openapi: openapi/openapi.yml @@ -67,7 +68,7 @@ service: values can be separated by commas. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_fields: type: optional> docs: Deprecated. Use show_enum_origins. @@ -92,7 +93,21 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_commonly_used_as_team: is_commonly_used_as_team + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + names: names + page_size: 1 + remote_fields: type + remote_id: remote_id + show_enum_origins: type + types: types headers: X-Account-Token: X-Account-Token response: @@ -121,7 +136,8 @@ service: retrieve: path: /hris/v1/groups/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Group` object with the given `id`. source: openapi: openapi/openapi.yml @@ -157,6 +173,11 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true + remote_fields: type + show_enum_origins: type headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/issues.yml b/.mock/definition/hris/issues.yml index d9de5306..0246523a 100644 --- a/.mock/definition/hris/issues.yml +++ b/.mock/definition/hris/issues.yml @@ -14,7 +14,8 @@ service: list: path: /hris/v1/issues method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets all issues for Organization. source: openapi: openapi/openapi.yml @@ -62,7 +63,7 @@ service: account passed in. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. start_date: type: optional docs: >- @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + account_token: account_token cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING headers: X-Account-Token: '[object Object]' response: @@ -103,7 +117,8 @@ service: retrieve: path: /hris/v1/issues/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Get a specific issue. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/linkToken.yml b/.mock/definition/hris/linkToken.yml index 766171de..e9d3235d 100644 --- a/.mock/definition/hris/linkToken.yml +++ b/.mock/definition/hris/linkToken.yml @@ -17,6 +17,20 @@ types: source: openapi: openapi/openapi.yml inline: true + EndUserDetailsRequestCompletedAccountInitialScreen: + discriminated: false + docs: >- + When creating a Link token, you can specifiy the initial screen of Linking + Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + union: + - root.CompletedAccountInitialScreenEnum + - string + source: + openapi: openapi/openapi.yml + inline: true service: auth: false base-path: '' @@ -24,7 +38,8 @@ service: create: path: /hris/v1/link-token method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a link token to be used when linking a new end user. source: openapi: openapi/openapi.yml @@ -130,6 +145,14 @@ service: docs: >- A JSON object containing integration-specific configuration options. + completed_account_initial_screen: + type: optional + docs: >- + When creating a Link token, you can specifiy the initial screen + of Linking Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC content-type: application/json response: docs: '' diff --git a/.mock/definition/hris/linkedAccounts.yml b/.mock/definition/hris/linkedAccounts.yml index 5d4c897d..77fca7fc 100644 --- a/.mock/definition/hris/linkedAccounts.yml +++ b/.mock/definition/hris/linkedAccounts.yml @@ -19,7 +19,8 @@ service: list: path: /hris/v1/linked-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: List linked accounts for your organization. source: openapi: openapi/openapi.yml @@ -96,7 +97,7 @@ service: included, will only include non-test linked accounts. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. status: type: optional docs: >- @@ -108,7 +109,19 @@ service: status-code: 200 examples: - query-parameters: + category: accounting cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/hris/locations.yml b/.mock/definition/hris/locations.yml index d5217222..3ea21564 100644 --- a/.mock/definition/hris/locations.yml +++ b/.mock/definition/hris/locations.yml @@ -46,7 +46,8 @@ service: list: path: /hris/v1/locations method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Location` objects. source: openapi: openapi/openapi.yml @@ -85,7 +86,7 @@ service: location_type: type: optional docs: |- - If provided, will only return locations with this location_type + If provided, will only return locations with this location type * `HOME` - HOME * `WORK` - WORK @@ -101,7 +102,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_fields: type: optional docs: Deprecated. Use show_enum_origins. @@ -121,7 +122,19 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + location_type: HOME + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: country + remote_id: remote_id + show_enum_origins: country headers: X-Account-Token: X-Account-Token response: @@ -155,7 +168,8 @@ service: retrieve: path: /hris/v1/locations/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Location` object with the given `id`. source: openapi: openapi/openapi.yml @@ -191,6 +205,11 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true + remote_fields: country + show_enum_origins: country headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/passthrough.yml b/.mock/definition/hris/passthrough.yml index fbe19301..28029d92 100644 --- a/.mock/definition/hris/passthrough.yml +++ b/.mock/definition/hris/passthrough.yml @@ -7,7 +7,8 @@ service: create: path: /hris/v1/passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: Pull data from an endpoint not currently supported by Merge. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/payGroups.yml b/.mock/definition/hris/payGroups.yml index dd031706..0a6ae4e1 100644 --- a/.mock/definition/hris/payGroups.yml +++ b/.mock/definition/hris/payGroups.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/pay-groups method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `PayGroup` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -91,7 +101,8 @@ service: retrieve: path: /hris/v1/pay-groups/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `PayGroup` object with the given `id`. source: openapi: openapi/openapi.yml @@ -117,6 +128,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/payrollRuns.yml b/.mock/definition/hris/payrollRuns.yml index 8687f6d5..d4c72205 100644 --- a/.mock/definition/hris/payrollRuns.yml +++ b/.mock/definition/hris/payrollRuns.yml @@ -49,7 +49,8 @@ service: list: path: /hris/v1/payroll-runs method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `PayrollRun` objects. source: openapi: openapi/openapi.yml @@ -107,7 +108,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_fields: type: optional docs: Deprecated. Use show_enum_origins. @@ -154,7 +155,23 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + ended_after: '2024-01-15T09:30:00Z' + ended_before: '2024-01-15T09:30:00Z' + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: run_state + remote_id: remote_id + run_type: CORRECTION + show_enum_origins: run_state + started_after: '2024-01-15T09:30:00Z' + started_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -184,7 +201,8 @@ service: retrieve: path: /hris/v1/payroll-runs/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `PayrollRun` object with the given `id`. source: openapi: openapi/openapi.yml @@ -220,6 +238,11 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true + remote_fields: run_state + show_enum_origins: run_state headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/regenerateKey.yml b/.mock/definition/hris/regenerateKey.yml index b9daa8b2..01ca259e 100644 --- a/.mock/definition/hris/regenerateKey.yml +++ b/.mock/definition/hris/regenerateKey.yml @@ -7,7 +7,8 @@ service: create: path: /hris/v1/regenerate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Exchange remote keys. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/scopes.yml b/.mock/definition/hris/scopes.yml index 31252ad4..d3caa6e1 100644 --- a/.mock/definition/hris/scopes.yml +++ b/.mock/definition/hris/scopes.yml @@ -7,7 +7,8 @@ service: default_scopes_retrieve: path: /hris/v1/default-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn @@ -50,7 +51,8 @@ service: linked_account_scopes_retrieve: path: /hris/v1/linked-account-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn @@ -93,7 +95,8 @@ service: linked_account_scopes_create: path: /hris/v1/linked-account-scopes method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the diff --git a/.mock/definition/hris/syncStatus.yml b/.mock/definition/hris/syncStatus.yml index cca7aca2..2ba7cc8d 100644 --- a/.mock/definition/hris/syncStatus.yml +++ b/.mock/definition/hris/syncStatus.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/sync-status method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. @@ -30,7 +31,7 @@ service: docs: The pagination cursor value. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. response: docs: '' type: root.PaginatedSyncStatusList @@ -38,6 +39,7 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/teams.yml b/.mock/definition/hris/teams.yml index 902b49a3..1bb0e5ff 100644 --- a/.mock/definition/hris/teams.yml +++ b/.mock/definition/hris/teams.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/teams method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Team` objects. source: openapi: openapi/openapi.yml @@ -60,7 +61,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. parent_team_id: type: optional docs: If provided, will only return teams with this parent team. @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: parent_team + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + parent_team_id: parent_team_id + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -100,7 +112,8 @@ service: retrieve: path: /hris/v1/teams/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Team` object with the given `id`. source: openapi: openapi/openapi.yml @@ -131,6 +144,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: parent_team + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/timeOff.yml b/.mock/definition/hris/timeOff.yml index 6ed9b785..b4c98707 100644 --- a/.mock/definition/hris/timeOff.yml +++ b/.mock/definition/hris/timeOff.yml @@ -103,7 +103,8 @@ service: list: path: /hris/v1/time-off method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `TimeOff` objects. source: openapi: openapi/openapi.yml @@ -172,7 +173,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_fields: type: optional docs: Deprecated. Use show_enum_origins. @@ -237,7 +238,27 @@ service: status-code: 200 examples: - query-parameters: + approver_id: approver_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + ended_after: '2024-01-15T09:30:00Z' + ended_before: '2024-01-15T09:30:00Z' + expand: approver + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_fields: request_type + remote_id: remote_id + request_type: BEREAVEMENT + show_enum_origins: request_type + started_after: '2024-01-15T09:30:00Z' + started_before: '2024-01-15T09:30:00Z' + status: APPROVED headers: X-Account-Token: X-Account-Token response: @@ -271,7 +292,8 @@ service: create: path: /hris/v1/time-off method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `TimeOff` object with the given values. source: openapi: openapi/openapi.yml @@ -295,7 +317,10 @@ service: type: root.TimeOffResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -348,7 +373,8 @@ service: retrieve: path: /hris/v1/time-off/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `TimeOff` object with the given `id`. source: openapi: openapi/openapi.yml @@ -389,6 +415,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: approver + include_remote_data: true + include_shell_data: true + remote_fields: request_type + show_enum_origins: request_type headers: X-Account-Token: X-Account-Token response: @@ -419,7 +451,8 @@ service: metaPostRetrieve: path: /hris/v1/time-off/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `TimeOff` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/timeOffBalances.yml b/.mock/definition/hris/timeOffBalances.yml index 22ad8176..2e510443 100644 --- a/.mock/definition/hris/timeOffBalances.yml +++ b/.mock/definition/hris/timeOffBalances.yml @@ -18,7 +18,8 @@ service: list: path: /hris/v1/time-off-balances method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `TimeOffBalance` objects. source: openapi: openapi/openapi.yml @@ -74,7 +75,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. policy_type: type: optional docs: >- @@ -113,7 +114,21 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + expand: employee + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + policy_type: BEREAVEMENT + remote_fields: policy_type + remote_id: remote_id + show_enum_origins: policy_type headers: X-Account-Token: X-Account-Token response: @@ -142,7 +157,8 @@ service: retrieve: path: /hris/v1/time-off-balances/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `TimeOffBalance` object with the given `id`. source: openapi: openapi/openapi.yml @@ -183,6 +199,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: employee + include_remote_data: true + include_shell_data: true + remote_fields: policy_type + show_enum_origins: policy_type headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/hris/timesheetEntries.yml b/.mock/definition/hris/timesheetEntries.yml index 62f53265..357670e0 100644 --- a/.mock/definition/hris/timesheetEntries.yml +++ b/.mock/definition/hris/timesheetEntries.yml @@ -16,7 +16,8 @@ service: list: path: /hris/v1/timesheet-entries method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `TimesheetEntry` objects. source: openapi: openapi/openapi.yml @@ -87,7 +88,7 @@ service: include: start_time, -start_time. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -107,7 +108,23 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + employee_id: employee_id + ended_after: '2024-01-15T09:30:00Z' + ended_before: '2024-01-15T09:30:00Z' + expand: employee + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + order_by: '-start_time' + page_size: 1 + remote_id: remote_id + started_after: '2024-01-15T09:30:00Z' + started_before: '2024-01-15T09:30:00Z' headers: X-Account-Token: X-Account-Token response: @@ -136,7 +153,8 @@ service: create: path: /hris/v1/timesheet-entries method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `TimesheetEntry` object with the given values. source: openapi: openapi/openapi.yml @@ -160,7 +178,10 @@ service: type: root.TimesheetEntryResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -208,7 +229,8 @@ service: retrieve: path: /hris/v1/timesheet-entries/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `TimesheetEntry` object with the given `id`. source: openapi: openapi/openapi.yml @@ -239,6 +261,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: employee + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -264,7 +290,8 @@ service: metaPostRetrieve: path: /hris/v1/timesheet-entries/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `TimesheetEntry` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/webhookReceivers.yml b/.mock/definition/hris/webhookReceivers.yml index 62fbcab5..dcd5b47d 100644 --- a/.mock/definition/hris/webhookReceivers.yml +++ b/.mock/definition/hris/webhookReceivers.yml @@ -7,7 +7,8 @@ service: list: path: /hris/v1/webhook-receivers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `WebhookReceiver` objects. source: openapi: openapi/openapi.yml @@ -26,7 +27,8 @@ service: create: path: /hris/v1/webhook-receivers method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `WebhookReceiver` object with the given values. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/accountDetails.yml b/.mock/definition/knowledgebase/accountDetails.yml index 06ff462a..a4dd0f32 100644 --- a/.mock/definition/knowledgebase/accountDetails.yml +++ b/.mock/definition/knowledgebase/accountDetails.yml @@ -7,7 +7,8 @@ service: retrieve: path: /knowledgebase/v1/account-details method: GET - auth: true + auth: + - tokenAuth: [] docs: Get details for a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/accountToken.yml b/.mock/definition/knowledgebase/accountToken.yml index 7cbde0f3..e5ae13ec 100644 --- a/.mock/definition/knowledgebase/accountToken.yml +++ b/.mock/definition/knowledgebase/accountToken.yml @@ -7,7 +7,8 @@ service: retrieve: path: /knowledgebase/v1/account-token/{public_token} method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns the account token for the end user with the provided public token. diff --git a/.mock/definition/knowledgebase/articles.yml b/.mock/definition/knowledgebase/articles.yml index b2d3fdc6..0c2c8ac0 100644 --- a/.mock/definition/knowledgebase/articles.yml +++ b/.mock/definition/knowledgebase/articles.yml @@ -262,6 +262,15 @@ types: - root_container source: openapi: openapi/openapi.yml + ArticlesListRequestType: + enum: + - value: '' + name: EMPTY + - BLOG_POST + - PAGE + - SMART_LINK + source: + openapi: openapi/openapi.yml ArticlesRetrieveRequestExpand: enum: - attachments @@ -534,7 +543,8 @@ service: list: path: /knowledgebase/v1/articles method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Article` objects. source: openapi: openapi/openapi.yml @@ -587,7 +597,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. parent_article_id: type: optional docs: >- @@ -605,8 +615,18 @@ service: remote_id: type: optional docs: The API provider's ID for the given object. - type: + root_container_id: type: optional + docs: >- + If provided, will only return sub articles of the + root_container_id. + status: + type: optional + docs: >- + If provided, will only return articles of the given status; + multiple statuses can be separated by commas. + type: + type: optional docs: If provided, will only return articles of the given type. response: docs: '' @@ -614,7 +634,22 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: attachments + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + parent_article_id: parent_article_id + parent_container_id: parent_container_id + remote_id: remote_id + root_container_id: root_container_id + status: status + type: '' headers: X-Account-Token: X-Account-Token response: @@ -669,7 +704,8 @@ service: retrieve: path: /knowledgebase/v1/articles/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Article` object with the given `id`. source: openapi: openapi/openapi.yml @@ -700,6 +736,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: attachments + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/knowledgebase/asyncPassthrough.yml b/.mock/definition/knowledgebase/asyncPassthrough.yml index 12e4aab7..de432290 100644 --- a/.mock/definition/knowledgebase/asyncPassthrough.yml +++ b/.mock/definition/knowledgebase/asyncPassthrough.yml @@ -7,7 +7,8 @@ service: create: path: /knowledgebase/v1/async-passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Asynchronously pull data from an endpoint not currently supported by Merge. @@ -32,7 +33,8 @@ service: retrieve: path: /knowledgebase/v1/async-passthrough/{async_passthrough_receipt_id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Retrieves data from earlier async-passthrough POST request source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/attachments.yml b/.mock/definition/knowledgebase/attachments.yml index f2826161..b45968b9 100644 --- a/.mock/definition/knowledgebase/attachments.yml +++ b/.mock/definition/knowledgebase/attachments.yml @@ -7,7 +7,8 @@ service: list: path: /knowledgebase/v1/attachments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Attachment` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -93,7 +103,8 @@ service: retrieve: path: /knowledgebase/v1/attachments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Attachment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -119,6 +130,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/knowledgebase/auditTrail.yml b/.mock/definition/knowledgebase/auditTrail.yml index a3a1fa8b..49acdbe0 100644 --- a/.mock/definition/knowledgebase/auditTrail.yml +++ b/.mock/definition/knowledgebase/auditTrail.yml @@ -7,7 +7,8 @@ service: list: path: /knowledgebase/v1/audit-trail method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets a list of audit trail events. source: openapi: openapi/openapi.yml @@ -77,6 +78,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/knowledgebase/availableActions.yml b/.mock/definition/knowledgebase/availableActions.yml index d45ad3f5..d18129a6 100644 --- a/.mock/definition/knowledgebase/availableActions.yml +++ b/.mock/definition/knowledgebase/availableActions.yml @@ -7,7 +7,8 @@ service: retrieve: path: /knowledgebase/v1/available-actions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of models and actions available for an account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/containers.yml b/.mock/definition/knowledgebase/containers.yml index 814ad7b9..603d38d7 100644 --- a/.mock/definition/knowledgebase/containers.yml +++ b/.mock/definition/knowledgebase/containers.yml @@ -14,6 +14,18 @@ types: name: PermissionsParentContainer source: openapi: openapi/openapi.yml + ContainersListRequestType: + enum: + - value: '' + name: EMPTY + - CATEGORY + - COLLECTION + - DATABASE + - FOLDER + - SECTION + - SPACE + source: + openapi: openapi/openapi.yml ContainersRetrieveRequestExpand: enum: - parent_article @@ -38,7 +50,8 @@ service: list: path: /knowledgebase/v1/containers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Container` objects. source: openapi: openapi/openapi.yml @@ -91,7 +104,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. parent_article_id: type: optional docs: >- @@ -110,7 +123,7 @@ service: type: optional docs: The API provider's ID for the given object. type: - type: optional + type: optional docs: If provided, will only return containers of the given type. response: docs: '' @@ -118,7 +131,20 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: parent_article + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + parent_article_id: parent_article_id + parent_container_id: parent_container_id + remote_id: remote_id + type: '' headers: X-Account-Token: X-Account-Token response: @@ -164,7 +190,8 @@ service: retrieve: path: /knowledgebase/v1/containers/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Container` object with the given `id`. source: openapi: openapi/openapi.yml @@ -195,6 +222,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: parent_article + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/knowledgebase/deleteAccount.yml b/.mock/definition/knowledgebase/deleteAccount.yml index fb61395f..c5fc2104 100644 --- a/.mock/definition/knowledgebase/deleteAccount.yml +++ b/.mock/definition/knowledgebase/deleteAccount.yml @@ -5,7 +5,8 @@ service: delete: path: /knowledgebase/v1/delete-account method: POST - auth: true + auth: + - tokenAuth: [] docs: Delete a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/fieldMapping.yml b/.mock/definition/knowledgebase/fieldMapping.yml index 311cd428..3d844098 100644 --- a/.mock/definition/knowledgebase/fieldMapping.yml +++ b/.mock/definition/knowledgebase/fieldMapping.yml @@ -7,7 +7,8 @@ service: field_mappings_retrieve: path: /knowledgebase/v1/field-mappings method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge @@ -30,7 +31,9 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token response: body: @@ -122,7 +125,8 @@ service: field_mappings_create: path: /knowledgebase/v1/field-mappings method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to @@ -194,7 +198,9 @@ service: type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name @@ -246,7 +252,8 @@ service: field_mappings_destroy: path: /knowledgebase/v1/field-mappings/{field_mapping_id} method: DELETE - auth: true + auth: + - tokenAuth: [] docs: >- Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after @@ -307,7 +314,8 @@ service: field_mappings_partial_update: path: /knowledgebase/v1/field-mappings/{field_mapping_id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: >- Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the @@ -399,7 +407,8 @@ service: remote_fields_retrieve: path: /knowledgebase/v1/remote-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data @@ -427,7 +436,10 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: X-Account-Token: X-Account-Token response: body: @@ -504,7 +516,8 @@ service: target_fields_retrieve: path: /knowledgebase/v1/target-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields diff --git a/.mock/definition/knowledgebase/forceResync.yml b/.mock/definition/knowledgebase/forceResync.yml index 22f60795..5a18e2dc 100644 --- a/.mock/definition/knowledgebase/forceResync.yml +++ b/.mock/definition/knowledgebase/forceResync.yml @@ -7,7 +7,8 @@ service: sync_status_resync_create: path: /knowledgebase/v1/sync-status/resync method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or diff --git a/.mock/definition/knowledgebase/generateKey.yml b/.mock/definition/knowledgebase/generateKey.yml index 28384f36..cf285f18 100644 --- a/.mock/definition/knowledgebase/generateKey.yml +++ b/.mock/definition/knowledgebase/generateKey.yml @@ -7,7 +7,8 @@ service: create: path: /knowledgebase/v1/generate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Create a remote key. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/groups.yml b/.mock/definition/knowledgebase/groups.yml index 392f8af5..edfee65e 100644 --- a/.mock/definition/knowledgebase/groups.yml +++ b/.mock/definition/knowledgebase/groups.yml @@ -24,7 +24,8 @@ service: list: path: /knowledgebase/v1/groups method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Group` objects. source: openapi: openapi/openapi.yml @@ -77,7 +78,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -87,7 +88,17 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: parent_group + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -117,7 +128,8 @@ service: retrieve: path: /knowledgebase/v1/groups/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Group` object with the given `id`. source: openapi: openapi/openapi.yml @@ -148,6 +160,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: parent_group + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/knowledgebase/issues.yml b/.mock/definition/knowledgebase/issues.yml index c2f6d4d8..e9acedaf 100644 --- a/.mock/definition/knowledgebase/issues.yml +++ b/.mock/definition/knowledgebase/issues.yml @@ -14,7 +14,8 @@ service: list: path: /knowledgebase/v1/issues method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets all issues for Organization. source: openapi: openapi/openapi.yml @@ -62,7 +63,7 @@ service: account passed in. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. start_date: type: optional docs: >- @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + account_token: account_token cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING headers: X-Account-Token: '[object Object]' response: @@ -103,7 +117,8 @@ service: retrieve: path: /knowledgebase/v1/issues/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Get a specific issue. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/linkToken.yml b/.mock/definition/knowledgebase/linkToken.yml index 0a256905..5ff30f71 100644 --- a/.mock/definition/knowledgebase/linkToken.yml +++ b/.mock/definition/knowledgebase/linkToken.yml @@ -17,6 +17,20 @@ types: source: openapi: openapi/openapi.yml inline: true + EndUserDetailsRequestCompletedAccountInitialScreen: + discriminated: false + docs: >- + When creating a Link token, you can specifiy the initial screen of Linking + Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + union: + - root.CompletedAccountInitialScreenEnum + - string + source: + openapi: openapi/openapi.yml + inline: true service: auth: false base-path: '' @@ -24,7 +38,8 @@ service: create: path: /knowledgebase/v1/link-token method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a link token to be used when linking a new end user. source: openapi: openapi/openapi.yml @@ -130,6 +145,14 @@ service: docs: >- A JSON object containing integration-specific configuration options. + completed_account_initial_screen: + type: optional + docs: >- + When creating a Link token, you can specifiy the initial screen + of Linking Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC content-type: application/json response: docs: '' diff --git a/.mock/definition/knowledgebase/linkedAccounts.yml b/.mock/definition/knowledgebase/linkedAccounts.yml index 3b7b13a0..7263159f 100644 --- a/.mock/definition/knowledgebase/linkedAccounts.yml +++ b/.mock/definition/knowledgebase/linkedAccounts.yml @@ -20,7 +20,8 @@ service: list: path: /knowledgebase/v1/linked-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: List linked accounts for your organization. source: openapi: openapi/openapi.yml @@ -99,7 +100,7 @@ service: included, will only include non-test linked accounts. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. status: type: optional docs: >- @@ -111,7 +112,19 @@ service: status-code: 200 examples: - query-parameters: + category: accounting cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/knowledgebase/passthrough.yml b/.mock/definition/knowledgebase/passthrough.yml index 71171a07..4a4ba7bc 100644 --- a/.mock/definition/knowledgebase/passthrough.yml +++ b/.mock/definition/knowledgebase/passthrough.yml @@ -7,7 +7,8 @@ service: create: path: /knowledgebase/v1/passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: Pull data from an endpoint not currently supported by Merge. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/regenerateKey.yml b/.mock/definition/knowledgebase/regenerateKey.yml index a1202626..e76401ce 100644 --- a/.mock/definition/knowledgebase/regenerateKey.yml +++ b/.mock/definition/knowledgebase/regenerateKey.yml @@ -7,7 +7,8 @@ service: create: path: /knowledgebase/v1/regenerate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Exchange remote keys. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/scopes.yml b/.mock/definition/knowledgebase/scopes.yml index 80d5a8bb..caa4fe5a 100644 --- a/.mock/definition/knowledgebase/scopes.yml +++ b/.mock/definition/knowledgebase/scopes.yml @@ -7,7 +7,8 @@ service: default_scopes_retrieve: path: /knowledgebase/v1/default-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn @@ -50,7 +51,8 @@ service: linked_account_scopes_retrieve: path: /knowledgebase/v1/linked-account-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn @@ -93,7 +95,8 @@ service: linked_account_scopes_create: path: /knowledgebase/v1/linked-account-scopes method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the diff --git a/.mock/definition/knowledgebase/syncStatus.yml b/.mock/definition/knowledgebase/syncStatus.yml index 0554650b..30b4d9ea 100644 --- a/.mock/definition/knowledgebase/syncStatus.yml +++ b/.mock/definition/knowledgebase/syncStatus.yml @@ -7,7 +7,8 @@ service: list: path: /knowledgebase/v1/sync-status method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. @@ -30,7 +31,7 @@ service: docs: The pagination cursor value. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. response: docs: '' type: root.PaginatedSyncStatusList @@ -38,6 +39,7 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/knowledgebase/users.yml b/.mock/definition/knowledgebase/users.yml index e5c4f8ee..f14d3acf 100644 --- a/.mock/definition/knowledgebase/users.yml +++ b/.mock/definition/knowledgebase/users.yml @@ -7,7 +7,8 @@ service: list: path: /knowledgebase/v1/users method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `User` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -88,7 +98,8 @@ service: retrieve: path: /knowledgebase/v1/users/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `User` object with the given `id`. source: openapi: openapi/openapi.yml @@ -114,6 +125,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/knowledgebase/webhookReceivers.yml b/.mock/definition/knowledgebase/webhookReceivers.yml index a3585da3..8ead6f75 100644 --- a/.mock/definition/knowledgebase/webhookReceivers.yml +++ b/.mock/definition/knowledgebase/webhookReceivers.yml @@ -7,7 +7,8 @@ service: list: path: /knowledgebase/v1/webhook-receivers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `WebhookReceiver` objects. source: openapi: openapi/openapi.yml @@ -26,7 +27,8 @@ service: create: path: /knowledgebase/v1/webhook-receivers method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `WebhookReceiver` object with the given values. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/__package__.yml b/.mock/definition/ticketing/__package__.yml index a9ceb98e..d1aa2e53 100644 --- a/.mock/definition/ticketing/__package__.yml +++ b/.mock/definition/ticketing/__package__.yml @@ -719,6 +719,7 @@ types: - crm - mktg - filestorage + - knowledgebase docs: |- * `hris` - hris * `ats` - ats @@ -727,6 +728,7 @@ types: * `crm` - crm * `mktg` - mktg * `filestorage` - filestorage + * `knowledgebase` - knowledgebase source: openapi: openapi/openapi.yml CategoryEnum: @@ -738,6 +740,7 @@ types: - crm - mktg - filestorage + - knowledgebase docs: |- * `hris` - hris * `ats` - ats @@ -746,6 +749,7 @@ types: * `crm` - crm * `mktg` - mktg * `filestorage` - filestorage + * `knowledgebase` - knowledgebase source: openapi: openapi/openapi.yml CollectionAccessLevel: @@ -1106,6 +1110,9 @@ types: disabled_fields: list source: openapi: openapi/openapi.yml + CompletedAccountInitialScreenEnum: + type: literal<"SELECTIVE_SYNC"> + docs: '* `SELECTIVE_SYNC` - SELECTIVE_SYNC' ContactAccount: discriminated: false docs: The contact's account. @@ -1555,6 +1562,9 @@ types: remote_field: type: optional access: read-only + jmes_path: + type: optional + access: read-only source: openapi: openapi/openapi.yml FieldMappingApiInstanceResponse: diff --git a/.mock/definition/ticketing/accountDetails.yml b/.mock/definition/ticketing/accountDetails.yml index 4204619f..cf6764e6 100644 --- a/.mock/definition/ticketing/accountDetails.yml +++ b/.mock/definition/ticketing/accountDetails.yml @@ -7,7 +7,8 @@ service: retrieve: path: /ticketing/v1/account-details method: GET - auth: true + auth: + - tokenAuth: [] docs: Get details for a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/accountToken.yml b/.mock/definition/ticketing/accountToken.yml index 057dc6d6..b8f0a14c 100644 --- a/.mock/definition/ticketing/accountToken.yml +++ b/.mock/definition/ticketing/accountToken.yml @@ -7,7 +7,8 @@ service: retrieve: path: /ticketing/v1/account-token/{public_token} method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns the account token for the end user with the provided public token. diff --git a/.mock/definition/ticketing/accounts.yml b/.mock/definition/ticketing/accounts.yml index 4f695f73..21e288e0 100644 --- a/.mock/definition/ticketing/accounts.yml +++ b/.mock/definition/ticketing/accounts.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Account` objects. source: openapi: openapi/openapi.yml @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -94,7 +104,8 @@ service: retrieve: path: /ticketing/v1/accounts/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Account` object with the given `id`. source: openapi: openapi/openapi.yml @@ -120,6 +131,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/asyncPassthrough.yml b/.mock/definition/ticketing/asyncPassthrough.yml index 02724e93..f988cb0a 100644 --- a/.mock/definition/ticketing/asyncPassthrough.yml +++ b/.mock/definition/ticketing/asyncPassthrough.yml @@ -7,7 +7,8 @@ service: create: path: /ticketing/v1/async-passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Asynchronously pull data from an endpoint not currently supported by Merge. @@ -32,7 +33,8 @@ service: retrieve: path: /ticketing/v1/async-passthrough/{async_passthrough_receipt_id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Retrieves data from earlier async-passthrough POST request source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/attachments.yml b/.mock/definition/ticketing/attachments.yml index 671474bf..d47438be 100644 --- a/.mock/definition/ticketing/attachments.yml +++ b/.mock/definition/ticketing/attachments.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/attachments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Attachment` objects. source: openapi: openapi/openapi.yml @@ -60,7 +61,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_created_after: type: optional docs: >- @@ -78,7 +79,19 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: ticket + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_created_after: '2024-01-15T09:30:00Z' + remote_id: remote_id + ticket_id: ticket_id headers: X-Account-Token: X-Account-Token response: @@ -107,7 +120,8 @@ service: create: path: /ticketing/v1/attachments method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates an `Attachment` object with the given values. source: openapi: openapi/openapi.yml @@ -131,7 +145,10 @@ service: type: root.TicketingAttachmentResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -179,7 +196,8 @@ service: retrieve: path: /ticketing/v1/attachments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns an `Attachment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -210,6 +228,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: ticket + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -237,7 +259,8 @@ service: downloadRetrieve: path: /ticketing/v1/attachments/{id}/download method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns the `File` content with the given `id` as a stream of bytes. source: openapi: openapi/openapi.yml @@ -266,7 +289,8 @@ service: metaPostRetrieve: path: /ticketing/v1/attachments/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `TicketingAttachment` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/auditTrail.yml b/.mock/definition/ticketing/auditTrail.yml index 5b42e8b8..5eaec421 100644 --- a/.mock/definition/ticketing/auditTrail.yml +++ b/.mock/definition/ticketing/auditTrail.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/audit-trail method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets a list of audit trail events. source: openapi: openapi/openapi.yml @@ -57,7 +58,7 @@ service: `END_USER_CREDENTIALS_ACCESSED` page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. start_date: type: optional docs: >- @@ -77,6 +78,11 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + event_type: event_type + page_size: 1 + start_date: start_date + user_email: user_email headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/ticketing/availableActions.yml b/.mock/definition/ticketing/availableActions.yml index 750b5faa..5add5326 100644 --- a/.mock/definition/ticketing/availableActions.yml +++ b/.mock/definition/ticketing/availableActions.yml @@ -7,7 +7,8 @@ service: retrieve: path: /ticketing/v1/available-actions method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of models and actions available for an account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/collections.yml b/.mock/definition/ticketing/collections.yml index 57359737..a7cace56 100644 --- a/.mock/definition/ticketing/collections.yml +++ b/.mock/definition/ticketing/collections.yml @@ -1,3 +1,20 @@ +types: + CollectionsListRequestCollectionType: + enum: + - value: '' + name: EMPTY + - LIST + - PROJECT + source: + openapi: openapi/openapi.yml + CollectionsViewersListRequestExpand: + enum: + - team + - user + - value: user,team + name: UserTeam + source: + openapi: openapi/openapi.yml imports: root: __package__.yml service: @@ -7,7 +24,8 @@ service: list: path: /ticketing/v1/collections method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Collection` objects. source: openapi: openapi/openapi.yml @@ -15,7 +33,7 @@ service: name: CollectionsListRequest query-parameters: collection_type: - type: optional + type: optional docs: If provided, will only return collections of the given type. created_after: type: optional @@ -66,7 +84,7 @@ service: docs: If provided, will only return collections with this name. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. parent_collection_id: type: optional docs: >- @@ -91,7 +109,22 @@ service: status-code: 200 examples: - query-parameters: + collection_type: '' + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: parent_collection + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + parent_collection_id: parent_collection_id + remote_fields: collection_type + remote_id: remote_id + show_enum_origins: collection_type headers: X-Account-Token: X-Account-Token response: @@ -122,7 +155,8 @@ service: viewersList: path: /ticketing/v1/collections/{collection_id}/viewers method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns a list of `Viewer` objects that point to a User id or Team id that is either an assignee or viewer on a `Collection` with the given @@ -173,6 +207,11 @@ service: collection_id: collection_id query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: team + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -189,7 +228,8 @@ service: retrieve: path: /ticketing/v1/collections/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Collection` object with the given `id`. source: openapi: openapi/openapi.yml @@ -230,6 +270,12 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: parent_collection + include_remote_data: true + include_shell_data: true + remote_fields: collection_type + show_enum_origins: collection_type headers: X-Account-Token: X-Account-Token response: @@ -258,12 +304,3 @@ service: key: value source: openapi: openapi/openapi.yml -types: - CollectionsViewersListRequestExpand: - enum: - - team - - user - - value: user,team - name: UserTeam - source: - openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/comments.yml b/.mock/definition/ticketing/comments.yml index 7c789021..8b75794a 100644 --- a/.mock/definition/ticketing/comments.yml +++ b/.mock/definition/ticketing/comments.yml @@ -38,7 +38,8 @@ service: list: path: /ticketing/v1/comments method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Comment` objects. source: openapi: openapi/openapi.yml @@ -91,7 +92,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_created_after: type: optional docs: >- @@ -109,7 +110,19 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: contact + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_created_after: '2024-01-15T09:30:00Z' + remote_id: remote_id + ticket_id: ticket_id headers: X-Account-Token: X-Account-Token response: @@ -143,7 +156,8 @@ service: create: path: /ticketing/v1/comments method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Comment` object with the given values. source: openapi: openapi/openapi.yml @@ -167,7 +181,10 @@ service: type: root.CommentResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -220,7 +237,8 @@ service: retrieve: path: /ticketing/v1/comments/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Comment` object with the given `id`. source: openapi: openapi/openapi.yml @@ -251,6 +269,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: contact + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -281,7 +303,8 @@ service: metaPostRetrieve: path: /ticketing/v1/comments/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Comment` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/contacts.yml b/.mock/definition/ticketing/contacts.yml index 5296646e..9126e2c4 100644 --- a/.mock/definition/ticketing/contacts.yml +++ b/.mock/definition/ticketing/contacts.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/contacts method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Contact` objects. source: openapi: openapi/openapi.yml @@ -63,7 +64,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -73,7 +74,18 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email_address: email_address + expand: account + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -101,7 +113,8 @@ service: create: path: /ticketing/v1/contacts method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Contact` object with the given values. source: openapi: openapi/openapi.yml @@ -125,7 +138,10 @@ service: type: root.TicketingContactResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -172,7 +188,8 @@ service: retrieve: path: /ticketing/v1/contacts/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Contact` object with the given `id`. source: openapi: openapi/openapi.yml @@ -203,6 +220,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -229,7 +250,8 @@ service: metaPostRetrieve: path: /ticketing/v1/contacts/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `TicketingContact` POSTs. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/deleteAccount.yml b/.mock/definition/ticketing/deleteAccount.yml index 021acbde..99dd5cea 100644 --- a/.mock/definition/ticketing/deleteAccount.yml +++ b/.mock/definition/ticketing/deleteAccount.yml @@ -5,7 +5,8 @@ service: delete: path: /ticketing/v1/delete-account method: POST - auth: true + auth: + - tokenAuth: [] docs: Delete a linked account. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/fieldMapping.yml b/.mock/definition/ticketing/fieldMapping.yml index 8721c1c2..915bd847 100644 --- a/.mock/definition/ticketing/fieldMapping.yml +++ b/.mock/definition/ticketing/fieldMapping.yml @@ -7,7 +7,8 @@ service: field_mappings_retrieve: path: /ticketing/v1/field-mappings method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge @@ -30,7 +31,9 @@ service: type: root.FieldMappingApiInstanceResponse status-code: 200 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token response: body: @@ -50,6 +53,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Comment: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -66,6 +70,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Project: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -82,6 +87,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Collection: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -98,6 +104,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' User: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -114,6 +121,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Role: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -130,6 +138,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Account: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -146,6 +155,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Team: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -162,6 +172,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Attachment: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -178,6 +189,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Tag: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -194,6 +206,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' Contact: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 is_integration_wide: true @@ -210,10 +223,12 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' field_mappings_create: path: /ticketing/v1/field-mappings method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to @@ -272,13 +287,22 @@ service: to in a given category. validation: minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 content-type: application/json response: docs: '' type: root.FieldMappingInstanceResponse status-code: 201 examples: - - headers: + - query-parameters: + exclude_remote_field_metadata: true + headers: X-Account-Token: X-Account-Token request: target_field_name: example_target_field_name @@ -306,6 +330,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' warnings: - source: pointer: pointer @@ -329,7 +354,8 @@ service: field_mappings_destroy: path: /ticketing/v1/field-mappings/{field_mapping_id} method: DELETE - auth: true + auth: + - tokenAuth: [] docs: >- Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after @@ -366,6 +392,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' warnings: - source: pointer: pointer @@ -389,7 +416,8 @@ service: field_mappings_partial_update: path: /ticketing/v1/field-mappings/{field_mapping_id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: >- Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the @@ -421,6 +449,13 @@ service: from. validation: minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 content-type: application/json response: docs: '' @@ -450,6 +485,7 @@ service: url_path: /example-url-path field_traversal_path: - example_remote_field_key + jmes_path: '[0].example_jmes_path' warnings: - source: pointer: pointer @@ -473,7 +509,8 @@ service: remote_fields_retrieve: path: /ticketing/v1/remote-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data @@ -501,7 +538,10 @@ service: type: root.RemoteFieldApiResponse status-code: 200 examples: - - headers: + - query-parameters: + common_models: common_models + include_example_values: include_example_values + headers: X-Account-Token: X-Account-Token response: body: @@ -662,7 +702,8 @@ service: target_fields_retrieve: path: /ticketing/v1/target-fields method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields diff --git a/.mock/definition/ticketing/forceResync.yml b/.mock/definition/ticketing/forceResync.yml index 39b44277..3a2db7b6 100644 --- a/.mock/definition/ticketing/forceResync.yml +++ b/.mock/definition/ticketing/forceResync.yml @@ -7,7 +7,8 @@ service: sync_status_resync_create: path: /ticketing/v1/sync-status/resync method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or diff --git a/.mock/definition/ticketing/generateKey.yml b/.mock/definition/ticketing/generateKey.yml index 03e42e8e..d0f1215b 100644 --- a/.mock/definition/ticketing/generateKey.yml +++ b/.mock/definition/ticketing/generateKey.yml @@ -7,7 +7,8 @@ service: create: path: /ticketing/v1/generate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Create a remote key. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/issues.yml b/.mock/definition/ticketing/issues.yml index 22c452d4..7742465a 100644 --- a/.mock/definition/ticketing/issues.yml +++ b/.mock/definition/ticketing/issues.yml @@ -14,7 +14,8 @@ service: list: path: /ticketing/v1/issues method: GET - auth: true + auth: + - tokenAuth: [] docs: Gets all issues for Organization. source: openapi: openapi/openapi.yml @@ -62,7 +63,7 @@ service: account passed in. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. start_date: type: optional docs: >- @@ -81,7 +82,20 @@ service: status-code: 200 examples: - query-parameters: + account_token: account_token cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_date: end_date + end_user_organization_name: end_user_organization_name + first_incident_time_after: '2024-01-15T09:30:00Z' + first_incident_time_before: '2024-01-15T09:30:00Z' + include_muted: include_muted + integration_name: integration_name + last_incident_time_after: '2024-01-15T09:30:00Z' + last_incident_time_before: '2024-01-15T09:30:00Z' + linked_account_id: linked_account_id + page_size: 1 + start_date: start_date + status: ONGOING headers: X-Account-Token: '[object Object]' response: @@ -103,7 +117,8 @@ service: retrieve: path: /ticketing/v1/issues/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Get a specific issue. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/linkToken.yml b/.mock/definition/ticketing/linkToken.yml index b3c79737..bcc870f7 100644 --- a/.mock/definition/ticketing/linkToken.yml +++ b/.mock/definition/ticketing/linkToken.yml @@ -17,6 +17,20 @@ types: source: openapi: openapi/openapi.yml inline: true + EndUserDetailsRequestCompletedAccountInitialScreen: + discriminated: false + docs: >- + When creating a Link token, you can specifiy the initial screen of Linking + Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + union: + - root.CompletedAccountInitialScreenEnum + - string + source: + openapi: openapi/openapi.yml + inline: true service: auth: false base-path: '' @@ -24,7 +38,8 @@ service: create: path: /ticketing/v1/link-token method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a link token to be used when linking a new end user. source: openapi: openapi/openapi.yml @@ -130,6 +145,14 @@ service: docs: >- A JSON object containing integration-specific configuration options. + completed_account_initial_screen: + type: optional + docs: >- + When creating a Link token, you can specifiy the initial screen + of Linking Flow for a completed Linked Account. + + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC content-type: application/json response: docs: '' diff --git a/.mock/definition/ticketing/linkedAccounts.yml b/.mock/definition/ticketing/linkedAccounts.yml index a9563978..d2cd8110 100644 --- a/.mock/definition/ticketing/linkedAccounts.yml +++ b/.mock/definition/ticketing/linkedAccounts.yml @@ -19,7 +19,8 @@ service: list: path: /ticketing/v1/linked-accounts method: GET - auth: true + auth: + - tokenAuth: [] docs: List linked accounts for your organization. source: openapi: openapi/openapi.yml @@ -96,7 +97,7 @@ service: included, will only include non-test linked accounts. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. status: type: optional docs: >- @@ -108,7 +109,19 @@ service: status-code: 200 examples: - query-parameters: + category: accounting cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + end_user_email_address: end_user_email_address + end_user_organization_name: end_user_organization_name + end_user_origin_id: end_user_origin_id + end_user_origin_ids: end_user_origin_ids + id: id + ids: ids + include_duplicates: true + integration_name: integration_name + is_test_account: is_test_account + page_size: 1 + status: status headers: X-Account-Token: '[object Object]' response: diff --git a/.mock/definition/ticketing/passthrough.yml b/.mock/definition/ticketing/passthrough.yml index f20522bf..6d5310be 100644 --- a/.mock/definition/ticketing/passthrough.yml +++ b/.mock/definition/ticketing/passthrough.yml @@ -7,7 +7,8 @@ service: create: path: /ticketing/v1/passthrough method: POST - auth: true + auth: + - tokenAuth: [] docs: Pull data from an endpoint not currently supported by Merge. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/projects.yml b/.mock/definition/ticketing/projects.yml index 7623e288..2901dc63 100644 --- a/.mock/definition/ticketing/projects.yml +++ b/.mock/definition/ticketing/projects.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/projects method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Project` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -90,7 +100,8 @@ service: retrieve: path: /ticketing/v1/projects/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Project` object with the given `id`. source: openapi: openapi/openapi.yml @@ -116,6 +127,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: @@ -139,7 +153,8 @@ service: usersList: path: /ticketing/v1/projects/{parent_id}/users method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `User` objects. source: openapi: openapi/openapi.yml @@ -176,7 +191,7 @@ service: (they may contain some metadata but all other fields are null). page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. response: docs: '' type: root.PaginatedUserList @@ -186,6 +201,11 @@ service: parent_id: parent_id query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: roles + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/regenerateKey.yml b/.mock/definition/ticketing/regenerateKey.yml index 1697dc88..0fd26589 100644 --- a/.mock/definition/ticketing/regenerateKey.yml +++ b/.mock/definition/ticketing/regenerateKey.yml @@ -7,7 +7,8 @@ service: create: path: /ticketing/v1/regenerate-key method: POST - auth: true + auth: + - tokenAuth: [] docs: Exchange remote keys. source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/roles.yml b/.mock/definition/ticketing/roles.yml index 38784053..d61264ba 100644 --- a/.mock/definition/ticketing/roles.yml +++ b/.mock/definition/ticketing/roles.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/roles method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Role` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -94,7 +104,8 @@ service: retrieve: path: /ticketing/v1/roles/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Role` object with the given `id`. source: openapi: openapi/openapi.yml @@ -120,6 +131,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/scopes.yml b/.mock/definition/ticketing/scopes.yml index 61201cbf..8df78934 100644 --- a/.mock/definition/ticketing/scopes.yml +++ b/.mock/definition/ticketing/scopes.yml @@ -7,7 +7,8 @@ service: default_scopes_retrieve: path: /ticketing/v1/default-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn @@ -50,7 +51,8 @@ service: linked_account_scopes_retrieve: path: /ticketing/v1/linked-account-scopes method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn @@ -93,7 +95,8 @@ service: linked_account_scopes_create: path: /ticketing/v1/linked-account-scopes method: POST - auth: true + auth: + - tokenAuth: [] docs: >- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the diff --git a/.mock/definition/ticketing/syncStatus.yml b/.mock/definition/ticketing/syncStatus.yml index 5cc91fe7..0efc39cd 100644 --- a/.mock/definition/ticketing/syncStatus.yml +++ b/.mock/definition/ticketing/syncStatus.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/sync-status method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. @@ -30,7 +31,7 @@ service: docs: The pagination cursor value. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. response: docs: '' type: root.PaginatedSyncStatusList @@ -38,6 +39,7 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/tags.yml b/.mock/definition/ticketing/tags.yml index d8046d5f..3c9c92f8 100644 --- a/.mock/definition/ticketing/tags.yml +++ b/.mock/definition/ticketing/tags.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/tags method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Tag` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -89,7 +99,8 @@ service: retrieve: path: /ticketing/v1/tags/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Tag` object with the given `id`. source: openapi: openapi/openapi.yml @@ -115,6 +126,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/teams.yml b/.mock/definition/ticketing/teams.yml index 0f6096db..8e9406f8 100644 --- a/.mock/definition/ticketing/teams.yml +++ b/.mock/definition/ticketing/teams.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/teams method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Team` objects. source: openapi: openapi/openapi.yml @@ -55,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -65,7 +66,16 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id headers: X-Account-Token: X-Account-Token response: @@ -90,7 +100,8 @@ service: retrieve: path: /ticketing/v1/teams/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Team` object with the given `id`. source: openapi: openapi/openapi.yml @@ -116,6 +127,9 @@ service: examples: - path-parameters: id: id + query-parameters: + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/tickets.yml b/.mock/definition/ticketing/tickets.yml index 74e70284..5a192233 100644 --- a/.mock/definition/ticketing/tickets.yml +++ b/.mock/definition/ticketing/tickets.yml @@ -553,6 +553,16 @@ types: - ticket_type source: openapi: openapi/openapi.yml + TicketsListRequestStatus: + enum: + - value: '' + name: EMPTY + - CLOSED + - IN_PROGRESS + - ON_HOLD + - OPEN + source: + openapi: openapi/openapi.yml TicketsRetrieveRequestExpand: enum: - account @@ -1116,7 +1126,8 @@ service: list: path: /ticketing/v1/tickets method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `Ticket` objects. source: openapi: openapi/openapi.yml @@ -1161,6 +1172,11 @@ service: creator_id: type: optional docs: If provided, will only return tickets created by this creator_id. + creator_ids: + type: optional + docs: >- + If provided, will only return tickets created by the creator_ids; + multiple creator_ids can be separated by commas. cursor: type: optional docs: The pagination cursor value. @@ -1213,7 +1229,7 @@ service: docs: If provided, will only return tickets with this name. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. parent_ticket_id: type: optional docs: If provided, will only return sub tickets of the parent_ticket_id. @@ -1260,7 +1276,7 @@ service: enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) status: - type: optional + type: optional docs: If provided, will only return tickets of this status. tags: type: optional @@ -1283,7 +1299,41 @@ service: status-code: 200 examples: - query-parameters: + account_id: account_id + assignee_ids: assignee_ids + collection_ids: collection_ids + completed_after: '2024-01-15T09:30:00Z' + completed_before: '2024-01-15T09:30:00Z' + contact_id: contact_id + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' + creator_id: creator_id + creator_ids: creator_ids cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + due_after: '2024-01-15T09:30:00Z' + due_before: '2024-01-15T09:30:00Z' + expand: account + include_deleted_data: true + include_remote_data: true + include_remote_fields: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + name: name + page_size: 1 + parent_ticket_id: parent_ticket_id + priority: HIGH + remote_created_after: '2024-01-15T09:30:00Z' + remote_created_before: '2024-01-15T09:30:00Z' + remote_fields: priority + remote_id: remote_id + remote_updated_after: '2024-01-15T09:30:00Z' + remote_updated_before: '2024-01-15T09:30:00Z' + show_enum_origins: priority + status: '' + tags: tags + ticket_type: ticket_type + ticket_url: ticket_url headers: X-Account-Token: X-Account-Token response: @@ -1340,7 +1390,8 @@ service: create: path: /ticketing/v1/tickets method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `Ticket` object with the given values. source: openapi: openapi/openapi.yml @@ -1364,7 +1415,10 @@ service: type: root.TicketResponse status-code: 201 examples: - - headers: + - query-parameters: + is_debug_mode: true + run_async: true + headers: X-Account-Token: X-Account-Token request: model: {} @@ -1440,7 +1494,8 @@ service: retrieve: path: /ticketing/v1/tickets/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `Ticket` object with the given `id`. source: openapi: openapi/openapi.yml @@ -1486,6 +1541,13 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: account + include_remote_data: true + include_remote_fields: true + include_shell_data: true + remote_fields: priority + show_enum_origins: priority headers: X-Account-Token: X-Account-Token response: @@ -1543,7 +1605,8 @@ service: partialUpdate: path: /ticketing/v1/tickets/{id} method: PATCH - auth: true + auth: + - tokenAuth: [] docs: Updates a `Ticket` object with the given `id`. source: openapi: openapi/openapi.yml @@ -1571,6 +1634,9 @@ service: examples: - path-parameters: id: id + query-parameters: + is_debug_mode: true + run_async: true headers: X-Account-Token: X-Account-Token request: @@ -1647,7 +1713,8 @@ service: viewersList: path: /ticketing/v1/tickets/{ticket_id}/viewers method: GET - auth: true + auth: + - tokenAuth: [] docs: >- Returns a list of `Viewer` objects that point to a User id or Team id that is either an assignee or viewer on a `Ticket` with the given id. @@ -1688,7 +1755,7 @@ service: (they may contain some metadata but all other fields are null). page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. response: docs: '' type: root.PaginatedViewerList @@ -1698,6 +1765,11 @@ service: ticket_id: ticket_id query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + expand: team + include_deleted_data: true + include_remote_data: true + include_shell_data: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: @@ -1714,7 +1786,8 @@ service: metaPatchRetrieve: path: /ticketing/v1/tickets/meta/patch/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Ticket` PATCHs. source: openapi: openapi/openapi.yml @@ -1903,7 +1976,8 @@ service: metaPostRetrieve: path: /ticketing/v1/tickets/meta/post method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns metadata for `Ticket` POSTs. source: openapi: openapi/openapi.yml @@ -1921,7 +1995,10 @@ service: type: root.MetaResponse status-code: 200 examples: - - headers: + - query-parameters: + collection_id: collection_id + ticket_type: ticket_type + headers: X-Account-Token: X-Account-Token response: body: @@ -2097,7 +2174,8 @@ service: remoteFieldClassesList: path: /ticketing/v1/tickets/remote-field-classes method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `RemoteFieldClass` objects. source: openapi: openapi/openapi.yml @@ -2142,7 +2220,7 @@ service: is_custom value page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. response: docs: '' type: root.PaginatedRemoteFieldClassList @@ -2150,6 +2228,13 @@ service: examples: - query-parameters: cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + ids: ids + include_deleted_data: true + include_remote_data: true + include_shell_data: true + is_common_model_field: true + is_custom: true + page_size: 1 headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/users.yml b/.mock/definition/ticketing/users.yml index 05094917..20577eb4 100644 --- a/.mock/definition/ticketing/users.yml +++ b/.mock/definition/ticketing/users.yml @@ -24,7 +24,8 @@ service: list: path: /ticketing/v1/users method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `User` objects. source: openapi: openapi/openapi.yml @@ -82,7 +83,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. @@ -95,7 +96,19 @@ service: status-code: 200 examples: - query-parameters: + created_after: '2024-01-15T09:30:00Z' + created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + email_address: email_address + expand: roles + include_deleted_data: true + include_remote_data: true + include_shell_data: true + modified_after: '2024-01-15T09:30:00Z' + modified_before: '2024-01-15T09:30:00Z' + page_size: 1 + remote_id: remote_id + team: team headers: X-Account-Token: X-Account-Token response: @@ -127,7 +140,8 @@ service: retrieve: path: /ticketing/v1/users/{id} method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a `User` object with the given `id`. source: openapi: openapi/openapi.yml @@ -158,6 +172,10 @@ service: examples: - path-parameters: id: id + query-parameters: + expand: roles + include_remote_data: true + include_shell_data: true headers: X-Account-Token: X-Account-Token response: diff --git a/.mock/definition/ticketing/webhookReceivers.yml b/.mock/definition/ticketing/webhookReceivers.yml index 454c1a98..f0d255a1 100644 --- a/.mock/definition/ticketing/webhookReceivers.yml +++ b/.mock/definition/ticketing/webhookReceivers.yml @@ -7,7 +7,8 @@ service: list: path: /ticketing/v1/webhook-receivers method: GET - auth: true + auth: + - tokenAuth: [] docs: Returns a list of `WebhookReceiver` objects. source: openapi: openapi/openapi.yml @@ -26,7 +27,8 @@ service: create: path: /ticketing/v1/webhook-receivers method: POST - auth: true + auth: + - tokenAuth: [] docs: Creates a `WebhookReceiver` object with the given values. source: openapi: openapi/openapi.yml diff --git a/.mock/fern.config.json b/.mock/fern.config.json index 43adf15e..9aef8fce 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "merge", - "version" : "0.66.29" + "version" : "0.83.0" } \ No newline at end of file diff --git a/README.md b/README.md index 2521236e..7ee7e37d 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.activities.create( + is_debug_mode=True, + run_async=True, model=ActivityRequest(), remote_user_id="remote_user_id", ) @@ -78,6 +80,8 @@ client = AsyncMerge( async def main() -> None: await client.ats.activities.create( + is_debug_mode=True, + run_async=True, model=ActivityRequest(), remote_user_id="remote_user_id", ) @@ -235,3 +239,4 @@ while response.next is not None: + diff --git a/poetry.lock b/poetry.lock index c2ddd863..fef37956 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2025.8.3" +version = "2025.10.5" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5"}, - {file = "certifi-2025.8.3.tar.gz", hash = "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407"}, + {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"}, + {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"}, ] [[package]] @@ -133,13 +133,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" -version = "3.10" +version = "3.11" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, - {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, + {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, + {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, ] [package.extras] @@ -483,43 +483,53 @@ files = [ [[package]] name = "tomli" -version = "2.2.1" +version = "2.3.0" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" files = [ - {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, - {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, - {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, - {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, - {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, - {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, - {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, - {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, - {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, - {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, + {file = "tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45"}, + {file = "tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c"}, + {file = "tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456"}, + {file = "tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6"}, + {file = "tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876"}, + {file = "tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05"}, + {file = "tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606"}, + {file = "tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005"}, + {file = "tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463"}, + {file = "tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f"}, + {file = "tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0"}, + {file = "tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba"}, + {file = "tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b"}, + {file = "tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index b6e20abe..00c30a0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "MergePythonClient" [tool.poetry] name = "MergePythonClient" -version = "2.4.0" +version = "2.5.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index ba196199..44fd8a5b 100644 --- a/reference.md +++ b/reference.md @@ -161,14 +161,40 @@ Returns a list of `Activity` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.activities import ( + ActivitiesListRequestRemoteFields, + ActivitiesListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.activities.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=ActivitiesListRequestRemoteFields.ACTIVITY_TYPE, + remote_id="remote_id", + show_enum_origins=ActivitiesListRequestShowEnumOrigins.ACTIVITY_TYPE, + user_id="user_id", ) ``` @@ -344,6 +370,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.activities.create( + is_debug_mode=True, + run_async=True, model=ActivityRequest(), remote_user_id="remote_user_id", ) @@ -434,6 +462,10 @@ Returns an `Activity` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.activities import ( + ActivitiesRetrieveRequestRemoteFields, + ActivitiesRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -441,6 +473,10 @@ client = Merge( ) client.ats.activities.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=ActivitiesRetrieveRequestRemoteFields.ACTIVITY_TYPE, + show_enum_origins=ActivitiesRetrieveRequestShowEnumOrigins.ACTIVITY_TYPE, ) ``` @@ -606,14 +642,43 @@ Returns a list of `Application` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.applications import ( + ApplicationsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.applications.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + credited_to_id="credited_to_id", + current_stage_id="current_stage_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ApplicationsListRequestExpand.CANDIDATE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + reject_reason_id="reject_reason_id", + remote_id="remote_id", + source="source", ) ``` @@ -816,6 +881,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.applications.create( + is_debug_mode=True, + run_async=True, model=ApplicationRequest(), remote_user_id="remote_user_id", ) @@ -906,6 +973,9 @@ Returns an `Application` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.applications import ( + ApplicationsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -913,6 +983,9 @@ client = Merge( ) client.ats.applications.retrieve( id="id", + expand=ApplicationsRetrieveRequestExpand.CANDIDATE, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -1008,6 +1081,8 @@ client = Merge( ) client.ats.applications.change_stage_create( id="id", + is_debug_mode=True, + run_async=True, ) ``` @@ -1109,7 +1184,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.ats.applications.meta_post_retrieve() +client.ats.applications.meta_post_retrieve( + application_remote_template_id="application_remote_template_id", +) ```
@@ -1320,6 +1397,8 @@ Returns a list of `Attachment` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -1327,7 +1406,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.attachments.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -1503,6 +1600,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.attachments.create( + is_debug_mode=True, + run_async=True, model=AttachmentRequest(), remote_user_id="remote_user_id", ) @@ -1600,6 +1699,8 @@ client = Merge( ) client.ats.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -1773,6 +1874,11 @@ client = Merge( ) client.ats.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -1939,14 +2045,39 @@ Returns a list of `Candidate` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.candidates import CandidatesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.candidates.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=CandidatesListRequestExpand.APPLICATIONS, + first_name="first_name", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + last_name="last_name", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + tags="tags", ) ``` @@ -2130,6 +2261,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.candidates.create( + is_debug_mode=True, + run_async=True, model=CandidateRequest(), remote_user_id="remote_user_id", ) @@ -2220,6 +2353,9 @@ Returns a `Candidate` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.candidates import ( + CandidatesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -2227,6 +2363,9 @@ client = Merge( ) client.ats.candidates.retrieve( id="id", + expand=CandidatesRetrieveRequestExpand.APPLICATIONS, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -2323,6 +2462,8 @@ client = Merge( ) client.ats.candidates.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedCandidateRequest(), remote_user_id="remote_user_id", ) @@ -2927,6 +3068,8 @@ Returns a list of `Department` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -2934,7 +3077,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.departments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -3078,6 +3238,8 @@ client = Merge( ) client.ats.departments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -3158,14 +3320,40 @@ Returns a list of `EEOC` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.eeocs import ( + EeocsListRequestRemoteFields, + EeocsListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.eeocs.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=EeocsListRequestRemoteFields.DISABILITY_STATUS, + remote_id="remote_id", + show_enum_origins=EeocsListRequestShowEnumOrigins.DISABILITY_STATUS, ) ``` @@ -3334,6 +3522,10 @@ Returns an `EEOC` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.eeocs import ( + EeocsRetrieveRequestRemoteFields, + EeocsRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -3341,6 +3533,10 @@ client = Merge( ) client.ats.eeocs.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS, + show_enum_origins=EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS, ) ``` @@ -3451,7 +3647,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.ats.field_mapping.field_mappings_retrieve() +client.ats.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, +) ```
@@ -3521,6 +3719,7 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -3810,7 +4009,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.ats.field_mapping.remote_fields_retrieve() +client.ats.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", +) ``` @@ -4015,14 +4217,39 @@ Returns a list of `ScheduledInterview` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.interviews import InterviewsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.interviews.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=InterviewsListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + job_interview_stage_id="job_interview_stage_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + organizer_id="organizer_id", + page_size=1, + remote_id="remote_id", ) ``` @@ -4222,6 +4449,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.interviews.create( + is_debug_mode=True, + run_async=True, model=ScheduledInterviewRequest(), remote_user_id="remote_user_id", ) @@ -4312,6 +4541,9 @@ Returns a `ScheduledInterview` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.interviews import ( + InterviewsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -4319,6 +4551,9 @@ client = Merge( ) client.ats.interviews.retrieve( id="id", + expand=InterviewsRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -4484,14 +4719,38 @@ Gets all issues for Organization.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -4736,6 +4995,8 @@ Returns a list of `JobInterviewStage` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -4743,7 +5004,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.job_interview_stages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -4903,6 +5182,8 @@ client = Merge( ) client.ats.job_interview_stages.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -4991,14 +5272,37 @@ Returns a list of `JobPosting` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.job_postings import ( + JobPostingsListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.job_postings.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + status=JobPostingsListRequestStatus.CLOSED, ) ``` @@ -5166,6 +5470,8 @@ client = Merge( ) client.ats.job_postings.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -5254,14 +5560,41 @@ Returns a list of `Job` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.jobs import ( + JobsListRequestExpand, + JobsListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.jobs.list( + code="code", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JobsListRequestExpand.DEPARTMENTS, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + offices="offices", + page_size=1, + remote_id="remote_id", + status=JobsListRequestStatus.ARCHIVED, ) ``` @@ -5454,6 +5787,7 @@ Returns a `Job` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.jobs import JobsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -5461,6 +5795,9 @@ client = Merge( ) client.ats.jobs.retrieve( id="id", + expand=JobsRetrieveRequestExpand.DEPARTMENTS, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -5565,6 +5902,9 @@ Returns a list of `ScreeningQuestion` objects. ```python from merge import Merge +from merge.resources.ats.resources.jobs import ( + JobsScreeningQuestionsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -5573,6 +5913,11 @@ client = Merge( client.ats.jobs.screening_questions_list( job_id="job_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JobsScreeningQuestionsListRequestExpand.JOB, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -5870,13 +6215,28 @@ List linked accounts for your organization. ```python from merge import Merge +from merge.resources.ats.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -6047,14 +6407,37 @@ Returns a list of `Offer` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.offers import OffersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.offers.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + creator_id="creator_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=OffersListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -6231,6 +6614,7 @@ Returns an `Offer` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.offers import OffersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -6238,6 +6622,9 @@ client = Merge( ) client.ats.offers.retrieve( id="id", + expand=OffersRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -6342,6 +6729,8 @@ Returns a list of `Office` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -6349,7 +6738,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.offices.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -6493,6 +6899,8 @@ client = Merge( ) client.ats.offices.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -6721,6 +7129,8 @@ Returns a list of `RejectReason` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -6728,7 +7138,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.reject_reasons.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -6872,6 +7299,8 @@ client = Merge( ) client.ats.reject_reasons.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -6952,14 +7381,38 @@ Returns a list of `Scorecard` objects.
```python +import datetime + from merge import Merge +from merge.resources.ats.resources.scorecards import ScorecardsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.scorecards.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ScorecardsListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + interview_id="interview_id", + interviewer_id="interviewer_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -7144,6 +7597,9 @@ Returns a `Scorecard` object with the given `id`. ```python from merge import Merge +from merge.resources.ats.resources.scorecards import ( + ScorecardsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -7151,6 +7607,9 @@ client = Merge( ) client.ats.scorecards.retrieve( id="id", + expand=ScorecardsRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -7263,6 +7722,7 @@ client = Merge( ) client.ats.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) ``` @@ -7397,6 +7857,8 @@ Returns a list of `Tag` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -7404,7 +7866,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.tags.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -7541,6 +8020,8 @@ Returns a list of `RemoteUser` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -7548,7 +8029,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ats.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email="email", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -7716,6 +8215,8 @@ client = Merge( ) client.ats.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -7934,8 +8435,8 @@ client.ats.webhook_receivers.create( -## Filestorage AccountDetails -
client.filestorage.account_details.retrieve() +## Chat AccountDetails +
client.chat.account_details.retrieve()
@@ -7968,7 +8469,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.account_details.retrieve() +client.chat.account_details.retrieve() ```
@@ -7996,8 +8497,8 @@ client.filestorage.account_details.retrieve()
-## Filestorage AccountToken -
client.filestorage.account_token.retrieve(...) +## Chat AccountToken +
client.chat.account_token.retrieve(...)
@@ -8030,7 +8531,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.account_token.retrieve( +client.chat.account_token.retrieve( public_token="public_token", ) @@ -8068,8 +8569,8 @@ client.filestorage.account_token.retrieve(
-## Filestorage AsyncPassthrough -
client.filestorage.async_passthrough.create(...) +## Chat AsyncPassthrough +
client.chat.async_passthrough.create(...)
@@ -8097,13 +8598,13 @@ Asynchronously pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.filestorage import DataPassthroughRequest, MethodEnum +from merge.resources.chat import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.async_passthrough.create( +client.chat.async_passthrough.create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", @@ -8144,7 +8645,7 @@ client.filestorage.async_passthrough.create(
-
client.filestorage.async_passthrough.retrieve(...) +
client.chat.async_passthrough.retrieve(...)
@@ -8177,7 +8678,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.async_passthrough.retrieve( +client.chat.async_passthrough.retrieve( async_passthrough_receipt_id="async_passthrough_receipt_id", ) @@ -8215,8 +8716,8 @@ client.filestorage.async_passthrough.retrieve(
-## Filestorage AuditTrail -
client.filestorage.audit_trail.list(...) +## Chat AuditTrail +
client.chat.audit_trail.list(...)
@@ -8249,8 +8750,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.audit_trail.list( +client.chat.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -8291,7 +8797,7 @@ client.filestorage.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -8327,8 +8833,8 @@ client.filestorage.audit_trail.list(
-## Filestorage AvailableActions -
client.filestorage.available_actions.retrieve() +## Chat AvailableActions +
client.chat.available_actions.retrieve()
@@ -8361,7 +8867,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.available_actions.retrieve() +client.chat.available_actions.retrieve() ```
@@ -8389,8 +8895,8 @@ client.filestorage.available_actions.retrieve()
-## Filestorage Scopes -
client.filestorage.scopes.default_scopes_retrieve() +## Chat Conversations +
client.chat.conversations.list(...)
@@ -8402,7 +8908,7 @@ client.filestorage.available_actions.retrieve()
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns a list of `Conversation` objects.
@@ -8417,13 +8923,34 @@ Get the default permissions for Merge Common Models and fields across all Linked
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.scopes.default_scopes_retrieve() +client.chat.conversations.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) ```
@@ -8439,160 +8966,55 @@ client.filestorage.scopes.default_scopes_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
-
- - - - - - - -
client.filestorage.scopes.linked_account_scopes_retrieve() -
-
- -#### 📝 Description
-
-
- -Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -
-
+**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.scopes.linked_account_scopes_retrieve() - -``` -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-#### ⚙️ Parameters -
-
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**expand:** `typing.Optional[typing.Literal["members"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
-
-
- - -
-
-
- -
client.filestorage.scopes.linked_account_scopes_create(...) -
-
- -#### 📝 Description - -
-
-Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) -
-
+**include_deleted_data:** `typing.Optional[bool]` — 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/). +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge -from merge.resources.filestorage import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, -) - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], -) - -``` -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-#### ⚙️ Parameters - -
-
-
-**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -8600,65 +9022,35 @@ client.filestorage.scopes.linked_account_scopes_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
-
-
- - -
-
-
-## Filestorage DeleteAccount -
client.filestorage.delete_account.delete()
-#### 📝 Description - -
-
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
-Delete a linked account. -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.delete_account.delete() - -``` -
-
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +
-#### ⚙️ Parameters - -
-
-
@@ -8674,8 +9066,7 @@ client.filestorage.delete_account.delete()
-## Filestorage Drives -
client.filestorage.drives.list(...) +
client.chat.conversations.members_list(...)
@@ -8687,7 +9078,7 @@ client.filestorage.delete_account.delete()
-Returns a list of `Drive` objects. +Returns a list of `Member` objects.
@@ -8703,13 +9094,22 @@ Returns a list of `Drive` objects. ```python from merge import Merge +from merge.resources.chat.resources.conversations import ( + ConversationsMembersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.drives.list( +client.chat.conversations.members_list( + conversation_id="conversation_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ConversationsMembersListRequestExpand.GROUP, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -8726,7 +9126,7 @@ client.filestorage.drives.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**conversation_id:** `str`
@@ -8734,7 +9134,7 @@ client.filestorage.drives.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -8742,7 +9142,7 @@ client.filestorage.drives.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**expand:** `typing.Optional[ConversationsMembersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -8774,7 +9174,7 @@ client.filestorage.drives.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -8782,15 +9182,72 @@ client.filestorage.drives.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.chat.conversations.retrieve(...)
-**name:** `typing.Optional[str]` — If provided, will only return drives with this name. This performs an exact match. +#### 📝 Description + +
+
+ +
+
+ +Returns a `Conversation` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.conversations.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str`
@@ -8798,7 +9255,7 @@ client.filestorage.drives.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**expand:** `typing.Optional[typing.Literal["members"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -8806,7 +9263,15 @@ client.filestorage.drives.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -8826,7 +9291,8 @@ client.filestorage.drives.list(
-
client.filestorage.drives.retrieve(...) +## Chat Scopes +
client.chat.scopes.default_scopes_retrieve()
@@ -8838,7 +9304,7 @@ client.filestorage.drives.list(
-Returns a `Drive` object with the given `id`. +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -8859,9 +9325,68 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.drives.retrieve( - id="id", +client.chat.scopes.default_scopes_retrieve() + +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.chat.scopes.linked_account_scopes_retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", ) +client.chat.scopes.linked_account_scopes_retrieve() ```
@@ -8877,15 +9402,99 @@ client.filestorage.drives.retrieve(
-**id:** `str` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+
client.chat.scopes.linked_account_scopes_create(...)
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.chat import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for
@@ -8893,10 +9502,64 @@ client.filestorage.drives.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+ +## Chat DeleteAccount +
client.chat.delete_account.delete() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.delete_account.delete() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
@@ -8913,8 +9576,8 @@ client.filestorage.drives.retrieve(
-## Filestorage FieldMapping -
client.filestorage.field_mapping.field_mappings_retrieve(...) +## Chat FieldMapping +
client.chat.field_mapping.field_mappings_retrieve(...)
@@ -8947,7 +9610,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_retrieve() +client.chat.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, +) ```
@@ -8983,7 +9648,7 @@ client.filestorage.field_mapping.field_mappings_retrieve()
-
client.filestorage.field_mapping.field_mappings_create(...) +
client.chat.field_mapping.field_mappings_create(...)
@@ -9016,7 +9681,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_create( +client.chat.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -9095,6 +9761,14 @@ client.filestorage.field_mapping.field_mappings_create(
+**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -9107,7 +9781,7 @@ client.filestorage.field_mapping.field_mappings_create(
-
client.filestorage.field_mapping.field_mappings_destroy(...) +
client.chat.field_mapping.field_mappings_destroy(...)
@@ -9140,7 +9814,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_destroy( +client.chat.field_mapping.field_mappings_destroy( field_mapping_id="field_mapping_id", ) @@ -9178,7 +9852,7 @@ client.filestorage.field_mapping.field_mappings_destroy(
-
client.filestorage.field_mapping.field_mappings_partial_update(...) +
client.chat.field_mapping.field_mappings_partial_update(...)
@@ -9211,7 +9885,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_partial_update( +client.chat.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", ) @@ -9261,6 +9935,14 @@ client.filestorage.field_mapping.field_mappings_partial_update(
+**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -9273,7 +9955,7 @@ client.filestorage.field_mapping.field_mappings_partial_update(
-
client.filestorage.field_mapping.remote_fields_retrieve(...) +
client.chat.field_mapping.remote_fields_retrieve(...)
@@ -9306,7 +9988,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.remote_fields_retrieve() +client.chat.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", +) ```
@@ -9350,7 +10035,7 @@ client.filestorage.field_mapping.remote_fields_retrieve()
-
client.filestorage.field_mapping.target_fields_retrieve() +
client.chat.field_mapping.target_fields_retrieve()
@@ -9383,7 +10068,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.target_fields_retrieve() +client.chat.field_mapping.target_fields_retrieve() ```
@@ -9411,8 +10096,8 @@ client.filestorage.field_mapping.target_fields_retrieve()
-## Filestorage Files -
client.filestorage.files.list(...) +## Chat GenerateKey +
client.chat.generate_key.create(...)
@@ -9424,7 +10109,7 @@ client.filestorage.field_mapping.target_fields_retrieve()
-Returns a list of `File` objects. +Create a remote key.
@@ -9445,8 +10130,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.chat.generate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -9463,7 +10148,7 @@ client.filestorage.files.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**name:** `str` — The name of the remote key
@@ -9471,63 +10156,90 @@ client.filestorage.files.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. -
+
+## Chat Groups +
client.chat.groups.list(...)
-**drive_id:** `typing.Optional[str]` — Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive. - -
-
+#### 📝 Description
-**expand:** `typing.Optional[FilesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
-
-**folder_id:** `typing.Optional[str]` — Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory. - +Returns a list of `Group` objects.
+ + + +#### 🔌 Usage
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +```
+ + + +#### ⚙️ Parameters
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -9535,7 +10247,7 @@ client.filestorage.files.list(
-**mime_type:** `typing.Optional[str]` — If provided, will only return files with these mime_types. Multiple values can be separated by commas. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -9543,7 +10255,7 @@ client.filestorage.files.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -9551,7 +10263,7 @@ client.filestorage.files.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -9559,7 +10271,7 @@ client.filestorage.files.list(
-**name:** `typing.Optional[str]` — If provided, will only return files with this name. This performs an exact match. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -9567,7 +10279,7 @@ client.filestorage.files.list(
-**order_by:** `typing.Optional[FilesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -9575,7 +10287,7 @@ client.filestorage.files.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -9583,7 +10295,7 @@ client.filestorage.files.list(
-**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform after this datetime. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -9591,7 +10303,7 @@ client.filestorage.files.list(
-**remote_created_before:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform before this datetime. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -9619,7 +10331,7 @@ client.filestorage.files.list(
-
client.filestorage.files.create(...) +
client.chat.groups.retrieve(...)
@@ -9631,7 +10343,7 @@ client.filestorage.files.list(
-Creates a `File` object with the given values. +Returns a `Group` object with the given `id`.
@@ -9647,14 +10359,15 @@ Creates a `File` object with the given values. ```python from merge import Merge -from merge.resources.filestorage import FileRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.create( - model=FileRequest(), +client.chat.groups.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -9671,7 +10384,7 @@ client.filestorage.files.create(
-**model:** `FileRequest` +**id:** `str`
@@ -9679,7 +10392,7 @@ client.filestorage.files.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -9687,7 +10400,7 @@ client.filestorage.files.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -9707,7 +10420,8 @@ client.filestorage.files.create(
-
client.filestorage.files.retrieve(...) +## Chat Issues +
client.chat.issues.list(...)
@@ -9719,7 +10433,7 @@ client.filestorage.files.create(
-Returns a `File` object with the given `id`. +Gets all issues for Organization.
@@ -9734,14 +10448,38 @@ Returns a `File` object with the given `id`.
```python +import datetime + from merge import Merge +from merge.resources.chat.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.retrieve( - id="id", +client.chat.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -9758,7 +10496,7 @@ client.filestorage.files.retrieve(
-**id:** `str` +**account_token:** `typing.Optional[str]`
@@ -9766,7 +10504,7 @@ client.filestorage.files.retrieve(
-**expand:** `typing.Optional[FilesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -9774,7 +10512,7 @@ client.filestorage.files.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time
@@ -9782,7 +10520,92 @@ client.filestorage.files.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**end_user_organization_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. + +
+
+ +
+
+ +**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. + +
+
+ +
+
+ +**include_muted:** `typing.Optional[str]` — If true, will include muted issues + +
+
+ +
+
+ +**integration_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. + +
+
+ +
+
+ +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. + +
+
+ +
+
+ +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time + +
+
+ +
+
+ +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -9802,7 +10625,7 @@ client.filestorage.files.retrieve(
-
client.filestorage.files.download_request_meta_retrieve(...) +
client.chat.issues.retrieve(...)
@@ -9814,7 +10637,7 @@ client.filestorage.files.retrieve(
-Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party. +Get a specific issue.
@@ -9835,7 +10658,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.download_request_meta_retrieve( +client.chat.issues.retrieve( id="id", ) @@ -9861,14 +10684,6 @@ client.filestorage.files.download_request_meta_retrieve(
-**mime_type:** `typing.Optional[str]` — 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. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -9881,7 +10696,8 @@ client.filestorage.files.download_request_meta_retrieve(
-
client.filestorage.files.download_request_meta_list(...) +## Chat LinkToken +
client.chat.link_token.create(...)
@@ -9893,7 +10709,7 @@ client.filestorage.files.download_request_meta_retrieve(
-Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party. +Creates a link token to be used when linking a new end user.
@@ -9909,13 +10725,17 @@ Returns metadata to construct authenticated file download requests, allowing you ```python from merge import Merge +from merge.resources.chat import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.download_request_meta_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.chat.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -9932,7 +10752,7 @@ client.filestorage.files.download_request_meta_list(
-**created_after:** `typing.Optional[str]` — If provided, will only return objects created after this datetime. +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -9940,7 +10760,7 @@ client.filestorage.files.download_request_meta_list(
-**created_before:** `typing.Optional[str]` — If provided, will only return objects created before this datetime. +**end_user_organization_name:** `str` — Your end user's organization.
@@ -9948,7 +10768,7 @@ client.filestorage.files.download_request_meta_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -9956,7 +10776,7 @@ client.filestorage.files.download_request_meta_list(
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — If provided, will only return objects with the given IDs. Comma-separated list of strings. +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
@@ -9964,7 +10784,7 @@ client.filestorage.files.download_request_meta_list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
@@ -9972,7 +10792,7 @@ client.filestorage.files.download_request_meta_list(
-**mime_types:** `typing.Optional[str]` — 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. +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
@@ -9980,7 +10800,7 @@ client.filestorage.files.download_request_meta_list(
-**modified_after:** `typing.Optional[str]` — If provided, will only return objects modified after this datetime. +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -9988,7 +10808,7 @@ client.filestorage.files.download_request_meta_list(
-**modified_before:** `typing.Optional[str]` — If provided, will only return objects modified before this datetime. +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -9996,7 +10816,7 @@ client.filestorage.files.download_request_meta_list(
-**order_by:** `typing.Optional[FilesDownloadRequestMetaListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -10004,7 +10824,14 @@ client.filestorage.files.download_request_meta_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
@@ -10012,64 +10839,44 @@ client.filestorage.files.download_request_meta_list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
- -
+**language:** `typing.Optional[EndUserDetailsRequestLanguage]` +The following subset of IETF language tags can be used to configure localization. +* `en` - en +* `de` - de + -
-
client.filestorage.files.meta_post_retrieve()
-#### 📝 Description - -
-
+**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. + +
+
-Returns metadata for `FileStorageFile` POSTs. -
-
+**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +
-#### 🔌 Usage -
-
-
+**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.files.meta_post_retrieve() +When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. -``` -
-
+* `SELECTIVE_SYNC` - SELECTIVE_SYNC +
-#### ⚙️ Parameters - -
-
-
@@ -10085,8 +10892,8 @@ client.filestorage.files.meta_post_retrieve()
-## Filestorage Folders -
client.filestorage.folders.list(...) +## Chat LinkedAccounts +
client.chat.linked_accounts.list(...)
@@ -10098,7 +10905,7 @@ client.filestorage.files.meta_post_retrieve()
-Returns a list of `Folder` objects. +List linked accounts for your organization.
@@ -10114,13 +10921,28 @@ Returns a list of `Folder` objects. ```python from merge import Merge +from merge.resources.chat.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.folders.list( +client.chat.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -10137,15 +10959,19 @@ client.filestorage.folders.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]` -
-
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage +* `knowledgebase` - knowledgebase +* `chat` - chat
@@ -10161,7 +10987,7 @@ client.filestorage.folders.list(
-**drive_id:** `typing.Optional[str]` — If provided, will only return folders in this drive. +**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address.
@@ -10169,7 +10995,7 @@ client.filestorage.folders.list(
-**expand:** `typing.Optional[FoldersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name.
@@ -10177,7 +11003,7 @@ client.filestorage.folders.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID.
@@ -10185,7 +11011,7 @@ client.filestorage.folders.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
@@ -10193,7 +11019,7 @@ client.filestorage.folders.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**id:** `typing.Optional[str]`
@@ -10201,7 +11027,7 @@ client.filestorage.folders.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
@@ -10209,7 +11035,7 @@ client.filestorage.folders.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**include_duplicates:** `typing.Optional[bool]` — 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.
@@ -10217,7 +11043,7 @@ client.filestorage.folders.list(
-**name:** `typing.Optional[str]` — If provided, will only return folders with this name. This performs an exact match. +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name.
@@ -10225,7 +11051,7 @@ client.filestorage.folders.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
@@ -10233,7 +11059,7 @@ client.filestorage.folders.list(
-**parent_folder_id:** `typing.Optional[str]` — If provided, will only return folders in this parent folder. If null, will return folders in root directory. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -10241,7 +11067,7 @@ client.filestorage.folders.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
@@ -10261,7 +11087,8 @@ client.filestorage.folders.list(
-
client.filestorage.folders.create(...) +## Chat Messages +
client.chat.messages.list(...)
@@ -10273,7 +11100,7 @@ client.filestorage.folders.list(
-Creates a `Folder` object with the given values. +Returns a list of `Message` objects.
@@ -10288,15 +11115,33 @@ Creates a `Folder` object with the given values.
```python +import datetime + from merge import Merge -from merge.resources.filestorage import FolderRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.folders.create( - model=FolderRequest(), +client.chat.messages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -10313,7 +11158,7 @@ client.filestorage.folders.create(
-**model:** `FolderRequest` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -10321,7 +11166,7 @@ client.filestorage.folders.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -10329,7 +11174,7 @@ client.filestorage.folders.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -10337,70 +11182,31 @@ client.filestorage.folders.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
-
-
- - - -
- -
client.filestorage.folders.retrieve(...)
-#### 📝 Description - -
-
- -
-
- -Returns a `Folder` object with the given `id`. -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.folders.retrieve( - id="id", -) - -``` -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -10408,7 +11214,7 @@ client.filestorage.folders.retrieve(
-**expand:** `typing.Optional[FoldersRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -10416,7 +11222,7 @@ client.filestorage.folders.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -10424,7 +11230,7 @@ client.filestorage.folders.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -10444,7 +11250,7 @@ client.filestorage.folders.retrieve(
-
client.filestorage.folders.meta_post_retrieve() +
client.chat.messages.retrieve(...)
@@ -10456,7 +11262,7 @@ client.filestorage.folders.retrieve(
-Returns metadata for `FileStorageFolder` POSTs. +Returns a `Message` object with the given `id`.
@@ -10477,7 +11283,11 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.folders.meta_post_retrieve() +client.chat.messages.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) ``` @@ -10493,6 +11303,30 @@ client.filestorage.folders.meta_post_retrieve()
+**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -10505,8 +11339,7 @@ client.filestorage.folders.meta_post_retrieve()
-## Filestorage GenerateKey -
client.filestorage.generate_key.create(...) +
client.chat.messages.replies_list(...)
@@ -10518,7 +11351,7 @@ client.filestorage.folders.meta_post_retrieve()
-Create a remote key. +Returns a list of `Message` objects.
@@ -10539,8 +11372,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.generate_key.create( - name="Remote Deployment Key 1", +client.chat.messages.replies_list( + message_id="message_id", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -10557,7 +11395,47 @@ client.filestorage.generate_key.create(
-**name:** `str` — The name of the remote key +**message_id:** `str` + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -10577,8 +11455,8 @@ client.filestorage.generate_key.create(
-## Filestorage Groups -
client.filestorage.groups.list(...) +## Chat Passthrough +
client.chat.passthrough.create(...)
@@ -10590,7 +11468,7 @@ client.filestorage.generate_key.create(
-Returns a list of `Group` objects. +Pull data from an endpoint not currently supported by Merge.
@@ -10606,13 +11484,17 @@ Returns a list of `Group` objects. ```python from merge import Merge +from merge.resources.chat import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.groups.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.chat.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -10629,7 +11511,7 @@ client.filestorage.groups.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**request:** `DataPassthroughRequest`
@@ -10637,79 +11519,71 @@ client.filestorage.groups.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. -
-
-
-**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. -
+
+## Chat RegenerateKey +
client.chat.regenerate_key.create(...)
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
+#### 📝 Description
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
-
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - +Exchange remote keys. +
+
+#### 🔌 Usage +
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
-
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.regenerate_key.create( + name="Remote Deployment Key 1", +) + +```
+ + + +#### ⚙️ Parameters
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
-
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**name:** `str` — The name of the remote key
@@ -10729,7 +11603,8 @@ client.filestorage.groups.list(
-
client.filestorage.groups.retrieve(...) +## Chat SyncStatus +
client.chat.sync_status.list(...)
@@ -10741,7 +11616,7 @@ client.filestorage.groups.list(
-Returns a `Group` object with the given `id`. +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -10762,8 +11637,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.groups.retrieve( - id="id", +client.chat.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) ``` @@ -10780,23 +11656,7 @@ client.filestorage.groups.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -10804,7 +11664,7 @@ client.filestorage.groups.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -10824,8 +11684,8 @@ client.filestorage.groups.retrieve(
-## Filestorage Issues -
client.filestorage.issues.list(...) +## Chat ForceResync +
client.chat.force_resync.sync_status_resync_create()
@@ -10837,7 +11697,7 @@ client.filestorage.groups.retrieve(
-Gets all issues for Organization. +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -10858,9 +11718,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.issues.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) +client.chat.force_resync.sync_status_resync_create() ``` @@ -10876,31 +11734,90 @@ client.filestorage.issues.list(
-**account_token:** `typing.Optional[str]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+## Chat Users +
client.chat.users.list(...)
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+#### 🔌 Usage +
-**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time - +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +```
+
+
+ +#### ⚙️ Parameters
-**end_user_organization_name:** `typing.Optional[str]` +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -10908,7 +11825,7 @@ client.filestorage.issues.list(
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -10916,7 +11833,7 @@ client.filestorage.issues.list(
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -10924,7 +11841,7 @@ client.filestorage.issues.list(
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues +**expand:** `typing.Optional[typing.Literal["groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -10932,7 +11849,7 @@ client.filestorage.issues.list(
-**integration_name:** `typing.Optional[str]` +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -10940,7 +11857,7 @@ client.filestorage.issues.list(
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -10948,7 +11865,7 @@ client.filestorage.issues.list(
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -10956,7 +11873,7 @@ client.filestorage.issues.list(
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -10964,7 +11881,7 @@ client.filestorage.issues.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -10972,7 +11889,7 @@ client.filestorage.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -10980,12 +11897,7 @@ client.filestorage.issues.list(
-**status:** `typing.Optional[IssuesListRequestStatus]` - -Status of the issue. Options: ('ONGOING', 'RESOLVED') - -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -11005,7 +11917,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.filestorage.issues.retrieve(...) +
client.chat.users.retrieve(...)
@@ -11017,7 +11929,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +Returns a `User` object with the given `id`.
@@ -11038,8 +11950,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.issues.retrieve( +client.chat.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -11064,6 +11978,30 @@ client.filestorage.issues.retrieve(
+**expand:** `typing.Optional[typing.Literal["groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11076,8 +12014,8 @@ client.filestorage.issues.retrieve(
-## Filestorage LinkToken -
client.filestorage.link_token.create(...) +## Chat WebhookReceivers +
client.chat.webhook_receivers.list()
@@ -11089,7 +12027,7 @@ client.filestorage.issues.retrieve(
-Creates a link token to be used when linking a new end user. +Returns a list of `WebhookReceiver` objects.
@@ -11105,18 +12043,12 @@ Creates a link token to be used when linking a new end user. ```python from merge import Merge -from merge.resources.filestorage import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], -) +client.chat.webhook_receivers.list() ``` @@ -11132,31 +12064,71 @@ client.filestorage.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.chat.webhook_receivers.create(...)
-**end_user_organization_name:** `str` — Your end user's organization. - +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values.
+
+
+ +#### 🔌 Usage
-**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.webhook_receivers.create( + event="event", + is_active=True, +) + +``` +
+
+#### ⚙️ Parameters +
-**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +
+
+ +**event:** `str`
@@ -11164,7 +12136,7 @@ client.filestorage.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**is_active:** `bool`
@@ -11172,7 +12144,7 @@ client.filestorage.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**key:** `typing.Optional[str]`
@@ -11180,67 +12152,133 @@ client.filestorage.link_token.create(
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+## Crm AccountDetails +
client.crm.account_details.retrieve()
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. +
+
+#### 🔌 Usage +
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.account_details.retrieve() + +``` +
+
+#### ⚙️ Parameters +
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ +
+
+
+ +## Crm AccountToken +
client.crm.account_token.retrieve(...)
-**language:** `typing.Optional[LanguageEnum]` +#### 📝 Description -The following subset of IETF language tags can be used to configure localization. +
+
-* `en` - en -* `de` - de - +
+
+ +Returns the account token for the end user with the provided public token. +
+
+#### 🔌 Usage +
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.account_token.retrieve( + public_token="public_token", +) + +``` +
+
+#### ⚙️ Parameters +
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +
+
+ +**public_token:** `str`
@@ -11260,8 +12298,8 @@ The following subset of IETF language tags can be used to configure localization
-## Filestorage LinkedAccounts -
client.filestorage.linked_accounts.list(...) +## Crm Accounts +
client.crm.accounts.list(...)
@@ -11273,7 +12311,7 @@ The following subset of IETF language tags can be used to configure localization
-List linked accounts for your organization. +Returns a list of `Account` objects.
@@ -11288,14 +12326,36 @@ List linked accounts for your organization.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.linked_accounts.list( +client.crm.accounts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + owner_id="owner_id", + page_size=1, + remote_id="remote_id", ) ``` @@ -11312,17 +12372,15 @@ client.filestorage.linked_accounts.list(
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
-Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` +
+
-* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -11338,7 +12396,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -11346,7 +12404,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -11354,7 +12412,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -11362,7 +12420,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -11370,7 +12428,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**id:** `typing.Optional[str]` +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -11378,7 +12436,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -11386,7 +12444,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**include_duplicates:** `typing.Optional[bool]` — 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. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -11394,7 +12452,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. +**name:** `typing.Optional[str]` — If provided, will only return accounts with this name.
@@ -11402,7 +12460,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. +**owner_id:** `typing.Optional[str]` — If provided, will only return accounts with this owner.
@@ -11418,7 +12476,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -11438,8 +12496,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-## Filestorage Passthrough -
client.filestorage.passthrough.create(...) +
client.crm.accounts.create(...)
@@ -11451,7 +12508,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-Pull data from an endpoint not currently supported by Merge. +Creates an `Account` object with the given values.
@@ -11467,17 +12524,16 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.filestorage import DataPassthroughRequest, MethodEnum +from merge.resources.crm import AccountRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.crm.accounts.create( + is_debug_mode=True, + run_async=True, + model=AccountRequest(), ) ``` @@ -11494,7 +12550,23 @@ client.filestorage.passthrough.create(
-**request:** `DataPassthroughRequest` +**model:** `AccountRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -11514,8 +12586,7 @@ client.filestorage.passthrough.create(
-## Filestorage RegenerateKey -
client.filestorage.regenerate_key.create(...) +
client.crm.accounts.retrieve(...)
@@ -11527,7 +12598,7 @@ client.filestorage.passthrough.create(
-Exchange remote keys. +Returns an `Account` object with the given `id`.
@@ -11548,8 +12619,11 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.regenerate_key.create( - name="Remote Deployment Key 1", +client.crm.accounts.retrieve( + id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -11566,7 +12640,39 @@ client.filestorage.regenerate_key.create(
-**name:** `str` — The name of the remote key +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -11586,8 +12692,7 @@ client.filestorage.regenerate_key.create(
-## Filestorage SyncStatus -
client.filestorage.sync_status.list(...) +
client.crm.accounts.partial_update(...)
@@ -11599,7 +12704,7 @@ client.filestorage.regenerate_key.create(
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +Updates an `Account` object with the given `id`.
@@ -11615,13 +12720,17 @@ Get sync status for the current sync and the most recently finished sync. `last_ ```python from merge import Merge +from merge.resources.crm import PatchedAccountRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.sync_status.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.accounts.partial_update( + id="id", + is_debug_mode=True, + run_async=True, + model=PatchedAccountRequest(), ) ``` @@ -11638,7 +12747,7 @@ client.filestorage.sync_status.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -11646,7 +12755,23 @@ client.filestorage.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**model:** `PatchedAccountRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -11666,8 +12791,7 @@ client.filestorage.sync_status.list(
-## Filestorage ForceResync -
client.filestorage.force_resync.sync_status_resync_create() +
client.crm.accounts.meta_patch_retrieve(...)
@@ -11679,7 +12803,7 @@ client.filestorage.sync_status.list(
-Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +Returns metadata for `CRMAccount` PATCHs.
@@ -11700,7 +12824,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.force_resync.sync_status_resync_create() +client.crm.accounts.meta_patch_retrieve( + id="id", +) ``` @@ -11716,6 +12842,14 @@ client.filestorage.force_resync.sync_status_resync_create()
+**id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11728,8 +12862,7 @@ client.filestorage.force_resync.sync_status_resync_create()
-## Filestorage Users -
client.filestorage.users.list(...) +
client.crm.accounts.meta_post_retrieve()
@@ -11741,7 +12874,7 @@ client.filestorage.force_resync.sync_status_resync_create()
-Returns a list of `User` objects. +Returns metadata for `CRMAccount` POSTs.
@@ -11762,9 +12895,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.users.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) +client.crm.accounts.meta_post_retrieve() ``` @@ -11780,31 +12911,77 @@ client.filestorage.users.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.crm.accounts.remote_field_classes_list(...)
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. +
+
+#### 🔌 Usage +
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.accounts.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, +) + +```
+
+
+ +#### ⚙️ Parameters
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -11812,7 +12989,7 @@ client.filestorage.users.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -11820,7 +12997,7 @@ client.filestorage.users.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -11828,7 +13005,7 @@ client.filestorage.users.list(
-**is_me:** `typing.Optional[str]` — If provided, will only return the user object for requestor. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -11836,7 +13013,7 @@ client.filestorage.users.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -11844,7 +13021,7 @@ client.filestorage.users.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value
@@ -11852,7 +13029,7 @@ client.filestorage.users.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value
@@ -11860,7 +13037,7 @@ client.filestorage.users.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -11880,7 +13057,8 @@ client.filestorage.users.list(
-
client.filestorage.users.retrieve(...) +## Crm AsyncPassthrough +
client.crm.async_passthrough.create(...)
@@ -11892,7 +13070,7 @@ client.filestorage.users.list(
-Returns a `User` object with the given `id`. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -11908,13 +13086,17 @@ Returns a `User` object with the given `id`. ```python from merge import Merge +from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.users.retrieve( - id="id", +client.crm.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -11931,23 +13113,7 @@ client.filestorage.users.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request:** `DataPassthroughRequest`
@@ -11967,8 +13133,7 @@ client.filestorage.users.retrieve(
-## Filestorage WebhookReceivers -
client.filestorage.webhook_receivers.list() +
client.crm.async_passthrough.retrieve(...)
@@ -11980,7 +13145,7 @@ client.filestorage.users.retrieve(
-Returns a list of `WebhookReceiver` objects. +Retrieves data from earlier async-passthrough POST request
@@ -12001,7 +13166,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.webhook_receivers.list() +client.crm.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", +) ``` @@ -12017,6 +13184,14 @@ client.filestorage.webhook_receivers.list()
+**async_passthrough_receipt_id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -12029,7 +13204,8 @@ client.filestorage.webhook_receivers.list()
-
client.filestorage.webhook_receivers.create(...) +## Crm AuditTrail +
client.crm.audit_trail.list(...)
@@ -12041,7 +13217,7 @@ client.filestorage.webhook_receivers.list()
-Creates a `WebhookReceiver` object with the given values. +Gets a list of audit trail events.
@@ -12062,9 +13238,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.webhook_receivers.create( - event="event", - is_active=True, +client.crm.audit_trail.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -12081,7 +13261,7 @@ client.filestorage.webhook_receivers.create(
-**event:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -12089,7 +13269,7 @@ client.filestorage.webhook_receivers.create(
-**is_active:** `bool` +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time
@@ -12097,7 +13277,7 @@ client.filestorage.webhook_receivers.create(
-**key:** `typing.Optional[str]` +**event_type:** `typing.Optional[str]` — 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`
@@ -12105,65 +13285,27 @@ client.filestorage.webhook_receivers.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
- -
- - - - -
- -## Crm AccountDetails -
client.crm.account_details.retrieve() -
-
- -#### 📝 Description - -
-
-Get details for a linked account. -
-
+**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.account_details.retrieve() - -``` -
-
+**user_email:** `typing.Optional[str]` — 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. +
-#### ⚙️ Parameters - -
-
-
@@ -12179,8 +13321,8 @@ client.crm.account_details.retrieve()
-## Crm AccountToken -
client.crm.account_token.retrieve(...) +## Crm AvailableActions +
client.crm.available_actions.retrieve()
@@ -12192,7 +13334,7 @@ client.crm.account_details.retrieve()
-Returns the account token for the end user with the provided public token. +Returns a list of models and actions available for an account.
@@ -12213,9 +13355,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.account_token.retrieve( - public_token="public_token", -) +client.crm.available_actions.retrieve() ``` @@ -12231,14 +13371,6 @@ client.crm.account_token.retrieve(
-**public_token:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -12251,8 +13383,8 @@ client.crm.account_token.retrieve(
-## Crm Accounts -
client.crm.accounts.list(...) +## Crm Contacts +
client.crm.contacts.list(...)
@@ -12264,7 +13396,7 @@ client.crm.account_token.retrieve(
-Returns a list of `Account` objects. +Returns a list of `Contact` objects.
@@ -12279,14 +13411,39 @@ Returns a list of `Account` objects.
```python +import datetime + from merge import Merge +from merge.resources.crm.resources.contacts import ContactsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.list( +client.crm.contacts.list( + account_id="account_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=ContactsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + phone_numbers="phone_numbers", + remote_id="remote_id", ) ``` @@ -12303,6 +13460,14 @@ client.crm.accounts.list(
+**account_id:** `typing.Optional[str]` — If provided, will only return contacts with this account. + +
+
+ +
+
+ **created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -12327,7 +13492,7 @@ client.crm.accounts.list(
-**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas.
@@ -12335,7 +13500,7 @@ client.crm.accounts.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**expand:** `typing.Optional[ContactsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -12343,7 +13508,7 @@ client.crm.accounts.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -12351,7 +13516,7 @@ client.crm.accounts.list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -12359,7 +13524,7 @@ client.crm.accounts.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -12367,7 +13532,7 @@ client.crm.accounts.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -12375,7 +13540,7 @@ client.crm.accounts.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -12383,7 +13548,7 @@ client.crm.accounts.list(
-**name:** `typing.Optional[str]` — If provided, will only return accounts with this name. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -12391,7 +13556,7 @@ client.crm.accounts.list(
-**owner_id:** `typing.Optional[str]` — If provided, will only return accounts with this owner. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -12399,7 +13564,7 @@ client.crm.accounts.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas.
@@ -12427,7 +13592,7 @@ client.crm.accounts.list(
-
client.crm.accounts.create(...) +
client.crm.contacts.create(...)
@@ -12439,7 +13604,7 @@ client.crm.accounts.list(
-Creates an `Account` object with the given values. +Creates a `Contact` object with the given values.
@@ -12455,14 +13620,16 @@ Creates an `Account` object with the given values. ```python from merge import Merge -from merge.resources.crm import AccountRequest +from merge.resources.crm import ContactRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.create( - model=AccountRequest(), +client.crm.contacts.create( + is_debug_mode=True, + run_async=True, + model=ContactRequest(), ) ``` @@ -12479,7 +13646,7 @@ client.crm.accounts.create(
-**model:** `AccountRequest` +**model:** `ContactRequest`
@@ -12515,7 +13682,7 @@ client.crm.accounts.create(
-
client.crm.accounts.retrieve(...) +
client.crm.contacts.retrieve(...)
@@ -12527,7 +13694,7 @@ client.crm.accounts.create(
-Returns an `Account` object with the given `id`. +Returns a `Contact` object with the given `id`.
@@ -12543,13 +13710,18 @@ Returns an `Account` object with the given `id`. ```python from merge import Merge +from merge.resources.crm.resources.contacts import ContactsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.retrieve( +client.crm.contacts.retrieve( id="id", + expand=ContactsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -12574,7 +13746,7 @@ client.crm.accounts.retrieve(
-**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[ContactsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -12618,7 +13790,7 @@ client.crm.accounts.retrieve(
-
client.crm.accounts.partial_update(...) +
client.crm.contacts.partial_update(...)
@@ -12630,7 +13802,7 @@ client.crm.accounts.retrieve(
-Updates an `Account` object with the given `id`. +Updates a `Contact` object with the given `id`.
@@ -12646,15 +13818,17 @@ Updates an `Account` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedAccountRequest +from merge.resources.crm import PatchedContactRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.partial_update( +client.crm.contacts.partial_update( id="id", - model=PatchedAccountRequest(), + is_debug_mode=True, + run_async=True, + model=PatchedContactRequest(), ) ``` @@ -12679,7 +13853,7 @@ client.crm.accounts.partial_update(
-**model:** `PatchedAccountRequest` +**model:** `PatchedContactRequest`
@@ -12715,139 +13889,7 @@ client.crm.accounts.partial_update(
-
client.crm.accounts.meta_patch_retrieve(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Returns metadata for `CRMAccount` PATCHs. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.accounts.meta_patch_retrieve( - id="id", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `str` - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.crm.accounts.meta_post_retrieve() -
-
- -#### 📝 Description - -
-
- -
-
- -Returns metadata for `CRMAccount` POSTs. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.accounts.meta_post_retrieve() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.crm.accounts.remote_field_classes_list(...) +
client.crm.contacts.ignore_create(...)
@@ -12859,7 +13901,7 @@ client.crm.accounts.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
@@ -12875,13 +13917,17 @@ Returns a list of `RemoteFieldClass` objects. ```python from merge import Merge +from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.contacts.ignore_create( + model_id="model_id", + request=IgnoreCommonModelRequest( + reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, + ), ) ``` @@ -12898,55 +13944,7 @@ client.crm.accounts.remote_field_classes_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value - -
-
- -
-
- -**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**model_id:** `str`
@@ -12954,7 +13952,7 @@ client.crm.accounts.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**request:** `IgnoreCommonModelRequest`
@@ -12974,8 +13972,7 @@ client.crm.accounts.remote_field_classes_list(
-## Crm AsyncPassthrough -
client.crm.async_passthrough.create(...) +
client.crm.contacts.meta_patch_retrieve(...)
@@ -12987,7 +13984,7 @@ client.crm.accounts.remote_field_classes_list(
-Asynchronously pull data from an endpoint not currently supported by Merge. +Returns metadata for `CRMContact` PATCHs.
@@ -13003,17 +14000,13 @@ Asynchronously pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.async_passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.crm.contacts.meta_patch_retrieve( + id="id", ) ``` @@ -13030,7 +14023,7 @@ client.crm.async_passthrough.create(
-**request:** `DataPassthroughRequest` +**id:** `str`
@@ -13050,7 +14043,7 @@ client.crm.async_passthrough.create(
-
client.crm.async_passthrough.retrieve(...) +
client.crm.contacts.meta_post_retrieve()
@@ -13062,7 +14055,7 @@ client.crm.async_passthrough.create(
-Retrieves data from earlier async-passthrough POST request +Returns metadata for `CRMContact` POSTs.
@@ -13083,9 +14076,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", -) +client.crm.contacts.meta_post_retrieve() ``` @@ -13101,14 +14092,6 @@ client.crm.async_passthrough.retrieve(
-**async_passthrough_receipt_id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -13121,8 +14104,7 @@ client.crm.async_passthrough.retrieve(
-## Crm AuditTrail -
client.crm.audit_trail.list(...) +
client.crm.contacts.remote_field_classes_list(...)
@@ -13134,7 +14116,7 @@ client.crm.async_passthrough.retrieve(
-Gets a list of audit trail events. +Returns a list of `RemoteFieldClass` objects.
@@ -13155,8 +14137,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.audit_trail.list( +client.crm.contacts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -13181,7 +14170,7 @@ client.crm.audit_trail.list(
-**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -13189,7 +14178,7 @@ client.crm.audit_trail.list(
-**event_type:** `typing.Optional[str]` — 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` +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -13197,7 +14186,7 @@ client.crm.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -13205,7 +14194,7 @@ client.crm.audit_trail.list(
-**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -13213,7 +14202,7 @@ client.crm.audit_trail.list(
-**user_email:** `typing.Optional[str]` — 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. +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value
@@ -13221,65 +14210,19 @@ client.crm.audit_trail.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value
- -
- - - -
- -## Crm AvailableActions -
client.crm.available_actions.retrieve()
-#### 📝 Description - -
-
- -
-
- -Returns a list of models and actions available for an account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.available_actions.retrieve() - -``` -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. +
-#### ⚙️ Parameters - -
-
-
@@ -13295,8 +14238,8 @@ client.crm.available_actions.retrieve()
-## Crm Contacts -
client.crm.contacts.list(...) +## Crm CustomObjectClasses +
client.crm.custom_object_classes.list(...)
@@ -13308,7 +14251,7 @@ client.crm.available_actions.retrieve()
-Returns a list of `Contact` objects. +Returns a list of `CustomObjectClass` objects.
@@ -13323,14 +14266,33 @@ Returns a list of `Contact` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.list( +client.crm.custom_object_classes.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -13347,14 +14309,6 @@ client.crm.contacts.list(
-**account_id:** `typing.Optional[str]` — If provided, will only return contacts with this account. - -
-
- -
-
- **created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -13379,15 +14333,7 @@ client.crm.contacts.list(
-**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. - -
-
- -
-
- -**expand:** `typing.Optional[ContactsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[typing.Literal["fields"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -13411,14 +14357,6 @@ client.crm.contacts.list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- **include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -13451,14 +14389,6 @@ client.crm.contacts.list(
-**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. - -
-
- -
-
- **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -13479,7 +14409,7 @@ client.crm.contacts.list(
-
client.crm.contacts.create(...) +
client.crm.custom_object_classes.retrieve(...)
@@ -13491,7 +14421,7 @@ client.crm.contacts.list(
-Creates a `Contact` object with the given values. +Returns a `CustomObjectClass` object with the given `id`.
@@ -13507,14 +14437,15 @@ Creates a `Contact` object with the given values. ```python from merge import Merge -from merge.resources.crm import ContactRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.create( - model=ContactRequest(), +client.crm.custom_object_classes.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -13531,7 +14462,7 @@ client.crm.contacts.create(
-**model:** `ContactRequest` +**id:** `str`
@@ -13539,7 +14470,7 @@ client.crm.contacts.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**expand:** `typing.Optional[typing.Literal["fields"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -13547,7 +14478,15 @@ client.crm.contacts.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -13567,7 +14506,8 @@ client.crm.contacts.create(
-
client.crm.contacts.retrieve(...) +## Crm AssociationTypes +
client.crm.association_types.custom_object_classes_association_types_list(...)
@@ -13579,7 +14519,7 @@ client.crm.contacts.create(
-Returns a `Contact` object with the given `id`. +Returns a list of `AssociationType` objects.
@@ -13594,14 +14534,34 @@ Returns a `Contact` object with the given `id`.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.retrieve( - id="id", +client.crm.association_types.custom_object_classes_association_types_list( + custom_object_class_id="custom_object_class_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -13618,7 +14578,7 @@ client.crm.contacts.retrieve(
-**id:** `str` +**custom_object_class_id:** `str`
@@ -13626,7 +14586,7 @@ client.crm.contacts.retrieve(
-**expand:** `typing.Optional[ContactsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -13634,7 +14594,7 @@ client.crm.contacts.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -13642,7 +14602,7 @@ client.crm.contacts.retrieve(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -13650,7 +14610,7 @@ client.crm.contacts.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -13658,72 +14618,31 @@ client.crm.contacts.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
-
-
- - - - -
- -
client.crm.contacts.partial_update(...) -
-
- -#### 📝 Description
-
-
- -Updates a `Contact` object with the given `id`. -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge -from merge.resources.crm import PatchedContactRequest - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.contacts.partial_update( - id="id", - model=PatchedContactRequest(), -) - -``` -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -13731,7 +14650,7 @@ client.crm.contacts.partial_update(
-**model:** `PatchedContactRequest` +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -13739,7 +14658,7 @@ client.crm.contacts.partial_update(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -13747,7 +14666,7 @@ client.crm.contacts.partial_update(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -13767,7 +14686,7 @@ client.crm.contacts.partial_update(
-
client.crm.contacts.ignore_create(...) +
client.crm.association_types.custom_object_classes_association_types_create(...)
@@ -13779,7 +14698,7 @@ client.crm.contacts.partial_update(
-Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +Creates an `AssociationType` object with the given values.
@@ -13795,16 +14714,32 @@ Ignores a specific row based on the `model_id` in the url. These records will ha ```python from merge import Merge -from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum +from merge.resources.crm import ( + AssociationTypeRequestRequest, + ObjectClassDescriptionRequest, + OriginTypeEnum, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.ignore_create( - model_id="model_id", - request=IgnoreCommonModelRequest( - reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, +client.crm.association_types.custom_object_classes_association_types_create( + custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, + model=AssociationTypeRequestRequest( + source_object_class=ObjectClassDescriptionRequest( + id="id", + origin_type=OriginTypeEnum.CUSTOM_OBJECT, + ), + target_object_classes=[ + ObjectClassDescriptionRequest( + id="id", + origin_type=OriginTypeEnum.CUSTOM_OBJECT, + ) + ], + remote_key_name="remote_key_name", ), ) @@ -13822,7 +14757,7 @@ client.crm.contacts.ignore_create(
-**model_id:** `str` +**custom_object_class_id:** `str`
@@ -13830,7 +14765,23 @@ client.crm.contacts.ignore_create(
-**request:** `IgnoreCommonModelRequest` +**model:** `AssociationTypeRequestRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -13850,7 +14801,7 @@ client.crm.contacts.ignore_create(
-
client.crm.contacts.meta_patch_retrieve(...) +
client.crm.association_types.custom_object_classes_association_types_retrieve(...)
@@ -13862,7 +14813,7 @@ client.crm.contacts.ignore_create(
-Returns metadata for `CRMContact` PATCHs. +Returns an `AssociationType` object with the given `id`.
@@ -13883,8 +14834,11 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.meta_patch_retrieve( +client.crm.association_types.custom_object_classes_association_types_retrieve( + custom_object_class_id="custom_object_class_id", id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -13901,6 +14855,14 @@ client.crm.contacts.meta_patch_retrieve(
+**custom_object_class_id:** `str` + +
+
+ +
+
+ **id:** `str`
@@ -13909,6 +14871,30 @@ client.crm.contacts.meta_patch_retrieve(
+**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -13921,7 +14907,7 @@ client.crm.contacts.meta_patch_retrieve(
-
client.crm.contacts.meta_post_retrieve() +
client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(...)
@@ -13933,7 +14919,7 @@ client.crm.contacts.meta_patch_retrieve(
-Returns metadata for `CRMContact` POSTs. +Returns metadata for `CRMAssociationType` POSTs.
@@ -13954,7 +14940,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.meta_post_retrieve() +client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve( + custom_object_class_id="custom_object_class_id", +) ``` @@ -13970,6 +14958,14 @@ client.crm.contacts.meta_post_retrieve()
+**custom_object_class_id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -13982,7 +14978,8 @@ client.crm.contacts.meta_post_retrieve()
-
client.crm.contacts.remote_field_classes_list(...) +## Crm CustomObjects +
client.crm.custom_objects.custom_object_classes_custom_objects_list(...)
@@ -13994,7 +14991,7 @@ client.crm.contacts.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `CustomObject` objects.
@@ -14009,14 +15006,35 @@ Returns a list of `RemoteFieldClass` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.remote_field_classes_list( +client.crm.custom_objects.custom_object_classes_custom_objects_list( + custom_object_class_id="custom_object_class_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -14033,6 +15051,30 @@ client.crm.contacts.remote_field_classes_list(
+**custom_object_class_id:** `str` + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ **cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -14073,7 +15115,7 @@ client.crm.contacts.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -14081,7 +15123,7 @@ client.crm.contacts.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -14097,6 +15139,14 @@ client.crm.contacts.remote_field_classes_list(
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -14109,8 +15159,7 @@ client.crm.contacts.remote_field_classes_list(
-## Crm CustomObjectClasses -
client.crm.custom_object_classes.list(...) +
client.crm.custom_objects.custom_object_classes_custom_objects_create(...)
@@ -14122,7 +15171,7 @@ client.crm.contacts.remote_field_classes_list(
-Returns a list of `CustomObjectClass` objects. +Creates a `CustomObject` object with the given values.
@@ -14138,13 +15187,19 @@ Returns a list of `CustomObjectClass` objects. ```python from merge import Merge +from merge.resources.crm import CustomObjectRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_object_classes.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.custom_objects.custom_object_classes_custom_objects_create( + custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, + model=CustomObjectRequest( + fields={"test_field": "hello"}, + ), ) ``` @@ -14161,63 +15216,7 @@ client.crm.custom_object_classes.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["fields"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**custom_object_class_id:** `str`
@@ -14225,7 +15224,7 @@ client.crm.custom_object_classes.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**model:** `CustomObjectRequest`
@@ -14233,7 +15232,7 @@ client.crm.custom_object_classes.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -14241,7 +15240,7 @@ client.crm.custom_object_classes.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -14261,7 +15260,7 @@ client.crm.custom_object_classes.list(
-
client.crm.custom_object_classes.retrieve(...) +
client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(...)
@@ -14273,7 +15272,7 @@ client.crm.custom_object_classes.list(
-Returns a `CustomObjectClass` object with the given `id`. +Returns a `CustomObject` object with the given `id`.
@@ -14294,8 +15293,12 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_object_classes.retrieve( +client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( + custom_object_class_id="custom_object_class_id", id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -14312,7 +15315,7 @@ client.crm.custom_object_classes.retrieve(
-**id:** `str` +**custom_object_class_id:** `str`
@@ -14320,7 +15323,7 @@ client.crm.custom_object_classes.retrieve(
-**expand:** `typing.Optional[typing.Literal["fields"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**id:** `str`
@@ -14336,6 +15339,14 @@ client.crm.custom_object_classes.retrieve(
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ **include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -14356,8 +15367,7 @@ client.crm.custom_object_classes.retrieve(
-## Crm AssociationTypes -
client.crm.association_types.custom_object_classes_association_types_list(...) +
client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(...)
@@ -14369,7 +15379,7 @@ client.crm.custom_object_classes.retrieve(
-Returns a list of `AssociationType` objects. +Returns metadata for `CRMCustomObject` POSTs.
@@ -14390,9 +15400,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.association_types.custom_object_classes_association_types_list( +client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve( custom_object_class_id="custom_object_class_id", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", ) ``` @@ -14417,31 +15426,77 @@ client.crm.association_types.custom_object_classes_association_types_list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list(...)
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. +
+
+#### 🔌 Usage +
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, +) + +``` +
+
+#### ⚙️ Parameters +
-**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -14465,7 +15520,7 @@ client.crm.association_types.custom_object_classes_association_types_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -14473,7 +15528,7 @@ client.crm.association_types.custom_object_classes_association_types_list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -14481,7 +15536,7 @@ client.crm.association_types.custom_object_classes_association_types_list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value
@@ -14489,7 +15544,7 @@ client.crm.association_types.custom_object_classes_association_types_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value
@@ -14497,7 +15552,7 @@ client.crm.association_types.custom_object_classes_association_types_list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -14517,7 +15572,8 @@ client.crm.association_types.custom_object_classes_association_types_list(
-
client.crm.association_types.custom_object_classes_association_types_create(...) +## Crm Associations +
client.crm.associations.custom_object_classes_custom_objects_associations_list(...)
@@ -14529,7 +15585,7 @@ client.crm.association_types.custom_object_classes_association_types_list(
-Creates an `AssociationType` object with the given values. +Returns a list of `Association` objects.
@@ -14544,32 +15600,36 @@ Creates an `AssociationType` object with the given values.
```python +import datetime + from merge import Merge -from merge.resources.crm import ( - AssociationTypeRequestRequest, - ObjectClassDescriptionRequest, - OriginTypeEnum, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.association_types.custom_object_classes_association_types_create( +client.crm.associations.custom_object_classes_custom_objects_associations_list( custom_object_class_id="custom_object_class_id", - model=AssociationTypeRequestRequest( - source_object_class=ObjectClassDescriptionRequest( - id="id", - origin_type=OriginTypeEnum.CUSTOM_OBJECT, - ), - target_object_classes=[ - ObjectClassDescriptionRequest( - id="id", - origin_type=OriginTypeEnum.CUSTOM_OBJECT, - ) - ], - remote_key_name="remote_key_name", + object_id="object_id", + association_type_id="association_type_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -14594,7 +15654,7 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**model:** `AssociationTypeRequestRequest` +**object_id:** `str`
@@ -14602,7 +15662,7 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**association_type_id:** `typing.Optional[str]` — If provided, will only return opportunities with this association_type.
@@ -14610,7 +15670,7 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -14618,71 +15678,47 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
-
-
+
+
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-
-
client.crm.association_types.custom_object_classes_association_types_retrieve(...)
-#### 📝 Description - -
-
+**expand:** `typing.Optional[typing.Literal["association_type"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
-Returns an `AssociationType` object with the given `id`. -
-
+**include_deleted_data:** `typing.Optional[bool]` — 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/). +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.association_types.custom_object_classes_association_types_retrieve( - custom_object_class_id="custom_object_class_id", - id="id", -) - -``` -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-#### ⚙️ Parameters -
-
-
- -**custom_object_class_id:** `str` +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -14690,7 +15726,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**id:** `str` +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -14698,7 +15734,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -14706,7 +15742,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -14714,7 +15750,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -14734,7 +15770,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-
client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(...) +
client.crm.associations.custom_object_classes_custom_objects_associations_update(...)
@@ -14746,7 +15782,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-Returns metadata for `CRMAssociationType` POSTs. +Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`.
@@ -14767,8 +15803,14 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve( - custom_object_class_id="custom_object_class_id", +client.crm.associations.custom_object_classes_custom_objects_associations_update( + source_class_id="source_class_id", + source_object_id="source_object_id", + target_class_id="target_class_id", + target_object_id="target_object_id", + association_type_id="association_type_id", + is_debug_mode=True, + run_async=True, ) ``` @@ -14785,7 +15827,55 @@ client.crm.association_types.custom_object_classes_association_types_meta_post_r
-**custom_object_class_id:** `str` +**source_class_id:** `str` + +
+
+ +
+
+ +**source_object_id:** `str` + +
+
+ +
+
+ +**target_class_id:** `str` + +
+
+ +
+
+ +**target_object_id:** `str` + +
+
+ +
+
+ +**association_type_id:** `str` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -14805,8 +15895,8 @@ client.crm.association_types.custom_object_classes_association_types_meta_post_r
-## Crm CustomObjects -
client.crm.custom_objects.custom_object_classes_custom_objects_list(...) +## Crm Scopes +
client.crm.scopes.default_scopes_retrieve()
@@ -14818,7 +15908,7 @@ client.crm.association_types.custom_object_classes_association_types_meta_post_r
-Returns a list of `CustomObject` objects. +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -14839,10 +15929,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_list( - custom_object_class_id="custom_object_class_id", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) +client.crm.scopes.default_scopes_retrieve() ``` @@ -14858,99 +15945,64 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
-**custom_object_class_id:** `str` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. -
-
-
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. -
+
+
client.crm.scopes.linked_account_scopes_retrieve()
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
+#### 📝 Description
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. -
+#### 🔌 Usage +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
+```python +from merge import Merge -
-
+client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.scopes.linked_account_scopes_retrieve() -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +```
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. -
+#### ⚙️ Parameters +
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
-
@@ -14966,7 +16018,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
-
client.crm.custom_objects.custom_object_classes_custom_objects_create(...) +
client.crm.scopes.linked_account_scopes_create(...)
@@ -14978,7 +16030,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
-Creates a `CustomObject` object with the given values. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -14994,17 +16046,42 @@ Creates a `CustomObject` object with the given values. ```python from merge import Merge -from merge.resources.crm import CustomObjectRequest +from merge.resources.crm import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_create( - custom_object_class_id="custom_object_class_id", - model=CustomObjectRequest( - fields={"test_field": "hello"}, - ), +client.crm.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], ) ``` @@ -15021,7 +16098,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_create(
-**custom_object_class_id:** `str` +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for
@@ -15029,27 +16106,65 @@ client.crm.custom_objects.custom_object_classes_custom_objects_create(
-**model:** `CustomObjectRequest` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+ +## Crm DeleteAccount +
client.crm.delete_account.delete() +
+
+ +#### 📝 Description
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - +
+
+ +Delete a linked account.
+
+
+ +#### 🔌 Usage
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.delete_account.delete() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -15065,7 +16180,8 @@ client.crm.custom_objects.custom_object_classes_custom_objects_create(
-
client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(...) +## Crm EngagementTypes +
client.crm.engagement_types.list(...)
@@ -15077,7 +16193,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_create(
-Returns a `CustomObject` object with the given `id`. +Returns a list of `EngagementType` objects.
@@ -15092,15 +16208,34 @@ Returns a `CustomObject` object with the given `id`.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( - custom_object_class_id="custom_object_class_id", - id="id", +client.crm.engagement_types.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -15117,7 +16252,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-**custom_object_class_id:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -15125,7 +16260,23 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-**id:** `str` +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -15157,6 +16308,38 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -15169,7 +16352,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-
client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(...) +
client.crm.engagement_types.retrieve(...)
@@ -15181,7 +16364,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-Returns metadata for `CRMCustomObject` POSTs. +Returns an `EngagementType` object with the given `id`.
@@ -15202,8 +16385,11 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve( - custom_object_class_id="custom_object_class_id", +client.crm.engagement_types.retrieve( + id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -15220,7 +16406,31 @@ client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retriev
-**custom_object_class_id:** `str` +**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -15240,7 +16450,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retriev
-
client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list(...) +
client.crm.engagement_types.remote_field_classes_list(...)
@@ -15273,8 +16483,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list( +client.crm.engagement_types.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -15367,8 +16584,8 @@ client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_clas
-## Crm Associations -
client.crm.associations.custom_object_classes_custom_objects_associations_list(...) +## Crm Engagements +
client.crm.engagements.list(...)
@@ -15380,7 +16597,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_clas
-Returns a list of `Association` objects. +Returns a list of `Engagement` objects.
@@ -15395,16 +16612,44 @@ Returns a list of `Association` objects.
```python +import datetime + from merge import Merge +from merge.resources.crm.resources.engagements import ( + EngagementsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.associations.custom_object_classes_custom_objects_associations_list( - custom_object_class_id="custom_object_class_id", - object_id="object_id", +client.crm.engagements.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=EngagementsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -15421,23 +16666,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**custom_object_class_id:** `str` - -
-
- -
-
- -**object_id:** `str` - -
-
- -
-
- -**association_type_id:** `typing.Optional[str]` — If provided, will only return opportunities with this association_type. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -15445,7 +16674,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -15453,7 +16682,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -15461,7 +16690,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**expand:** `typing.Optional[EngagementsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -15469,7 +16698,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**expand:** `typing.Optional[typing.Literal["association_type"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -15477,7 +16706,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -15485,7 +16714,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -15533,6 +16762,22 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
+**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started after this datetime. + +
+
+ +
+
+ +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started before this datetime. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -15545,7 +16790,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-
client.crm.associations.custom_object_classes_custom_objects_associations_update(...) +
client.crm.engagements.create(...)
@@ -15557,7 +16802,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. +Creates an `Engagement` object with the given values.
@@ -15573,17 +16818,16 @@ Creates an Association between `source_object_id` and `target_object_id` of type ```python from merge import Merge +from merge.resources.crm import EngagementRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.associations.custom_object_classes_custom_objects_associations_update( - association_type_id="association_type_id", - source_class_id="source_class_id", - source_object_id="source_object_id", - target_class_id="target_class_id", - target_object_id="target_object_id", +client.crm.engagements.create( + is_debug_mode=True, + run_async=True, + model=EngagementRequest(), ) ``` @@ -15600,39 +16844,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**association_type_id:** `str` - -
-
- -
-
- -**source_class_id:** `str` - -
-
- -
-
- -**source_object_id:** `str` - -
-
- -
-
- -**target_class_id:** `str` - -
-
- -
-
- -**target_object_id:** `str` +**model:** `EngagementRequest`
@@ -15668,8 +16880,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-## Crm Scopes -
client.crm.scopes.default_scopes_retrieve() +
client.crm.engagements.retrieve(...)
@@ -15681,7 +16892,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns an `Engagement` object with the given `id`.
@@ -15697,12 +16908,21 @@ Get the default permissions for Merge Common Models and fields across all Linked ```python from merge import Merge +from merge.resources.crm.resources.engagements import ( + EngagementsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.scopes.default_scopes_retrieve() +client.crm.engagements.retrieve( + id="id", + expand=EngagementsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, +) ``` @@ -15718,64 +16938,43 @@ client.crm.scopes.default_scopes_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**id:** `str`
- -
+
+
+**expand:** `typing.Optional[EngagementsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
-
-
client.crm.scopes.linked_account_scopes_retrieve()
-#### 📝 Description - -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
-Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -
-
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.scopes.linked_account_scopes_retrieve() - -``` -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### ⚙️ Parameters - -
-
-
@@ -15791,7 +16990,7 @@ client.crm.scopes.linked_account_scopes_retrieve()
-
client.crm.scopes.linked_account_scopes_create(...) +
client.crm.engagements.partial_update(...)
@@ -15803,7 +17002,7 @@ client.crm.scopes.linked_account_scopes_retrieve()
-Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) +Updates an `Engagement` object with the given `id`.
@@ -15819,42 +17018,17 @@ Update permissions for any Common Model or field for a single Linked Account. An ```python from merge import Merge -from merge.resources.crm import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, -) +from merge.resources.crm import PatchedEngagementRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], +client.crm.engagements.partial_update( + id="id", + is_debug_mode=True, + run_async=True, + model=PatchedEngagementRequest(), ) ``` @@ -15871,7 +17045,7 @@ client.crm.scopes.linked_account_scopes_create(
-**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**id:** `str`
@@ -15879,65 +17053,27 @@ client.crm.scopes.linked_account_scopes_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**model:** `PatchedEngagementRequest`
- -
- - - - -
- -## Crm DeleteAccount -
client.crm.delete_account.delete() -
-
- -#### 📝 Description - -
-
-Delete a linked account. -
-
+**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.delete_account.delete() - -``` -
-
+**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +
-#### ⚙️ Parameters - -
-
-
@@ -15953,8 +17089,7 @@ client.crm.delete_account.delete()
-## Crm EngagementTypes -
client.crm.engagement_types.list(...) +
client.crm.engagements.meta_patch_retrieve(...)
@@ -15966,7 +17101,7 @@ client.crm.delete_account.delete()
-Returns a list of `EngagementType` objects. +Returns metadata for `Engagement` PATCHs.
@@ -15987,8 +17122,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagement_types.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.engagements.meta_patch_retrieve( + id="id", ) ``` @@ -16005,87 +17140,7 @@ client.crm.engagement_types.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
- -
-
- -**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**id:** `str`
@@ -16105,7 +17160,7 @@ client.crm.engagement_types.list(
-
client.crm.engagement_types.retrieve(...) +
client.crm.engagements.meta_post_retrieve()
@@ -16117,7 +17172,7 @@ client.crm.engagement_types.list(
-Returns an `EngagementType` object with the given `id`. +Returns metadata for `Engagement` POSTs.
@@ -16138,9 +17193,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagement_types.retrieve( - id="id", -) +client.crm.engagements.meta_post_retrieve() ``` @@ -16156,38 +17209,6 @@ client.crm.engagement_types.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -16200,7 +17221,7 @@ client.crm.engagement_types.retrieve(
-
client.crm.engagement_types.remote_field_classes_list(...) +
client.crm.engagements.remote_field_classes_list(...)
@@ -16233,8 +17254,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagement_types.remote_field_classes_list( +client.crm.engagements.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -16327,8 +17355,8 @@ client.crm.engagement_types.remote_field_classes_list(
-## Crm Engagements -
client.crm.engagements.list(...) +## Crm FieldMapping +
client.crm.field_mapping.field_mappings_retrieve(...)
@@ -16340,7 +17368,7 @@ client.crm.engagement_types.remote_field_classes_list(
-Returns a list of `Engagement` objects. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -16361,8 +17389,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -16379,7 +17407,7 @@ client.crm.engagements.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -16387,55 +17415,76 @@ client.crm.engagements.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. -
+
+
client.crm.field_mapping.field_mappings_create(...)
-**expand:** `typing.Optional[EngagementsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
+#### 📝 Description
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+ + + +#### 🔌 Usage
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", +) + +``` +
+
+#### ⚙️ Parameters +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
+
+ +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -16443,7 +17492,7 @@ client.crm.engagements.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
@@ -16451,7 +17500,7 @@ client.crm.engagements.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -16459,7 +17508,7 @@ client.crm.engagements.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from.
@@ -16467,7 +17516,7 @@ client.crm.engagements.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from.
@@ -16475,7 +17524,7 @@ client.crm.engagements.list(
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started after this datetime. +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category.
@@ -16483,7 +17532,7 @@ client.crm.engagements.list(
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started before this datetime. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -16503,7 +17552,7 @@ client.crm.engagements.list(
-
client.crm.engagements.create(...) +
client.crm.field_mapping.field_mappings_destroy(...)
@@ -16515,7 +17564,7 @@ client.crm.engagements.list(
-Creates an `Engagement` object with the given values. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -16531,14 +17580,13 @@ Creates an `Engagement` object with the given values. ```python from merge import Merge -from merge.resources.crm import EngagementRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.create( - model=EngagementRequest(), +client.crm.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", ) ``` @@ -16555,23 +17603,7 @@ client.crm.engagements.create(
-**model:** `EngagementRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - -
-
- -
-
- -**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**field_mapping_id:** `str`
@@ -16591,7 +17623,7 @@ client.crm.engagements.create(
-
client.crm.engagements.retrieve(...) +
client.crm.field_mapping.field_mappings_partial_update(...)
@@ -16603,7 +17635,7 @@ client.crm.engagements.create(
-Returns an `Engagement` object with the given `id`. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -16624,8 +17656,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.retrieve( - id="id", +client.crm.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", ) ``` @@ -16642,15 +17674,7 @@ client.crm.engagements.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[EngagementsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**field_mapping_id:** `str`
@@ -16658,7 +17682,7 @@ client.crm.engagements.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -16666,7 +17690,7 @@ client.crm.engagements.retrieve(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from.
@@ -16674,7 +17698,7 @@ client.crm.engagements.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -16694,7 +17718,7 @@ client.crm.engagements.retrieve(
-
client.crm.engagements.partial_update(...) +
client.crm.field_mapping.remote_fields_retrieve(...)
@@ -16706,7 +17730,7 @@ client.crm.engagements.retrieve(
-Updates an `Engagement` object with the given `id`. +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -16722,15 +17746,14 @@ Updates an `Engagement` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedEngagementRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.partial_update( - id="id", - model=PatchedEngagementRequest(), +client.crm.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", ) ``` @@ -16747,23 +17770,7 @@ client.crm.engagements.partial_update(
-**id:** `str` - -
-
- -
-
- -**model:** `PatchedEngagementRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
@@ -16771,7 +17778,7 @@ client.crm.engagements.partial_update(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**include_example_values:** `typing.Optional[str]` — 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.
@@ -16791,7 +17798,7 @@ client.crm.engagements.partial_update(
-
client.crm.engagements.meta_patch_retrieve(...) +
client.crm.field_mapping.target_fields_retrieve()
@@ -16803,7 +17810,7 @@ client.crm.engagements.partial_update(
-Returns metadata for `Engagement` PATCHs. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -16824,9 +17831,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.meta_patch_retrieve( - id="id", -) +client.crm.field_mapping.target_fields_retrieve() ``` @@ -16842,14 +17847,6 @@ client.crm.engagements.meta_patch_retrieve(
-**id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -16862,7 +17859,8 @@ client.crm.engagements.meta_patch_retrieve(
-
client.crm.engagements.meta_post_retrieve() +## Crm GenerateKey +
client.crm.generate_key.create(...)
@@ -16874,7 +17872,7 @@ client.crm.engagements.meta_patch_retrieve(
-Returns metadata for `Engagement` POSTs. +Create a remote key.
@@ -16895,7 +17893,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.meta_post_retrieve() +client.crm.generate_key.create( + name="Remote Deployment Key 1", +) ``` @@ -16911,6 +17911,14 @@ client.crm.engagements.meta_post_retrieve()
+**name:** `str` — The name of the remote key + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -16923,7 +17931,8 @@ client.crm.engagements.meta_post_retrieve()
-
client.crm.engagements.remote_field_classes_list(...) +## Crm Issues +
client.crm.issues.list(...)
@@ -16935,7 +17944,7 @@ client.crm.engagements.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Gets all issues for Organization.
@@ -16950,14 +17959,38 @@ Returns a list of `RemoteFieldClass` objects.
```python +import datetime + from merge import Merge +from merge.resources.crm.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.remote_field_classes_list( +client.crm.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -16974,6 +18007,14 @@ client.crm.engagements.remote_field_classes_list(
+**account_token:** `typing.Optional[str]` + +
+
+ +
+
+ **cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -16982,7 +18023,7 @@ client.crm.engagements.remote_field_classes_list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time
@@ -16990,7 +18031,7 @@ client.crm.engagements.remote_field_classes_list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**end_user_organization_name:** `typing.Optional[str]`
@@ -16998,7 +18039,7 @@ client.crm.engagements.remote_field_classes_list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime.
@@ -17006,7 +18047,7 @@ client.crm.engagements.remote_field_classes_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime.
@@ -17014,7 +18055,7 @@ client.crm.engagements.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**include_muted:** `typing.Optional[str]` — If true, will include muted issues
@@ -17022,7 +18063,31 @@ client.crm.engagements.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**integration_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. + +
+
+ +
+
+ +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. + +
+
+ +
+
+ +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in.
@@ -17038,6 +18103,27 @@ client.crm.engagements.remote_field_classes_list(
+**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time + +
+
+ +
+
+ +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -17050,8 +18136,7 @@ client.crm.engagements.remote_field_classes_list(
-## Crm FieldMapping -
client.crm.field_mapping.field_mappings_retrieve(...) +
client.crm.issues.retrieve(...)
@@ -17063,7 +18148,7 @@ client.crm.engagements.remote_field_classes_list(
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Get a specific issue.
@@ -17084,7 +18169,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.field_mappings_retrieve() +client.crm.issues.retrieve( + id="id", +) ``` @@ -17100,7 +18187,7 @@ client.crm.field_mapping.field_mappings_retrieve()
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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. +**id:** `str`
@@ -17120,7 +18207,8 @@ client.crm.field_mapping.field_mappings_retrieve()
-
client.crm.field_mapping.field_mappings_create(...) +## Crm Leads +
client.crm.leads.list(...)
@@ -17132,7 +18220,7 @@ client.crm.field_mapping.field_mappings_retrieve()
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of `Lead` objects.
@@ -17147,19 +18235,41 @@ Create new Field Mappings that will be available after the next scheduled sync.
```python +import datetime + from merge import Merge +from merge.resources.crm.resources.leads import LeadsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.field_mappings_create( - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", +client.crm.leads.list( + converted_account_id="converted_account_id", + converted_contact_id="converted_contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=LeadsListRequestExpand.CONVERTED_ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + owner_id="owner_id", + page_size=1, + phone_numbers="phone_numbers", + remote_id="remote_id", ) ``` @@ -17176,7 +18286,7 @@ client.crm.field_mapping.field_mappings_create(
-**target_field_name:** `str` — The name of the target field you want this remote field to map to. +**converted_account_id:** `typing.Optional[str]` — If provided, will only return leads with this account.
@@ -17184,7 +18294,7 @@ client.crm.field_mapping.field_mappings_create(
-**target_field_description:** `str` — The description of the target field you want this remote field to map to. +**converted_contact_id:** `typing.Optional[str]` — If provided, will only return leads with this contact.
@@ -17192,7 +18302,7 @@ client.crm.field_mapping.field_mappings_create(
-**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -17200,7 +18310,7 @@ client.crm.field_mapping.field_mappings_create(
-**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -17208,7 +18318,7 @@ client.crm.field_mapping.field_mappings_create(
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -17216,7 +18326,7 @@ client.crm.field_mapping.field_mappings_create(
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas.
@@ -17224,7 +18334,7 @@ client.crm.field_mapping.field_mappings_create(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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. +**expand:** `typing.Optional[LeadsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -17232,70 +18342,79 @@ client.crm.field_mapping.field_mappings_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
-
-
+
+
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-
-
client.crm.field_mapping.field_mappings_destroy(...)
-#### 📝 Description +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -
-
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + -#### 🔌 Usage -
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", -) - -``` +**owner_id:** `typing.Optional[str]` — If provided, will only return leads with this owner. +
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. +
-#### ⚙️ Parameters -
+**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. + +
+
+
-**field_mapping_id:** `str` +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -17315,7 +18434,7 @@ client.crm.field_mapping.field_mappings_destroy(
-
client.crm.field_mapping.field_mappings_partial_update(...) +
client.crm.leads.create(...)
@@ -17327,7 +18446,7 @@ client.crm.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Creates a `Lead` object with the given values.
@@ -17343,13 +18462,16 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r ```python from merge import Merge +from merge.resources.crm import LeadRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", +client.crm.leads.create( + is_debug_mode=True, + run_async=True, + model=LeadRequest(), ) ``` @@ -17366,15 +18488,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` - -
-
- -
-
- -**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**model:** `LeadRequest`
@@ -17382,7 +18496,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -17390,7 +18504,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -17410,7 +18524,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-
client.crm.field_mapping.remote_fields_retrieve(...) +
client.crm.leads.retrieve(...)
@@ -17422,7 +18536,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns a `Lead` object with the given `id`.
@@ -17438,12 +18552,19 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields ```python from merge import Merge +from merge.resources.crm.resources.leads import LeadsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.remote_fields_retrieve() +client.crm.leads.retrieve( + id="id", + expand=LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, +) ``` @@ -17459,7 +18580,7 @@ client.crm.field_mapping.remote_fields_retrieve()
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. +**id:** `str`
@@ -17467,7 +18588,31 @@ client.crm.field_mapping.remote_fields_retrieve()
-**include_example_values:** `typing.Optional[str]` — 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. +**expand:** `typing.Optional[LeadsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -17487,7 +18632,7 @@ client.crm.field_mapping.remote_fields_retrieve()
-
client.crm.field_mapping.target_fields_retrieve() +
client.crm.leads.meta_post_retrieve()
@@ -17499,7 +18644,7 @@ client.crm.field_mapping.remote_fields_retrieve()
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). +Returns metadata for `Lead` POSTs.
@@ -17520,7 +18665,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.target_fields_retrieve() +client.crm.leads.meta_post_retrieve() ``` @@ -17548,8 +18693,7 @@ client.crm.field_mapping.target_fields_retrieve()
-## Crm GenerateKey -
client.crm.generate_key.create(...) +
client.crm.leads.remote_field_classes_list(...)
@@ -17561,7 +18705,7 @@ client.crm.field_mapping.target_fields_retrieve()
-Create a remote key. +Returns a list of `RemoteFieldClass` objects.
@@ -17582,8 +18726,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.generate_key.create( - name="Remote Deployment Key 1", +client.crm.leads.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -17600,7 +18751,63 @@ client.crm.generate_key.create(
-**name:** `str` — The name of the remote key +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value + +
+
+ +
+
+ +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -17620,8 +18827,8 @@ client.crm.generate_key.create(
-## Crm Issues -
client.crm.issues.list(...) +## Crm LinkToken +
client.crm.link_token.create(...)
@@ -17633,7 +18840,7 @@ client.crm.generate_key.create(
-Gets all issues for Organization. +Creates a link token to be used when linking a new end user.
@@ -17649,13 +18856,17 @@ Gets all issues for Organization. ```python from merge import Merge +from merge.resources.crm import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.issues.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -17672,7 +18883,7 @@ client.crm.issues.list(
-**account_token:** `typing.Optional[str]` +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -17680,7 +18891,7 @@ client.crm.issues.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_user_organization_name:** `str` — Your end user's organization.
@@ -17688,7 +18899,7 @@ client.crm.issues.list(
-**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -17696,7 +18907,7 @@ client.crm.issues.list(
-**end_user_organization_name:** `typing.Optional[str]` +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
@@ -17704,7 +18915,7 @@ client.crm.issues.list(
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
@@ -17712,7 +18923,7 @@ client.crm.issues.list(
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
@@ -17720,7 +18931,7 @@ client.crm.issues.list(
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -17728,7 +18939,7 @@ client.crm.issues.list(
-**integration_name:** `typing.Optional[str]` +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -17736,7 +18947,7 @@ client.crm.issues.list(
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -17744,7 +18955,14 @@ client.crm.issues.list(
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
@@ -17752,15 +18970,12 @@ client.crm.issues.list(
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. - -
-
+**language:** `typing.Optional[EndUserDetailsRequestLanguage]` -
-
+The following subset of IETF language tags can be used to configure localization. -**page_size:** `typing.Optional[int]` — Number of results to return per page. +* `en` - en +* `de` - de
@@ -17768,7 +18983,7 @@ client.crm.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled.
@@ -17776,12 +18991,7 @@ client.crm.issues.list(
-**status:** `typing.Optional[IssuesListRequestStatus]` - -Status of the issue. Options: ('ONGOING', 'RESOLVED') - -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -17801,7 +19011,8 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.crm.issues.retrieve(...) +## Crm LinkedAccounts +
client.crm.linked_accounts.list(...)
@@ -17813,7 +19024,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +List linked accounts for your organization.
@@ -17829,13 +19040,28 @@ Get a specific issue. ```python from merge import Merge +from merge.resources.crm.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.issues.retrieve( +client.crm.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -17852,7 +19078,113 @@ client.crm.issues.retrieve(
-**id:** `str` +**category:** `typing.Optional[LinkedAccountsListRequestCategory]` + +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. + +
+
+ +
+
+ +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. + +
+
+ +
+
+ +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. + +
+
+ +
+
+ +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + +
+
+ +
+
+ +**id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + +
+
+ +
+
+ +**include_duplicates:** `typing.Optional[bool]` — 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. + +
+
+ +
+
+ +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. + +
+
+ +
+
+ +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
@@ -17872,8 +19204,8 @@ client.crm.issues.retrieve(
-## Crm Leads -
client.crm.leads.list(...) +## Crm Notes +
client.crm.notes.list(...)
@@ -17885,7 +19217,7 @@ client.crm.issues.retrieve(
-Returns a list of `Lead` objects. +Returns a list of `Note` objects.
@@ -17900,14 +19232,40 @@ Returns a list of `Lead` objects.
```python +import datetime + from merge import Merge +from merge.resources.crm.resources.notes import NotesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.list( +client.crm.notes.list( + account_id="account_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=NotesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + opportunity_id="opportunity_id", + owner_id="owner_id", + page_size=1, + remote_id="remote_id", ) ``` @@ -17924,7 +19282,7 @@ client.crm.leads.list(
-**converted_account_id:** `typing.Optional[str]` — If provided, will only return leads with this account. +**account_id:** `typing.Optional[str]` — If provided, will only return notes with this account.
@@ -17932,7 +19290,7 @@ client.crm.leads.list(
-**converted_contact_id:** `typing.Optional[str]` — If provided, will only return leads with this contact. +**contact_id:** `typing.Optional[str]` — If provided, will only return notes with this contact.
@@ -17964,15 +19322,7 @@ client.crm.leads.list(
-**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. - -
-
- -
-
- -**expand:** `typing.Optional[LeadsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[NotesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -18028,7 +19378,7 @@ client.crm.leads.list(
-**owner_id:** `typing.Optional[str]` — If provided, will only return leads with this owner. +**opportunity_id:** `typing.Optional[str]` — If provided, will only return notes with this opportunity.
@@ -18036,7 +19386,7 @@ client.crm.leads.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**owner_id:** `typing.Optional[str]` — If provided, will only return notes with this owner.
@@ -18044,7 +19394,7 @@ client.crm.leads.list(
-**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -18072,7 +19422,7 @@ client.crm.leads.list(
-
client.crm.leads.create(...) +
client.crm.notes.create(...)
@@ -18084,7 +19434,7 @@ client.crm.leads.list(
-Creates a `Lead` object with the given values. +Creates a `Note` object with the given values.
@@ -18100,14 +19450,16 @@ Creates a `Lead` object with the given values. ```python from merge import Merge -from merge.resources.crm import LeadRequest +from merge.resources.crm import NoteRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.create( - model=LeadRequest(), +client.crm.notes.create( + is_debug_mode=True, + run_async=True, + model=NoteRequest(), ) ``` @@ -18124,7 +19476,7 @@ client.crm.leads.create(
-**model:** `LeadRequest` +**model:** `NoteRequest`
@@ -18160,7 +19512,7 @@ client.crm.leads.create(
-
client.crm.leads.retrieve(...) +
client.crm.notes.retrieve(...)
@@ -18172,7 +19524,7 @@ client.crm.leads.create(
-Returns a `Lead` object with the given `id`. +Returns a `Note` object with the given `id`.
@@ -18188,13 +19540,18 @@ Returns a `Lead` object with the given `id`. ```python from merge import Merge +from merge.resources.crm.resources.notes import NotesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.retrieve( +client.crm.notes.retrieve( id="id", + expand=NotesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -18219,7 +19576,7 @@ client.crm.leads.retrieve(
-**expand:** `typing.Optional[LeadsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[NotesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -18263,7 +19620,7 @@ client.crm.leads.retrieve(
-
client.crm.leads.meta_post_retrieve() +
client.crm.notes.meta_post_retrieve()
@@ -18275,7 +19632,7 @@ client.crm.leads.retrieve(
-Returns metadata for `Lead` POSTs. +Returns metadata for `Note` POSTs.
@@ -18296,7 +19653,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.meta_post_retrieve() +client.crm.notes.meta_post_retrieve() ``` @@ -18324,7 +19681,7 @@ client.crm.leads.meta_post_retrieve()
-
client.crm.leads.remote_field_classes_list(...) +
client.crm.notes.remote_field_classes_list(...)
@@ -18357,8 +19714,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.remote_field_classes_list( +client.crm.notes.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -18451,8 +19815,8 @@ client.crm.leads.remote_field_classes_list(
-## Crm LinkToken -
client.crm.link_token.create(...) +## Crm Opportunities +
client.crm.opportunities.list(...)
@@ -18464,7 +19828,7 @@ client.crm.leads.remote_field_classes_list(
-Creates a link token to be used when linking a new end user. +Returns a list of `Opportunity` objects.
@@ -18479,18 +19843,46 @@ Creates a link token to be used when linking a new end user.
```python +import datetime + from merge import Merge -from merge.resources.crm import CategoriesEnum +from merge.resources.crm.resources.opportunities import ( + OpportunitiesListRequestExpand, + OpportunitiesListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +client.crm.opportunities.list( + account_id="account_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=OpportunitiesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + owner_id="owner_id", + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + stage_id="stage_id", + status=OpportunitiesListRequestStatus.LOST, ) ``` @@ -18507,7 +19899,7 @@ client.crm.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. +**account_id:** `typing.Optional[str]` — If provided, will only return opportunities with this account.
@@ -18515,7 +19907,7 @@ client.crm.link_token.create(
-**end_user_organization_name:** `str` — Your end user's organization. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -18523,7 +19915,7 @@ client.crm.link_token.create(
-**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -18531,7 +19923,7 @@ client.crm.link_token.create(
-**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -18539,7 +19931,7 @@ client.crm.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**expand:** `typing.Optional[OpportunitiesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -18547,7 +19939,7 @@ client.crm.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -18555,7 +19947,7 @@ client.crm.link_token.create(
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -18563,7 +19955,7 @@ client.crm.link_token.create(
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -18571,7 +19963,7 @@ client.crm.link_token.create(
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -18579,14 +19971,7 @@ client.crm.link_token.create(
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -18594,12 +19979,7 @@ client.crm.link_token.create(
-**language:** `typing.Optional[EndUserDetailsRequestLanguage]` - -The following subset of IETF language tags can be used to configure localization. - -* `en` - en -* `de` - de +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -18607,7 +19987,7 @@ The following subset of IETF language tags can be used to configure localization
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. +**owner_id:** `typing.Optional[str]` — If provided, will only return opportunities with this owner.
@@ -18615,7 +19995,7 @@ The following subset of IETF language tags can be used to configure localization
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -18623,81 +20003,53 @@ The following subset of IETF language tags can be used to configure localization
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return opportunities created in the third party platform after this datetime.
-
-
+
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins. +
-
-## Crm LinkedAccounts -
client.crm.linked_accounts.list(...)
-#### 📝 Description - -
-
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
-List linked accounts for your organization. -
-
+**show_enum_origins:** `typing.Optional[typing.Literal["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) +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.linked_accounts.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) - -``` -
-
+**stage_id:** `typing.Optional[str]` — If provided, will only return opportunities with this stage. +
-#### ⚙️ Parameters - -
-
-
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` +**status:** `typing.Optional[OpportunitiesListRequestStatus]` -Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` +If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') -* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage +* `OPEN` - OPEN +* `WON` - WON +* `LOST` - LOST
@@ -18705,79 +20057,73 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. -
-
-
-**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. -
+
+
client.crm.opportunities.create(...)
-**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. - -
-
+#### 📝 Description
-**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - -
-
-
-**id:** `typing.Optional[str]` - +Creates an `Opportunity` object with the given values.
+ + + +#### 🔌 Usage
-**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - -
-
-
-**include_duplicates:** `typing.Optional[bool]` — 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. - +```python +from merge import Merge +from merge.resources.crm import OpportunityRequest + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.opportunities.create( + is_debug_mode=True, + run_async=True, + model=OpportunityRequest(), +) + +```
+ + + +#### ⚙️ Parameters
-**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. - -
-
-
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. +**model:** `OpportunityRequest`
@@ -18785,7 +20131,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -18793,7 +20139,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -18813,8 +20159,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-## Crm Notes -
client.crm.notes.list(...) +
client.crm.opportunities.retrieve(...)
@@ -18826,7 +20171,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-Returns a list of `Note` objects. +Returns an `Opportunity` object with the given `id`.
@@ -18842,13 +20187,20 @@ Returns a list of `Note` objects. ```python from merge import Merge +from merge.resources.crm.resources.opportunities import ( + OpportunitiesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.opportunities.retrieve( + id="id", + expand=OpportunitiesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -18865,47 +20217,7 @@ client.crm.notes.list(
-**account_id:** `typing.Optional[str]` — If provided, will only return notes with this account. - -
-
- -
-
- -**contact_id:** `typing.Optional[str]` — If provided, will only return notes with this contact. - -
-
- -
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**expand:** `typing.Optional[NotesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**id:** `str`
@@ -18913,7 +20225,7 @@ client.crm.notes.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**expand:** `typing.Optional[OpportunitiesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -18945,39 +20257,7 @@ client.crm.notes.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
- -
-
- -**opportunity_id:** `typing.Optional[str]` — If provided, will only return notes with this opportunity. - -
-
- -
-
- -**owner_id:** `typing.Optional[str]` — If provided, will only return notes with this owner. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. +**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins.
@@ -18985,7 +20265,7 @@ client.crm.notes.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**show_enum_origins:** `typing.Optional[typing.Literal["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)
@@ -19005,7 +20285,7 @@ client.crm.notes.list(
-
client.crm.notes.create(...) +
client.crm.opportunities.partial_update(...)
@@ -19017,7 +20297,7 @@ client.crm.notes.list(
-Creates a `Note` object with the given values. +Updates an `Opportunity` object with the given `id`.
@@ -19033,14 +20313,17 @@ Creates a `Note` object with the given values. ```python from merge import Merge -from merge.resources.crm import NoteRequest +from merge.resources.crm import PatchedOpportunityRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.create( - model=NoteRequest(), +client.crm.opportunities.partial_update( + id="id", + is_debug_mode=True, + run_async=True, + model=PatchedOpportunityRequest(), ) ``` @@ -19057,7 +20340,15 @@ client.crm.notes.create(
-**model:** `NoteRequest` +**id:** `str` + +
+
+ +
+
+ +**model:** `PatchedOpportunityRequest`
@@ -19093,7 +20384,7 @@ client.crm.notes.create(
-
client.crm.notes.retrieve(...) +
client.crm.opportunities.meta_patch_retrieve(...)
@@ -19105,7 +20396,7 @@ client.crm.notes.create(
-Returns a `Note` object with the given `id`. +Returns metadata for `Opportunity` PATCHs.
@@ -19126,7 +20417,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.retrieve( +client.crm.opportunities.meta_patch_retrieve( id="id", ) @@ -19152,38 +20443,6 @@ client.crm.notes.retrieve(
-**expand:** `typing.Optional[NotesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -19196,7 +20455,7 @@ client.crm.notes.retrieve(
-
client.crm.notes.meta_post_retrieve() +
client.crm.opportunities.meta_post_retrieve()
@@ -19208,7 +20467,7 @@ client.crm.notes.retrieve(
-Returns metadata for `Note` POSTs. +Returns metadata for `Opportunity` POSTs.
@@ -19229,7 +20488,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.meta_post_retrieve() +client.crm.opportunities.meta_post_retrieve() ``` @@ -19257,7 +20516,7 @@ client.crm.notes.meta_post_retrieve()
-
client.crm.notes.remote_field_classes_list(...) +
client.crm.opportunities.remote_field_classes_list(...)
@@ -19290,8 +20549,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.remote_field_classes_list( +client.crm.opportunities.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -19384,8 +20650,8 @@ client.crm.notes.remote_field_classes_list(
-## Crm Opportunities -
client.crm.opportunities.list(...) +## Crm Passthrough +
client.crm.passthrough.create(...)
@@ -19397,7 +20663,7 @@ client.crm.notes.remote_field_classes_list(
-Returns a list of `Opportunity` objects. +Pull data from an endpoint not currently supported by Merge.
@@ -19413,13 +20679,17 @@ Returns a list of `Opportunity` objects. ```python from merge import Merge +from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -19436,7 +20706,7 @@ client.crm.opportunities.list(
-**account_id:** `typing.Optional[str]` — If provided, will only return opportunities with this account. +**request:** `DataPassthroughRequest`
@@ -19444,7 +20714,71 @@ client.crm.opportunities.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
+ + + + +
+ +## Crm RegenerateKey +
client.crm.regenerate_key.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.regenerate_key.create( + name="Remote Deployment Key 1", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name of the remote key
@@ -19452,15 +20786,91 @@ client.crm.opportunities.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+## Crm Stages +
client.crm.stages.list(...)
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Stage` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.stages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -19468,7 +20878,15 @@ client.crm.opportunities.list(
-**expand:** `typing.Optional[OpportunitiesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -19524,14 +20942,6 @@ client.crm.opportunities.list(
-**owner_id:** `typing.Optional[str]` — If provided, will only return opportunities with this owner. - -
-
- -
-
- **page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -19540,22 +20950,6 @@ client.crm.opportunities.list(
-**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return opportunities created in the third party platform after this datetime. - -
-
- -
-
- -**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins. - -
-
- -
-
- **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -19564,36 +20958,6 @@ client.crm.opportunities.list(
-**show_enum_origins:** `typing.Optional[typing.Literal["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) - -
-
- -
-
- -**stage_id:** `typing.Optional[str]` — If provided, will only return opportunities with this stage. - -
-
- -
-
- -**status:** `typing.Optional[OpportunitiesListRequestStatus]` - -If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') - -* `OPEN` - OPEN -* `WON` - WON -* `LOST` - LOST - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -19606,7 +20970,7 @@ If provided, will only return opportunities with this status. Options: ('OPEN',
-
client.crm.opportunities.create(...) +
client.crm.stages.retrieve(...)
@@ -19618,7 +20982,7 @@ If provided, will only return opportunities with this status. Options: ('OPEN',
-Creates an `Opportunity` object with the given values. +Returns a `Stage` object with the given `id`.
@@ -19634,14 +20998,16 @@ Creates an `Opportunity` object with the given values. ```python from merge import Merge -from merge.resources.crm import OpportunityRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.create( - model=OpportunityRequest(), +client.crm.stages.retrieve( + id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -19658,7 +21024,7 @@ client.crm.opportunities.create(
-**model:** `OpportunityRequest` +**id:** `str`
@@ -19666,7 +21032,7 @@ client.crm.opportunities.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -19674,7 +21040,15 @@ client.crm.opportunities.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -19694,7 +21068,7 @@ client.crm.opportunities.create(
-
client.crm.opportunities.retrieve(...) +
client.crm.stages.remote_field_classes_list(...)
@@ -19706,7 +21080,7 @@ client.crm.opportunities.create(
-Returns an `Opportunity` object with the given `id`. +Returns a list of `RemoteFieldClass` objects.
@@ -19727,8 +21101,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.retrieve( - id="id", +client.crm.stages.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -19745,7 +21126,7 @@ client.crm.opportunities.retrieve(
-**id:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -19753,7 +21134,7 @@ client.crm.opportunities.retrieve(
-**expand:** `typing.Optional[OpportunitiesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -19785,7 +21166,7 @@ client.crm.opportunities.retrieve(
-**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins. +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value
@@ -19793,7 +21174,15 @@ client.crm.opportunities.retrieve(
-**show_enum_origins:** `typing.Optional[typing.Literal["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) +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -19813,7 +21202,8 @@ client.crm.opportunities.retrieve(
-
client.crm.opportunities.partial_update(...) +## Crm SyncStatus +
client.crm.sync_status.list(...)
@@ -19825,7 +21215,7 @@ client.crm.opportunities.retrieve(
-Updates an `Opportunity` object with the given `id`. +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -19841,15 +21231,14 @@ Updates an `Opportunity` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedOpportunityRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.partial_update( - id="id", - model=PatchedOpportunityRequest(), +client.crm.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) ``` @@ -19866,23 +21255,7 @@ client.crm.opportunities.partial_update(
-**id:** `str` - -
-
- -
-
- -**model:** `PatchedOpportunityRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -19890,7 +21263,7 @@ client.crm.opportunities.partial_update(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -19910,7 +21283,8 @@ client.crm.opportunities.partial_update(
-
client.crm.opportunities.meta_patch_retrieve(...) +## Crm ForceResync +
client.crm.force_resync.sync_status_resync_create()
@@ -19922,7 +21296,7 @@ client.crm.opportunities.partial_update(
-Returns metadata for `Opportunity` PATCHs. +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -19943,9 +21317,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.meta_patch_retrieve( - id="id", -) +client.crm.force_resync.sync_status_resync_create() ``` @@ -19961,14 +21333,6 @@ client.crm.opportunities.meta_patch_retrieve(
-**id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -19981,7 +21345,8 @@ client.crm.opportunities.meta_patch_retrieve(
-
client.crm.opportunities.meta_post_retrieve() +## Crm Tasks +
client.crm.tasks.list(...)
@@ -19993,7 +21358,7 @@ client.crm.opportunities.meta_patch_retrieve(
-Returns metadata for `Opportunity` POSTs. +Returns a list of `Task` objects.
@@ -20008,13 +21373,37 @@ Returns metadata for `Opportunity` POSTs.
```python +import datetime + from merge import Merge +from merge.resources.crm.resources.tasks import TasksListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.meta_post_retrieve() +client.crm.tasks.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TasksListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) ```
@@ -20030,70 +21419,31 @@ client.crm.opportunities.meta_post_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
- -
- - - - -
-
client.crm.opportunities.remote_field_classes_list(...)
-#### 📝 Description - -
-
- -
-
- -Returns a list of `RemoteFieldClass` objects. -
-
+**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.opportunities.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) - -``` -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-#### ⚙️ Parameters - -
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**expand:** `typing.Optional[TasksListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -20133,7 +21483,7 @@ client.crm.opportunities.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -20141,7 +21491,7 @@ client.crm.opportunities.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -20157,6 +21507,14 @@ client.crm.opportunities.remote_field_classes_list(
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -20169,8 +21527,7 @@ client.crm.opportunities.remote_field_classes_list(
-## Crm Passthrough -
client.crm.passthrough.create(...) +
client.crm.tasks.create(...)
@@ -20182,7 +21539,7 @@ client.crm.opportunities.remote_field_classes_list(
-Pull data from an endpoint not currently supported by Merge. +Creates a `Task` object with the given values.
@@ -20198,17 +21555,16 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.crm import DataPassthroughRequest, MethodEnum +from merge.resources.crm import TaskRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.crm.tasks.create( + is_debug_mode=True, + run_async=True, + model=TaskRequest(), ) ``` @@ -20225,7 +21581,7 @@ client.crm.passthrough.create(
-**request:** `DataPassthroughRequest` +**model:** `TaskRequest`
@@ -20233,71 +21589,15 @@ client.crm.passthrough.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. -
-
- -
- - - - -
- -## Crm RegenerateKey -
client.crm.regenerate_key.create(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Exchange remote keys. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.regenerate_key.create( - name="Remote Deployment Key 1", -) - -``` -
-
-#### ⚙️ Parameters -
-
-
- -**name:** `str` — The name of the remote key +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -20317,8 +21617,7 @@ client.crm.regenerate_key.create(
-## Crm Stages -
client.crm.stages.list(...) +
client.crm.tasks.retrieve(...)
@@ -20330,7 +21629,7 @@ client.crm.regenerate_key.create(
-Returns a list of `Stage` objects. +Returns a `Task` object with the given `id`.
@@ -20346,13 +21645,18 @@ Returns a list of `Stage` objects. ```python from merge import Merge +from merge.resources.crm.resources.tasks import TasksRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.stages.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.tasks.retrieve( + id="id", + expand=TasksRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -20369,23 +21673,7 @@ client.crm.stages.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -20393,7 +21681,7 @@ client.crm.stages.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**expand:** `typing.Optional[TasksRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -20425,38 +21713,6 @@ client.crm.stages.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
- -
-
- -**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -20469,7 +21725,7 @@ client.crm.stages.list(
-
client.crm.stages.retrieve(...) +
client.crm.tasks.partial_update(...)
@@ -20481,7 +21737,7 @@ client.crm.stages.list(
-Returns a `Stage` object with the given `id`. +Updates a `Task` object with the given `id`.
@@ -20497,13 +21753,17 @@ Returns a `Stage` object with the given `id`. ```python from merge import Merge +from merge.resources.crm import PatchedTaskRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.stages.retrieve( +client.crm.tasks.partial_update( id="id", + is_debug_mode=True, + run_async=True, + model=PatchedTaskRequest(), ) ``` @@ -20528,7 +21788,7 @@ client.crm.stages.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**model:** `PatchedTaskRequest`
@@ -20536,7 +21796,7 @@ client.crm.stages.retrieve(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -20544,7 +21804,7 @@ client.crm.stages.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -20564,7 +21824,7 @@ client.crm.stages.retrieve(
-
client.crm.stages.remote_field_classes_list(...) +
client.crm.tasks.meta_patch_retrieve(...)
@@ -20576,7 +21836,7 @@ client.crm.stages.retrieve(
-Returns a list of `RemoteFieldClass` objects. +Returns metadata for `Task` PATCHs.
@@ -20597,8 +21857,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.stages.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.crm.tasks.meta_patch_retrieve( + id="id", ) ``` @@ -20615,7 +21875,7 @@ client.crm.stages.remote_field_classes_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -20623,59 +21883,64 @@ client.crm.stages.remote_field_classes_list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
+
+
client.crm.tasks.meta_post_retrieve()
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
+#### 📝 Description
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value - +Returns metadata for `Task` POSTs.
+ + + +#### 🔌 Usage
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value - -
-
-
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.tasks.meta_post_retrieve() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -20691,8 +21956,7 @@ client.crm.stages.remote_field_classes_list(
-## Crm SyncStatus -
client.crm.sync_status.list(...) +
client.crm.tasks.remote_field_classes_list(...)
@@ -20704,7 +21968,7 @@ client.crm.stages.remote_field_classes_list(
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +Returns a list of `RemoteFieldClass` objects.
@@ -20725,8 +21989,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.sync_status.list( +client.crm.tasks.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -20751,7 +22022,7 @@ client.crm.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -20759,65 +22030,51 @@ client.crm.sync_status.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
- -
+
+
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +
-
-## Crm ForceResync -
client.crm.force_resync.sync_status_resync_create()
-#### 📝 Description - -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
-Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. -
-
+**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.force_resync.sync_status_resync_create() - -``` -
-
+**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +
-#### ⚙️ Parameters -
+**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+
@@ -20833,8 +22090,8 @@ client.crm.force_resync.sync_status_resync_create()
-## Crm Tasks -
client.crm.tasks.list(...) +## Crm Users +
client.crm.users.list(...)
@@ -20846,7 +22103,7 @@ client.crm.force_resync.sync_status_resync_create()
-Returns a list of `Task` objects. +Returns a list of `User` objects.
@@ -20861,14 +22118,35 @@ Returns a list of `Task` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.list( +client.crm.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email="email", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -20909,7 +22187,7 @@ client.crm.tasks.list(
-**expand:** `typing.Optional[TasksListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**email:** `typing.Optional[str]` — If provided, will only return users with this email.
@@ -20993,95 +22271,7 @@ client.crm.tasks.list(
-
client.crm.tasks.create(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a `Task` object with the given values. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge -from merge.resources.crm import TaskRequest - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.tasks.create( - model=TaskRequest(), -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**model:** `TaskRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - -
-
- -
-
- -**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.crm.tasks.retrieve(...) +
client.crm.users.retrieve(...)
@@ -21093,7 +22283,7 @@ client.crm.tasks.create(
-Returns a `Task` object with the given `id`. +Returns a `User` object with the given `id`.
@@ -21114,8 +22304,11 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.retrieve( +client.crm.users.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -21140,14 +22333,6 @@ client.crm.tasks.retrieve(
-**expand:** `typing.Optional[TasksRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -21184,7 +22369,7 @@ client.crm.tasks.retrieve(
-
client.crm.tasks.partial_update(...) +
client.crm.users.ignore_create(...)
@@ -21196,7 +22381,7 @@ client.crm.tasks.retrieve(
-Updates a `Task` object with the given `id`. +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
@@ -21212,15 +22397,17 @@ Updates a `Task` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedTaskRequest +from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.partial_update( - id="id", - model=PatchedTaskRequest(), +client.crm.users.ignore_create( + model_id="model_id", + request=IgnoreCommonModelRequest( + reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, + ), ) ``` @@ -21237,23 +22424,7 @@ client.crm.tasks.partial_update(
-**id:** `str` - -
-
- -
-
- -**model:** `PatchedTaskRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**model_id:** `str`
@@ -21261,7 +22432,7 @@ client.crm.tasks.partial_update(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**request:** `IgnoreCommonModelRequest`
@@ -21281,7 +22452,7 @@ client.crm.tasks.partial_update(
-
client.crm.tasks.meta_patch_retrieve(...) +
client.crm.users.remote_field_classes_list(...)
@@ -21293,7 +22464,7 @@ client.crm.tasks.partial_update(
-Returns metadata for `Task` PATCHs. +Returns a list of `RemoteFieldClass` objects.
@@ -21314,8 +22485,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.meta_patch_retrieve( - id="id", +client.crm.users.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -21332,7 +22510,7 @@ client.crm.tasks.meta_patch_retrieve(
-**id:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -21340,64 +22518,59 @@ client.crm.tasks.meta_patch_retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
- -
+
+
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-
-
client.crm.tasks.meta_post_retrieve()
-#### 📝 Description - -
-
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
-Returns metadata for `Task` POSTs. -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### 🔌 Usage -
+**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.tasks.meta_post_retrieve() - -``` -
-
+**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value + -#### ⚙️ Parameters -
+**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+
@@ -21413,7 +22586,8 @@ client.crm.tasks.meta_post_retrieve()
-
client.crm.tasks.remote_field_classes_list(...) +## Crm WebhookReceivers +
client.crm.webhook_receivers.list()
@@ -21425,7 +22599,7 @@ client.crm.tasks.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `WebhookReceiver` objects.
@@ -21446,9 +22620,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) +client.crm.webhook_receivers.list() ``` @@ -21464,47 +22636,71 @@ client.crm.tasks.remote_field_classes_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**include_deleted_data:** `typing.Optional[bool]` — 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/). -
+
+
client.crm.webhook_receivers.create(...)
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
+#### 📝 Description
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - +
+
+ +Creates a `WebhookReceiver` object with the given values. +
+
+#### 🔌 Usage +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.webhook_receivers.create( + event="event", + is_active=True, +) + +``` +
+
+#### ⚙️ Parameters +
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +
+
+ +**event:** `str`
@@ -21512,7 +22708,7 @@ client.crm.tasks.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**is_active:** `bool`
@@ -21520,7 +22716,7 @@ client.crm.tasks.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**key:** `typing.Optional[str]`
@@ -21540,8 +22736,8 @@ client.crm.tasks.remote_field_classes_list(
-## Crm Users -
client.crm.users.list(...) +## Filestorage AccountDetails +
client.filestorage.account_details.retrieve()
@@ -21553,7 +22749,7 @@ client.crm.tasks.remote_field_classes_list(
-Returns a list of `User` objects. +Get details for a linked account.
@@ -21574,9 +22770,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.users.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) +client.filestorage.account_details.retrieve() ``` @@ -21592,95 +22786,71 @@ client.crm.users.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. -
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. -
+
+## Filestorage AccountToken +
client.filestorage.account_token.retrieve(...)
-**email:** `typing.Optional[str]` — If provided, will only return users with this email. - -
-
+#### 📝 Description
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +Returns the account token for the end user with the provided public token.
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. -
+#### 🔌 Usage +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
+```python +from merge import Merge -
-
+client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.account_token.retrieve( + public_token="public_token", +) -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +``` +
+
+#### ⚙️ Parameters +
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
-
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**public_token:** `str`
@@ -21700,7 +22870,8 @@ client.crm.users.list(
-
client.crm.users.retrieve(...) +## Filestorage AsyncPassthrough +
client.filestorage.async_passthrough.create(...)
@@ -21712,7 +22883,7 @@ client.crm.users.list(
-Returns a `User` object with the given `id`. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -21728,13 +22899,17 @@ Returns a `User` object with the given `id`. ```python from merge import Merge +from merge.resources.filestorage import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.users.retrieve( - id="id", +client.filestorage.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -21751,31 +22926,7 @@ client.crm.users.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request:** `DataPassthroughRequest`
@@ -21795,7 +22946,7 @@ client.crm.users.retrieve(
-
client.crm.users.ignore_create(...) +
client.filestorage.async_passthrough.retrieve(...)
@@ -21807,7 +22958,7 @@ client.crm.users.retrieve(
-Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +Retrieves data from earlier async-passthrough POST request
@@ -21823,17 +22974,13 @@ Ignores a specific row based on the `model_id` in the url. These records will ha ```python from merge import Merge -from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.users.ignore_create( - model_id="model_id", - request=IgnoreCommonModelRequest( - reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - ), +client.filestorage.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", ) ``` @@ -21850,15 +22997,7 @@ client.crm.users.ignore_create(
-**model_id:** `str` - -
-
- -
-
- -**request:** `IgnoreCommonModelRequest` +**async_passthrough_receipt_id:** `str`
@@ -21878,7 +23017,8 @@ client.crm.users.ignore_create(
-
client.crm.users.remote_field_classes_list(...) +## Filestorage AuditTrail +
client.filestorage.audit_trail.list(...)
@@ -21890,7 +23030,7 @@ client.crm.users.ignore_create(
-Returns a list of `RemoteFieldClass` objects. +Gets a list of audit trail events.
@@ -21911,8 +23051,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.users.remote_field_classes_list( +client.filestorage.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -21937,23 +23082,7 @@ client.crm.users.remote_field_classes_list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time
@@ -21961,7 +23090,7 @@ client.crm.users.remote_field_classes_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**event_type:** `typing.Optional[str]` — 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`
@@ -21969,7 +23098,7 @@ client.crm.users.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -21977,7 +23106,7 @@ client.crm.users.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time
@@ -21985,7 +23114,7 @@ client.crm.users.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**user_email:** `typing.Optional[str]` — 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.
@@ -22005,8 +23134,8 @@ client.crm.users.remote_field_classes_list(
-## Crm WebhookReceivers -
client.crm.webhook_receivers.list() +## Filestorage AvailableActions +
client.filestorage.available_actions.retrieve()
@@ -22018,7 +23147,7 @@ client.crm.users.remote_field_classes_list(
-Returns a list of `WebhookReceiver` objects. +Returns a list of models and actions available for an account.
@@ -22039,7 +23168,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.webhook_receivers.list() +client.filestorage.available_actions.retrieve() ``` @@ -22067,7 +23196,8 @@ client.crm.webhook_receivers.list()
-
client.crm.webhook_receivers.create(...) +## Filestorage Scopes +
client.filestorage.scopes.default_scopes_retrieve()
@@ -22079,7 +23209,7 @@ client.crm.webhook_receivers.list()
-Creates a `WebhookReceiver` object with the given values. +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -22100,10 +23230,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.webhook_receivers.create( - event="event", - is_active=True, -) +client.filestorage.scopes.default_scopes_retrieve() ``` @@ -22119,27 +23246,64 @@ client.crm.webhook_receivers.create(
-**event:** `str` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.filestorage.scopes.linked_account_scopes_retrieve()
-**is_active:** `bool` - +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+#### 🔌 Usage +
-**key:** `typing.Optional[str]` - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.scopes.linked_account_scopes_retrieve() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -22155,8 +23319,7 @@ client.crm.webhook_receivers.create(
-## Knowledgebase AccountDetails -
client.knowledgebase.account_details.retrieve() +
client.filestorage.scopes.linked_account_scopes_create(...)
@@ -22168,7 +23331,7 @@ client.crm.webhook_receivers.create(
-Get details for a linked account. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -22184,12 +23347,43 @@ Get details for a linked account. ```python from merge import Merge +from merge.resources.filestorage import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.account_details.retrieve() +client.filestorage.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], +) ``` @@ -22205,6 +23399,14 @@ client.knowledgebase.account_details.retrieve()
+**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -22217,8 +23419,8 @@ client.knowledgebase.account_details.retrieve()
-## Knowledgebase AccountToken -
client.knowledgebase.account_token.retrieve(...) +## Filestorage DeleteAccount +
client.filestorage.delete_account.delete()
@@ -22230,7 +23432,7 @@ client.knowledgebase.account_details.retrieve()
-Returns the account token for the end user with the provided public token. +Delete a linked account.
@@ -22251,9 +23453,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.account_token.retrieve( - public_token="public_token", -) +client.filestorage.delete_account.delete() ``` @@ -22269,14 +23469,6 @@ client.knowledgebase.account_token.retrieve(
-**public_token:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -22289,8 +23481,8 @@ client.knowledgebase.account_token.retrieve(
-## Knowledgebase Articles -
client.knowledgebase.articles.list(...) +## Filestorage Drives +
client.filestorage.drives.list(...)
@@ -22302,7 +23494,7 @@ client.knowledgebase.account_token.retrieve(
-Returns a list of `Article` objects. +Returns a list of `Drive` objects.
@@ -22317,14 +23509,34 @@ Returns a list of `Article` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.articles.list( +client.filestorage.drives.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", ) ``` @@ -22365,14 +23577,6 @@ client.knowledgebase.articles.list(
-**expand:** `typing.Optional[ArticlesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -22413,15 +23617,7 @@ client.knowledgebase.articles.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
- -
-
- -**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_article_id. +**name:** `typing.Optional[str]` — If provided, will only return drives with this name. This performs an exact match.
@@ -22429,7 +23625,7 @@ client.knowledgebase.articles.list(
-**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_container_id. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -22445,14 +23641,6 @@ client.knowledgebase.articles.list(
-**type:** `typing.Optional[str]` — If provided, will only return articles of the given type. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -22465,7 +23653,7 @@ client.knowledgebase.articles.list(
-
client.knowledgebase.articles.retrieve(...) +
client.filestorage.drives.retrieve(...)
@@ -22477,7 +23665,7 @@ client.knowledgebase.articles.list(
-Returns an `Article` object with the given `id`. +Returns a `Drive` object with the given `id`.
@@ -22498,8 +23686,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.articles.retrieve( +client.filestorage.drives.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -22524,14 +23714,6 @@ client.knowledgebase.articles.retrieve(
-**expand:** `typing.Optional[ArticlesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -22560,8 +23742,8 @@ client.knowledgebase.articles.retrieve(
-## Knowledgebase AsyncPassthrough -
client.knowledgebase.async_passthrough.create(...) +## Filestorage FieldMapping +
client.filestorage.field_mapping.field_mappings_retrieve(...)
@@ -22573,7 +23755,7 @@ client.knowledgebase.articles.retrieve(
-Asynchronously pull data from an endpoint not currently supported by Merge. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -22589,17 +23771,13 @@ Asynchronously pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.async_passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.filestorage.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -22616,7 +23794,7 @@ client.knowledgebase.async_passthrough.create(
-**request:** `DataPassthroughRequest` +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -22636,7 +23814,7 @@ client.knowledgebase.async_passthrough.create(
-
client.knowledgebase.async_passthrough.retrieve(...) +
client.filestorage.field_mapping.field_mappings_create(...)
@@ -22648,7 +23826,7 @@ client.knowledgebase.async_passthrough.create(
-Retrieves data from earlier async-passthrough POST request +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -22669,8 +23847,14 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", +client.filestorage.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", ) ``` @@ -22687,7 +23871,7 @@ client.knowledgebase.async_passthrough.retrieve(
-**async_passthrough_receipt_id:** `str` +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -22695,71 +23879,31 @@ client.knowledgebase.async_passthrough.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
- -
- - - - -
- -## Knowledgebase Attachments -
client.knowledgebase.attachments.list(...) -
-
- -#### 📝 Description - -
-
-Returns a list of `Attachment` objects. -
-
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.attachments.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) - -``` -
-
+**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. +
-#### ⚙️ Parameters - -
-
-
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from.
@@ -22767,7 +23911,7 @@ client.knowledgebase.attachments.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category.
@@ -22775,7 +23919,7 @@ client.knowledgebase.attachments.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -22783,55 +23927,70 @@ client.knowledgebase.attachments.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
+
+
client.filestorage.field_mapping.field_mappings_destroy(...)
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
+#### 📝 Description
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
-
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +
+
+#### 🔌 Usage +
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", +) + +```
+
+
+ +#### ⚙️ Parameters
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +
+
+ +**field_mapping_id:** `str`
@@ -22851,7 +24010,7 @@ client.knowledgebase.attachments.list(
-
client.knowledgebase.attachments.retrieve(...) +
client.filestorage.field_mapping.field_mappings_partial_update(...)
@@ -22863,7 +24022,7 @@ client.knowledgebase.attachments.list(
-Returns an `Attachment` object with the given `id`. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -22884,8 +24043,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.attachments.retrieve( - id="id", +client.filestorage.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", ) ``` @@ -22902,7 +24061,7 @@ client.knowledgebase.attachments.retrieve(
-**id:** `str` +**field_mapping_id:** `str`
@@ -22910,7 +24069,7 @@ client.knowledgebase.attachments.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -22918,7 +24077,15 @@ client.knowledgebase.attachments.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. + +
+
+ +
+
+ +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -22938,8 +24105,7 @@ client.knowledgebase.attachments.retrieve(
-## Knowledgebase AuditTrail -
client.knowledgebase.audit_trail.list(...) +
client.filestorage.field_mapping.remote_fields_retrieve(...)
@@ -22951,7 +24117,7 @@ client.knowledgebase.attachments.retrieve(
-Gets a list of audit trail events. +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -22972,8 +24138,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.audit_trail.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.filestorage.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", ) ``` @@ -22990,39 +24157,7 @@ client.knowledgebase.audit_trail.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time - -
-
- -
-
- -**event_type:** `typing.Optional[str]` — 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` - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
- -
-
- -**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
@@ -23030,7 +24165,7 @@ client.knowledgebase.audit_trail.list(
-**user_email:** `typing.Optional[str]` — 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. +**include_example_values:** `typing.Optional[str]` — 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.
@@ -23050,8 +24185,7 @@ client.knowledgebase.audit_trail.list(
-## Knowledgebase AvailableActions -
client.knowledgebase.available_actions.retrieve() +
client.filestorage.field_mapping.target_fields_retrieve()
@@ -23063,7 +24197,7 @@ client.knowledgebase.audit_trail.list(
-Returns a list of models and actions available for an account. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -23084,7 +24218,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.available_actions.retrieve() +client.filestorage.field_mapping.target_fields_retrieve() ``` @@ -23112,8 +24246,8 @@ client.knowledgebase.available_actions.retrieve()
-## Knowledgebase Containers -
client.knowledgebase.containers.list(...) +## Filestorage Files +
client.filestorage.files.list(...)
@@ -23125,7 +24259,7 @@ client.knowledgebase.available_actions.retrieve()
-Returns a list of `Container` objects. +Returns a list of `File` objects.
@@ -23140,14 +24274,49 @@ Returns a list of `Container` objects.
```python +import datetime + from merge import Merge +from merge.resources.filestorage.resources.files import ( + FilesListRequestExpand, + FilesListRequestOrderBy, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.containers.list( +client.filestorage.files.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FilesListRequestExpand.DRIVE, + folder_id="folder_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + mime_type="mime_type", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + order_by=FilesListRequestOrderBy.CREATED_AT_DESCENDING, + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", ) ``` @@ -23188,7 +24357,23 @@ client.knowledgebase.containers.list(
-**expand:** `typing.Optional[ContainersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**drive_id:** `typing.Optional[str]` — Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive. + +
+
+ +
+
+ +**expand:** `typing.Optional[FilesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**folder_id:** `typing.Optional[str]` — Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory.
@@ -23220,6 +24405,14 @@ client.knowledgebase.containers.list(
+**mime_type:** `typing.Optional[str]` — If provided, will only return files with these mime_types. Multiple values can be separated by commas. + +
+
+ +
+
+ **modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -23236,7 +24429,7 @@ client.knowledgebase.containers.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**name:** `typing.Optional[str]` — If provided, will only return files with this name. This performs an exact match.
@@ -23244,7 +24437,7 @@ client.knowledgebase.containers.list(
-**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_article_id. +**order_by:** `typing.Optional[FilesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at.
@@ -23252,7 +24445,7 @@ client.knowledgebase.containers.list(
-**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_container_id. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -23260,7 +24453,7 @@ client.knowledgebase.containers.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform after this datetime.
@@ -23268,7 +24461,15 @@ client.knowledgebase.containers.list(
-**type:** `typing.Optional[str]` — If provided, will only return containers of the given type. +**remote_created_before:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform before this datetime. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -23288,7 +24489,7 @@ client.knowledgebase.containers.list(
-
client.knowledgebase.containers.retrieve(...) +
client.filestorage.files.create(...)
@@ -23300,7 +24501,7 @@ client.knowledgebase.containers.list(
-Returns a `Container` object with the given `id`. +Creates a `File` object with the given values.
@@ -23316,13 +24517,16 @@ Returns a `Container` object with the given `id`. ```python from merge import Merge +from merge.resources.filestorage import FileRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.containers.retrieve( - id="id", +client.filestorage.files.create( + is_debug_mode=True, + run_async=True, + model=FileRequest(), ) ``` @@ -23339,15 +24543,7 @@ client.knowledgebase.containers.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[ContainersRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**model:** `FileRequest`
@@ -23355,7 +24551,7 @@ client.knowledgebase.containers.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -23363,7 +24559,7 @@ client.knowledgebase.containers.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -23383,8 +24579,7 @@ client.knowledgebase.containers.retrieve(
-## Knowledgebase Scopes -
client.knowledgebase.scopes.default_scopes_retrieve() +
client.filestorage.files.retrieve(...)
@@ -23396,7 +24591,7 @@ client.knowledgebase.containers.retrieve(
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns a `File` object with the given `id`.
@@ -23412,12 +24607,20 @@ Get the default permissions for Merge Common Models and fields across all Linked ```python from merge import Merge +from merge.resources.filestorage.resources.files import ( + FilesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.scopes.default_scopes_retrieve() +client.filestorage.files.retrieve( + id="id", + expand=FilesRetrieveRequestExpand.DRIVE, + include_remote_data=True, + include_shell_data=True, +) ``` @@ -23433,6 +24636,38 @@ client.knowledgebase.scopes.default_scopes_retrieve()
+**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[FilesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -23445,7 +24680,7 @@ client.knowledgebase.scopes.default_scopes_retrieve()
-
client.knowledgebase.scopes.linked_account_scopes_retrieve() +
client.filestorage.files.download_request_meta_retrieve(...)
@@ -23457,7 +24692,7 @@ client.knowledgebase.scopes.default_scopes_retrieve()
-Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party.
@@ -23478,7 +24713,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.scopes.linked_account_scopes_retrieve() +client.filestorage.files.download_request_meta_retrieve( + id="id", + mime_type="mime_type", +) ``` @@ -23494,6 +24732,22 @@ client.knowledgebase.scopes.linked_account_scopes_retrieve()
+**id:** `str` + +
+
+ +
+
+ +**mime_type:** `typing.Optional[str]` — 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. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -23506,7 +24760,7 @@ client.knowledgebase.scopes.linked_account_scopes_retrieve()
-
client.knowledgebase.scopes.linked_account_scopes_create(...) +
client.filestorage.files.download_request_meta_list(...)
@@ -23518,7 +24772,7 @@ client.knowledgebase.scopes.linked_account_scopes_retrieve()
-Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) +Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party.
@@ -23534,42 +24788,24 @@ Update permissions for any Common Model or field for a single Linked Account. An ```python from merge import Merge -from merge.resources.knowledgebase import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, +from merge.resources.filestorage.resources.files import ( + FilesDownloadRequestMetaListRequestOrderBy, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], +client.filestorage.files.download_request_meta_list( + created_after="created_after", + created_before="created_before", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + mime_types="mime_types", + modified_after="modified_after", + modified_before="modified_before", + order_by=FilesDownloadRequestMetaListRequestOrderBy.CREATED_AT_DESCENDING, + page_size=1, ) ``` @@ -23586,7 +24822,79 @@ client.knowledgebase.scopes.linked_account_scopes_create(
-**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**created_after:** `typing.Optional[str]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[str]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — If provided, will only return objects with the given IDs. Comma-separated list of strings. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**mime_types:** `typing.Optional[str]` — 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. + +
+
+ +
+
+ +**modified_after:** `typing.Optional[str]` — If provided, will only return objects modified after this datetime. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[str]` — If provided, will only return objects modified before this datetime. + +
+
+ +
+
+ +**order_by:** `typing.Optional[FilesDownloadRequestMetaListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -23606,8 +24914,7 @@ client.knowledgebase.scopes.linked_account_scopes_create(
-## Knowledgebase DeleteAccount -
client.knowledgebase.delete_account.delete() +
client.filestorage.files.meta_post_retrieve()
@@ -23619,7 +24926,7 @@ client.knowledgebase.scopes.linked_account_scopes_create(
-Delete a linked account. +Returns metadata for `FileStorageFile` POSTs.
@@ -23640,7 +24947,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.delete_account.delete() +client.filestorage.files.meta_post_retrieve() ``` @@ -23668,8 +24975,8 @@ client.knowledgebase.delete_account.delete()
-## Knowledgebase FieldMapping -
client.knowledgebase.field_mapping.field_mappings_retrieve(...) +## Filestorage Folders +
client.filestorage.folders.list(...)
@@ -23681,7 +24988,7 @@ client.knowledgebase.delete_account.delete()
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns a list of `Folder` objects.
@@ -23696,13 +25003,41 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```python +import datetime + from merge import Merge +from merge.resources.filestorage.resources.folders import ( + FoldersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.field_mappings_retrieve() +client.filestorage.folders.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FoldersListRequestExpand.DRIVE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_folder_id="parent_folder_id", + remote_id="remote_id", +) ```
@@ -23718,7 +25053,7 @@ client.knowledgebase.field_mapping.field_mappings_retrieve()
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -23726,75 +25061,47 @@ client.knowledgebase.field_mapping.field_mappings_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
- -
+
+
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-
-
client.knowledgebase.field_mapping.field_mappings_create(...)
-#### 📝 Description - -
-
+**drive_id:** `typing.Optional[str]` — If provided, will only return folders in this drive. + +
+
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -
-
+**expand:** `typing.Optional[FoldersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.field_mapping.field_mappings_create( - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", -) - -``` -
-
+**include_deleted_data:** `typing.Optional[bool]` — 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/). +
-#### ⚙️ Parameters -
-
-
- -**target_field_name:** `str` — The name of the target field you want this remote field to map to. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -23802,7 +25109,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**target_field_description:** `str` — The description of the target field you want this remote field to map to. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -23810,7 +25117,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -23818,7 +25125,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -23826,7 +25133,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. +**name:** `typing.Optional[str]` — If provided, will only return folders with this name. This performs an exact match.
@@ -23834,7 +25141,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -23842,7 +25149,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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. +**parent_folder_id:** `typing.Optional[str]` — If provided, will only return folders in this parent folder. If null, will return folders in root directory.
@@ -23850,7 +25157,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -23870,7 +25177,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-
client.knowledgebase.field_mapping.field_mappings_destroy(...) +
client.filestorage.folders.create(...)
@@ -23882,7 +25189,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Creates a `Folder` object with the given values.
@@ -23898,13 +25205,16 @@ Deletes Field Mappings for a Linked Account. All data related to this Field Mapp ```python from merge import Merge +from merge.resources.filestorage import FolderRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", +client.filestorage.folders.create( + is_debug_mode=True, + run_async=True, + model=FolderRequest(), ) ``` @@ -23921,7 +25231,23 @@ client.knowledgebase.field_mapping.field_mappings_destroy(
-**field_mapping_id:** `str` +**model:** `FolderRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -23941,7 +25267,7 @@ client.knowledgebase.field_mapping.field_mappings_destroy(
-
client.knowledgebase.field_mapping.field_mappings_partial_update(...) +
client.filestorage.folders.retrieve(...)
@@ -23953,7 +25279,7 @@ client.knowledgebase.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a `Folder` object with the given `id`.
@@ -23969,13 +25295,19 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r ```python from merge import Merge +from merge.resources.filestorage.resources.folders import ( + FoldersRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", +client.filestorage.folders.retrieve( + id="id", + expand=FoldersRetrieveRequestExpand.DRIVE, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -23992,15 +25324,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` - -
-
- -
-
- -**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**id:** `str`
@@ -24008,7 +25332,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. +**expand:** `typing.Optional[FoldersRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -24016,7 +25340,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -24024,7 +25348,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -24044,7 +25368,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-
client.knowledgebase.field_mapping.remote_fields_retrieve(...) +
client.filestorage.folders.meta_post_retrieve()
@@ -24056,7 +25380,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns metadata for `FileStorageFolder` POSTs.
@@ -24077,7 +25401,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.remote_fields_retrieve() +client.filestorage.folders.meta_post_retrieve() ``` @@ -24093,22 +25417,6 @@ client.knowledgebase.field_mapping.remote_fields_retrieve()
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - -
-
- -
-
- -**include_example_values:** `typing.Optional[str]` — 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. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -24121,7 +25429,8 @@ client.knowledgebase.field_mapping.remote_fields_retrieve()
-
client.knowledgebase.field_mapping.target_fields_retrieve() +## Filestorage GenerateKey +
client.filestorage.generate_key.create(...)
@@ -24133,7 +25442,7 @@ client.knowledgebase.field_mapping.remote_fields_retrieve()
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). +Create a remote key.
@@ -24154,7 +25463,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.target_fields_retrieve() +client.filestorage.generate_key.create( + name="Remote Deployment Key 1", +) ``` @@ -24170,6 +25481,14 @@ client.knowledgebase.field_mapping.target_fields_retrieve()
+**name:** `str` — The name of the remote key + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -24182,8 +25501,8 @@ client.knowledgebase.field_mapping.target_fields_retrieve()
-## Knowledgebase GenerateKey -
client.knowledgebase.generate_key.create(...) +## Filestorage Groups +
client.filestorage.groups.list(...)
@@ -24195,7 +25514,7 @@ client.knowledgebase.field_mapping.target_fields_retrieve()
-Create a remote key. +Returns a list of `Group` objects.
@@ -24210,14 +25529,33 @@ Create a remote key.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.generate_key.create( - name="Remote Deployment Key 1", +client.filestorage.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -24234,7 +25572,7 @@ client.knowledgebase.generate_key.create(
-**name:** `str` — The name of the remote key +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -24242,95 +25580,152 @@ client.knowledgebase.generate_key.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. +
+
+
+**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
-
-## Knowledgebase Groups -
client.knowledgebase.groups.list(...)
-#### 📝 Description +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+
-Returns a list of `Group` objects. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
-#### 🔌 Usage +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+
-```python -from merge import Merge +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
-client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.groups.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) +
+
-``` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +
-#### ⚙️ Parameters + + +
+ +
client.filestorage.groups.retrieve(...)
+#### 📝 Description +
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
-
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - +Returns a `Group` object with the given `id`. +
+
+#### 🔌 Usage +
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.groups.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+#### ⚙️ Parameters +
-**expand:** `typing.Optional[GroupsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
+
+ +**id:** `str`
@@ -24338,7 +25733,7 @@ client.knowledgebase.groups.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -24362,6 +25757,3876 @@ client.knowledgebase.groups.list(
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +## Filestorage Issues +
client.filestorage.issues.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge +from merge.resources.filestorage.resources.issues import IssuesListRequestStatus + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_token:** `typing.Optional[str]` + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time + +
+
+ +
+
+ +**end_user_organization_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. + +
+
+ +
+
+ +**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. + +
+
+ +
+
+ +**include_muted:** `typing.Optional[str]` — If true, will include muted issues + +
+
+ +
+
+ +**integration_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. + +
+
+ +
+
+ +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. + +
+
+ +
+
+ +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time + +
+
+ +
+
+ +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.filestorage.issues.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.issues.retrieve( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage LinkToken +
client.filestorage.link_token.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.filestorage import CategoriesEnum + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + +
+
+ +
+
+ +**end_user_organization_name:** `str` — Your end user's organization. + +
+
+ +
+
+ +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. + +
+
+ +
+
+ +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. + +
+
+ +
+
+ +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. + +
+
+ +
+
+ +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. + +
+
+ +
+
+ +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + +
+
+ +
+
+ +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + +
+
+ +
+
+ +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. + +
+
+ +
+
+ +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + +
+
+ +
+
+ +**language:** `typing.Optional[LanguageEnum]` + +The following subset of IETF language tags can be used to configure localization. + +* `en` - en +* `de` - de + +
+
+ +
+
+ +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. + +
+
+ +
+
+ +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage LinkedAccounts +
client.filestorage.linked_accounts.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.filestorage.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**category:** `typing.Optional[LinkedAccountsListRequestCategory]` + +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. + +
+
+ +
+
+ +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. + +
+
+ +
+
+ +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. + +
+
+ +
+
+ +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + +
+
+ +
+
+ +**id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + +
+
+ +
+
+ +**include_duplicates:** `typing.Optional[bool]` — 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. + +
+
+ +
+
+ +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. + +
+
+ +
+
+ +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage Passthrough +
client.filestorage.passthrough.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.filestorage import DataPassthroughRequest, MethodEnum + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `DataPassthroughRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage RegenerateKey +
client.filestorage.regenerate_key.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.regenerate_key.create( + name="Remote Deployment Key 1", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name of the remote key + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage SyncStatus +
client.filestorage.sync_status.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage ForceResync +
client.filestorage.force_resync.sync_status_resync_create() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.force_resync.sync_status_resync_create() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage Users +
client.filestorage.users.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_me="is_me", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**is_me:** `typing.Optional[str]` — If provided, will only return the user object for requestor. + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.filestorage.users.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `User` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.users.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Filestorage WebhookReceivers +
client.filestorage.webhook_receivers.list() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.webhook_receivers.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.filestorage.webhook_receivers.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.webhook_receivers.create( + event="event", + is_active=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**event:** `str` + +
+
+ +
+
+ +**is_active:** `bool` + +
+
+ +
+
+ +**key:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris AccountDetails +
client.hris.account_details.retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.account_details.retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris AccountToken +
client.hris.account_token.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.account_token.retrieve( + public_token="public_token", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**public_token:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris AsyncPassthrough +
client.hris.async_passthrough.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.hris import DataPassthroughRequest, MethodEnum + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `DataPassthroughRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.async_passthrough.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**async_passthrough_receipt_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris AuditTrail +
client.hris.audit_trail.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.audit_trail.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time + +
+
+ +
+
+ +**event_type:** `typing.Optional[str]` — 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` + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time + +
+
+ +
+
+ +**user_email:** `typing.Optional[str]` — 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. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris AvailableActions +
client.hris.available_actions.retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.available_actions.retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris BankInfo +
client.hris.bank_info.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `BankInfo` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge +from merge.resources.hris.resources.bank_info import ( + BankInfoListRequestAccountType, + BankInfoListRequestOrderBy, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.bank_info.list( + account_type=BankInfoListRequestAccountType.CHECKING, + bank_name="bank_name", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=BankInfoListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, + page_size=1, + remote_id="remote_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_type:** `typing.Optional[BankInfoListRequestAccountType]` + +If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING') + +* `SAVINGS` - SAVINGS +* `CHECKING` - CHECKING + +
+
+ +
+
+ +**bank_name:** `typing.Optional[str]` — If provided, will only return BankInfo's with this bank name. + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**employee_id:** `typing.Optional[str]` — If provided, will only return bank accounts for this employee. + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**order_by:** `typing.Optional[BankInfoListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["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) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.bank_info.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `BankInfo` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.bank_info.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["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) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris Benefits +
client.hris.benefits.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Benefit` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.benefits.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**employee_id:** `typing.Optional[str]` — If provided, will return the benefits associated with the employee. + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.benefits.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Benefit` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.benefits.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris Companies +
client.hris.companies.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Company` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.companies.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.companies.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Company` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.companies.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris Scopes +
client.hris.scopes.default_scopes_retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.scopes.default_scopes_retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.scopes.linked_account_scopes_retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.scopes.linked_account_scopes_retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.scopes.linked_account_scopes_create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.hris import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris DeleteAccount +
client.hris.delete_account.delete() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.delete_account.delete() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris Dependents +
client.hris.dependents.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Dependent` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.dependents.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**employee_id:** `typing.Optional[str]` — If provided, will only return dependents for this employee. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.dependents.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Dependent` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.dependents.retrieve( + id="id", + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris EmployeePayrollRuns +
client.hris.employee_payroll_runs.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EmployeePayrollRun` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge +from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsListRequestExpand, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employee_payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=EmployeePayrollRunsListRequestExpand.EMPLOYEE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + payroll_run_id="payroll_run_id", + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**employee_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee. + +
+
+ +
+
+ +**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended after this datetime. + +
+
+ +
+
+ +**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended before this datetime. + +
+
+ +
+
+ +**expand:** `typing.Optional[EmployeePayrollRunsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**payroll_run_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started after this datetime. + +
+
+ +
+
+ +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started before this datetime. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.employee_payroll_runs.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EmployeePayrollRun` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsRetrieveRequestExpand, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employee_payroll_runs.retrieve( + id="id", + expand=EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[EmployeePayrollRunsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Hris Employees +
client.hris.employees.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Employee` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge +from merge.resources.hris.resources.employees import ( + EmployeesListRequestEmploymentStatus, + EmployeesListRequestExpand, + EmployeesListRequestRemoteFields, + EmployeesListRequestShowEnumOrigins, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employees.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + display_full_name="display_full_name", + employee_number="employee_number", + employment_status=EmployeesListRequestEmploymentStatus.ACTIVE, + employment_type="employment_type", + expand=EmployeesListRequestExpand.COMPANY, + first_name="first_name", + groups="groups", + home_location_id="home_location_id", + include_deleted_data=True, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + job_title="job_title", + last_name="last_name", + manager_id="manager_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + pay_group_id="pay_group_id", + personal_email="personal_email", + remote_fields=EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS, + remote_id="remote_id", + show_enum_origins=EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + team_id="team_id", + terminated_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + terminated_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + work_email="work_email", + work_location_id="work_location_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` — If provided, will only return employees for this company. + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**display_full_name:** `typing.Optional[str]` — If provided, will only return employees with this display name. + +
+
+ +
+
+ +**employee_number:** `typing.Optional[str]` — If provided, will only return employees with this employee number. + +
+
+ +
+
+ +**employment_status:** `typing.Optional[EmployeesListRequestEmploymentStatus]` + +If provided, will only return employees with this employment status. + +* `ACTIVE` - ACTIVE +* `PENDING` - PENDING +* `INACTIVE` - INACTIVE + +
+
+ +
+
+ +**employment_type:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified employment type. + +
+
+ +
+
+ +**expand:** `typing.Optional[EmployeesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**first_name:** `typing.Optional[str]` — If provided, will only return employees with this first name. + +
+
+ +
+
+ +**groups:** `typing.Optional[str]` — If provided, will only return employees matching the group ids; multiple groups can be separated by commas. + +
+
+ +
+
+ +**home_location_id:** `typing.Optional[str]` — If provided, will only return employees for this home location. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**job_title:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified job title. + +
+
+ +
+
+ +**last_name:** `typing.Optional[str]` — If provided, will only return employees with this last name. + +
+
+ +
+
+ +**manager_id:** `typing.Optional[str]` — If provided, will only return employees for this manager. + +
+
+ +
+
+ **modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -24386,6 +29651,30 @@ client.knowledgebase.groups.list(
+**pay_group_id:** `typing.Optional[str]` — If provided, will only return employees for this pay group + +
+
+ +
+
+ +**personal_email:** `typing.Optional[str]` — If provided, will only return Employees with this personal email + +
+
+ +
+
+ +**remote_fields:** `typing.Optional[EmployeesListRequestRemoteFields]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -24394,6 +29683,70 @@ client.knowledgebase.groups.list(
+**show_enum_origins:** `typing.Optional[EmployeesListRequestShowEnumOrigins]` — 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) + +
+
+ +
+
+ +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started after this datetime. + +
+
+ +
+
+ +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started before this datetime. + +
+
+ +
+
+ +**team_id:** `typing.Optional[str]` — If provided, will only return employees for this team. + +
+
+ +
+
+ +**terminated_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated after this datetime. + +
+
+ +
+
+ +**terminated_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated before this datetime. + +
+
+ +
+
+ +**work_email:** `typing.Optional[str]` — If provided, will only return Employees with this work email + +
+
+ +
+
+ +**work_location_id:** `typing.Optional[str]` — If provided, will only return employees for this location. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -24406,7 +29759,7 @@ client.knowledgebase.groups.list(
-
client.knowledgebase.groups.retrieve(...) +
client.hris.employees.create(...)
@@ -24418,7 +29771,316 @@ client.knowledgebase.groups.list(
-Returns a `Group` object with the given `id`. +Creates an `Employee` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.hris import EmployeeRequest + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employees.create( + is_debug_mode=True, + run_async=True, + model=EmployeeRequest(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**model:** `EmployeeRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.hris.employees.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Employee` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.hris.resources.employees import ( + EmployeesRetrieveRequestExpand, + EmployeesRetrieveRequestRemoteFields, + EmployeesRetrieveRequestShowEnumOrigins, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employees.retrieve( + id="id", + expand=EmployeesRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + remote_fields=EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS, + show_enum_origins=EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[EmployeesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**remote_fields:** `typing.Optional[EmployeesRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]` — 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) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.employees.ignore_create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.hris import ReasonEnum + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employees.ignore_create( + model_id="model_id", + reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**model_id:** `str` + +
+
+ +
+
+ +**reason:** `IgnoreCommonModelRequestReason` + +
+
+ +
+
+ +**message:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.hris.employees.meta_post_retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Employee` POSTs.
@@ -24439,9 +30101,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.groups.retrieve( - id="id", -) +client.hris.employees.meta_post_retrieve() ```
@@ -24457,38 +30117,6 @@ client.knowledgebase.groups.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[GroupsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -24501,8 +30129,8 @@ client.knowledgebase.groups.retrieve(
-## Knowledgebase Issues -
client.knowledgebase.issues.list(...) +## Hris EmployerBenefits +
client.hris.employer_benefits.list(...)
@@ -24514,7 +30142,7 @@ client.knowledgebase.groups.retrieve(
-Gets all issues for Organization. +Returns a list of `EmployerBenefit` objects.
@@ -24529,14 +30157,33 @@ Gets all issues for Organization.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.issues.list( +client.hris.employer_benefits.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -24553,39 +30200,7 @@ client.knowledgebase.issues.list(
-**account_token:** `typing.Optional[str]` - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time - -
-
- -
-
- -**end_user_organization_name:** `typing.Optional[str]` - -
-
- -
-
- -**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -24593,7 +30208,7 @@ client.knowledgebase.issues.list(
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -24601,7 +30216,7 @@ client.knowledgebase.issues.list(
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -24609,7 +30224,7 @@ client.knowledgebase.issues.list(
-**integration_name:** `typing.Optional[str]` +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -24617,7 +30232,7 @@ client.knowledgebase.issues.list(
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -24625,7 +30240,7 @@ client.knowledgebase.issues.list(
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -24633,7 +30248,7 @@ client.knowledgebase.issues.list(
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -24641,7 +30256,7 @@ client.knowledgebase.issues.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -24649,7 +30264,7 @@ client.knowledgebase.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -24657,12 +30272,7 @@ client.knowledgebase.issues.list(
-**status:** `typing.Optional[IssuesListRequestStatus]` - -Status of the issue. Options: ('ONGOING', 'RESOLVED') - -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -24682,7 +30292,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.knowledgebase.issues.retrieve(...) +
client.hris.employer_benefits.retrieve(...)
@@ -24694,7 +30304,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +Returns an `EmployerBenefit` object with the given `id`.
@@ -24715,8 +30325,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.issues.retrieve( +client.hris.employer_benefits.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -24741,6 +30353,22 @@ client.knowledgebase.issues.retrieve(
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -24753,8 +30381,8 @@ client.knowledgebase.issues.retrieve(
-## Knowledgebase LinkToken -
client.knowledgebase.link_token.create(...) +## Hris Employments +
client.hris.employments.list(...)
@@ -24766,7 +30394,7 @@ client.knowledgebase.issues.retrieve(
-Creates a link token to be used when linking a new end user. +Returns a list of `Employment` objects.
@@ -24781,18 +30409,44 @@ Creates a link token to be used when linking a new end user.
```python +import datetime + from merge import Merge -from merge.resources.knowledgebase import CategoriesEnum +from merge.resources.hris.resources.employments import ( + EmploymentsListRequestExpand, + EmploymentsListRequestOrderBy, + EmploymentsListRequestRemoteFields, + EmploymentsListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +client.hris.employments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + expand=EmploymentsListRequestExpand.EMPLOYEE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=EmploymentsListRequestOrderBy.EFFECTIVE_DATE_DESCENDING, + page_size=1, + remote_fields=EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE, + remote_id="remote_id", + show_enum_origins=EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE, ) ``` @@ -24809,7 +30463,7 @@ client.knowledgebase.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -24817,7 +30471,7 @@ client.knowledgebase.link_token.create(
-**end_user_organization_name:** `str` — Your end user's organization. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -24825,7 +30479,7 @@ client.knowledgebase.link_token.create(
-**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -24833,7 +30487,7 @@ client.knowledgebase.link_token.create(
-**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +**employee_id:** `typing.Optional[str]` — If provided, will only return employments for this employee.
@@ -24841,7 +30495,7 @@ client.knowledgebase.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**expand:** `typing.Optional[EmploymentsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -24849,7 +30503,7 @@ client.knowledgebase.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -24857,7 +30511,7 @@ client.knowledgebase.link_token.create(
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -24865,7 +30519,7 @@ client.knowledgebase.link_token.create(
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -24873,7 +30527,7 @@ client.knowledgebase.link_token.create(
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -24881,14 +30535,7 @@ client.knowledgebase.link_token.create(
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -24896,12 +30543,15 @@ client.knowledgebase.link_token.create(
-**language:** `typing.Optional[EndUserDetailsRequestLanguage]` +**order_by:** `typing.Optional[EmploymentsListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. + +
+
-The following subset of IETF language tags can be used to configure localization. +
+
-* `en` - en -* `de` - de +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -24909,7 +30559,7 @@ The following subset of IETF language tags can be used to configure localization
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. +**remote_fields:** `typing.Optional[EmploymentsListRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -24917,7 +30567,15 @@ The following subset of IETF language tags can be used to configure localization
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[EmploymentsListRequestShowEnumOrigins]` — 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)
@@ -24937,8 +30595,7 @@ The following subset of IETF language tags can be used to configure localization
-## Knowledgebase LinkedAccounts -
client.knowledgebase.linked_accounts.list(...) +
client.hris.employments.retrieve(...)
@@ -24950,7 +30607,7 @@ The following subset of IETF language tags can be used to configure localization
-List linked accounts for your organization. +Returns an `Employment` object with the given `id`.
@@ -24966,13 +30623,23 @@ List linked accounts for your organization. ```python from merge import Merge +from merge.resources.hris.resources.employments import ( + EmploymentsRetrieveRequestExpand, + EmploymentsRetrieveRequestRemoteFields, + EmploymentsRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.linked_accounts.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.hris.employments.retrieve( + id="id", + expand=EmploymentsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, + remote_fields=EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE, + show_enum_origins=EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE, ) ``` @@ -24989,74 +30656,7 @@ client.knowledgebase.linked_accounts.list(
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` - -Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` - -* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage -* `knowledgebase` - knowledgebase - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. - -
-
- -
-
- -**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. - -
-
- -
-
- -**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. - -
-
- -
-
- -**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - -
-
- -
-
- -**id:** `typing.Optional[str]` - -
-
- -
-
- -**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. +**id:** `str`
@@ -25064,7 +30664,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**include_duplicates:** `typing.Optional[bool]` — 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. +**expand:** `typing.Optional[EmploymentsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -25072,7 +30672,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -25080,7 +30680,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -25088,7 +30688,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**remote_fields:** `typing.Optional[EmploymentsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -25096,7 +30696,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` +**show_enum_origins:** `typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]` — 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)
@@ -25116,8 +30716,8 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-## Knowledgebase Passthrough -
client.knowledgebase.passthrough.create(...) +## Hris FieldMapping +
client.hris.field_mapping.field_mappings_retrieve(...)
@@ -25129,7 +30729,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-Pull data from an endpoint not currently supported by Merge. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -25145,17 +30745,13 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.hris.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -25172,7 +30768,7 @@ client.knowledgebase.passthrough.create(
-**request:** `DataPassthroughRequest` +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -25192,8 +30788,7 @@ client.knowledgebase.passthrough.create(
-## Knowledgebase RegenerateKey -
client.knowledgebase.regenerate_key.create(...) +
client.hris.field_mapping.field_mappings_create(...)
@@ -25205,7 +30800,7 @@ client.knowledgebase.passthrough.create(
-Exchange remote keys. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -25226,8 +30821,14 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.regenerate_key.create( - name="Remote Deployment Key 1", +client.hris.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", ) ``` @@ -25244,7 +30845,7 @@ client.knowledgebase.regenerate_key.create(
-**name:** `str` — The name of the remote key +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -25252,71 +30853,47 @@ client.knowledgebase.regenerate_key.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
- -
+
+
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +
-
-## Knowledgebase SyncStatus -
client.knowledgebase.sync_status.list(...)
-#### 📝 Description - -
-
+**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. + +
+
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -
-
+**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.sync_status.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) - -``` -
-
+**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +
-#### ⚙️ Parameters -
-
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -25324,7 +30901,7 @@ client.knowledgebase.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -25344,8 +30921,7 @@ client.knowledgebase.sync_status.list(
-## Knowledgebase ForceResync -
client.knowledgebase.force_resync.sync_status_resync_create() +
client.hris.field_mapping.field_mappings_destroy(...)
@@ -25357,7 +30933,7 @@ client.knowledgebase.sync_status.list(
-Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -25378,7 +30954,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.force_resync.sync_status_resync_create() +client.hris.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", +) ``` @@ -25394,6 +30972,14 @@ client.knowledgebase.force_resync.sync_status_resync_create()
+**field_mapping_id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -25406,8 +30992,7 @@ client.knowledgebase.force_resync.sync_status_resync_create()
-## Knowledgebase Users -
client.knowledgebase.users.list(...) +
client.hris.field_mapping.field_mappings_partial_update(...)
@@ -25419,7 +31004,7 @@ client.knowledgebase.force_resync.sync_status_resync_create()
-Returns a list of `User` objects. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -25440,8 +31025,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.users.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.hris.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", ) ``` @@ -25458,7 +31043,7 @@ client.knowledgebase.users.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**field_mapping_id:** `str`
@@ -25466,7 +31051,7 @@ client.knowledgebase.users.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -25474,7 +31059,7 @@ client.knowledgebase.users.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from.
@@ -25482,7 +31067,7 @@ client.knowledgebase.users.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -25490,7 +31075,7 @@ client.knowledgebase.users.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -25498,31 +31083,71 @@ client.knowledgebase.users.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + +
+ +
client.hris.field_mapping.remote_fields_retrieve(...)
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +
+
+#### 🔌 Usage +
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", +) + +```
+
+
+ +#### ⚙️ Parameters
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +
+
+ +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
@@ -25530,7 +31155,7 @@ client.knowledgebase.users.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**include_example_values:** `typing.Optional[str]` — 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.
@@ -25550,7 +31175,7 @@ client.knowledgebase.users.list(
-
client.knowledgebase.users.retrieve(...) +
client.hris.field_mapping.target_fields_retrieve()
@@ -25562,7 +31187,7 @@ client.knowledgebase.users.list(
-Returns a `User` object with the given `id`. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -25583,9 +31208,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.users.retrieve( - id="id", -) +client.hris.field_mapping.target_fields_retrieve() ``` @@ -25601,30 +31224,6 @@ client.knowledgebase.users.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -25637,8 +31236,8 @@ client.knowledgebase.users.retrieve(
-## Knowledgebase WebhookReceivers -
client.knowledgebase.webhook_receivers.list() +## Hris GenerateKey +
client.hris.generate_key.create(...)
@@ -25650,7 +31249,7 @@ client.knowledgebase.users.retrieve(
-Returns a list of `WebhookReceiver` objects. +Create a remote key.
@@ -25671,7 +31270,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.webhook_receivers.list() +client.hris.generate_key.create( + name="Remote Deployment Key 1", +) ``` @@ -25687,6 +31288,14 @@ client.knowledgebase.webhook_receivers.list()
+**name:** `str` — The name of the remote key + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -25699,7 +31308,8 @@ client.knowledgebase.webhook_receivers.list()
-
client.knowledgebase.webhook_receivers.create(...) +## Hris Groups +
client.hris.groups.list(...)
@@ -25711,7 +31321,7 @@ client.knowledgebase.webhook_receivers.list()
-Creates a `WebhookReceiver` object with the given values. +Returns a list of `Group` objects.
@@ -25726,15 +31336,36 @@ Creates a `WebhookReceiver` object with the given values.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.webhook_receivers.create( - event="event", - is_active=True, +client.hris.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_commonly_used_as_team="is_commonly_used_as_team", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + names="names", + page_size=1, + remote_id="remote_id", + types="types", ) ``` @@ -25751,7 +31382,7 @@ client.knowledgebase.webhook_receivers.create(
-**event:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -25759,7 +31390,7 @@ client.knowledgebase.webhook_receivers.create(
-**is_active:** `bool` +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -25767,7 +31398,7 @@ client.knowledgebase.webhook_receivers.create(
-**key:** `typing.Optional[str]` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -25775,65 +31406,99 @@ client.knowledgebase.webhook_receivers.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
-
-
+
+
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-
-## Hris AccountDetails -
client.hris.account_details.retrieve()
-#### 📝 Description +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+**is_commonly_used_as_team:** `typing.Optional[str]` — 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. + +
+
+
-Get details for a linked account. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +
-#### 🔌 Usage -
+**names:** `typing.Optional[str]` — If provided, will only return groups with these names. Multiple values can be separated by commas. + +
+
+
-```python -from merge import Merge +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
-client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.account_details.retrieve() +
+
-``` +**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins. +
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +
-#### ⚙️ Parameters +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["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) + +
+
+**types:** `typing.Optional[str]` — If provided, will only return groups of these types. Multiple values can be separated by commas. + +
+
+
@@ -25849,8 +31514,7 @@ client.hris.account_details.retrieve()
-## Hris AccountToken -
client.hris.account_token.retrieve(...) +
client.hris.groups.retrieve(...)
@@ -25862,7 +31526,7 @@ client.hris.account_details.retrieve()
-Returns the account token for the end user with the provided public token. +Returns a `Group` object with the given `id`.
@@ -25883,8 +31547,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.account_token.retrieve( - public_token="public_token", +client.hris.groups.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -25901,7 +31567,7 @@ client.hris.account_token.retrieve(
-**public_token:** `str` +**id:** `str`
@@ -25909,75 +31575,31 @@ client.hris.account_token.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
- -
- - - - -
- -## Hris AsyncPassthrough -
client.hris.async_passthrough.create(...) -
-
- -#### 📝 Description - -
-
-Asynchronously pull data from an endpoint not currently supported by Merge. -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge -from merge.resources.hris import DataPassthroughRequest, MethodEnum - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.async_passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), -) - -``` -
-
+**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins. +
-#### ⚙️ Parameters -
-
-
- -**request:** `DataPassthroughRequest` +**show_enum_origins:** `typing.Optional[typing.Literal["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)
@@ -25997,7 +31619,8 @@ client.hris.async_passthrough.create(
-
client.hris.async_passthrough.retrieve(...) +## Hris Issues +
client.hris.issues.list(...)
@@ -26009,7 +31632,7 @@ client.hris.async_passthrough.create(
-Retrieves data from earlier async-passthrough POST request +Gets all issues for Organization.
@@ -26024,14 +31647,38 @@ Retrieves data from earlier async-passthrough POST request
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", +client.hris.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -26048,7 +31695,7 @@ client.hris.async_passthrough.retrieve(
-**async_passthrough_receipt_id:** `str` +**account_token:** `typing.Optional[str]`
@@ -26056,71 +31703,63 @@ client.hris.async_passthrough.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
-
-
+
+
+**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time +
-
-## Hris AuditTrail -
client.hris.audit_trail.list(...)
-#### 📝 Description - -
-
+**end_user_organization_name:** `typing.Optional[str]` + +
+
-Gets a list of audit trail events. -
-
+**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +
-#### 🔌 Usage -
+**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.audit_trail.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) - -``` -
-
+**include_muted:** `typing.Optional[str]` — If true, will include muted issues + -#### ⚙️ Parameters -
+**integration_name:** `typing.Optional[str]` + +
+
+
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime.
@@ -26128,7 +31767,7 @@ client.hris.audit_trail.list(
-**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime.
@@ -26136,7 +31775,7 @@ client.hris.audit_trail.list(
-**event_type:** `typing.Optional[str]` — 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` +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in.
@@ -26144,7 +31783,7 @@ client.hris.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -26152,7 +31791,7 @@ client.hris.audit_trail.list(
-**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time
@@ -26160,7 +31799,12 @@ client.hris.audit_trail.list(
-**user_email:** `typing.Optional[str]` — 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. +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -26180,8 +31824,7 @@ client.hris.audit_trail.list(
-## Hris AvailableActions -
client.hris.available_actions.retrieve() +
client.hris.issues.retrieve(...)
@@ -26193,7 +31836,7 @@ client.hris.audit_trail.list(
-Returns a list of models and actions available for an account. +Get a specific issue.
@@ -26214,7 +31857,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.available_actions.retrieve() +client.hris.issues.retrieve( + id="id", +) ``` @@ -26230,6 +31875,14 @@ client.hris.available_actions.retrieve()
+**id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -26242,8 +31895,8 @@ client.hris.available_actions.retrieve()
-## Hris BankInfo -
client.hris.bank_info.list(...) +## Hris LinkToken +
client.hris.link_token.create(...)
@@ -26255,7 +31908,7 @@ client.hris.available_actions.retrieve()
-Returns a list of `BankInfo` objects. +Creates a link token to be used when linking a new end user.
@@ -26271,13 +31924,17 @@ Returns a list of `BankInfo` objects. ```python from merge import Merge +from merge.resources.hris import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.bank_info.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.hris.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -26294,20 +31951,7 @@ client.hris.bank_info.list(
-**account_type:** `typing.Optional[BankInfoListRequestAccountType]` - -If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING') - -* `SAVINGS` - SAVINGS -* `CHECKING` - CHECKING - -
-
- -
-
- -**bank_name:** `typing.Optional[str]` — If provided, will only return BankInfo's with this bank name. +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -26315,7 +31959,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**end_user_organization_name:** `str` — Your end user's organization.
@@ -26323,7 +31967,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -26331,7 +31975,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
@@ -26339,7 +31983,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**employee_id:** `typing.Optional[str]` — If provided, will only return bank accounts for this employee. +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
@@ -26347,7 +31991,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
@@ -26355,7 +31999,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -26363,7 +32007,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -26371,7 +32015,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -26379,7 +32023,14 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
@@ -26387,15 +32038,12 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
+**language:** `typing.Optional[EndUserDetailsRequestLanguage]` -
-
+The following subset of IETF language tags can be used to configure localization. -**order_by:** `typing.Optional[BankInfoListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. +* `en` - en +* `de` - de
@@ -26403,7 +32051,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled.
@@ -26411,7 +32059,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins. +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -26419,15 +32067,11 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
+**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` -
-
+When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. -**show_enum_origins:** `typing.Optional[typing.Literal["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) +* `SELECTIVE_SYNC` - SELECTIVE_SYNC
@@ -26447,7 +32091,8 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-
client.hris.bank_info.retrieve(...) +## Hris LinkedAccounts +
client.hris.linked_accounts.list(...)
@@ -26459,7 +32104,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-Returns a `BankInfo` object with the given `id`. +List linked accounts for your organization.
@@ -26475,13 +32120,28 @@ Returns a `BankInfo` object with the given `id`. ```python from merge import Merge +from merge.resources.hris.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.bank_info.retrieve( +client.hris.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -26498,7 +32158,17 @@ client.hris.bank_info.retrieve(
-**id:** `str` +**category:** `typing.Optional[LinkedAccountsListRequestCategory]` + +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage
@@ -26506,7 +32176,7 @@ client.hris.bank_info.retrieve(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -26514,7 +32184,7 @@ client.hris.bank_info.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address.
@@ -26522,7 +32192,7 @@ client.hris.bank_info.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name.
@@ -26530,7 +32200,7 @@ client.hris.bank_info.retrieve(
-**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins. +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID.
@@ -26538,7 +32208,63 @@ client.hris.bank_info.retrieve(
-**show_enum_origins:** `typing.Optional[typing.Literal["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) +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + +
+
+ +
+
+ +**id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + +
+
+ +
+
+ +**include_duplicates:** `typing.Optional[bool]` — 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. + +
+
+ +
+
+ +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. + +
+
+ +
+
+ +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
@@ -26558,8 +32284,8 @@ client.hris.bank_info.retrieve(
-## Hris Benefits -
client.hris.benefits.list(...) +## Hris Locations +
client.hris.locations.list(...)
@@ -26571,7 +32297,7 @@ client.hris.bank_info.retrieve(
-Returns a list of `Benefit` objects. +Returns a list of `Location` objects.
@@ -26586,14 +32312,41 @@ Returns a list of `Benefit` objects.
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.locations import ( + LocationsListRequestLocationType, + LocationsListRequestRemoteFields, + LocationsListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.benefits.list( +client.hris.locations.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + location_type=LocationsListRequestLocationType.HOME, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=LocationsListRequestRemoteFields.COUNTRY, + remote_id="remote_id", + show_enum_origins=LocationsListRequestShowEnumOrigins.COUNTRY, ) ``` @@ -26634,7 +32387,7 @@ client.hris.benefits.list(
-**employee_id:** `typing.Optional[str]` — If provided, will return the benefits associated with the employee. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -26642,7 +32395,7 @@ client.hris.benefits.list(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -26650,7 +32403,7 @@ client.hris.benefits.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -26658,7 +32411,12 @@ client.hris.benefits.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**location_type:** `typing.Optional[LocationsListRequestLocationType]` + +If provided, will only return locations with this location type + +* `HOME` - HOME +* `WORK` - WORK
@@ -26666,7 +32424,7 @@ client.hris.benefits.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -26674,7 +32432,7 @@ client.hris.benefits.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -26682,7 +32440,7 @@ client.hris.benefits.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -26690,7 +32448,7 @@ client.hris.benefits.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**remote_fields:** `typing.Optional[LocationsListRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -26706,6 +32464,14 @@ client.hris.benefits.list(
+**show_enum_origins:** `typing.Optional[LocationsListRequestShowEnumOrigins]` — 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) + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -26718,7 +32484,7 @@ client.hris.benefits.list(
-
client.hris.benefits.retrieve(...) +
client.hris.locations.retrieve(...)
@@ -26730,7 +32496,7 @@ client.hris.benefits.list(
-Returns a `Benefit` object with the given `id`. +Returns a `Location` object with the given `id`.
@@ -26746,13 +32512,21 @@ Returns a `Benefit` object with the given `id`. ```python from merge import Merge +from merge.resources.hris.resources.locations import ( + LocationsRetrieveRequestRemoteFields, + LocationsRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.benefits.retrieve( +client.hris.locations.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=LocationsRetrieveRequestRemoteFields.COUNTRY, + show_enum_origins=LocationsRetrieveRequestShowEnumOrigins.COUNTRY, ) ``` @@ -26777,7 +32551,7 @@ client.hris.benefits.retrieve(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -26785,7 +32559,7 @@ client.hris.benefits.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -26793,7 +32567,15 @@ client.hris.benefits.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_fields:** `typing.Optional[LocationsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[LocationsRetrieveRequestShowEnumOrigins]` — 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)
@@ -26813,8 +32595,8 @@ client.hris.benefits.retrieve(
-## Hris Companies -
client.hris.companies.list(...) +## Hris Passthrough +
client.hris.passthrough.create(...)
@@ -26826,7 +32608,7 @@ client.hris.benefits.retrieve(
-Returns a list of `Company` objects. +Pull data from an endpoint not currently supported by Merge.
@@ -26842,13 +32624,108 @@ Returns a list of `Company` objects. ```python from merge import Merge +from merge.resources.hris import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.companies.list( +client.hris.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) + +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `DataPassthroughRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +## Hris PayGroups +
client.hris.pay_groups.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `PayGroup` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.pay_groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -26929,7 +32806,7 @@ client.hris.companies.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -26957,7 +32834,7 @@ client.hris.companies.list(
-
client.hris.companies.retrieve(...) +
client.hris.pay_groups.retrieve(...)
@@ -26969,7 +32846,7 @@ client.hris.companies.list(
-Returns a `Company` object with the given `id`. +Returns a `PayGroup` object with the given `id`.
@@ -26990,8 +32867,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.companies.retrieve( +client.hris.pay_groups.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -27044,8 +32923,8 @@ client.hris.companies.retrieve(
-## Hris Scopes -
client.hris.scopes.default_scopes_retrieve() +## Hris PayrollRuns +
client.hris.payroll_runs.list(...)
@@ -27057,7 +32936,7 @@ client.hris.companies.retrieve(
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns a list of `PayrollRun` objects.
@@ -27072,13 +32951,54 @@ Get the default permissions for Merge Common Models and fields across all Linked
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsListRequestRemoteFields, + PayrollRunsListRequestRunType, + PayrollRunsListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.scopes.default_scopes_retrieve() +client.hris.payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=PayrollRunsListRequestRemoteFields.RUN_STATE, + remote_id="remote_id", + run_type=PayrollRunsListRequestRunType.CORRECTION, + show_enum_origins=PayrollRunsListRequestShowEnumOrigins.RUN_STATE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), +) ```
@@ -27094,160 +33014,143 @@ client.hris.scopes.default_scopes_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
- -
+
+
+**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +
-
-
client.hris.scopes.linked_account_scopes_retrieve()
-#### 📝 Description - -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
-Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -
-
+**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended after this datetime. +
-#### 🔌 Usage -
+**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended before this datetime. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.scopes.linked_account_scopes_retrieve() - -``` -
-
+**include_deleted_data:** `typing.Optional[bool]` — 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/). + -#### ⚙️ Parameters -
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
- - +
+
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
-
-
client.hris.scopes.linked_account_scopes_create(...)
-#### 📝 Description +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+
-Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) -
-
+**remote_fields:** `typing.Optional[PayrollRunsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. + -#### 🔌 Usage -
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+
-```python -from merge import Merge -from merge.resources.hris import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, -) +**run_type:** `typing.Optional[PayrollRunsListRequestRunType]` -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], -) +If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS') -``` +* `REGULAR` - REGULAR +* `OFF_CYCLE` - OFF_CYCLE +* `CORRECTION` - CORRECTION +* `TERMINATION` - TERMINATION +* `SIGN_ON_BONUS` - SIGN_ON_BONUS +
+ +
+
+ +**show_enum_origins:** `typing.Optional[PayrollRunsListRequestShowEnumOrigins]` — 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) +
-#### ⚙️ Parameters -
+**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started after this datetime. + +
+
+
-**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started before this datetime.
@@ -27267,8 +33170,7 @@ client.hris.scopes.linked_account_scopes_create(
-## Hris DeleteAccount -
client.hris.delete_account.delete() +
client.hris.payroll_runs.retrieve(...)
@@ -27280,7 +33182,7 @@ client.hris.scopes.linked_account_scopes_create(
-Delete a linked account. +Returns a `PayrollRun` object with the given `id`.
@@ -27296,12 +33198,22 @@ Delete a linked account. ```python from merge import Merge +from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsRetrieveRequestRemoteFields, + PayrollRunsRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.delete_account.delete() +client.hris.payroll_runs.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=PayrollRunsRetrieveRequestRemoteFields.RUN_STATE, + show_enum_origins=PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE, +) ``` @@ -27317,6 +33229,46 @@ client.hris.delete_account.delete()
+**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**remote_fields:** `typing.Optional[PayrollRunsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]` — 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) + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27329,8 +33281,8 @@ client.hris.delete_account.delete()
-## Hris Dependents -
client.hris.dependents.list(...) +## Hris RegenerateKey +
client.hris.regenerate_key.create(...)
@@ -27342,7 +33294,7 @@ client.hris.delete_account.delete()
-Returns a list of `Dependent` objects. +Exchange remote keys.
@@ -27363,8 +33315,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.dependents.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.hris.regenerate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -27381,7 +33333,7 @@ client.hris.dependents.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**name:** `str` — The name of the remote key
@@ -27389,79 +33341,72 @@ client.hris.dependents.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. -
-
-
-**employee_id:** `typing.Optional[str]` — If provided, will only return dependents for this employee. -
+
+## Hris SyncStatus +
client.hris.sync_status.list(...)
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - -
-
+#### 📝 Description
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
-
-**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. - +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+ + + +#### 🔌 Usage
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, +) + +``` +
+
+#### ⚙️ Parameters +
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
-
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -27469,7 +33414,7 @@ client.hris.dependents.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -27489,7 +33434,8 @@ client.hris.dependents.list(
-
client.hris.dependents.retrieve(...) +## Hris ForceResync +
client.hris.force_resync.sync_status_resync_create()
@@ -27501,7 +33447,7 @@ client.hris.dependents.list(
-Returns a `Dependent` object with the given `id`. +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -27522,9 +33468,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.dependents.retrieve( - id="id", -) +client.hris.force_resync.sync_status_resync_create() ``` @@ -27540,38 +33484,6 @@ client.hris.dependents.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27584,8 +33496,8 @@ client.hris.dependents.retrieve(
-## Hris EmployeePayrollRuns -
client.hris.employee_payroll_runs.list(...) +## Hris Teams +
client.hris.teams.list(...)
@@ -27597,7 +33509,7 @@ client.hris.dependents.retrieve(
-Returns a list of `EmployeePayrollRun` objects. +Returns a list of `Team` objects.
@@ -27612,14 +33524,34 @@ Returns a list of `EmployeePayrollRun` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employee_payroll_runs.list( +client.hris.teams.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_team_id="parent_team_id", + remote_id="remote_id", ) ``` @@ -27660,31 +33592,7 @@ client.hris.employee_payroll_runs.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee. - -
-
- -
-
- -**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended after this datetime. - -
-
- -
-
- -**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended before this datetime. - -
-
- -
-
- -**expand:** `typing.Optional[EmployeePayrollRunsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -27732,7 +33640,7 @@ client.hris.employee_payroll_runs.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -27740,7 +33648,7 @@ client.hris.employee_payroll_runs.list(
-**payroll_run_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee. +**parent_team_id:** `typing.Optional[str]` — If provided, will only return teams with this parent team.
@@ -27756,22 +33664,6 @@ client.hris.employee_payroll_runs.list(
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started after this datetime. - -
-
- -
-
- -**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started before this datetime. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27784,7 +33676,7 @@ client.hris.employee_payroll_runs.list(
-
client.hris.employee_payroll_runs.retrieve(...) +
client.hris.teams.retrieve(...)
@@ -27796,7 +33688,7 @@ client.hris.employee_payroll_runs.list(
-Returns an `EmployeePayrollRun` object with the given `id`. +Returns a `Team` object with the given `id`.
@@ -27817,8 +33709,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employee_payroll_runs.retrieve( +client.hris.teams.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -27843,7 +33737,7 @@ client.hris.employee_payroll_runs.retrieve(
-**expand:** `typing.Optional[EmployeePayrollRunsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -27879,8 +33773,8 @@ client.hris.employee_payroll_runs.retrieve(
-## Hris Employees -
client.hris.employees.list(...) +## Hris TimeOff +
client.hris.time_off.list(...)
@@ -27892,7 +33786,7 @@ client.hris.employee_payroll_runs.retrieve(
-Returns a list of `Employee` objects. +Returns a list of `TimeOff` objects.
@@ -27907,14 +33801,59 @@ Returns a list of `Employee` objects.
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.time_off import ( + TimeOffListRequestExpand, + TimeOffListRequestRemoteFields, + TimeOffListRequestRequestType, + TimeOffListRequestShowEnumOrigins, + TimeOffListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.list( +client.hris.time_off.list( + approver_id="approver_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=TimeOffListRequestExpand.APPROVER, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=TimeOffListRequestRemoteFields.REQUEST_TYPE, + remote_id="remote_id", + request_type=TimeOffListRequestRequestType.BEREAVEMENT, + show_enum_origins=TimeOffListRequestShowEnumOrigins.REQUEST_TYPE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + status=TimeOffListRequestStatus.APPROVED, ) ``` @@ -27931,7 +33870,7 @@ client.hris.employees.list(
-**company_id:** `typing.Optional[str]` — If provided, will only return employees for this company. +**approver_id:** `typing.Optional[str]` — If provided, will only return time off for this approver.
@@ -27963,45 +33902,7 @@ client.hris.employees.list(
-**display_full_name:** `typing.Optional[str]` — If provided, will only return employees with this display name. - -
-
- -
-
- -**employee_number:** `typing.Optional[str]` — If provided, will only return employees with this employee number. - -
-
- -
-
- -**employment_status:** `typing.Optional[EmployeesListRequestEmploymentStatus]` - -If provided, will only return employees with this employment status. - -* `ACTIVE` - ACTIVE -* `PENDING` - PENDING -* `INACTIVE` - INACTIVE - -
-
- -
-
- -**employment_type:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified employment_type. - -
-
- -
-
- -**expand:** `typing.Optional[EmployeesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**employee_id:** `typing.Optional[str]` — If provided, will only return time off for this employee.
@@ -28009,7 +33910,7 @@ If provided, will only return employees with this employment status.
-**first_name:** `typing.Optional[str]` — If provided, will only return employees with this first name. +**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that ended after this datetime.
@@ -28017,7 +33918,7 @@ If provided, will only return employees with this employment status.
-**groups:** `typing.Optional[str]` — If provided, will only return employees matching the group ids; multiple groups can be separated by commas. +**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that ended before this datetime.
@@ -28025,7 +33926,7 @@ If provided, will only return employees with this employment status.
-**home_location_id:** `typing.Optional[str]` — If provided, will only return employees for this home location. +**expand:** `typing.Optional[TimeOffListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -28049,14 +33950,6 @@ If provided, will only return employees with this employment status.
-**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. - -
-
- -
-
- **include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -28065,30 +33958,6 @@ If provided, will only return employees with this employment status.
-**job_title:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified job_title. - -
-
- -
-
- -**last_name:** `typing.Optional[str]` — If provided, will only return employees with this last name. - -
-
- -
-
- -**manager_id:** `typing.Optional[str]` — If provided, will only return employees for this manager. - -
-
- -
-
- **modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -28105,7 +33974,7 @@ If provided, will only return employees with this employment status.
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -28113,23 +33982,7 @@ If provided, will only return employees with this employment status.
-**pay_group_id:** `typing.Optional[str]` — If provided, will only return employees for this pay group - -
-
- -
-
- -**personal_email:** `typing.Optional[str]` — If provided, will only return Employees with this personal email - -
-
- -
-
- -**remote_fields:** `typing.Optional[EmployeesListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**remote_fields:** `typing.Optional[TimeOffListRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -28145,23 +33998,16 @@ If provided, will only return employees with this employment status.
-**show_enum_origins:** `typing.Optional[EmployeesListRequestShowEnumOrigins]` — 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) - -
-
- -
-
- -**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started after this datetime. - -
-
+**request_type:** `typing.Optional[TimeOffListRequestRequestType]` -
-
+If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') -**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started before this datetime. +* `VACATION` - VACATION +* `SICK` - SICK +* `PERSONAL` - PERSONAL +* `JURY_DUTY` - JURY_DUTY +* `VOLUNTEER` - VOLUNTEER +* `BEREAVEMENT` - BEREAVEMENT
@@ -28169,7 +34015,7 @@ If provided, will only return employees with this employment status.
-**team_id:** `typing.Optional[str]` — If provided, will only return employees for this team. +**show_enum_origins:** `typing.Optional[TimeOffListRequestShowEnumOrigins]` — 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)
@@ -28177,7 +34023,7 @@ If provided, will only return employees with this employment status.
-**terminated_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated after this datetime. +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started after this datetime.
@@ -28185,7 +34031,7 @@ If provided, will only return employees with this employment status.
-**terminated_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated before this datetime. +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started before this datetime.
@@ -28193,15 +34039,15 @@ If provided, will only return employees with this employment status.
-**work_email:** `typing.Optional[str]` — If provided, will only return Employees with this work email - -
-
+**status:** `typing.Optional[TimeOffListRequestStatus]` -
-
+If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') -**work_location_id:** `typing.Optional[str]` — If provided, will only return employees for this location. +* `REQUESTED` - REQUESTED +* `APPROVED` - APPROVED +* `DECLINED` - DECLINED +* `CANCELLED` - CANCELLED +* `DELETED` - DELETED
@@ -28221,7 +34067,7 @@ If provided, will only return employees with this employment status.
-
client.hris.employees.create(...) +
client.hris.time_off.create(...)
@@ -28233,7 +34079,7 @@ If provided, will only return employees with this employment status.
-Creates an `Employee` object with the given values. +Creates a `TimeOff` object with the given values.
@@ -28249,14 +34095,16 @@ Creates an `Employee` object with the given values. ```python from merge import Merge -from merge.resources.hris import EmployeeRequest +from merge.resources.hris import TimeOffRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.create( - model=EmployeeRequest(), +client.hris.time_off.create( + is_debug_mode=True, + run_async=True, + model=TimeOffRequest(), ) ``` @@ -28273,7 +34121,7 @@ client.hris.employees.create(
-**model:** `EmployeeRequest` +**model:** `TimeOffRequest`
@@ -28309,7 +34157,7 @@ client.hris.employees.create(
-
client.hris.employees.retrieve(...) +
client.hris.time_off.retrieve(...)
@@ -28321,7 +34169,7 @@ client.hris.employees.create(
-Returns an `Employee` object with the given `id`. +Returns a `TimeOff` object with the given `id`.
@@ -28337,13 +34185,23 @@ Returns an `Employee` object with the given `id`. ```python from merge import Merge +from merge.resources.hris.resources.time_off import ( + TimeOffRetrieveRequestExpand, + TimeOffRetrieveRequestRemoteFields, + TimeOffRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.retrieve( +client.hris.time_off.retrieve( id="id", + expand=TimeOffRetrieveRequestExpand.APPROVER, + include_remote_data=True, + include_shell_data=True, + remote_fields=TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE, + show_enum_origins=TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE, ) ``` @@ -28368,7 +34226,7 @@ client.hris.employees.retrieve(
-**expand:** `typing.Optional[EmployeesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[TimeOffRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -28384,14 +34242,6 @@ client.hris.employees.retrieve(
-**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. - -
-
- -
-
- **include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -28400,7 +34250,7 @@ client.hris.employees.retrieve(
-**remote_fields:** `typing.Optional[EmployeesRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**remote_fields:** `typing.Optional[TimeOffRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -28408,7 +34258,7 @@ client.hris.employees.retrieve(
-**show_enum_origins:** `typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]` — 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) +**show_enum_origins:** `typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]` — 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)
@@ -28428,7 +34278,7 @@ client.hris.employees.retrieve(
-
client.hris.employees.ignore_create(...) +
client.hris.time_off.meta_post_retrieve()
@@ -28440,7 +34290,7 @@ client.hris.employees.retrieve(
-Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +Returns metadata for `TimeOff` POSTs.
@@ -28456,16 +34306,12 @@ Ignores a specific row based on the `model_id` in the url. These records will ha ```python from merge import Merge -from merge.resources.hris import ReasonEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.ignore_create( - model_id="model_id", - reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, -) +client.hris.time_off.meta_post_retrieve() ``` @@ -28481,30 +34327,6 @@ client.hris.employees.ignore_create(
-**model_id:** `str` - -
-
- -
-
- -**reason:** `IgnoreCommonModelRequestReason` - -
-
- -
-
- -**message:** `typing.Optional[str]` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -28517,7 +34339,8 @@ client.hris.employees.ignore_create(
-
client.hris.employees.meta_post_retrieve() +## Hris TimeOffBalances +
client.hris.time_off_balances.list(...)
@@ -28529,7 +34352,7 @@ client.hris.employees.ignore_create(
-Returns metadata for `Employee` POSTs. +Returns a list of `TimeOffBalance` objects.
@@ -28544,13 +34367,39 @@ Returns metadata for `Employee` POSTs.
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.time_off_balances import ( + TimeOffBalancesListRequestPolicyType, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.meta_post_retrieve() +client.hris.time_off_balances.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + policy_type=TimeOffBalancesListRequestPolicyType.BEREAVEMENT, + remote_id="remote_id", +) ```
@@ -28566,71 +34415,47 @@ client.hris.employees.meta_post_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
- -
+
+
+**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +
-
-## Hris EmployerBenefits -
client.hris.employer_benefits.list(...)
-#### 📝 Description - -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
-Returns a list of `EmployerBenefit` objects. -
-
+**employee_id:** `typing.Optional[str]` — If provided, will only return time off balances for this employee. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.employer_benefits.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) - -``` -
-
+**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
-#### ⚙️ Parameters - -
-
-
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -28638,7 +34463,7 @@ client.hris.employer_benefits.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -28646,7 +34471,7 @@ client.hris.employer_benefits.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -28654,7 +34479,7 @@ client.hris.employer_benefits.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -28662,7 +34487,7 @@ client.hris.employer_benefits.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -28670,7 +34495,7 @@ client.hris.employer_benefits.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -28678,7 +34503,16 @@ client.hris.employer_benefits.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**policy_type:** `typing.Optional[TimeOffBalancesListRequestPolicyType]` + +If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') + +* `VACATION` - VACATION +* `SICK` - SICK +* `PERSONAL` - PERSONAL +* `JURY_DUTY` - JURY_DUTY +* `VOLUNTEER` - VOLUNTEER +* `BEREAVEMENT` - BEREAVEMENT
@@ -28686,7 +34520,7 @@ client.hris.employer_benefits.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins.
@@ -28694,7 +34528,7 @@ client.hris.employer_benefits.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -28702,7 +34536,7 @@ client.hris.employer_benefits.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**show_enum_origins:** `typing.Optional[typing.Literal["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)
@@ -28722,7 +34556,7 @@ client.hris.employer_benefits.list(
-
client.hris.employer_benefits.retrieve(...) +
client.hris.time_off_balances.retrieve(...)
@@ -28734,7 +34568,7 @@ client.hris.employer_benefits.list(
-Returns an `EmployerBenefit` object with the given `id`. +Returns a `TimeOffBalance` object with the given `id`.
@@ -28755,8 +34589,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employer_benefits.retrieve( +client.hris.time_off_balances.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -28781,6 +34617,14 @@ client.hris.employer_benefits.retrieve(
+**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -28797,6 +34641,22 @@ client.hris.employer_benefits.retrieve(
+**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["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) + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -28809,8 +34669,8 @@ client.hris.employer_benefits.retrieve(
-## Hris Employments -
client.hris.employments.list(...) +## Hris TimesheetEntries +
client.hris.timesheet_entries.list(...)
@@ -28822,7 +34682,7 @@ client.hris.employer_benefits.retrieve(
-Returns a list of `Employment` objects. +Returns a list of `TimesheetEntry` objects.
@@ -28837,14 +34697,50 @@ Returns a list of `Employment` objects.
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.timesheet_entries import ( + TimesheetEntriesListRequestOrderBy, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employments.list( +client.hris.timesheet_entries.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=TimesheetEntriesListRequestOrderBy.START_TIME_DESCENDING, + page_size=1, + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -28885,7 +34781,7 @@ client.hris.employments.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return employments for this employee. +**employee_id:** `typing.Optional[str]` — If provided, will only return timesheet entries for this employee.
@@ -28893,7 +34789,23 @@ client.hris.employments.list(
-**expand:** `typing.Optional[EmploymentsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended after this datetime. + +
+
+ +
+
+ +**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended before this datetime. + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -28941,7 +34853,7 @@ client.hris.employments.list(
-**order_by:** `typing.Optional[EmploymentsListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. +**order_by:** `typing.Optional[TimesheetEntriesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time.
@@ -28949,7 +34861,7 @@ client.hris.employments.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -28957,7 +34869,7 @@ client.hris.employments.list(
-**remote_fields:** `typing.Optional[EmploymentsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -28965,7 +34877,7 @@ client.hris.employments.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started after this datetime.
@@ -28973,7 +34885,7 @@ client.hris.employments.list(
-**show_enum_origins:** `typing.Optional[EmploymentsListRequestShowEnumOrigins]` — 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) +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started before this datetime.
@@ -28993,7 +34905,7 @@ client.hris.employments.list(
-
client.hris.employments.retrieve(...) +
client.hris.timesheet_entries.create(...)
@@ -29005,7 +34917,7 @@ client.hris.employments.list(
-Returns an `Employment` object with the given `id`. +Creates a `TimesheetEntry` object with the given values.
@@ -29021,13 +34933,16 @@ Returns an `Employment` object with the given `id`. ```python from merge import Merge +from merge.resources.hris import TimesheetEntryRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employments.retrieve( - id="id", +client.hris.timesheet_entries.create( + is_debug_mode=True, + run_async=True, + model=TimesheetEntryRequest(), ) ``` @@ -29044,47 +34959,7 @@ client.hris.employments.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[EmploymentsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**remote_fields:** `typing.Optional[EmploymentsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. - -
-
- -
-
- -**show_enum_origins:** `typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]` — 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) +**model:** `TimesheetEntryRequest`
@@ -29092,69 +34967,15 @@ client.hris.employments.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
- -
- - - - -
- -## Hris FieldMapping -
client.hris.field_mapping.field_mappings_retrieve(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.field_mapping.field_mappings_retrieve() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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. +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -29174,7 +34995,7 @@ client.hris.field_mapping.field_mappings_retrieve()
-
client.hris.field_mapping.field_mappings_create(...) +
client.hris.timesheet_entries.retrieve(...)
@@ -29186,7 +35007,7 @@ client.hris.field_mapping.field_mappings_retrieve()
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a `TimesheetEntry` object with the given `id`.
@@ -29207,13 +35028,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.field_mappings_create( - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", +client.hris.timesheet_entries.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -29230,31 +35048,7 @@ client.hris.field_mapping.field_mappings_create(
-**target_field_name:** `str` — The name of the target field you want this remote field to map to. - -
-
- -
-
- -**target_field_description:** `str` — The description of the target field you want this remote field to map to. - -
-
- -
-
- -**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - -
-
- -
-
- -**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. +**id:** `str`
@@ -29262,7 +35056,7 @@ client.hris.field_mapping.field_mappings_create(
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -29270,7 +35064,7 @@ client.hris.field_mapping.field_mappings_create(
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -29278,7 +35072,7 @@ client.hris.field_mapping.field_mappings_create(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -29298,7 +35092,7 @@ client.hris.field_mapping.field_mappings_create(
-
client.hris.field_mapping.field_mappings_destroy(...) +
client.hris.timesheet_entries.meta_post_retrieve()
@@ -29310,7 +35104,7 @@ client.hris.field_mapping.field_mappings_create(
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns metadata for `TimesheetEntry` POSTs.
@@ -29331,9 +35125,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", -) +client.hris.timesheet_entries.meta_post_retrieve() ``` @@ -29349,14 +35141,6 @@ client.hris.field_mapping.field_mappings_destroy(
-**field_mapping_id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -29369,7 +35153,8 @@ client.hris.field_mapping.field_mappings_destroy(
-
client.hris.field_mapping.field_mappings_partial_update(...) +## Hris WebhookReceivers +
client.hris.webhook_receivers.list()
@@ -29381,7 +35166,7 @@ client.hris.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of `WebhookReceiver` objects.
@@ -29402,9 +35187,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", -) +client.hris.webhook_receivers.list() ``` @@ -29420,38 +35203,6 @@ client.hris.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` - -
-
- -
-
- -**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - -
-
- -
-
- -**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. - -
-
- -
-
- -**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -29464,7 +35215,7 @@ client.hris.field_mapping.field_mappings_partial_update(
-
client.hris.field_mapping.remote_fields_retrieve(...) +
client.hris.webhook_receivers.create(...)
@@ -29476,7 +35227,7 @@ client.hris.field_mapping.field_mappings_partial_update(
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Creates a `WebhookReceiver` object with the given values.
@@ -29497,7 +35248,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.remote_fields_retrieve() +client.hris.webhook_receivers.create( + event="event", + is_active=True, +) ``` @@ -29513,7 +35267,7 @@ client.hris.field_mapping.remote_fields_retrieve()
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. +**event:** `str`
@@ -29521,7 +35275,15 @@ client.hris.field_mapping.remote_fields_retrieve()
-**include_example_values:** `typing.Optional[str]` — 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. +**is_active:** `bool` + +
+
+ +
+
+ +**key:** `typing.Optional[str]`
@@ -29541,7 +35303,8 @@ client.hris.field_mapping.remote_fields_retrieve()
-
client.hris.field_mapping.target_fields_retrieve() +## Knowledgebase AccountDetails +
client.knowledgebase.account_details.retrieve()
@@ -29553,7 +35316,7 @@ client.hris.field_mapping.remote_fields_retrieve()
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). +Get details for a linked account.
@@ -29574,7 +35337,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.target_fields_retrieve() +client.knowledgebase.account_details.retrieve() ``` @@ -29602,8 +35365,8 @@ client.hris.field_mapping.target_fields_retrieve()
-## Hris GenerateKey -
client.hris.generate_key.create(...) +## Knowledgebase AccountToken +
client.knowledgebase.account_token.retrieve(...)
@@ -29615,7 +35378,7 @@ client.hris.field_mapping.target_fields_retrieve()
-Create a remote key. +Returns the account token for the end user with the provided public token.
@@ -29636,8 +35399,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.generate_key.create( - name="Remote Deployment Key 1", +client.knowledgebase.account_token.retrieve( + public_token="public_token", ) ``` @@ -29654,7 +35417,7 @@ client.hris.generate_key.create(
-**name:** `str` — The name of the remote key +**public_token:** `str`
@@ -29674,8 +35437,8 @@ client.hris.generate_key.create(
-## Hris Groups -
client.hris.groups.list(...) +## Knowledgebase Articles +
client.knowledgebase.articles.list(...)
@@ -29687,7 +35450,7 @@ client.hris.generate_key.create(
-Returns a list of `Group` objects. +Returns a list of `Article` objects.
@@ -29702,14 +35465,43 @@ Returns a list of `Group` objects.
```python +import datetime + from merge import Merge +from merge.resources.knowledgebase.resources.articles import ( + ArticlesListRequestExpand, + ArticlesListRequestType, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.groups.list( +client.knowledgebase.articles.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ArticlesListRequestExpand.ATTACHMENTS, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", + remote_id="remote_id", + root_container_id="root_container_id", + status="status", + type=ArticlesListRequestType.EMPTY, ) ``` @@ -29750,6 +35542,14 @@ client.hris.groups.list(
+**expand:** `typing.Optional[ArticlesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -29774,7 +35574,7 @@ client.hris.groups.list(
-**is_commonly_used_as_team:** `typing.Optional[str]` — 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. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -29782,7 +35582,7 @@ client.hris.groups.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -29790,7 +35590,7 @@ client.hris.groups.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -29798,7 +35598,7 @@ client.hris.groups.list(
-**names:** `typing.Optional[str]` — If provided, will only return groups with these names. Multiple values can be separated by commas. +**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_article_id.
@@ -29806,7 +35606,7 @@ client.hris.groups.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_container_id.
@@ -29814,7 +35614,7 @@ client.hris.groups.list(
-**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -29822,7 +35622,7 @@ client.hris.groups.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**root_container_id:** `typing.Optional[str]` — If provided, will only return sub articles of the root_container_id.
@@ -29830,7 +35630,7 @@ client.hris.groups.list(
-**show_enum_origins:** `typing.Optional[typing.Literal["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) +**status:** `typing.Optional[str]` — If provided, will only return articles of the given status; multiple statuses can be separated by commas.
@@ -29838,7 +35638,7 @@ client.hris.groups.list(
-**types:** `typing.Optional[str]` — If provided, will only return groups of these types. Multiple values can be separated by commas. +**type:** `typing.Optional[ArticlesListRequestType]` — If provided, will only return articles of the given type.
@@ -29858,7 +35658,7 @@ client.hris.groups.list(
-
client.hris.groups.retrieve(...) +
client.knowledgebase.articles.retrieve(...)
@@ -29870,7 +35670,7 @@ client.hris.groups.list(
-Returns a `Group` object with the given `id`. +Returns an `Article` object with the given `id`.
@@ -29886,13 +35686,19 @@ Returns a `Group` object with the given `id`. ```python from merge import Merge +from merge.resources.knowledgebase.resources.articles import ( + ArticlesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.groups.retrieve( +client.knowledgebase.articles.retrieve( id="id", + expand=ArticlesRetrieveRequestExpand.ATTACHMENTS, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -29917,15 +35723,7 @@ client.hris.groups.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**expand:** `typing.Optional[ArticlesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -29933,7 +35731,7 @@ client.hris.groups.retrieve(
-**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -29941,7 +35739,7 @@ client.hris.groups.retrieve(
-**show_enum_origins:** `typing.Optional[typing.Literal["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) +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -29961,8 +35759,8 @@ client.hris.groups.retrieve(
-## Hris Issues -
client.hris.issues.list(...) +## Knowledgebase AsyncPassthrough +
client.knowledgebase.async_passthrough.create(...)
@@ -29974,7 +35772,7 @@ client.hris.groups.retrieve(
-Gets all issues for Organization. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -29990,13 +35788,17 @@ Gets all issues for Organization. ```python from merge import Merge +from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.issues.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.knowledgebase.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -30013,7 +35815,7 @@ client.hris.issues.list(
-**account_token:** `typing.Optional[str]` +**request:** `DataPassthroughRequest`
@@ -30021,108 +35823,70 @@ client.hris.issues.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time -
-
-
-**end_user_organization_name:** `typing.Optional[str]` -
+
+
client.knowledgebase.async_passthrough.retrieve(...)
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. - -
-
+#### 📝 Description
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. - -
-
-
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues - +Retrieves data from earlier async-passthrough POST request
- -
-
- -**integration_name:** `typing.Optional[str]` -
+#### 🔌 Usage +
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. - -
-
-
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. - -
-
+```python +from merge import Merge -
-
+client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", +) -**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. - +```
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. -
+#### ⚙️ Parameters +
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time - -
-
-
-**status:** `typing.Optional[IssuesListRequestStatus]` - -Status of the issue. Options: ('ONGOING', 'RESOLVED') - -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**async_passthrough_receipt_id:** `str`
@@ -30142,7 +35906,8 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.hris.issues.retrieve(...) +## Knowledgebase Attachments +
client.knowledgebase.attachments.list(...)
@@ -30154,7 +35919,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +Returns a list of `Attachment` objects.
@@ -30169,14 +35934,33 @@ Get a specific issue.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.issues.retrieve( - id="id", +client.knowledgebase.attachments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -30193,7 +35977,7 @@ client.hris.issues.retrieve(
-**id:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -30201,75 +35985,39 @@ client.hris.issues.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
-
-
- - - -
- -## Hris LinkToken -
client.hris.link_token.create(...)
-#### 📝 Description - -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
-Creates a link token to be used when linking a new end user. -
-
+**include_deleted_data:** `typing.Optional[bool]` — 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/). +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge -from merge.resources.hris import CategoriesEnum - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], -) - -``` -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-#### ⚙️ Parameters - -
-
-
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -30277,7 +36025,7 @@ client.hris.link_token.create(
-**end_user_organization_name:** `str` — Your end user's organization. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -30285,7 +36033,7 @@ client.hris.link_token.create(
-**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -30293,7 +36041,7 @@ client.hris.link_token.create(
-**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -30301,7 +36049,7 @@ client.hris.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -30309,59 +36057,72 @@ client.hris.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. -
+
+
client.knowledgebase.attachments.retrieve(...)
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - -
-
+#### 📝 Description
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - +
+
+ +Returns an `Attachment` object with the given `id`.
+
+
+ +#### 🔌 Usage
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.attachments.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +```
+
+
+ +#### ⚙️ Parameters
-**language:** `typing.Optional[EndUserDetailsRequestLanguage]` - -The following subset of IETF language tags can be used to configure localization. +
+
-* `en` - en -* `de` - de +**id:** `str`
@@ -30369,7 +36130,7 @@ The following subset of IETF language tags can be used to configure localization
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -30377,7 +36138,7 @@ The following subset of IETF language tags can be used to configure localization
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -30397,8 +36158,8 @@ The following subset of IETF language tags can be used to configure localization
-## Hris LinkedAccounts -
client.hris.linked_accounts.list(...) +## Knowledgebase AuditTrail +
client.knowledgebase.audit_trail.list(...)
@@ -30410,7 +36171,7 @@ The following subset of IETF language tags can be used to configure localization
-List linked accounts for your organization. +Gets a list of audit trail events.
@@ -30431,8 +36192,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.linked_accounts.list( +client.knowledgebase.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -30449,17 +36215,7 @@ client.hris.linked_accounts.list(
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` - -Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - -* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -30467,7 +36223,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time
@@ -30475,7 +36231,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +**event_type:** `typing.Optional[str]` — 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`
@@ -30483,7 +36239,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -30491,7 +36247,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time
@@ -30499,7 +36255,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. +**user_email:** `typing.Optional[str]` — 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.
@@ -30507,59 +36263,65 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**id:** `typing.Optional[str]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. -
+
+## Knowledgebase AvailableActions +
client.knowledgebase.available_actions.retrieve()
-**include_duplicates:** `typing.Optional[bool]` — 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. - -
-
+#### 📝 Description
-**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. - -
-
-
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - +Returns a list of models and actions available for an account. +
+
+#### 🔌 Usage +
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
-
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.available_actions.retrieve() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -30575,8 +36337,8 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-## Hris Locations -
client.hris.locations.list(...) +## Knowledgebase Containers +
client.knowledgebase.containers.list(...)
@@ -30588,7 +36350,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-Returns a list of `Location` objects. +Returns a list of `Container` objects.
@@ -30603,14 +36365,41 @@ Returns a list of `Location` objects.
```python +import datetime + from merge import Merge +from merge.resources.knowledgebase.resources.containers import ( + ContainersListRequestExpand, + ContainersListRequestType, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.locations.list( +client.knowledgebase.containers.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ContainersListRequestExpand.PARENT_ARTICLE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", + remote_id="remote_id", + type=ContainersListRequestType.EMPTY, ) ``` @@ -30651,6 +36440,14 @@ client.hris.locations.list(
+**expand:** `typing.Optional[ContainersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -30675,12 +36472,7 @@ client.hris.locations.list(
-**location_type:** `typing.Optional[LocationsListRequestLocationType]` - -If provided, will only return locations with this location_type - -* `HOME` - HOME -* `WORK` - WORK +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -30688,7 +36480,7 @@ If provided, will only return locations with this location_type
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -30696,7 +36488,7 @@ If provided, will only return locations with this location_type
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -30704,7 +36496,7 @@ If provided, will only return locations with this location_type
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_article_id.
@@ -30712,7 +36504,7 @@ If provided, will only return locations with this location_type
-**remote_fields:** `typing.Optional[LocationsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_container_id.
@@ -30728,7 +36520,7 @@ If provided, will only return locations with this location_type
-**show_enum_origins:** `typing.Optional[LocationsListRequestShowEnumOrigins]` — 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) +**type:** `typing.Optional[ContainersListRequestType]` — If provided, will only return containers of the given type.
@@ -30748,7 +36540,7 @@ If provided, will only return locations with this location_type
-
client.hris.locations.retrieve(...) +
client.knowledgebase.containers.retrieve(...)
@@ -30760,7 +36552,7 @@ If provided, will only return locations with this location_type
-Returns a `Location` object with the given `id`. +Returns a `Container` object with the given `id`.
@@ -30776,13 +36568,19 @@ Returns a `Location` object with the given `id`. ```python from merge import Merge +from merge.resources.knowledgebase.resources.containers import ( + ContainersRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.locations.retrieve( +client.knowledgebase.containers.retrieve( id="id", + expand=ContainersRetrieveRequestExpand.PARENT_ARTICLE, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -30807,6 +36605,14 @@ client.hris.locations.retrieve(
+**expand:** `typing.Optional[ContainersRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -30823,19 +36629,65 @@ client.hris.locations.retrieve(
-**remote_fields:** `typing.Optional[LocationsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + +
+
+## Knowledgebase Scopes +
client.knowledgebase.scopes.default_scopes_retrieve()
-**show_enum_origins:** `typing.Optional[LocationsRetrieveRequestShowEnumOrigins]` — 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) - +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.scopes.default_scopes_retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+
@@ -30851,8 +36703,7 @@ client.hris.locations.retrieve(
-## Hris Passthrough -
client.hris.passthrough.create(...) +
client.knowledgebase.scopes.linked_account_scopes_retrieve()
@@ -30864,7 +36715,7 @@ client.hris.locations.retrieve(
-Pull data from an endpoint not currently supported by Merge. +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -30880,18 +36731,12 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.hris import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), -) +client.knowledgebase.scopes.linked_account_scopes_retrieve() ``` @@ -30907,14 +36752,6 @@ client.hris.passthrough.create(
-**request:** `DataPassthroughRequest` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -30927,8 +36764,7 @@ client.hris.passthrough.create(
-## Hris PayGroups -
client.hris.pay_groups.list(...) +
client.knowledgebase.scopes.linked_account_scopes_create(...)
@@ -30940,7 +36776,7 @@ client.hris.passthrough.create(
-Returns a list of `PayGroup` objects. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -30956,13 +36792,42 @@ Returns a list of `PayGroup` objects. ```python from merge import Merge +from merge.resources.knowledgebase import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.pay_groups.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.knowledgebase.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], ) ``` @@ -30979,7 +36844,7 @@ client.hris.pay_groups.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for
@@ -30987,75 +36852,65 @@ client.hris.pay_groups.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. -
-
-
-**include_deleted_data:** `typing.Optional[bool]` — 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/). -
+
+## Knowledgebase DeleteAccount +
client.knowledgebase.delete_account.delete()
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
+#### 📝 Description
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +Delete a linked account.
+ + + +#### 🔌 Usage
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
-
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.delete_account.delete() + +```
+ + + +#### ⚙️ Parameters
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
-
@@ -31071,7 +36926,8 @@ client.hris.pay_groups.list(
-
client.hris.pay_groups.retrieve(...) +## Knowledgebase FieldMapping +
client.knowledgebase.field_mapping.field_mappings_retrieve(...)
@@ -31083,7 +36939,7 @@ client.hris.pay_groups.list(
-Returns a `PayGroup` object with the given `id`. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -31104,8 +36960,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.pay_groups.retrieve( - id="id", +client.knowledgebase.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -31122,23 +36978,7 @@ client.hris.pay_groups.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -31158,8 +36998,7 @@ client.hris.pay_groups.retrieve(
-## Hris PayrollRuns -
client.hris.payroll_runs.list(...) +
client.knowledgebase.field_mapping.field_mappings_create(...)
@@ -31171,7 +37010,7 @@ client.hris.pay_groups.retrieve(
-Returns a list of `PayrollRun` objects. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -31192,8 +37031,14 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.payroll_runs.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +client.knowledgebase.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", ) ``` @@ -31210,7 +37055,7 @@ client.hris.payroll_runs.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -31218,7 +37063,7 @@ client.hris.payroll_runs.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
@@ -31226,7 +37071,7 @@ client.hris.payroll_runs.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -31234,7 +37079,7 @@ client.hris.payroll_runs.list(
-**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended after this datetime. +**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from.
@@ -31242,7 +37087,7 @@ client.hris.payroll_runs.list(
-**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended before this datetime. +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from.
@@ -31250,7 +37095,7 @@ client.hris.payroll_runs.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category.
@@ -31258,7 +37103,7 @@ client.hris.payroll_runs.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — 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.
@@ -31266,7 +37111,7 @@ client.hris.payroll_runs.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -31274,79 +37119,70 @@ client.hris.payroll_runs.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. -
+
+
client.knowledgebase.field_mapping.field_mappings_destroy(...)
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
+#### 📝 Description
-**remote_fields:** `typing.Optional[PayrollRunsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. - -
-
-
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+ + + +#### 🔌 Usage
-**run_type:** `typing.Optional[PayrollRunsListRequestRunType]` +
+
-If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS') +```python +from merge import Merge -* `REGULAR` - REGULAR -* `OFF_CYCLE` - OFF_CYCLE -* `CORRECTION` - CORRECTION -* `TERMINATION` - TERMINATION -* `SIGN_ON_BONUS` - SIGN_ON_BONUS - +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", +) + +```
- -
-
- -**show_enum_origins:** `typing.Optional[PayrollRunsListRequestShowEnumOrigins]` — 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) -
+#### ⚙️ Parameters +
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started after this datetime. - -
-
-
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started before this datetime. +**field_mapping_id:** `str`
@@ -31366,7 +37202,7 @@ If provided, will only return PayrollRun's with this status. Options: ('REGULAR'
-
client.hris.payroll_runs.retrieve(...) +
client.knowledgebase.field_mapping.field_mappings_partial_update(...)
@@ -31378,7 +37214,7 @@ If provided, will only return PayrollRun's with this status. Options: ('REGULAR'
-Returns a `PayrollRun` object with the given `id`. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -31399,8 +37235,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.payroll_runs.retrieve( - id="id", +client.knowledgebase.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", ) ``` @@ -31417,7 +37253,7 @@ client.hris.payroll_runs.retrieve(
-**id:** `str` +**field_mapping_id:** `str`
@@ -31425,7 +37261,7 @@ client.hris.payroll_runs.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -31433,7 +37269,7 @@ client.hris.payroll_runs.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from.
@@ -31441,7 +37277,7 @@ client.hris.payroll_runs.retrieve(
-**remote_fields:** `typing.Optional[PayrollRunsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -31449,7 +37285,7 @@ client.hris.payroll_runs.retrieve(
-**show_enum_origins:** `typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]` — 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) +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -31469,8 +37305,7 @@ client.hris.payroll_runs.retrieve(
-## Hris RegenerateKey -
client.hris.regenerate_key.create(...) +
client.knowledgebase.field_mapping.remote_fields_retrieve(...)
@@ -31482,7 +37317,7 @@ client.hris.payroll_runs.retrieve(
-Exchange remote keys. +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -31503,8 +37338,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.regenerate_key.create( - name="Remote Deployment Key 1", +client.knowledgebase.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", ) ``` @@ -31521,7 +37357,15 @@ client.hris.regenerate_key.create(
-**name:** `str` — The name of the remote key +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. + +
+
+ +
+
+ +**include_example_values:** `typing.Optional[str]` — 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.
@@ -31541,8 +37385,7 @@ client.hris.regenerate_key.create(
-## Hris SyncStatus -
client.hris.sync_status.list(...) +
client.knowledgebase.field_mapping.target_fields_retrieve()
@@ -31554,7 +37397,7 @@ client.hris.regenerate_key.create(
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -31575,9 +37418,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.sync_status.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) +client.knowledgebase.field_mapping.target_fields_retrieve() ``` @@ -31593,22 +37434,6 @@ client.hris.sync_status.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -31621,8 +37446,8 @@ client.hris.sync_status.list(
-## Hris ForceResync -
client.hris.force_resync.sync_status_resync_create() +## Knowledgebase GenerateKey +
client.knowledgebase.generate_key.create(...)
@@ -31634,7 +37459,7 @@ client.hris.sync_status.list(
-Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +Create a remote key.
@@ -31655,7 +37480,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.force_resync.sync_status_resync_create() +client.knowledgebase.generate_key.create( + name="Remote Deployment Key 1", +) ``` @@ -31671,6 +37498,14 @@ client.hris.force_resync.sync_status_resync_create()
+**name:** `str` — The name of the remote key + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -31683,8 +37518,8 @@ client.hris.force_resync.sync_status_resync_create()
-## Hris Teams -
client.hris.teams.list(...) +## Knowledgebase Groups +
client.knowledgebase.groups.list(...)
@@ -31696,7 +37531,7 @@ client.hris.force_resync.sync_status_resync_create()
-Returns a list of `Team` objects. +Returns a list of `Group` objects.
@@ -31711,14 +37546,37 @@ Returns a list of `Team` objects.
```python +import datetime + from merge import Merge +from merge.resources.knowledgebase.resources.groups import ( + GroupsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.teams.list( +client.knowledgebase.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=GroupsListRequestExpand.PARENT_GROUP, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -31759,7 +37617,7 @@ client.hris.teams.list(
-**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[GroupsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -31807,15 +37665,7 @@ client.hris.teams.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
- -
-
- -**parent_team_id:** `typing.Optional[str]` — If provided, will only return teams with this parent team. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -31843,7 +37693,7 @@ client.hris.teams.list(
-
client.hris.teams.retrieve(...) +
client.knowledgebase.groups.retrieve(...)
@@ -31855,7 +37705,7 @@ client.hris.teams.list(
-Returns a `Team` object with the given `id`. +Returns a `Group` object with the given `id`.
@@ -31871,13 +37721,19 @@ Returns a `Team` object with the given `id`. ```python from merge import Merge +from merge.resources.knowledgebase.resources.groups import ( + GroupsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.teams.retrieve( +client.knowledgebase.groups.retrieve( id="id", + expand=GroupsRetrieveRequestExpand.PARENT_GROUP, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -31902,7 +37758,7 @@ client.hris.teams.retrieve(
-**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[GroupsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -31938,8 +37794,8 @@ client.hris.teams.retrieve(
-## Hris TimeOff -
client.hris.time_off.list(...) +## Knowledgebase Issues +
client.knowledgebase.issues.list(...)
@@ -31951,7 +37807,7 @@ client.hris.teams.retrieve(
-Returns a list of `TimeOff` objects. +Gets all issues for Organization.
@@ -31966,14 +37822,40 @@ Returns a list of `TimeOff` objects.
```python +import datetime + from merge import Merge +from merge.resources.knowledgebase.resources.issues import ( + IssuesListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off.list( +client.knowledgebase.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -31990,7 +37872,7 @@ client.hris.time_off.list(
-**approver_id:** `typing.Optional[str]` — If provided, will only return time off for this approver. +**account_token:** `typing.Optional[str]`
@@ -31998,7 +37880,7 @@ client.hris.time_off.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -32006,7 +37888,7 @@ client.hris.time_off.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time
@@ -32014,7 +37896,7 @@ client.hris.time_off.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_user_organization_name:** `typing.Optional[str]`
@@ -32022,7 +37904,7 @@ client.hris.time_off.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return time off for this employee. +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime.
@@ -32030,7 +37912,7 @@ client.hris.time_off.list(
-**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that ended after this datetime. +**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime.
@@ -32038,7 +37920,7 @@ client.hris.time_off.list(
-**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that ended before this datetime. +**include_muted:** `typing.Optional[str]` — If true, will include muted issues
@@ -32046,7 +37928,7 @@ client.hris.time_off.list(
-**expand:** `typing.Optional[TimeOffListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**integration_name:** `typing.Optional[str]`
@@ -32054,7 +37936,7 @@ client.hris.time_off.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime.
@@ -32062,7 +37944,7 @@ client.hris.time_off.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime.
@@ -32070,7 +37952,7 @@ client.hris.time_off.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in.
@@ -32078,7 +37960,7 @@ client.hris.time_off.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -32086,7 +37968,7 @@ client.hris.time_off.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time
@@ -32094,7 +37976,12 @@ client.hris.time_off.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -32102,72 +37989,70 @@ client.hris.time_off.list(
-**remote_fields:** `typing.Optional[TimeOffListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. -
+
+
client.knowledgebase.issues.retrieve(...)
-**request_type:** `typing.Optional[TimeOffListRequestRequestType]` - -If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') +#### 📝 Description -* `VACATION` - VACATION -* `SICK` - SICK -* `PERSONAL` - PERSONAL -* `JURY_DUTY` - JURY_DUTY -* `VOLUNTEER` - VOLUNTEER -* `BEREAVEMENT` - BEREAVEMENT - -
-
+
+
-**show_enum_origins:** `typing.Optional[TimeOffListRequestShowEnumOrigins]` — 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) - +Get a specific issue. +
+
+#### 🔌 Usage +
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started after this datetime. - -
-
-
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started before this datetime. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.issues.retrieve( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**status:** `typing.Optional[TimeOffListRequestStatus]` - -If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') +
+
-* `REQUESTED` - REQUESTED -* `APPROVED` - APPROVED -* `DECLINED` - DECLINED -* `CANCELLED` - CANCELLED -* `DELETED` - DELETED +**id:** `str`
@@ -32187,7 +38072,8 @@ If provided, will only return TimeOff with this status. Options: ('REQUESTED', '
-
client.hris.time_off.create(...) +## Knowledgebase LinkToken +
client.knowledgebase.link_token.create(...)
@@ -32199,7 +38085,7 @@ If provided, will only return TimeOff with this status. Options: ('REQUESTED', '
-Creates a `TimeOff` object with the given values. +Creates a link token to be used when linking a new end user.
@@ -32215,14 +38101,17 @@ Creates a `TimeOff` object with the given values. ```python from merge import Merge -from merge.resources.hris import TimeOffRequest +from merge.resources.knowledgebase import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off.create( - model=TimeOffRequest(), +client.knowledgebase.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -32239,7 +38128,7 @@ client.hris.time_off.create(
-**model:** `TimeOffRequest` +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -32247,7 +38136,7 @@ client.hris.time_off.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**end_user_organization_name:** `str` — Your end user's organization.
@@ -32255,7 +38144,7 @@ client.hris.time_off.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -32263,70 +38152,47 @@ client.hris.time_off.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
- -
+
+
+**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +
-
-
client.hris.time_off.retrieve(...)
-#### 📝 Description - -
-
+**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. + +
+
-Returns a `TimeOff` object with the given `id`. -
-
+**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.time_off.retrieve( - id="id", -) - -``` -
-
+**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -32334,7 +38200,14 @@ client.hris.time_off.retrieve(
-**expand:** `typing.Optional[TimeOffRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
@@ -32342,7 +38215,12 @@ client.hris.time_off.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**language:** `typing.Optional[EndUserDetailsRequestLanguage]` + +The following subset of IETF language tags can be used to configure localization. + +* `en` - en +* `de` - de
@@ -32350,7 +38228,7 @@ client.hris.time_off.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled.
@@ -32358,7 +38236,7 @@ client.hris.time_off.retrieve(
-**remote_fields:** `typing.Optional[TimeOffRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -32366,7 +38244,11 @@ client.hris.time_off.retrieve(
-**show_enum_origins:** `typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]` — 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) +**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` + +When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + +* `SELECTIVE_SYNC` - SELECTIVE_SYNC
@@ -32386,7 +38268,8 @@ client.hris.time_off.retrieve(
-
client.hris.time_off.meta_post_retrieve() +## Knowledgebase LinkedAccounts +
client.knowledgebase.linked_accounts.list(...)
@@ -32398,7 +38281,7 @@ client.hris.time_off.retrieve(
-Returns metadata for `TimeOff` POSTs. +List linked accounts for your organization.
@@ -32414,12 +38297,29 @@ Returns metadata for `TimeOff` POSTs. ```python from merge import Merge +from merge.resources.knowledgebase.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off.meta_post_retrieve() +client.knowledgebase.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", +) ``` @@ -32435,71 +38335,66 @@ client.hris.time_off.meta_post_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
- -
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]` +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage +* `knowledgebase` - knowledgebase + -
-## Hris TimeOffBalances -
client.hris.time_off_balances.list(...)
-#### 📝 Description - -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
-Returns a list of `TimeOffBalance` objects. -
-
+**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +
-#### 🔌 Usage -
+**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.time_off_balances.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -) - -``` -
-
+**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. + -#### ⚙️ Parameters -
+**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + +
+
+
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**id:** `typing.Optional[str]`
@@ -32507,7 +38402,7 @@ client.hris.time_off_balances.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
@@ -32515,7 +38410,7 @@ client.hris.time_off_balances.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_duplicates:** `typing.Optional[bool]` — 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.
@@ -32523,7 +38418,7 @@ client.hris.time_off_balances.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return time off balances for this employee. +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name.
@@ -32531,7 +38426,7 @@ client.hris.time_off_balances.list(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
@@ -32539,7 +38434,7 @@ client.hris.time_off_balances.list(
-**include_deleted_data:** `typing.Optional[bool]` — 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/). +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -32547,7 +38442,7 @@ client.hris.time_off_balances.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
@@ -32555,31 +38450,75 @@ client.hris.time_off_balances.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ + + + + + +
+ +## Knowledgebase Passthrough +
client.knowledgebase.passthrough.create(...) +
+
+ +#### 📝 Description
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +
+
+ +Pull data from an endpoint not currently supported by Merge.
+
+
+ +#### 🔌 Usage
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +
+
+ +```python +from merge import Merge +from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) + +``` +
+
+#### ⚙️ Parameters +
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +
+
+ +**request:** `DataPassthroughRequest`
@@ -32587,40 +38526,71 @@ client.hris.time_off_balances.list(
-**policy_type:** `typing.Optional[TimeOffBalancesListRequestPolicyType]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
-If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') -* `VACATION` - VACATION -* `SICK` - SICK -* `PERSONAL` - PERSONAL -* `JURY_DUTY` - JURY_DUTY -* `VOLUNTEER` - VOLUNTEER -* `BEREAVEMENT` - BEREAVEMENT -
+
+## Knowledgebase RegenerateKey +
client.knowledgebase.regenerate_key.create(...)
-**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins. - +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. +
+
+#### 🔌 Usage +
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.regenerate_key.create( + name="Remote Deployment Key 1", +) + +``` +
+
+#### ⚙️ Parameters +
-**show_enum_origins:** `typing.Optional[typing.Literal["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) +
+
+ +**name:** `str` — The name of the remote key
@@ -32640,7 +38610,8 @@ If provided, will only return TimeOffBalance with this policy type. Options: ('V
-
client.hris.time_off_balances.retrieve(...) +## Knowledgebase SyncStatus +
client.knowledgebase.sync_status.list(...)
@@ -32652,7 +38623,7 @@ If provided, will only return TimeOffBalance with this policy type. Options: ('V
-Returns a `TimeOffBalance` object with the given `id`. +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -32673,8 +38644,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off_balances.retrieve( - id="id", +client.knowledgebase.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) ``` @@ -32691,7 +38663,7 @@ client.hris.time_off_balances.retrieve(
-**id:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -32699,7 +38671,7 @@ client.hris.time_off_balances.retrieve(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -32707,35 +38679,65 @@ client.hris.time_off_balances.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). -
+
+## Knowledgebase ForceResync +
client.knowledgebase.force_resync.sync_status_resync_create()
-**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins. - +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
+
+
+ +#### 🔌 Usage
-**show_enum_origins:** `typing.Optional[typing.Literal["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) - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.force_resync.sync_status_resync_create() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -32751,8 +38753,8 @@ client.hris.time_off_balances.retrieve(
-## Hris TimesheetEntries -
client.hris.timesheet_entries.list(...) +## Knowledgebase Users +
client.knowledgebase.users.list(...)
@@ -32764,7 +38766,7 @@ client.hris.time_off_balances.retrieve(
-Returns a list of `TimesheetEntry` objects. +Returns a list of `User` objects.
@@ -32779,14 +38781,33 @@ Returns a list of `TimesheetEntry` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.timesheet_entries.list( +client.knowledgebase.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -32827,38 +38848,6 @@ client.hris.timesheet_entries.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return timesheet entries for this employee. - -
-
- -
-
- -**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended after this datetime. - -
-
- -
-
- -**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended before this datetime. - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -32899,15 +38888,7 @@ client.hris.timesheet_entries.list(
-**order_by:** `typing.Optional[TimesheetEntriesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -32923,22 +38904,6 @@ client.hris.timesheet_entries.list(
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started after this datetime. - -
-
- -
-
- -**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started before this datetime. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -32951,95 +38916,7 @@ client.hris.timesheet_entries.list(
-
client.hris.timesheet_entries.create(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a `TimesheetEntry` object with the given values. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge -from merge.resources.hris import TimesheetEntryRequest - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.timesheet_entries.create( - model=TimesheetEntryRequest(), -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**model:** `TimesheetEntryRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - -
-
- -
-
- -**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.hris.timesheet_entries.retrieve(...) +
client.knowledgebase.users.retrieve(...)
@@ -33051,7 +38928,7 @@ client.hris.timesheet_entries.create(
-Returns a `TimesheetEntry` object with the given `id`. +Returns a `User` object with the given `id`.
@@ -33072,8 +38949,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.timesheet_entries.retrieve( +client.knowledgebase.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -33098,14 +38977,6 @@ client.hris.timesheet_entries.retrieve(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -33134,69 +39005,8 @@ client.hris.timesheet_entries.retrieve(
-
client.hris.timesheet_entries.meta_post_retrieve() -
-
- -#### 📝 Description - -
-
- -
-
- -Returns metadata for `TimesheetEntry` POSTs. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.timesheet_entries.meta_post_retrieve() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -## Hris WebhookReceivers -
client.hris.webhook_receivers.list() +## Knowledgebase WebhookReceivers +
client.knowledgebase.webhook_receivers.list()
@@ -33229,7 +39039,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.webhook_receivers.list() +client.knowledgebase.webhook_receivers.list() ```
@@ -33257,7 +39067,7 @@ client.hris.webhook_receivers.list()
-
client.hris.webhook_receivers.create(...) +
client.knowledgebase.webhook_receivers.create(...)
@@ -33290,7 +39100,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.webhook_receivers.create( +client.knowledgebase.webhook_receivers.create( event="event", is_active=True, ) @@ -33507,6 +39317,8 @@ Returns a list of `Account` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -33514,7 +39326,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.accounts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -33658,6 +39487,8 @@ client = Merge( ) client.ticketing.accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -33885,6 +39716,8 @@ Returns a list of `Attachment` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -33892,7 +39725,28 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.attachments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + ticket_id="ticket_id", ) ``` @@ -33981,7 +39835,7 @@ client.ticketing.attachments.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -34060,6 +39914,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.attachments.create( + is_debug_mode=True, + run_async=True, model=AttachmentRequest(), ) @@ -34148,6 +40004,8 @@ client = Merge( ) client.ticketing.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -34305,6 +40163,11 @@ client = Merge( ) client.ticketing.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -34345,7 +40208,7 @@ client.ticketing.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -34471,14 +40334,39 @@ Returns a list of `Collection` objects.
```python +import datetime + from merge import Merge +from merge.resources.ticketing.resources.collections import ( + CollectionsListRequestCollectionType, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.collections.list( + collection_type=CollectionsListRequestCollectionType.EMPTY, + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_collection_id="parent_collection_id", + remote_id="remote_id", ) ``` @@ -34495,7 +40383,7 @@ client.ticketing.collections.list(
-**collection_type:** `typing.Optional[str]` — If provided, will only return collections of the given type. +**collection_type:** `typing.Optional[CollectionsListRequestCollectionType]` — If provided, will only return collections of the given type.
@@ -34583,7 +40471,7 @@ client.ticketing.collections.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -34663,6 +40551,9 @@ Returns a list of `Viewer` objects that point to a User id or Team id that is ei ```python from merge import Merge +from merge.resources.ticketing.resources.collections import ( + CollectionsViewersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -34671,6 +40562,11 @@ client = Merge( client.ticketing.collections.viewers_list( collection_id="collection_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CollectionsViewersListRequestExpand.TEAM, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -34790,6 +40686,8 @@ client = Merge( ) client.ticketing.collections.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -34894,14 +40792,41 @@ Returns a list of `Comment` objects.
```python +import datetime + from merge import Merge +from merge.resources.ticketing.resources.comments import ( + CommentsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.comments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CommentsListRequestExpand.CONTACT, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + ticket_id="ticket_id", ) ``` @@ -34990,7 +40915,7 @@ client.ticketing.comments.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -35069,6 +40994,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.comments.create( + is_debug_mode=True, + run_async=True, model=CommentRequest(), ) @@ -35150,6 +41077,9 @@ Returns a `Comment` object with the given `id`. ```python from merge import Merge +from merge.resources.ticketing.resources.comments import ( + CommentsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -35157,6 +41087,9 @@ client = Merge( ) client.ticketing.comments.retrieve( id="id", + expand=CommentsRetrieveRequestExpand.CONTACT, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -35306,6 +41239,8 @@ Returns a list of `Contact` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -35313,7 +41248,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.contacts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -35410,7 +41363,7 @@ client.ticketing.contacts.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -35473,6 +41426,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) @@ -35561,6 +41516,8 @@ client = Merge( ) client.ticketing.contacts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -36001,7 +41958,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.ticketing.field_mapping.field_mappings_retrieve() +client.ticketing.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, +) ```
@@ -36071,6 +42030,7 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -36149,6 +42109,14 @@ client.ticketing.field_mapping.field_mappings_create(
+**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -36315,6 +42283,14 @@ client.ticketing.field_mapping.field_mappings_partial_update(
+**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -36360,7 +42336,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.ticketing.field_mapping.remote_fields_retrieve() +client.ticketing.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", +) ``` @@ -36565,14 +42544,38 @@ Gets all issues for Organization.
```python +import datetime + from merge import Merge +from merge.resources.ticketing.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -36677,7 +42680,7 @@ client.ticketing.issues.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -36961,6 +42964,18 @@ The following subset of IETF language tags can be used to configure localization
+**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` + +When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + +* `SELECTIVE_SYNC` - SELECTIVE_SYNC + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -37002,13 +43017,28 @@ List linked accounts for your organization. ```python from merge import Merge +from merge.resources.ticketing.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -37123,7 +43153,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -37255,6 +43285,8 @@ Returns a list of `Project` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -37262,7 +43294,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.projects.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -37343,7 +43392,7 @@ client.ticketing.projects.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -37406,6 +43455,8 @@ client = Merge( ) client.ticketing.projects.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -37486,6 +43537,9 @@ Returns a list of `User` objects. ```python from merge import Merge +from merge.resources.ticketing.resources.projects import ( + ProjectsUsersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -37494,6 +43548,11 @@ client = Merge( client.ticketing.projects.users_list( parent_id="parent_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ProjectsUsersListRequestExpand.ROLES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -37558,7 +43617,7 @@ client.ticketing.projects.users_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -37678,6 +43737,8 @@ Returns a list of `Role` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -37685,7 +43746,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.roles.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -37766,7 +43844,7 @@ client.ticketing.roles.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -37829,6 +43907,8 @@ client = Merge( ) client.ticketing.roles.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -37917,6 +43997,7 @@ client = Merge( ) client.ticketing.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) ``` @@ -37941,7 +44022,7 @@ client.ticketing.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -38051,6 +44132,8 @@ Returns a list of `Tag` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -38058,7 +44141,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.tags.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -38139,7 +44239,7 @@ client.ticketing.tags.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -38202,6 +44302,8 @@ client = Merge( ) client.ticketing.tags.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -38282,6 +44384,8 @@ Returns a list of `Team` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -38289,7 +44393,24 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.teams.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -38370,7 +44491,7 @@ client.ticketing.teams.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -38433,6 +44554,8 @@ client = Merge( ) client.ticketing.teams.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -38513,14 +44636,81 @@ Returns a list of `Ticket` objects.
```python +import datetime + from merge import Merge +from merge.resources.ticketing.resources.tickets import ( + TicketsListRequestExpand, + TicketsListRequestPriority, + TicketsListRequestRemoteFields, + TicketsListRequestShowEnumOrigins, + TicketsListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.tickets.list( + account_id="account_id", + assignee_ids="assignee_ids", + collection_ids="collection_ids", + completed_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + completed_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + creator_id="creator_id", + creator_ids="creator_ids", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + due_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + due_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=TicketsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_ticket_id="parent_ticket_id", + priority=TicketsListRequestPriority.HIGH, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_fields=TicketsListRequestRemoteFields.PRIORITY, + remote_id="remote_id", + remote_updated_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_updated_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, + status=TicketsListRequestStatus.EMPTY, + tags="tags", + ticket_type="ticket_type", + ticket_url="ticket_url", ) ``` @@ -38609,6 +44799,14 @@ client.ticketing.tickets.list(
+**creator_ids:** `typing.Optional[str]` — If provided, will only return tickets created by the creator_ids; multiple creator_ids can be separated by commas. + +
+
+ +
+
+ **cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -38697,7 +44895,7 @@ client.ticketing.tickets.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -38784,7 +44982,7 @@ If provided, will only return tickets of this priority.
-**status:** `typing.Optional[str]` — If provided, will only return tickets of this status. +**status:** `typing.Optional[TicketsListRequestStatus]` — If provided, will only return tickets of this status.
@@ -38863,6 +45061,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.tickets.create( + is_debug_mode=True, + run_async=True, model=TicketRequest(), ) @@ -38944,6 +45144,11 @@ Returns a `Ticket` object with the given `id`. ```python from merge import Merge +from merge.resources.ticketing.resources.tickets import ( + TicketsRetrieveRequestExpand, + TicketsRetrieveRequestRemoteFields, + TicketsRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -38951,6 +45156,12 @@ client = Merge( ) client.ticketing.tickets.retrieve( id="id", + expand=TicketsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + remote_fields=TicketsRetrieveRequestRemoteFields.PRIORITY, + show_enum_origins=TicketsRetrieveRequestShowEnumOrigins.PRIORITY, ) ``` @@ -39071,6 +45282,8 @@ client = Merge( ) client.ticketing.tickets.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedTicketRequest(), ) @@ -39160,6 +45373,9 @@ Returns a list of `Viewer` objects that point to a User id or Team id that is ei ```python from merge import Merge +from merge.resources.ticketing.resources.tickets import ( + TicketsViewersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -39168,6 +45384,11 @@ client = Merge( client.ticketing.tickets.viewers_list( ticket_id="ticket_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TicketsViewersListRequestExpand.TEAM, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -39232,7 +45453,7 @@ client.ticketing.tickets.viewers_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -39356,7 +45577,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.ticketing.tickets.meta_post_retrieve() +client.ticketing.tickets.meta_post_retrieve( + collection_id="collection_id", + ticket_type="ticket_type", +) ```
@@ -39435,6 +45659,13 @@ client = Merge( ) client.ticketing.tickets.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + ids="ids", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -39507,7 +45738,7 @@ client.ticketing.tickets.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -39555,14 +45786,37 @@ Returns a list of `User` objects.
```python +import datetime + from merge import Merge +from merge.resources.ticketing.resources.users import UsersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + expand=UsersListRequestExpand.ROLES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + team="team", ) ``` @@ -39659,7 +45913,7 @@ client.ticketing.users.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -39723,6 +45977,7 @@ Returns a `User` object with the given `id`. ```python from merge import Merge +from merge.resources.ticketing.resources.users import UsersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -39730,6 +45985,9 @@ client = Merge( ) client.ticketing.users.retrieve( id="id", + expand=UsersRetrieveRequestExpand.ROLES, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -40110,6 +46368,10 @@ client = Merge( ) client.accounting.accounting_periods.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -40213,6 +46475,8 @@ client = Merge( ) client.accounting.accounting_periods.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -40293,14 +46557,46 @@ Returns a list of `Account` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.accounts import ( + AccountsListRequestClassification, + AccountsListRequestRemoteFields, + AccountsListRequestShowEnumOrigins, + AccountsListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.accounts.list( + account_type="account_type", + classification=AccountsListRequestClassification.EMPTY, + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION, + remote_id="remote_id", + show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION, + status=AccountsListRequestStatus.EMPTY, ) ``` @@ -40325,7 +46621,7 @@ client.accounting.accounts.list(
-**classification:** `typing.Optional[str]` — If provided, will only return accounts with this classification. +**classification:** `typing.Optional[AccountsListRequestClassification]` — If provided, will only return accounts with this classification.
@@ -40453,7 +46749,7 @@ client.accounting.accounts.list(
-**status:** `typing.Optional[str]` — If provided, will only return accounts with this status. +**status:** `typing.Optional[AccountsListRequestStatus]` — If provided, will only return accounts with this status.
@@ -40508,6 +46804,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.accounts.create( + is_debug_mode=True, + run_async=True, model=AccountRequest(), ) @@ -40589,6 +46887,10 @@ Returns an `Account` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.accounts import ( + AccountsRetrieveRequestRemoteFields, + AccountsRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -40596,6 +46898,10 @@ client = Merge( ) client.accounting.accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION, + show_enum_origins=AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION, ) ``` @@ -40769,6 +47075,8 @@ client = Merge( ) client.accounting.addresses.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -41084,6 +47392,8 @@ Returns a list of `AccountingAttachment` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -41091,7 +47401,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.attachments.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -41243,6 +47571,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.attachments.create( + is_debug_mode=True, + run_async=True, model=AccountingAttachmentRequest(), ) @@ -41331,6 +47661,8 @@ client = Merge( ) client.accounting.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -41480,6 +47812,11 @@ client = Merge( ) client.accounting.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -41646,6 +47983,8 @@ Returns a list of `BalanceSheet` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -41653,7 +47992,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.balance_sheets.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -41813,6 +48170,8 @@ client = Merge( ) client.accounting.balance_sheets.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -41909,6 +48268,10 @@ client = Merge( ) client.accounting.bank_feed_accounts.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -42012,6 +48375,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.bank_feed_accounts.create( + is_debug_mode=True, + run_async=True, model=BankFeedAccountRequest(), ) @@ -42100,6 +48465,8 @@ client = Merge( ) client.accounting.bank_feed_accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -42241,6 +48608,8 @@ Returns a list of `BankFeedTransaction` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -42248,7 +48617,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.bank_feed_transactions.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_processed=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -42408,6 +48795,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.bank_feed_transactions.create( + is_debug_mode=True, + run_async=True, model=BankFeedTransactionRequestRequest(), ) @@ -42496,6 +48885,8 @@ client = Merge( ) client.accounting.bank_feed_transactions.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -42645,6 +49036,8 @@ Returns a list of `CashFlowStatement` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -42652,7 +49045,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.cash_flow_statements.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -42812,6 +49223,8 @@ client = Merge( ) client.accounting.cash_flow_statements.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -42900,14 +49313,37 @@ Returns a list of `CompanyInfo` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.company_info import ( + CompanyInfoListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.company_info.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CompanyInfoListRequestExpand.ADDRESSES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -43052,6 +49488,9 @@ Returns a `CompanyInfo` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.company_info import ( + CompanyInfoRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -43059,6 +49498,9 @@ client = Merge( ) client.accounting.company_info.retrieve( id="id", + expand=CompanyInfoRetrieveRequestExpand.ADDRESSES, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -43147,14 +49589,45 @@ Returns a list of `Contact` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.contacts import ( + ContactsListRequestExpand, + ContactsListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.contacts.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + expand=ContactsListRequestExpand.ADDRESSES, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_customer="is_customer", + is_supplier="is_supplier", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", + status=ContactsListRequestStatus.EMPTY, ) ``` @@ -43323,7 +49796,7 @@ client.accounting.contacts.list(
-**status:** `typing.Optional[str]` — If provided, will only return Contacts that match this status. +**status:** `typing.Optional[ContactsListRequestStatus]` — If provided, will only return Contacts that match this status.
@@ -43378,6 +49851,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) @@ -43459,6 +49934,9 @@ Returns a `Contact` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.contacts import ( + ContactsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -43466,6 +49944,10 @@ client = Merge( ) client.accounting.contacts.retrieve( id="id", + expand=ContactsRetrieveRequestExpand.ADDRESSES, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -43586,6 +50068,8 @@ client = Merge( ) client.accounting.contacts.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedContactRequest(), ) @@ -43814,6 +50298,12 @@ client = Merge( ) client.accounting.contacts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -43926,14 +50416,48 @@ Returns a list of `CreditNote` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.credit_notes import ( + CreditNotesListRequestExpand, + CreditNotesListRequestRemoteFields, + CreditNotesListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.credit_notes.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CreditNotesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=CreditNotesListRequestRemoteFields.STATUS, + remote_id="remote_id", + show_enum_origins=CreditNotesListRequestShowEnumOrigins.STATUS, + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -44125,6 +50649,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.credit_notes.create( + is_debug_mode=True, + run_async=True, model=CreditNoteRequest(), ) @@ -44206,6 +50732,11 @@ Returns a `CreditNote` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.credit_notes import ( + CreditNotesRetrieveRequestExpand, + CreditNotesRetrieveRequestRemoteFields, + CreditNotesRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -44213,6 +50744,11 @@ client = Merge( ) client.accounting.credit_notes.retrieve( id="id", + expand=CreditNotesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, + remote_fields=CreditNotesRetrieveRequestRemoteFields.STATUS, + show_enum_origins=CreditNotesRetrieveRequestShowEnumOrigins.STATUS, ) ``` @@ -44663,6 +51199,8 @@ Returns a list of `Employee` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -44670,7 +51208,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.employees.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -44830,6 +51386,8 @@ client = Merge( ) client.accounting.employees.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -44918,14 +51476,39 @@ Returns a list of `ExpenseReport` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.expense_reports.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpenseReportsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -45093,6 +51676,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.expense_reports.create( + is_debug_mode=True, + run_async=True, model=ExpenseReportRequest( tracking_categories=[ "a1b2c3d4-e5f6-4a5b-9c3d-2e1f0a9b8c7d", @@ -45179,6 +51764,9 @@ Returns a list of `ExpenseReportLine` objects that point to a `ExpenseReport` wi ```python from merge import Merge +from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsLinesListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -45187,6 +51775,12 @@ client = Merge( client.accounting.expense_reports.lines_list( expense_report_id="expense_report_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpenseReportsLinesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + page_size=1, ) ``` @@ -45307,6 +51901,9 @@ Returns an `ExpenseReport` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -45314,6 +51911,10 @@ client = Merge( ) client.accounting.expense_reports.retrieve( id="id", + expand=ExpenseReportsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -45417,6 +52018,12 @@ client = Merge( ) client.accounting.expense_reports.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -45597,6 +52204,12 @@ client = Merge( ) client.accounting.expense_reports.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -45709,14 +52322,45 @@ Returns a list of `Expense` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.expenses import ( + ExpensesListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.expenses.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpensesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -45900,6 +52544,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.expenses.create( + is_debug_mode=True, + run_async=True, model=ExpenseRequest(), ) @@ -45981,6 +52627,9 @@ Returns an `Expense` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.expenses import ( + ExpensesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -45988,6 +52637,10 @@ client = Merge( ) client.accounting.expenses.retrieve( id="id", + expand=ExpensesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -46091,6 +52744,12 @@ client = Merge( ) client.accounting.expenses.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -46271,6 +52930,12 @@ client = Merge( ) client.accounting.expenses.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -46389,7 +53054,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.accounting.field_mapping.field_mappings_retrieve() +client.accounting.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, +) ```
@@ -46459,6 +53126,7 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -46748,7 +53416,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.accounting.field_mapping.remote_fields_retrieve() +client.accounting.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", +) ```
@@ -46881,14 +53552,44 @@ Returns a list of `GeneralLedgerTransaction` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.general_ledger_transactions import ( + GeneralLedgerTransactionsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.general_ledger_transactions.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=GeneralLedgerTransactionsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + posted_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + posted_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", ) ``` @@ -47057,6 +53758,9 @@ Returns a `GeneralLedgerTransaction` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.general_ledger_transactions import ( + GeneralLedgerTransactionsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -47064,6 +53768,9 @@ client = Merge( ) client.accounting.general_ledger_transactions.retrieve( id="id", + expand=GeneralLedgerTransactionsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -47224,6 +53931,8 @@ Returns a list of `IncomeStatement` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -47231,7 +53940,25 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.income_statements.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -47391,6 +54118,8 @@ client = Merge( ) client.accounting.income_statements.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -47479,14 +54208,51 @@ Returns a list of `Invoice` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.invoices import ( + InvoicesListRequestExpand, + InvoicesListRequestStatus, + InvoicesListRequestType, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.invoices.list( + company_id="company_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=InvoicesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + issue_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + issue_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + number="number", + page_size=1, + remote_id="remote_id", + status=InvoicesListRequestStatus.DRAFT, + type=InvoicesListRequestType.ACCOUNTS_PAYABLE, ) ``` @@ -47734,6 +54500,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.invoices.create( + is_debug_mode=True, + run_async=True, model=InvoiceRequest(), ) @@ -47815,6 +54583,9 @@ Returns an `Invoice` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.invoices import ( + InvoicesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -47822,6 +54593,10 @@ client = Merge( ) client.accounting.invoices.retrieve( id="id", + expand=InvoicesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -47942,6 +54717,8 @@ client = Merge( ) client.accounting.invoices.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=InvoiceRequest(), ) @@ -48038,6 +54815,12 @@ client = Merge( ) client.accounting.invoices.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -48289,6 +55072,12 @@ client = Merge( ) client.accounting.invoices.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -48401,14 +55190,38 @@ Gets all issues for Organization.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -48653,14 +55466,36 @@ Returns a list of `Item` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.items import ItemsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.items.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ItemsListRequestExpand.COMPANY, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -48836,6 +55671,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.items.create( + is_debug_mode=True, + run_async=True, model=ItemRequestRequest(), ) @@ -48917,6 +55754,9 @@ Returns an `Item` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.items import ( + ItemsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -48924,6 +55764,9 @@ client = Merge( ) client.accounting.items.retrieve( id="id", + expand=ItemsRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -49036,6 +55879,8 @@ client = Merge( ) client.accounting.items.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedItemRequestRequest(), ) @@ -49257,14 +56102,45 @@ Returns a list of `JournalEntry` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.journal_entries import ( + JournalEntriesListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.journal_entries.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JournalEntriesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -49448,6 +56324,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.journal_entries.create( + is_debug_mode=True, + run_async=True, model=JournalEntryRequest(), ) @@ -49529,6 +56407,9 @@ Returns a `JournalEntry` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.journal_entries import ( + JournalEntriesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -49536,6 +56417,10 @@ client = Merge( ) client.accounting.journal_entries.retrieve( id="id", + expand=JournalEntriesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -49639,6 +56524,12 @@ client = Merge( ) client.accounting.journal_entries.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -49819,6 +56710,12 @@ client = Merge( ) client.accounting.journal_entries.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -50116,13 +57013,28 @@ List linked accounts for your organization. ```python from merge import Merge +from merge.resources.accounting.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -50377,6 +57289,10 @@ client = Merge( ) client.accounting.payment_methods.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -50480,6 +57396,8 @@ client = Merge( ) client.accounting.payment_methods.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -50568,6 +57486,10 @@ client = Merge( ) client.accounting.payment_terms.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -50679,6 +57601,8 @@ client = Merge( ) client.accounting.payment_terms.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -50767,14 +57691,47 @@ Returns a list of `Payment` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.payments import ( + PaymentsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.payments.list( + account_id="account_id", + company_id="company_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=PaymentsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -50974,6 +57931,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.payments.create( + is_debug_mode=True, + run_async=True, model=PaymentRequest(), ) @@ -51055,6 +58014,9 @@ Returns a `Payment` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.payments import ( + PaymentsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51062,6 +58024,10 @@ client = Merge( ) client.accounting.payments.retrieve( id="id", + expand=PaymentsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -51166,6 +58132,8 @@ client = Merge( ) client.accounting.payments.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedPaymentRequest(), ) @@ -51262,6 +58230,12 @@ client = Merge( ) client.accounting.payments.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -51513,6 +58487,12 @@ client = Merge( ) client.accounting.payments.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -51633,6 +58613,8 @@ client = Merge( ) client.accounting.phone_numbers.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -51713,14 +58695,38 @@ Returns a list of `Project` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.projects import ( + ProjectsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.projects.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ProjectsListRequestExpand.COMPANY, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -51873,6 +58879,9 @@ Returns a `Project` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.projects import ( + ProjectsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51880,6 +58889,9 @@ client = Merge( ) client.accounting.projects.retrieve( id="id", + expand=ProjectsRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -51968,14 +58980,45 @@ Returns a list of `PurchaseOrder` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.purchase_orders import ( + PurchaseOrdersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.purchase_orders.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=PurchaseOrdersListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + issue_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + issue_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -52175,6 +59218,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.purchase_orders.create( + is_debug_mode=True, + run_async=True, model=PurchaseOrderRequest(), ) @@ -52256,6 +59301,9 @@ Returns a `PurchaseOrder` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.purchase_orders import ( + PurchaseOrdersRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -52263,6 +59311,10 @@ client = Merge( ) client.accounting.purchase_orders.retrieve( id="id", + expand=PurchaseOrdersRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -52382,6 +59434,12 @@ client = Merge( ) client.accounting.purchase_orders.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -52562,6 +59620,12 @@ client = Merge( ) client.accounting.purchase_orders.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -52754,6 +59818,7 @@ client = Merge( ) client.accounting.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) ``` @@ -52888,6 +59953,8 @@ Returns a list of `TaxRate` objects.
```python +import datetime + from merge import Merge client = Merge( @@ -52895,7 +59962,26 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.tax_rates.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", ) ``` @@ -53063,6 +60149,8 @@ client = Merge( ) client.accounting.tax_rates.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -53151,14 +60239,41 @@ Returns a list of `TrackingCategory` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.tracking_categories import ( + TrackingCategoriesListRequestCategoryType, + TrackingCategoriesListRequestStatus, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.tracking_categories.list( + category_type=TrackingCategoriesListRequestCategoryType.EMPTY, + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", + status=TrackingCategoriesListRequestStatus.EMPTY, ) ``` @@ -53175,7 +60290,7 @@ client.accounting.tracking_categories.list(
-**category_type:** `typing.Optional[str]` — If provided, will only return tracking categories with this type. +**category_type:** `typing.Optional[TrackingCategoriesListRequestCategoryType]` — If provided, will only return tracking categories with this type.
@@ -53303,7 +60418,7 @@ client.accounting.tracking_categories.list(
-**status:** `typing.Optional[str]` — If provided, will only return tracking categories with this status. +**status:** `typing.Optional[TrackingCategoriesListRequestStatus]` — If provided, will only return tracking categories with this status.
@@ -53358,6 +60473,8 @@ client = Merge( ) client.accounting.tracking_categories.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -53462,14 +60579,44 @@ Returns a list of `Transaction` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.transactions import ( + TransactionsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.transactions.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TransactionsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -53638,6 +60785,9 @@ Returns a `Transaction` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.transactions import ( + TransactionsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -53645,6 +60795,9 @@ client = Merge( ) client.accounting.transactions.retrieve( id="id", + expand=TransactionsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -53733,14 +60886,44 @@ Returns a list of `VendorCredit` objects.
```python +import datetime + from merge import Merge +from merge.resources.accounting.resources.vendor_credits import ( + VendorCreditsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.vendor_credits.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=VendorCreditsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -53916,6 +61099,8 @@ client = Merge( api_key="YOUR_API_KEY", ) client.accounting.vendor_credits.create( + is_debug_mode=True, + run_async=True, model=VendorCreditRequest(), ) @@ -53997,6 +61182,9 @@ Returns a `VendorCredit` object with the given `id`. ```python from merge import Merge +from merge.resources.accounting.resources.vendor_credits import ( + VendorCreditsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -54004,6 +61192,9 @@ client = Merge( ) client.accounting.vendor_credits.retrieve( id="id", + expand=VendorCreditsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, ) ``` diff --git a/src/merge/__init__.py b/src/merge/__init__.py index f9da1787..91011bdf 100644 --- a/src/merge/__init__.py +++ b/src/merge/__init__.py @@ -6,7 +6,7 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .resources import accounting, ats, crm, filestorage, hris, knowledgebase, ticketing + from .resources import accounting, ats, chat, crm, filestorage, hris, knowledgebase, ticketing from .client import AsyncMerge, Merge from .environment import MergeEnvironment from .version import __version__ @@ -17,6 +17,7 @@ "__version__": ".version", "accounting": ".resources", "ats": ".resources", + "chat": ".resources", "crm": ".resources", "filestorage": ".resources", "hris": ".resources", @@ -51,6 +52,7 @@ def __dir__(): "__version__", "accounting", "ats", + "chat", "crm", "filestorage", "hris", diff --git a/src/merge/client.py b/src/merge/client.py index 09650c56..4350fe25 100644 --- a/src/merge/client.py +++ b/src/merge/client.py @@ -11,6 +11,7 @@ if typing.TYPE_CHECKING: from .resources.accounting.client import AccountingClient, AsyncAccountingClient from .resources.ats.client import AsyncAtsClient, AtsClient + from .resources.chat.client import AsyncChatClient, ChatClient from .resources.crm.client import AsyncCrmClient, CrmClient from .resources.filestorage.client import AsyncFilestorageClient, FilestorageClient from .resources.hris.client import AsyncHrisClient, HrisClient @@ -88,10 +89,11 @@ def __init__( timeout=_defaulted_timeout, ) self._ats: typing.Optional[AtsClient] = None - self._filestorage: typing.Optional[FilestorageClient] = None + self._chat: typing.Optional[ChatClient] = None self._crm: typing.Optional[CrmClient] = None - self._knowledgebase: typing.Optional[KnowledgebaseClient] = None + self._filestorage: typing.Optional[FilestorageClient] = None self._hris: typing.Optional[HrisClient] = None + self._knowledgebase: typing.Optional[KnowledgebaseClient] = None self._ticketing: typing.Optional[TicketingClient] = None self._accounting: typing.Optional[AccountingClient] = None @@ -104,12 +106,12 @@ def ats(self): return self._ats @property - def filestorage(self): - if self._filestorage is None: - from .resources.filestorage.client import FilestorageClient # noqa: E402 + def chat(self): + if self._chat is None: + from .resources.chat.client import ChatClient # noqa: E402 - self._filestorage = FilestorageClient(client_wrapper=self._client_wrapper) - return self._filestorage + self._chat = ChatClient(client_wrapper=self._client_wrapper) + return self._chat @property def crm(self): @@ -120,12 +122,12 @@ def crm(self): return self._crm @property - def knowledgebase(self): - if self._knowledgebase is None: - from .resources.knowledgebase.client import KnowledgebaseClient # noqa: E402 + def filestorage(self): + if self._filestorage is None: + from .resources.filestorage.client import FilestorageClient # noqa: E402 - self._knowledgebase = KnowledgebaseClient(client_wrapper=self._client_wrapper) - return self._knowledgebase + self._filestorage = FilestorageClient(client_wrapper=self._client_wrapper) + return self._filestorage @property def hris(self): @@ -135,6 +137,14 @@ def hris(self): self._hris = HrisClient(client_wrapper=self._client_wrapper) return self._hris + @property + def knowledgebase(self): + if self._knowledgebase is None: + from .resources.knowledgebase.client import KnowledgebaseClient # noqa: E402 + + self._knowledgebase = KnowledgebaseClient(client_wrapper=self._client_wrapper) + return self._knowledgebase + @property def ticketing(self): if self._ticketing is None: @@ -222,10 +232,11 @@ def __init__( timeout=_defaulted_timeout, ) self._ats: typing.Optional[AsyncAtsClient] = None - self._filestorage: typing.Optional[AsyncFilestorageClient] = None + self._chat: typing.Optional[AsyncChatClient] = None self._crm: typing.Optional[AsyncCrmClient] = None - self._knowledgebase: typing.Optional[AsyncKnowledgebaseClient] = None + self._filestorage: typing.Optional[AsyncFilestorageClient] = None self._hris: typing.Optional[AsyncHrisClient] = None + self._knowledgebase: typing.Optional[AsyncKnowledgebaseClient] = None self._ticketing: typing.Optional[AsyncTicketingClient] = None self._accounting: typing.Optional[AsyncAccountingClient] = None @@ -238,12 +249,12 @@ def ats(self): return self._ats @property - def filestorage(self): - if self._filestorage is None: - from .resources.filestorage.client import AsyncFilestorageClient # noqa: E402 + def chat(self): + if self._chat is None: + from .resources.chat.client import AsyncChatClient # noqa: E402 - self._filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper) - return self._filestorage + self._chat = AsyncChatClient(client_wrapper=self._client_wrapper) + return self._chat @property def crm(self): @@ -254,12 +265,12 @@ def crm(self): return self._crm @property - def knowledgebase(self): - if self._knowledgebase is None: - from .resources.knowledgebase.client import AsyncKnowledgebaseClient # noqa: E402 + def filestorage(self): + if self._filestorage is None: + from .resources.filestorage.client import AsyncFilestorageClient # noqa: E402 - self._knowledgebase = AsyncKnowledgebaseClient(client_wrapper=self._client_wrapper) - return self._knowledgebase + self._filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper) + return self._filestorage @property def hris(self): @@ -269,6 +280,14 @@ def hris(self): self._hris = AsyncHrisClient(client_wrapper=self._client_wrapper) return self._hris + @property + def knowledgebase(self): + if self._knowledgebase is None: + from .resources.knowledgebase.client import AsyncKnowledgebaseClient # noqa: E402 + + self._knowledgebase = AsyncKnowledgebaseClient(client_wrapper=self._client_wrapper) + return self._knowledgebase + @property def ticketing(self): if self._ticketing is None: diff --git a/src/merge/core/client_wrapper.py b/src/merge/core/client_wrapper.py index 0bec11f2..8a7cd5e7 100644 --- a/src/merge/core/client_wrapper.py +++ b/src/merge/core/client_wrapper.py @@ -24,10 +24,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "MergePythonClient/2.4.0", + "User-Agent": "MergePythonClient/2.5.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "MergePythonClient", - "X-Fern-SDK-Version": "2.4.0", + "X-Fern-SDK-Version": "2.5.0", **(self.get_custom_headers() or {}), } if self._account_token is not None: diff --git a/src/merge/resources/__init__.py b/src/merge/resources/__init__.py index 19bb76ff..7fdb8ad9 100644 --- a/src/merge/resources/__init__.py +++ b/src/merge/resources/__init__.py @@ -6,10 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: - from . import accounting, ats, crm, filestorage, hris, knowledgebase, ticketing + from . import accounting, ats, chat, crm, filestorage, hris, knowledgebase, ticketing _dynamic_imports: typing.Dict[str, str] = { "accounting": ".", "ats": ".", + "chat": ".", "crm": ".", "filestorage": ".", "hris": ".", @@ -37,4 +38,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["accounting", "ats", "crm", "filestorage", "hris", "knowledgebase", "ticketing"] +__all__ = ["accounting", "ats", "chat", "crm", "filestorage", "hris", "knowledgebase", "ticketing"] diff --git a/src/merge/resources/accounting/__init__.py b/src/merge/resources/accounting/__init__.py index f96f0dcc..119d224a 100644 --- a/src/merge/resources/accounting/__init__.py +++ b/src/merge/resources/accounting/__init__.py @@ -524,14 +524,17 @@ WebhookReceiver, ) from .resources import ( + AccountsListRequestClassification, AccountsListRequestRemoteFields, AccountsListRequestShowEnumOrigins, + AccountsListRequestStatus, AccountsRetrieveRequestRemoteFields, AccountsRetrieveRequestShowEnumOrigins, AsyncPassthroughRetrieveResponse, CompanyInfoListRequestExpand, CompanyInfoRetrieveRequestExpand, ContactsListRequestExpand, + ContactsListRequestStatus, ContactsRetrieveRequestExpand, CreditNotesListRequestExpand, CreditNotesListRequestRemoteFields, @@ -563,6 +566,8 @@ ProjectsRetrieveRequestExpand, PurchaseOrdersListRequestExpand, PurchaseOrdersRetrieveRequestExpand, + TrackingCategoriesListRequestCategoryType, + TrackingCategoriesListRequestStatus, TransactionsListRequestExpand, TransactionsRetrieveRequestExpand, VendorCreditsListRequestExpand, @@ -645,8 +650,10 @@ "AccountingPeriodStatus": ".types", "AccountingPhoneNumber": ".types", "AccountingPhoneNumberRequest": ".types", + "AccountsListRequestClassification": ".resources", "AccountsListRequestRemoteFields": ".resources", "AccountsListRequestShowEnumOrigins": ".resources", + "AccountsListRequestStatus": ".resources", "AccountsRetrieveRequestRemoteFields": ".resources", "AccountsRetrieveRequestShowEnumOrigins": ".resources", "Address": ".types", @@ -709,6 +716,7 @@ "ContactResponse": ".types", "ContactStatus": ".types", "ContactsListRequestExpand": ".resources", + "ContactsListRequestStatus": ".resources", "ContactsRetrieveRequestExpand": ".resources", "CountryEnum": ".types", "CreditNote": ".types", @@ -1124,6 +1132,8 @@ "TaxRateCompany": ".types", "TaxRateStatus": ".types", "TaxRateTaxComponentsItem": ".types", + "TrackingCategoriesListRequestCategoryType": ".resources", + "TrackingCategoriesListRequestStatus": ".resources", "TrackingCategory": ".types", "TrackingCategoryCategoryType": ".types", "TrackingCategoryCompany": ".types", @@ -1273,8 +1283,10 @@ def __dir__(): "AccountingPeriodStatus", "AccountingPhoneNumber", "AccountingPhoneNumberRequest", + "AccountsListRequestClassification", "AccountsListRequestRemoteFields", "AccountsListRequestShowEnumOrigins", + "AccountsListRequestStatus", "AccountsRetrieveRequestRemoteFields", "AccountsRetrieveRequestShowEnumOrigins", "Address", @@ -1337,6 +1349,7 @@ def __dir__(): "ContactResponse", "ContactStatus", "ContactsListRequestExpand", + "ContactsListRequestStatus", "ContactsRetrieveRequestExpand", "CountryEnum", "CreditNote", @@ -1752,6 +1765,8 @@ def __dir__(): "TaxRateCompany", "TaxRateStatus", "TaxRateTaxComponentsItem", + "TrackingCategoriesListRequestCategoryType", + "TrackingCategoriesListRequestStatus", "TrackingCategory", "TrackingCategoryCategoryType", "TrackingCategoryCompany", diff --git a/src/merge/resources/accounting/resources/__init__.py b/src/merge/resources/accounting/resources/__init__.py index aa50101e..46b82e29 100644 --- a/src/merge/resources/accounting/resources/__init__.py +++ b/src/merge/resources/accounting/resources/__init__.py @@ -56,14 +56,16 @@ webhook_receivers, ) from .accounts import ( + AccountsListRequestClassification, AccountsListRequestRemoteFields, AccountsListRequestShowEnumOrigins, + AccountsListRequestStatus, AccountsRetrieveRequestRemoteFields, AccountsRetrieveRequestShowEnumOrigins, ) from .async_passthrough import AsyncPassthroughRetrieveResponse from .company_info import CompanyInfoListRequestExpand, CompanyInfoRetrieveRequestExpand - from .contacts import ContactsListRequestExpand, ContactsRetrieveRequestExpand + from .contacts import ContactsListRequestExpand, ContactsListRequestStatus, ContactsRetrieveRequestExpand from .credit_notes import ( CreditNotesListRequestExpand, CreditNotesListRequestRemoteFields, @@ -96,17 +98,21 @@ from .payments import PaymentsListRequestExpand, PaymentsRetrieveRequestExpand from .projects import ProjectsListRequestExpand, ProjectsRetrieveRequestExpand from .purchase_orders import PurchaseOrdersListRequestExpand, PurchaseOrdersRetrieveRequestExpand + from .tracking_categories import TrackingCategoriesListRequestCategoryType, TrackingCategoriesListRequestStatus from .transactions import TransactionsListRequestExpand, TransactionsRetrieveRequestExpand from .vendor_credits import VendorCreditsListRequestExpand, VendorCreditsRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { + "AccountsListRequestClassification": ".accounts", "AccountsListRequestRemoteFields": ".accounts", "AccountsListRequestShowEnumOrigins": ".accounts", + "AccountsListRequestStatus": ".accounts", "AccountsRetrieveRequestRemoteFields": ".accounts", "AccountsRetrieveRequestShowEnumOrigins": ".accounts", "AsyncPassthroughRetrieveResponse": ".async_passthrough", "CompanyInfoListRequestExpand": ".company_info", "CompanyInfoRetrieveRequestExpand": ".company_info", "ContactsListRequestExpand": ".contacts", + "ContactsListRequestStatus": ".contacts", "ContactsRetrieveRequestExpand": ".contacts", "CreditNotesListRequestExpand": ".credit_notes", "CreditNotesListRequestRemoteFields": ".credit_notes", @@ -138,6 +144,8 @@ "ProjectsRetrieveRequestExpand": ".projects", "PurchaseOrdersListRequestExpand": ".purchase_orders", "PurchaseOrdersRetrieveRequestExpand": ".purchase_orders", + "TrackingCategoriesListRequestCategoryType": ".tracking_categories", + "TrackingCategoriesListRequestStatus": ".tracking_categories", "TransactionsListRequestExpand": ".transactions", "TransactionsRetrieveRequestExpand": ".transactions", "VendorCreditsListRequestExpand": ".vendor_credits", @@ -212,14 +220,17 @@ def __dir__(): __all__ = [ + "AccountsListRequestClassification", "AccountsListRequestRemoteFields", "AccountsListRequestShowEnumOrigins", + "AccountsListRequestStatus", "AccountsRetrieveRequestRemoteFields", "AccountsRetrieveRequestShowEnumOrigins", "AsyncPassthroughRetrieveResponse", "CompanyInfoListRequestExpand", "CompanyInfoRetrieveRequestExpand", "ContactsListRequestExpand", + "ContactsListRequestStatus", "ContactsRetrieveRequestExpand", "CreditNotesListRequestExpand", "CreditNotesListRequestRemoteFields", @@ -251,6 +262,8 @@ def __dir__(): "ProjectsRetrieveRequestExpand", "PurchaseOrdersListRequestExpand", "PurchaseOrdersRetrieveRequestExpand", + "TrackingCategoriesListRequestCategoryType", + "TrackingCategoriesListRequestStatus", "TransactionsListRequestExpand", "TransactionsRetrieveRequestExpand", "VendorCreditsListRequestExpand", diff --git a/src/merge/resources/accounting/resources/accounting_periods/client.py b/src/merge/resources/accounting/resources/accounting_periods/client.py index ea3dd2a4..6bf4adb9 100644 --- a/src/merge/resources/accounting/resources/accounting_periods/client.py +++ b/src/merge/resources/accounting/resources/accounting_periods/client.py @@ -72,6 +72,10 @@ def list( ) client.accounting.accounting_periods.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.list( @@ -123,6 +127,8 @@ def retrieve( ) client.accounting.accounting_periods.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -202,6 +208,10 @@ async def list( async def main() -> None: await client.accounting.accounting_periods.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) @@ -261,6 +271,8 @@ async def retrieve( async def main() -> None: await client.accounting.accounting_periods.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/accounts/__init__.py b/src/merge/resources/accounting/resources/accounts/__init__.py index 467be479..bee926eb 100644 --- a/src/merge/resources/accounting/resources/accounts/__init__.py +++ b/src/merge/resources/accounting/resources/accounts/__init__.py @@ -7,14 +7,18 @@ if typing.TYPE_CHECKING: from .types import ( + AccountsListRequestClassification, AccountsListRequestRemoteFields, AccountsListRequestShowEnumOrigins, + AccountsListRequestStatus, AccountsRetrieveRequestRemoteFields, AccountsRetrieveRequestShowEnumOrigins, ) _dynamic_imports: typing.Dict[str, str] = { + "AccountsListRequestClassification": ".types", "AccountsListRequestRemoteFields": ".types", "AccountsListRequestShowEnumOrigins": ".types", + "AccountsListRequestStatus": ".types", "AccountsRetrieveRequestRemoteFields": ".types", "AccountsRetrieveRequestShowEnumOrigins": ".types", } @@ -40,8 +44,10 @@ def __dir__(): __all__ = [ + "AccountsListRequestClassification", "AccountsListRequestRemoteFields", "AccountsListRequestShowEnumOrigins", + "AccountsListRequestStatus", "AccountsRetrieveRequestRemoteFields", "AccountsRetrieveRequestShowEnumOrigins", ] diff --git a/src/merge/resources/accounting/resources/accounts/client.py b/src/merge/resources/accounting/resources/accounts/client.py index 2cd1cb34..e0354f59 100644 --- a/src/merge/resources/accounting/resources/accounts/client.py +++ b/src/merge/resources/accounting/resources/accounts/client.py @@ -11,8 +11,10 @@ from ...types.meta_response import MetaResponse from ...types.paginated_account_list import PaginatedAccountList from .raw_client import AsyncRawAccountsClient, RawAccountsClient +from .types.accounts_list_request_classification import AccountsListRequestClassification from .types.accounts_list_request_remote_fields import AccountsListRequestRemoteFields from .types.accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins +from .types.accounts_list_request_status import AccountsListRequestStatus from .types.accounts_retrieve_request_remote_fields import AccountsRetrieveRequestRemoteFields from .types.accounts_retrieve_request_show_enum_origins import AccountsRetrieveRequestShowEnumOrigins @@ -39,7 +41,7 @@ def list( self, *, account_type: typing.Optional[str] = None, - classification: typing.Optional[str] = None, + classification: typing.Optional[AccountsListRequestClassification] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -55,7 +57,7 @@ def list( remote_fields: typing.Optional[AccountsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[AccountsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedAccountList: """ @@ -66,7 +68,7 @@ def list( account_type : typing.Optional[str] If provided, will only return accounts with the passed in enum. - classification : typing.Optional[str] + classification : typing.Optional[AccountsListRequestClassification] If provided, will only return accounts with this classification. company_id : typing.Optional[str] @@ -114,7 +116,7 @@ def list( show_enum_origins : typing.Optional[AccountsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[AccountsListRequestStatus] If provided, will only return accounts with this status. request_options : typing.Optional[RequestOptions] @@ -127,14 +129,46 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.accounts import ( + AccountsListRequestClassification, + AccountsListRequestRemoteFields, + AccountsListRequestShowEnumOrigins, + AccountsListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.accounts.list( + account_type="account_type", + classification=AccountsListRequestClassification.EMPTY, + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION, + remote_id="remote_id", + show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION, + status=AccountsListRequestStatus.EMPTY, ) """ _response = self._raw_client.list( @@ -199,6 +233,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.accounts.create( + is_debug_mode=True, + run_async=True, model=AccountRequest(), ) """ @@ -251,6 +287,10 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.accounts import ( + AccountsRetrieveRequestRemoteFields, + AccountsRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -258,6 +298,10 @@ def retrieve( ) client.accounting.accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION, + show_enum_origins=AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION, ) """ _response = self._raw_client.retrieve( @@ -318,7 +362,7 @@ async def list( self, *, account_type: typing.Optional[str] = None, - classification: typing.Optional[str] = None, + classification: typing.Optional[AccountsListRequestClassification] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -334,7 +378,7 @@ async def list( remote_fields: typing.Optional[AccountsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[AccountsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedAccountList: """ @@ -345,7 +389,7 @@ async def list( account_type : typing.Optional[str] If provided, will only return accounts with the passed in enum. - classification : typing.Optional[str] + classification : typing.Optional[AccountsListRequestClassification] If provided, will only return accounts with this classification. company_id : typing.Optional[str] @@ -393,7 +437,7 @@ async def list( show_enum_origins : typing.Optional[AccountsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[AccountsListRequestStatus] If provided, will only return accounts with this status. request_options : typing.Optional[RequestOptions] @@ -407,8 +451,15 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.accounts import ( + AccountsListRequestClassification, + AccountsListRequestRemoteFields, + AccountsListRequestShowEnumOrigins, + AccountsListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -418,7 +469,31 @@ async def list( async def main() -> None: await client.accounting.accounts.list( + account_type="account_type", + classification=AccountsListRequestClassification.EMPTY, + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION, + remote_id="remote_id", + show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION, + status=AccountsListRequestStatus.EMPTY, ) @@ -491,6 +566,8 @@ async def create( async def main() -> None: await client.accounting.accounts.create( + is_debug_mode=True, + run_async=True, model=AccountRequest(), ) @@ -548,6 +625,10 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.accounts import ( + AccountsRetrieveRequestRemoteFields, + AccountsRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -558,6 +639,10 @@ async def retrieve( async def main() -> None: await client.accounting.accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION, + show_enum_origins=AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION, ) diff --git a/src/merge/resources/accounting/resources/accounts/raw_client.py b/src/merge/resources/accounting/resources/accounts/raw_client.py index f8389c62..a2b127ea 100644 --- a/src/merge/resources/accounting/resources/accounts/raw_client.py +++ b/src/merge/resources/accounting/resources/accounts/raw_client.py @@ -16,8 +16,10 @@ from ...types.account_response import AccountResponse from ...types.meta_response import MetaResponse from ...types.paginated_account_list import PaginatedAccountList +from .types.accounts_list_request_classification import AccountsListRequestClassification from .types.accounts_list_request_remote_fields import AccountsListRequestRemoteFields from .types.accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins +from .types.accounts_list_request_status import AccountsListRequestStatus from .types.accounts_retrieve_request_remote_fields import AccountsRetrieveRequestRemoteFields from .types.accounts_retrieve_request_show_enum_origins import AccountsRetrieveRequestShowEnumOrigins @@ -33,7 +35,7 @@ def list( self, *, account_type: typing.Optional[str] = None, - classification: typing.Optional[str] = None, + classification: typing.Optional[AccountsListRequestClassification] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -49,7 +51,7 @@ def list( remote_fields: typing.Optional[AccountsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[AccountsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedAccountList]: """ @@ -60,7 +62,7 @@ def list( account_type : typing.Optional[str] If provided, will only return accounts with the passed in enum. - classification : typing.Optional[str] + classification : typing.Optional[AccountsListRequestClassification] If provided, will only return accounts with this classification. company_id : typing.Optional[str] @@ -108,7 +110,7 @@ def list( show_enum_origins : typing.Optional[AccountsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[AccountsListRequestStatus] If provided, will only return accounts with this status. request_options : typing.Optional[RequestOptions] @@ -332,7 +334,7 @@ async def list( self, *, account_type: typing.Optional[str] = None, - classification: typing.Optional[str] = None, + classification: typing.Optional[AccountsListRequestClassification] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -348,7 +350,7 @@ async def list( remote_fields: typing.Optional[AccountsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[AccountsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedAccountList]: """ @@ -359,7 +361,7 @@ async def list( account_type : typing.Optional[str] If provided, will only return accounts with the passed in enum. - classification : typing.Optional[str] + classification : typing.Optional[AccountsListRequestClassification] If provided, will only return accounts with this classification. company_id : typing.Optional[str] @@ -407,7 +409,7 @@ async def list( show_enum_origins : typing.Optional[AccountsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[AccountsListRequestStatus] If provided, will only return accounts with this status. request_options : typing.Optional[RequestOptions] diff --git a/src/merge/resources/accounting/resources/accounts/types/__init__.py b/src/merge/resources/accounting/resources/accounts/types/__init__.py index 262ecaa9..61dd5434 100644 --- a/src/merge/resources/accounting/resources/accounts/types/__init__.py +++ b/src/merge/resources/accounting/resources/accounts/types/__init__.py @@ -6,13 +6,17 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .accounts_list_request_classification import AccountsListRequestClassification from .accounts_list_request_remote_fields import AccountsListRequestRemoteFields from .accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins + from .accounts_list_request_status import AccountsListRequestStatus from .accounts_retrieve_request_remote_fields import AccountsRetrieveRequestRemoteFields from .accounts_retrieve_request_show_enum_origins import AccountsRetrieveRequestShowEnumOrigins _dynamic_imports: typing.Dict[str, str] = { + "AccountsListRequestClassification": ".accounts_list_request_classification", "AccountsListRequestRemoteFields": ".accounts_list_request_remote_fields", "AccountsListRequestShowEnumOrigins": ".accounts_list_request_show_enum_origins", + "AccountsListRequestStatus": ".accounts_list_request_status", "AccountsRetrieveRequestRemoteFields": ".accounts_retrieve_request_remote_fields", "AccountsRetrieveRequestShowEnumOrigins": ".accounts_retrieve_request_show_enum_origins", } @@ -38,8 +42,10 @@ def __dir__(): __all__ = [ + "AccountsListRequestClassification", "AccountsListRequestRemoteFields", "AccountsListRequestShowEnumOrigins", + "AccountsListRequestStatus", "AccountsRetrieveRequestRemoteFields", "AccountsRetrieveRequestShowEnumOrigins", ] diff --git a/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_classification.py b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_classification.py new file mode 100644 index 00000000..dd3eac4b --- /dev/null +++ b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_classification.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class AccountsListRequestClassification(str, enum.Enum): + EMPTY = "" + ASSET = "ASSET" + EQUITY = "EQUITY" + EXPENSE = "EXPENSE" + LIABILITY = "LIABILITY" + REVENUE = "REVENUE" + + def visit( + self, + empty: typing.Callable[[], T_Result], + asset: typing.Callable[[], T_Result], + equity: typing.Callable[[], T_Result], + expense: typing.Callable[[], T_Result], + liability: typing.Callable[[], T_Result], + revenue: typing.Callable[[], T_Result], + ) -> T_Result: + if self is AccountsListRequestClassification.EMPTY: + return empty() + if self is AccountsListRequestClassification.ASSET: + return asset() + if self is AccountsListRequestClassification.EQUITY: + return equity() + if self is AccountsListRequestClassification.EXPENSE: + return expense() + if self is AccountsListRequestClassification.LIABILITY: + return liability() + if self is AccountsListRequestClassification.REVENUE: + return revenue() diff --git a/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_status.py b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_status.py new file mode 100644 index 00000000..ddaed77c --- /dev/null +++ b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_status.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class AccountsListRequestStatus(str, enum.Enum): + EMPTY = "" + ACTIVE = "ACTIVE" + INACTIVE = "INACTIVE" + PENDING = "PENDING" + + def visit( + self, + empty: typing.Callable[[], T_Result], + active: typing.Callable[[], T_Result], + inactive: typing.Callable[[], T_Result], + pending: typing.Callable[[], T_Result], + ) -> T_Result: + if self is AccountsListRequestStatus.EMPTY: + return empty() + if self is AccountsListRequestStatus.ACTIVE: + return active() + if self is AccountsListRequestStatus.INACTIVE: + return inactive() + if self is AccountsListRequestStatus.PENDING: + return pending() diff --git a/src/merge/resources/accounting/resources/addresses/client.py b/src/merge/resources/accounting/resources/addresses/client.py index 2add6ff1..aa72613d 100644 --- a/src/merge/resources/accounting/resources/addresses/client.py +++ b/src/merge/resources/accounting/resources/addresses/client.py @@ -70,6 +70,8 @@ def retrieve( ) client.accounting.addresses.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -150,6 +152,8 @@ async def retrieve( async def main() -> None: await client.accounting.addresses.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/attachments/client.py b/src/merge/resources/accounting/resources/attachments/client.py index ca9a16a7..15c46c56 100644 --- a/src/merge/resources/accounting/resources/attachments/client.py +++ b/src/merge/resources/accounting/resources/attachments/client.py @@ -95,6 +95,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -102,7 +104,25 @@ def list( api_key="YOUR_API_KEY", ) client.accounting.attachments.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -160,6 +180,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.attachments.create( + is_debug_mode=True, + run_async=True, model=AccountingAttachmentRequest(), ) """ @@ -207,6 +229,8 @@ def retrieve( ) client.accounting.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -325,6 +349,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -336,7 +361,25 @@ async def list( async def main() -> None: await client.accounting.attachments.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -402,6 +445,8 @@ async def create( async def main() -> None: await client.accounting.attachments.create( + is_debug_mode=True, + run_async=True, model=AccountingAttachmentRequest(), ) @@ -457,6 +502,8 @@ async def retrieve( async def main() -> None: await client.accounting.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/audit_trail/client.py b/src/merge/resources/accounting/resources/audit_trail/client.py index be175372..71f803da 100644 --- a/src/merge/resources/accounting/resources/audit_trail/client.py +++ b/src/merge/resources/accounting/resources/audit_trail/client.py @@ -75,6 +75,11 @@ def list( ) client.accounting.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) """ _response = self._raw_client.list( @@ -161,6 +166,11 @@ async def list( async def main() -> None: await client.accounting.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) diff --git a/src/merge/resources/accounting/resources/balance_sheets/client.py b/src/merge/resources/accounting/resources/balance_sheets/client.py index 9f18736a..61fbf4a3 100644 --- a/src/merge/resources/accounting/resources/balance_sheets/client.py +++ b/src/merge/resources/accounting/resources/balance_sheets/client.py @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,25 @@ def list( api_key="YOUR_API_KEY", ) client.accounting.balance_sheets.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +183,8 @@ def retrieve( ) client.accounting.balance_sheets.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -259,6 +281,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +293,25 @@ async def list( async def main() -> None: await client.accounting.balance_sheets.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -341,6 +382,8 @@ async def retrieve( async def main() -> None: await client.accounting.balance_sheets.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/bank_feed_accounts/client.py b/src/merge/resources/accounting/resources/bank_feed_accounts/client.py index 0063c805..5fa70be3 100644 --- a/src/merge/resources/accounting/resources/bank_feed_accounts/client.py +++ b/src/merge/resources/accounting/resources/bank_feed_accounts/client.py @@ -78,6 +78,10 @@ def list( ) client.accounting.bank_feed_accounts.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.list( @@ -129,6 +133,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.bank_feed_accounts.create( + is_debug_mode=True, + run_async=True, model=BankFeedAccountRequest(), ) """ @@ -176,6 +182,8 @@ def retrieve( ) client.accounting.bank_feed_accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -282,6 +290,10 @@ async def list( async def main() -> None: await client.accounting.bank_feed_accounts.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) @@ -341,6 +353,8 @@ async def create( async def main() -> None: await client.accounting.bank_feed_accounts.create( + is_debug_mode=True, + run_async=True, model=BankFeedAccountRequest(), ) @@ -396,6 +410,8 @@ async def retrieve( async def main() -> None: await client.accounting.bank_feed_accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/bank_feed_transactions/client.py b/src/merge/resources/accounting/resources/bank_feed_transactions/client.py index 5def8262..479ad363 100644 --- a/src/merge/resources/accounting/resources/bank_feed_transactions/client.py +++ b/src/merge/resources/accounting/resources/bank_feed_transactions/client.py @@ -99,6 +99,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -106,7 +108,25 @@ def list( api_key="YOUR_API_KEY", ) client.accounting.bank_feed_transactions.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_processed=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -165,6 +185,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.bank_feed_transactions.create( + is_debug_mode=True, + run_async=True, model=BankFeedTransactionRequestRequest(), ) """ @@ -216,6 +238,8 @@ def retrieve( ) client.accounting.bank_feed_transactions.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -339,6 +363,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -350,7 +375,25 @@ async def list( async def main() -> None: await client.accounting.bank_feed_transactions.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_processed=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -417,6 +460,8 @@ async def create( async def main() -> None: await client.accounting.bank_feed_transactions.create( + is_debug_mode=True, + run_async=True, model=BankFeedTransactionRequestRequest(), ) @@ -476,6 +521,8 @@ async def retrieve( async def main() -> None: await client.accounting.bank_feed_transactions.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/cash_flow_statements/client.py b/src/merge/resources/accounting/resources/cash_flow_statements/client.py index 632235a4..c9d0f6d1 100644 --- a/src/merge/resources/accounting/resources/cash_flow_statements/client.py +++ b/src/merge/resources/accounting/resources/cash_flow_statements/client.py @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,25 @@ def list( api_key="YOUR_API_KEY", ) client.accounting.cash_flow_statements.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +183,8 @@ def retrieve( ) client.accounting.cash_flow_statements.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -259,6 +281,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +293,25 @@ async def list( async def main() -> None: await client.accounting.cash_flow_statements.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -341,6 +382,8 @@ async def retrieve( async def main() -> None: await client.accounting.cash_flow_statements.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/company_info/client.py b/src/merge/resources/accounting/resources/company_info/client.py index a4a4fbc6..bdf7dc90 100644 --- a/src/merge/resources/accounting/resources/company_info/client.py +++ b/src/merge/resources/accounting/resources/company_info/client.py @@ -91,14 +91,37 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.company_info import ( + CompanyInfoListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.company_info.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CompanyInfoListRequestExpand.ADDRESSES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -153,6 +176,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.company_info import ( + CompanyInfoRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -160,6 +186,9 @@ def retrieve( ) client.accounting.company_info.retrieve( id="id", + expand=CompanyInfoRetrieveRequestExpand.ADDRESSES, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -252,8 +281,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.company_info import ( + CompanyInfoListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -263,7 +296,25 @@ async def list( async def main() -> None: await client.accounting.company_info.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CompanyInfoListRequestExpand.ADDRESSES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -323,6 +374,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.company_info import ( + CompanyInfoRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -333,6 +387,9 @@ async def retrieve( async def main() -> None: await client.accounting.company_info.retrieve( id="id", + expand=CompanyInfoRetrieveRequestExpand.ADDRESSES, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/contacts/__init__.py b/src/merge/resources/accounting/resources/contacts/__init__.py index e5740c79..192f6977 100644 --- a/src/merge/resources/accounting/resources/contacts/__init__.py +++ b/src/merge/resources/accounting/resources/contacts/__init__.py @@ -6,9 +6,10 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import ContactsListRequestExpand, ContactsRetrieveRequestExpand + from .types import ContactsListRequestExpand, ContactsListRequestStatus, ContactsRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { "ContactsListRequestExpand": ".types", + "ContactsListRequestStatus": ".types", "ContactsRetrieveRequestExpand": ".types", } @@ -32,4 +33,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["ContactsListRequestExpand", "ContactsRetrieveRequestExpand"] +__all__ = ["ContactsListRequestExpand", "ContactsListRequestStatus", "ContactsRetrieveRequestExpand"] diff --git a/src/merge/resources/accounting/resources/contacts/client.py b/src/merge/resources/accounting/resources/contacts/client.py index 390e0974..b0c75ce4 100644 --- a/src/merge/resources/accounting/resources/contacts/client.py +++ b/src/merge/resources/accounting/resources/contacts/client.py @@ -14,6 +14,7 @@ from ...types.patched_contact_request import PatchedContactRequest from .raw_client import AsyncRawContactsClient, RawContactsClient from .types.contacts_list_request_expand import ContactsListRequestExpand +from .types.contacts_list_request_status import ContactsListRequestStatus from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand # this is used as the default value for optional parameters @@ -57,7 +58,7 @@ def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[ContactsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedContactList: """ @@ -122,7 +123,7 @@ def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[ContactsListRequestStatus] If provided, will only return Contacts that match this status. request_options : typing.Optional[RequestOptions] @@ -135,14 +136,45 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.contacts import ( + ContactsListRequestExpand, + ContactsListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.contacts.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + expand=ContactsListRequestExpand.ADDRESSES, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_customer="is_customer", + is_supplier="is_supplier", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", + status=ContactsListRequestStatus.EMPTY, ) """ _response = self._raw_client.list( @@ -209,6 +241,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) """ @@ -265,6 +299,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.contacts import ( + ContactsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -272,6 +309,10 @@ def retrieve( ) client.accounting.contacts.retrieve( id="id", + expand=ContactsRetrieveRequestExpand.ADDRESSES, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -329,6 +370,8 @@ def partial_update( ) client.accounting.contacts.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedContactRequest(), ) """ @@ -451,6 +494,12 @@ def remote_field_classes_list( ) client.accounting.contacts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -503,7 +552,7 @@ async def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[ContactsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedContactList: """ @@ -568,7 +617,7 @@ async def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[ContactsListRequestStatus] If provided, will only return Contacts that match this status. request_options : typing.Optional[RequestOptions] @@ -582,8 +631,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.contacts import ( + ContactsListRequestExpand, + ContactsListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -593,7 +647,32 @@ async def list( async def main() -> None: await client.accounting.contacts.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + expand=ContactsListRequestExpand.ADDRESSES, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_customer="is_customer", + is_supplier="is_supplier", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", + status=ContactsListRequestStatus.EMPTY, ) @@ -668,6 +747,8 @@ async def create( async def main() -> None: await client.accounting.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) @@ -729,6 +810,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.contacts import ( + ContactsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -739,6 +823,10 @@ async def retrieve( async def main() -> None: await client.accounting.contacts.retrieve( id="id", + expand=ContactsRetrieveRequestExpand.ADDRESSES, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -804,6 +892,8 @@ async def partial_update( async def main() -> None: await client.accounting.contacts.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedContactRequest(), ) @@ -952,6 +1042,12 @@ async def remote_field_classes_list( async def main() -> None: await client.accounting.contacts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/contacts/raw_client.py b/src/merge/resources/accounting/resources/contacts/raw_client.py index 8dae59f7..e27d1a5b 100644 --- a/src/merge/resources/accounting/resources/contacts/raw_client.py +++ b/src/merge/resources/accounting/resources/contacts/raw_client.py @@ -19,6 +19,7 @@ from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList from ...types.patched_contact_request import PatchedContactRequest from .types.contacts_list_request_expand import ContactsListRequestExpand +from .types.contacts_list_request_status import ContactsListRequestStatus from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand # this is used as the default value for optional parameters @@ -51,7 +52,7 @@ def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[ContactsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedContactList]: """ @@ -116,7 +117,7 @@ def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[ContactsListRequestStatus] If provided, will only return Contacts that match this status. request_options : typing.Optional[RequestOptions] @@ -541,7 +542,7 @@ async def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[ContactsListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedContactList]: """ @@ -606,7 +607,7 @@ async def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[ContactsListRequestStatus] If provided, will only return Contacts that match this status. request_options : typing.Optional[RequestOptions] diff --git a/src/merge/resources/accounting/resources/contacts/types/__init__.py b/src/merge/resources/accounting/resources/contacts/types/__init__.py index 2dbee7a7..adab250c 100644 --- a/src/merge/resources/accounting/resources/contacts/types/__init__.py +++ b/src/merge/resources/accounting/resources/contacts/types/__init__.py @@ -7,9 +7,11 @@ if typing.TYPE_CHECKING: from .contacts_list_request_expand import ContactsListRequestExpand + from .contacts_list_request_status import ContactsListRequestStatus from .contacts_retrieve_request_expand import ContactsRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { "ContactsListRequestExpand": ".contacts_list_request_expand", + "ContactsListRequestStatus": ".contacts_list_request_status", "ContactsRetrieveRequestExpand": ".contacts_retrieve_request_expand", } @@ -33,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["ContactsListRequestExpand", "ContactsRetrieveRequestExpand"] +__all__ = ["ContactsListRequestExpand", "ContactsListRequestStatus", "ContactsRetrieveRequestExpand"] diff --git a/src/merge/resources/accounting/resources/contacts/types/contacts_list_request_status.py b/src/merge/resources/accounting/resources/contacts/types/contacts_list_request_status.py new file mode 100644 index 00000000..fa950926 --- /dev/null +++ b/src/merge/resources/accounting/resources/contacts/types/contacts_list_request_status.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class ContactsListRequestStatus(str, enum.Enum): + EMPTY = "" + ACTIVE = "ACTIVE" + ARCHIVED = "ARCHIVED" + + def visit( + self, + empty: typing.Callable[[], T_Result], + active: typing.Callable[[], T_Result], + archived: typing.Callable[[], T_Result], + ) -> T_Result: + if self is ContactsListRequestStatus.EMPTY: + return empty() + if self is ContactsListRequestStatus.ACTIVE: + return active() + if self is ContactsListRequestStatus.ARCHIVED: + return archived() diff --git a/src/merge/resources/accounting/resources/credit_notes/client.py b/src/merge/resources/accounting/resources/credit_notes/client.py index 8b535864..b31fb459 100644 --- a/src/merge/resources/accounting/resources/credit_notes/client.py +++ b/src/merge/resources/accounting/resources/credit_notes/client.py @@ -121,14 +121,48 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.credit_notes import ( + CreditNotesListRequestExpand, + CreditNotesListRequestRemoteFields, + CreditNotesListRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.credit_notes.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CreditNotesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=CreditNotesListRequestRemoteFields.STATUS, + remote_id="remote_id", + show_enum_origins=CreditNotesListRequestShowEnumOrigins.STATUS, + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -191,6 +225,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.credit_notes.create( + is_debug_mode=True, + run_async=True, model=CreditNoteRequest(), ) """ @@ -243,6 +279,11 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.credit_notes import ( + CreditNotesRetrieveRequestExpand, + CreditNotesRetrieveRequestRemoteFields, + CreditNotesRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -250,6 +291,11 @@ def retrieve( ) client.accounting.credit_notes.retrieve( id="id", + expand=CreditNotesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, + remote_fields=CreditNotesRetrieveRequestRemoteFields.STATUS, + show_enum_origins=CreditNotesRetrieveRequestShowEnumOrigins.STATUS, ) """ _response = self._raw_client.retrieve( @@ -391,8 +437,14 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.credit_notes import ( + CreditNotesListRequestExpand, + CreditNotesListRequestRemoteFields, + CreditNotesListRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -402,7 +454,34 @@ async def list( async def main() -> None: await client.accounting.credit_notes.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CreditNotesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=CreditNotesListRequestRemoteFields.STATUS, + remote_id="remote_id", + show_enum_origins=CreditNotesListRequestShowEnumOrigins.STATUS, + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -473,6 +552,8 @@ async def create( async def main() -> None: await client.accounting.credit_notes.create( + is_debug_mode=True, + run_async=True, model=CreditNoteRequest(), ) @@ -530,6 +611,11 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.credit_notes import ( + CreditNotesRetrieveRequestExpand, + CreditNotesRetrieveRequestRemoteFields, + CreditNotesRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -540,6 +626,11 @@ async def retrieve( async def main() -> None: await client.accounting.credit_notes.retrieve( id="id", + expand=CreditNotesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, + remote_fields=CreditNotesRetrieveRequestRemoteFields.STATUS, + show_enum_origins=CreditNotesRetrieveRequestShowEnumOrigins.STATUS, ) diff --git a/src/merge/resources/accounting/resources/employees/client.py b/src/merge/resources/accounting/resources/employees/client.py index 73f4af0b..113421fc 100644 --- a/src/merge/resources/accounting/resources/employees/client.py +++ b/src/merge/resources/accounting/resources/employees/client.py @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,25 @@ def list( api_key="YOUR_API_KEY", ) client.accounting.employees.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +183,8 @@ def retrieve( ) client.accounting.employees.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -259,6 +281,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +293,25 @@ async def list( async def main() -> None: await client.accounting.employees.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -341,6 +382,8 @@ async def retrieve( async def main() -> None: await client.accounting.employees.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/expense_reports/client.py b/src/merge/resources/accounting/resources/expense_reports/client.py index 0b2585d5..5f440172 100644 --- a/src/merge/resources/accounting/resources/expense_reports/client.py +++ b/src/merge/resources/accounting/resources/expense_reports/client.py @@ -108,14 +108,39 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.expense_reports.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpenseReportsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -175,6 +200,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.expense_reports.create( + is_debug_mode=True, + run_async=True, model=ExpenseReportRequest( tracking_categories=[ "a1b2c3d4-e5f6-4a5b-9c3d-2e1f0a9b8c7d", @@ -240,6 +267,9 @@ def lines_list( Examples -------- from merge import Merge + from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsLinesListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -248,6 +278,12 @@ def lines_list( client.accounting.expense_reports.lines_list( expense_report_id="expense_report_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpenseReportsLinesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.lines_list( @@ -303,6 +339,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -310,6 +349,10 @@ def retrieve( ) client.accounting.expense_reports.retrieve( id="id", + expand=ExpenseReportsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -378,6 +421,12 @@ def lines_remote_field_classes_list( ) client.accounting.expense_reports.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.lines_remote_field_classes_list( @@ -475,6 +524,12 @@ def remote_field_classes_list( ) client.accounting.expense_reports.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -578,8 +633,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -589,7 +648,27 @@ async def list( async def main() -> None: await client.accounting.expense_reports.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpenseReportsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -657,6 +736,8 @@ async def create( async def main() -> None: await client.accounting.expense_reports.create( + is_debug_mode=True, + run_async=True, model=ExpenseReportRequest( tracking_categories=[ "a1b2c3d4-e5f6-4a5b-9c3d-2e1f0a9b8c7d", @@ -727,6 +808,9 @@ async def lines_list( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsLinesListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -738,6 +822,12 @@ async def main() -> None: await client.accounting.expense_reports.lines_list( expense_report_id="expense_report_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpenseReportsLinesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + page_size=1, ) @@ -798,6 +888,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.expense_reports import ( + ExpenseReportsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -808,6 +901,10 @@ async def retrieve( async def main() -> None: await client.accounting.expense_reports.retrieve( id="id", + expand=ExpenseReportsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -884,6 +981,12 @@ async def lines_remote_field_classes_list( async def main() -> None: await client.accounting.expense_reports.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) @@ -997,6 +1100,12 @@ async def remote_field_classes_list( async def main() -> None: await client.accounting.expense_reports.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/expenses/client.py b/src/merge/resources/accounting/resources/expenses/client.py index c268fc18..8e4a205f 100644 --- a/src/merge/resources/accounting/resources/expenses/client.py +++ b/src/merge/resources/accounting/resources/expenses/client.py @@ -114,14 +114,45 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.expenses import ( + ExpensesListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.expenses.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpensesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -183,6 +214,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.expenses.create( + is_debug_mode=True, + run_async=True, model=ExpenseRequest(), ) """ @@ -231,6 +264,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.expenses import ( + ExpensesRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,6 +274,10 @@ def retrieve( ) client.accounting.expenses.retrieve( id="id", + expand=ExpensesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -306,6 +346,12 @@ def lines_remote_field_classes_list( ) client.accounting.expenses.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.lines_remote_field_classes_list( @@ -403,6 +449,12 @@ def remote_field_classes_list( ) client.accounting.expenses.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -514,8 +566,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.expenses import ( + ExpensesListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -525,7 +581,33 @@ async def list( async def main() -> None: await client.accounting.expenses.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ExpensesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -595,6 +677,8 @@ async def create( async def main() -> None: await client.accounting.expenses.create( + is_debug_mode=True, + run_async=True, model=ExpenseRequest(), ) @@ -648,6 +732,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.expenses import ( + ExpensesRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -658,6 +745,10 @@ async def retrieve( async def main() -> None: await client.accounting.expenses.retrieve( id="id", + expand=ExpensesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -734,6 +825,12 @@ async def lines_remote_field_classes_list( async def main() -> None: await client.accounting.expenses.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) @@ -847,6 +944,12 @@ async def remote_field_classes_list( async def main() -> None: await client.accounting.expenses.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/field_mapping/client.py b/src/merge/resources/accounting/resources/field_mapping/client.py index 3e07b83f..feed925c 100644 --- a/src/merge/resources/accounting/resources/field_mapping/client.py +++ b/src/merge/resources/accounting/resources/field_mapping/client.py @@ -59,7 +59,9 @@ def field_mappings_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.field_mapping.field_mappings_retrieve() + client.accounting.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) """ _response = self._raw_client.field_mappings_retrieve( exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options @@ -121,6 +123,7 @@ def field_mappings_create( api_key="YOUR_API_KEY", ) client.accounting.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -262,7 +265,10 @@ def remote_fields_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.field_mapping.remote_fields_retrieve() + client.accounting.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) """ _response = self._raw_client.remote_fields_retrieve( common_models=common_models, include_example_values=include_example_values, request_options=request_options @@ -349,7 +355,9 @@ async def field_mappings_retrieve( async def main() -> None: - await client.accounting.field_mapping.field_mappings_retrieve() + await client.accounting.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) asyncio.run(main()) @@ -419,6 +427,7 @@ async def field_mappings_create( async def main() -> None: await client.accounting.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -584,7 +593,10 @@ async def remote_fields_retrieve( async def main() -> None: - await client.accounting.field_mapping.remote_fields_retrieve() + await client.accounting.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) asyncio.run(main()) diff --git a/src/merge/resources/accounting/resources/general_ledger_transactions/client.py b/src/merge/resources/accounting/resources/general_ledger_transactions/client.py index 77139d04..377163ab 100644 --- a/src/merge/resources/accounting/resources/general_ledger_transactions/client.py +++ b/src/merge/resources/accounting/resources/general_ledger_transactions/client.py @@ -103,14 +103,44 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.general_ledger_transactions import ( + GeneralLedgerTransactionsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.general_ledger_transactions.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=GeneralLedgerTransactionsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + posted_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + posted_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -168,6 +198,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.general_ledger_transactions import ( + GeneralLedgerTransactionsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -175,6 +208,9 @@ def retrieve( ) client.accounting.general_ledger_transactions.retrieve( id="id", + expand=GeneralLedgerTransactionsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -279,8 +315,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.general_ledger_transactions import ( + GeneralLedgerTransactionsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -290,7 +330,32 @@ async def list( async def main() -> None: await client.accounting.general_ledger_transactions.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=GeneralLedgerTransactionsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + posted_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + posted_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", ) @@ -353,6 +418,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.general_ledger_transactions import ( + GeneralLedgerTransactionsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -363,6 +431,9 @@ async def retrieve( async def main() -> None: await client.accounting.general_ledger_transactions.retrieve( id="id", + expand=GeneralLedgerTransactionsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/income_statements/client.py b/src/merge/resources/accounting/resources/income_statements/client.py index 79cd108f..539bae03 100644 --- a/src/merge/resources/accounting/resources/income_statements/client.py +++ b/src/merge/resources/accounting/resources/income_statements/client.py @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,25 @@ def list( api_key="YOUR_API_KEY", ) client.accounting.income_statements.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +183,8 @@ def retrieve( ) client.accounting.income_statements.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -259,6 +281,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +293,25 @@ async def list( async def main() -> None: await client.accounting.income_statements.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -341,6 +382,8 @@ async def retrieve( async def main() -> None: await client.accounting.income_statements.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/invoices/client.py b/src/merge/resources/accounting/resources/invoices/client.py index f5a51718..9ec8d516 100644 --- a/src/merge/resources/accounting/resources/invoices/client.py +++ b/src/merge/resources/accounting/resources/invoices/client.py @@ -150,14 +150,51 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.invoices import ( + InvoicesListRequestExpand, + InvoicesListRequestStatus, + InvoicesListRequestType, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.invoices.list( + company_id="company_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=InvoicesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + issue_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + issue_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + number="number", + page_size=1, + remote_id="remote_id", + status=InvoicesListRequestStatus.DRAFT, + type=InvoicesListRequestType.ACCOUNTS_PAYABLE, ) """ _response = self._raw_client.list( @@ -227,6 +264,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.invoices.create( + is_debug_mode=True, + run_async=True, model=InvoiceRequest(), ) """ @@ -283,6 +322,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.invoices import ( + InvoicesRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -290,6 +332,10 @@ def retrieve( ) client.accounting.invoices.retrieve( id="id", + expand=InvoicesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -347,6 +393,8 @@ def partial_update( ) client.accounting.invoices.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=InvoiceRequest(), ) """ @@ -411,6 +459,12 @@ def line_items_remote_field_classes_list( ) client.accounting.invoices.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.line_items_remote_field_classes_list( @@ -539,6 +593,12 @@ def remote_field_classes_list( ) client.accounting.invoices.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -684,8 +744,14 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.invoices import ( + InvoicesListRequestExpand, + InvoicesListRequestStatus, + InvoicesListRequestType, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -695,7 +761,37 @@ async def list( async def main() -> None: await client.accounting.invoices.list( + company_id="company_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=InvoicesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + issue_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + issue_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + number="number", + page_size=1, + remote_id="remote_id", + status=InvoicesListRequestStatus.DRAFT, + type=InvoicesListRequestType.ACCOUNTS_PAYABLE, ) @@ -773,6 +869,8 @@ async def create( async def main() -> None: await client.accounting.invoices.create( + is_debug_mode=True, + run_async=True, model=InvoiceRequest(), ) @@ -834,6 +932,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.invoices import ( + InvoicesRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -844,6 +945,10 @@ async def retrieve( async def main() -> None: await client.accounting.invoices.retrieve( id="id", + expand=InvoicesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -909,6 +1014,8 @@ async def partial_update( async def main() -> None: await client.accounting.invoices.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=InvoiceRequest(), ) @@ -981,6 +1088,12 @@ async def line_items_remote_field_classes_list( async def main() -> None: await client.accounting.invoices.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) @@ -1135,6 +1248,12 @@ async def remote_field_classes_list( async def main() -> None: await client.accounting.invoices.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/issues/client.py b/src/merge/resources/accounting/resources/issues/client.py index 18eec115..b4469343 100644 --- a/src/merge/resources/accounting/resources/issues/client.py +++ b/src/merge/resources/accounting/resources/issues/client.py @@ -102,14 +102,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) """ _response = self._raw_client.list( @@ -255,8 +279,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.issues import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -266,7 +292,28 @@ async def list( async def main() -> None: await client.accounting.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) diff --git a/src/merge/resources/accounting/resources/items/client.py b/src/merge/resources/accounting/resources/items/client.py index e66fe427..6e6f4b14 100644 --- a/src/merge/resources/accounting/resources/items/client.py +++ b/src/merge/resources/accounting/resources/items/client.py @@ -110,14 +110,36 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.items import ItemsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.items.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ItemsListRequestExpand.COMPANY, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -178,6 +200,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.items.create( + is_debug_mode=True, + run_async=True, model=ItemRequestRequest(), ) """ @@ -230,6 +254,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.items import ( + ItemsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -237,6 +264,9 @@ def retrieve( ) client.accounting.items.retrieve( id="id", + expand=ItemsRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -293,6 +323,8 @@ def partial_update( ) client.accounting.items.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedItemRequestRequest(), ) """ @@ -452,8 +484,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.items import ItemsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -463,7 +497,26 @@ async def list( async def main() -> None: await client.accounting.items.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ItemsListRequestExpand.COMPANY, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -532,6 +585,8 @@ async def create( async def main() -> None: await client.accounting.items.create( + is_debug_mode=True, + run_async=True, model=ItemRequestRequest(), ) @@ -589,6 +644,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.items import ( + ItemsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -599,6 +657,9 @@ async def retrieve( async def main() -> None: await client.accounting.items.retrieve( id="id", + expand=ItemsRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_shell_data=True, ) @@ -663,6 +724,8 @@ async def partial_update( async def main() -> None: await client.accounting.items.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedItemRequestRequest(), ) diff --git a/src/merge/resources/accounting/resources/journal_entries/client.py b/src/merge/resources/accounting/resources/journal_entries/client.py index 1a7d47ed..43249ba4 100644 --- a/src/merge/resources/accounting/resources/journal_entries/client.py +++ b/src/merge/resources/accounting/resources/journal_entries/client.py @@ -114,14 +114,45 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.journal_entries import ( + JournalEntriesListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.journal_entries.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JournalEntriesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -183,6 +214,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.journal_entries.create( + is_debug_mode=True, + run_async=True, model=JournalEntryRequest(), ) """ @@ -231,6 +264,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.journal_entries import ( + JournalEntriesRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,6 +274,10 @@ def retrieve( ) client.accounting.journal_entries.retrieve( id="id", + expand=JournalEntriesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -306,6 +346,12 @@ def lines_remote_field_classes_list( ) client.accounting.journal_entries.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.lines_remote_field_classes_list( @@ -403,6 +449,12 @@ def remote_field_classes_list( ) client.accounting.journal_entries.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -514,8 +566,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.journal_entries import ( + JournalEntriesListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -525,7 +581,33 @@ async def list( async def main() -> None: await client.accounting.journal_entries.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JournalEntriesListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -595,6 +677,8 @@ async def create( async def main() -> None: await client.accounting.journal_entries.create( + is_debug_mode=True, + run_async=True, model=JournalEntryRequest(), ) @@ -648,6 +732,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.journal_entries import ( + JournalEntriesRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -658,6 +745,10 @@ async def retrieve( async def main() -> None: await client.accounting.journal_entries.retrieve( id="id", + expand=JournalEntriesRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -734,6 +825,12 @@ async def lines_remote_field_classes_list( async def main() -> None: await client.accounting.journal_entries.lines_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) @@ -847,6 +944,12 @@ async def remote_field_classes_list( async def main() -> None: await client.accounting.journal_entries.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/linked_accounts/client.py b/src/merge/resources/accounting/resources/linked_accounts/client.py index 2a5024cd..3fceae3a 100644 --- a/src/merge/resources/accounting/resources/linked_accounts/client.py +++ b/src/merge/resources/accounting/resources/linked_accounts/client.py @@ -104,13 +104,28 @@ def list( Examples -------- from merge import Merge + from merge.resources.accounting.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) """ _response = self._raw_client.list( @@ -229,6 +244,9 @@ async def list( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,7 +256,19 @@ async def list( async def main() -> None: await client.accounting.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) diff --git a/src/merge/resources/accounting/resources/payment_methods/client.py b/src/merge/resources/accounting/resources/payment_methods/client.py index 2b8226d6..f1761ebf 100644 --- a/src/merge/resources/accounting/resources/payment_methods/client.py +++ b/src/merge/resources/accounting/resources/payment_methods/client.py @@ -72,6 +72,10 @@ def list( ) client.accounting.payment_methods.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.list( @@ -123,6 +127,8 @@ def retrieve( ) client.accounting.payment_methods.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -202,6 +208,10 @@ async def list( async def main() -> None: await client.accounting.payment_methods.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) @@ -261,6 +271,8 @@ async def retrieve( async def main() -> None: await client.accounting.payment_methods.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/payment_terms/client.py b/src/merge/resources/accounting/resources/payment_terms/client.py index 7f0e7f70..89107e4e 100644 --- a/src/merge/resources/accounting/resources/payment_terms/client.py +++ b/src/merge/resources/accounting/resources/payment_terms/client.py @@ -76,6 +76,10 @@ def list( ) client.accounting.payment_terms.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.list( @@ -132,6 +136,8 @@ def retrieve( ) client.accounting.payment_terms.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -216,6 +222,10 @@ async def list( async def main() -> None: await client.accounting.payment_terms.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) @@ -280,6 +290,8 @@ async def retrieve( async def main() -> None: await client.accounting.payment_terms.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/payments/client.py b/src/merge/resources/accounting/resources/payments/client.py index c6fdbb43..a6cae803 100644 --- a/src/merge/resources/accounting/resources/payments/client.py +++ b/src/merge/resources/accounting/resources/payments/client.py @@ -123,14 +123,47 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.payments import ( + PaymentsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.payments.list( + account_id="account_id", + company_id="company_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=PaymentsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -194,6 +227,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.payments.create( + is_debug_mode=True, + run_async=True, model=PaymentRequest(), ) """ @@ -242,6 +277,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.payments import ( + PaymentsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -249,6 +287,10 @@ def retrieve( ) client.accounting.payments.retrieve( id="id", + expand=PaymentsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -304,6 +346,8 @@ def partial_update( ) client.accounting.payments.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedPaymentRequest(), ) """ @@ -368,6 +412,12 @@ def line_items_remote_field_classes_list( ) client.accounting.payments.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.line_items_remote_field_classes_list( @@ -496,6 +546,12 @@ def remote_field_classes_list( ) client.accounting.payments.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -615,8 +671,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.payments import ( + PaymentsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -626,7 +686,35 @@ async def list( async def main() -> None: await client.accounting.payments.list( + account_id="account_id", + company_id="company_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=PaymentsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -698,6 +786,8 @@ async def create( async def main() -> None: await client.accounting.payments.create( + is_debug_mode=True, + run_async=True, model=PaymentRequest(), ) @@ -751,6 +841,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.payments import ( + PaymentsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -761,6 +854,10 @@ async def retrieve( async def main() -> None: await client.accounting.payments.retrieve( id="id", + expand=PaymentsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -824,6 +921,8 @@ async def partial_update( async def main() -> None: await client.accounting.payments.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedPaymentRequest(), ) @@ -896,6 +995,12 @@ async def line_items_remote_field_classes_list( async def main() -> None: await client.accounting.payments.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) @@ -1050,6 +1155,12 @@ async def remote_field_classes_list( async def main() -> None: await client.accounting.payments.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/phone_numbers/client.py b/src/merge/resources/accounting/resources/phone_numbers/client.py index e794ee7f..65aa5178 100644 --- a/src/merge/resources/accounting/resources/phone_numbers/client.py +++ b/src/merge/resources/accounting/resources/phone_numbers/client.py @@ -62,6 +62,8 @@ def retrieve( ) client.accounting.phone_numbers.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -132,6 +134,8 @@ async def retrieve( async def main() -> None: await client.accounting.phone_numbers.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/projects/client.py b/src/merge/resources/accounting/resources/projects/client.py index a7335b20..22263c6b 100644 --- a/src/merge/resources/accounting/resources/projects/client.py +++ b/src/merge/resources/accounting/resources/projects/client.py @@ -95,14 +95,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.projects import ( + ProjectsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.projects.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ProjectsListRequestExpand.COMPANY, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -158,6 +182,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.projects import ( + ProjectsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -165,6 +192,9 @@ def retrieve( ) client.accounting.projects.retrieve( id="id", + expand=ProjectsRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -261,8 +291,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.projects import ( + ProjectsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -272,7 +306,26 @@ async def list( async def main() -> None: await client.accounting.projects.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ProjectsListRequestExpand.COMPANY, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -333,6 +386,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.projects import ( + ProjectsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -343,6 +399,9 @@ async def retrieve( async def main() -> None: await client.accounting.projects.retrieve( id="id", + expand=ProjectsRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/purchase_orders/client.py b/src/merge/resources/accounting/resources/purchase_orders/client.py index 5b6a4ab6..1aeb1d72 100644 --- a/src/merge/resources/accounting/resources/purchase_orders/client.py +++ b/src/merge/resources/accounting/resources/purchase_orders/client.py @@ -122,14 +122,45 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.purchase_orders import ( + PurchaseOrdersListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.purchase_orders.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=PurchaseOrdersListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + issue_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + issue_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -193,6 +224,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.purchase_orders.create( + is_debug_mode=True, + run_async=True, model=PurchaseOrderRequest(), ) """ @@ -249,6 +282,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.purchase_orders import ( + PurchaseOrdersRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -256,6 +292,10 @@ def retrieve( ) client.accounting.purchase_orders.retrieve( id="id", + expand=PurchaseOrdersRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -326,6 +366,12 @@ def line_items_remote_field_classes_list( ) client.accounting.purchase_orders.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.line_items_remote_field_classes_list( @@ -423,6 +469,12 @@ def remote_field_classes_list( ) client.accounting.purchase_orders.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -542,8 +594,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.purchase_orders import ( + PurchaseOrdersListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -553,7 +609,33 @@ async def list( async def main() -> None: await client.accounting.purchase_orders.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=PurchaseOrdersListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + issue_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + issue_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -625,6 +707,8 @@ async def create( async def main() -> None: await client.accounting.purchase_orders.create( + is_debug_mode=True, + run_async=True, model=PurchaseOrderRequest(), ) @@ -686,6 +770,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.purchase_orders import ( + PurchaseOrdersRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -696,6 +783,10 @@ async def retrieve( async def main() -> None: await client.accounting.purchase_orders.retrieve( id="id", + expand=PurchaseOrdersRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -774,6 +865,12 @@ async def line_items_remote_field_classes_list( async def main() -> None: await client.accounting.purchase_orders.line_items_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) @@ -887,6 +984,12 @@ async def remote_field_classes_list( async def main() -> None: await client.accounting.purchase_orders.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/sync_status/client.py b/src/merge/resources/accounting/resources/sync_status/client.py index 3c1b31e8..0f2b6791 100644 --- a/src/merge/resources/accounting/resources/sync_status/client.py +++ b/src/merge/resources/accounting/resources/sync_status/client.py @@ -59,6 +59,7 @@ def list( ) client.accounting.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) """ _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) @@ -121,6 +122,7 @@ async def list( async def main() -> None: await client.accounting.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) diff --git a/src/merge/resources/accounting/resources/tax_rates/client.py b/src/merge/resources/accounting/resources/tax_rates/client.py index 29f1ca42..b63969c8 100644 --- a/src/merge/resources/accounting/resources/tax_rates/client.py +++ b/src/merge/resources/accounting/resources/tax_rates/client.py @@ -97,6 +97,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -104,7 +106,26 @@ def list( api_key="YOUR_API_KEY", ) client.accounting.tax_rates.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -168,6 +189,8 @@ def retrieve( ) client.accounting.tax_rates.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -268,6 +291,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -279,7 +303,26 @@ async def list( async def main() -> None: await client.accounting.tax_rates.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", ) @@ -351,6 +394,8 @@ async def retrieve( async def main() -> None: await client.accounting.tax_rates.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/tracking_categories/__init__.py b/src/merge/resources/accounting/resources/tracking_categories/__init__.py index 5cde0202..6f5cbc5a 100644 --- a/src/merge/resources/accounting/resources/tracking_categories/__init__.py +++ b/src/merge/resources/accounting/resources/tracking_categories/__init__.py @@ -2,3 +2,34 @@ # isort: skip_file +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import TrackingCategoriesListRequestCategoryType, TrackingCategoriesListRequestStatus +_dynamic_imports: typing.Dict[str, str] = { + "TrackingCategoriesListRequestCategoryType": ".types", + "TrackingCategoriesListRequestStatus": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["TrackingCategoriesListRequestCategoryType", "TrackingCategoriesListRequestStatus"] diff --git a/src/merge/resources/accounting/resources/tracking_categories/client.py b/src/merge/resources/accounting/resources/tracking_categories/client.py index bdd73f97..c2f68550 100644 --- a/src/merge/resources/accounting/resources/tracking_categories/client.py +++ b/src/merge/resources/accounting/resources/tracking_categories/client.py @@ -8,6 +8,8 @@ from ...types.paginated_tracking_category_list import PaginatedTrackingCategoryList from ...types.tracking_category import TrackingCategory from .raw_client import AsyncRawTrackingCategoriesClient, RawTrackingCategoriesClient +from .types.tracking_categories_list_request_category_type import TrackingCategoriesListRequestCategoryType +from .types.tracking_categories_list_request_status import TrackingCategoriesListRequestStatus class TrackingCategoriesClient: @@ -28,7 +30,7 @@ def with_raw_response(self) -> RawTrackingCategoriesClient: def list( self, *, - category_type: typing.Optional[str] = None, + category_type: typing.Optional[TrackingCategoriesListRequestCategoryType] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -44,7 +46,7 @@ def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TrackingCategoriesListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedTrackingCategoryList: """ @@ -52,7 +54,7 @@ def list( Parameters ---------- - category_type : typing.Optional[str] + category_type : typing.Optional[TrackingCategoriesListRequestCategoryType] If provided, will only return tracking categories with this type. company_id : typing.Optional[str] @@ -100,7 +102,7 @@ def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[TrackingCategoriesListRequestStatus] If provided, will only return tracking categories with this status. request_options : typing.Optional[RequestOptions] @@ -113,14 +115,41 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.tracking_categories import ( + TrackingCategoriesListRequestCategoryType, + TrackingCategoriesListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.tracking_categories.list( + category_type=TrackingCategoriesListRequestCategoryType.EMPTY, + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", + status=TrackingCategoriesListRequestStatus.EMPTY, ) """ _response = self._raw_client.list( @@ -196,6 +225,8 @@ def retrieve( ) client.accounting.tracking_categories.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -228,7 +259,7 @@ def with_raw_response(self) -> AsyncRawTrackingCategoriesClient: async def list( self, *, - category_type: typing.Optional[str] = None, + category_type: typing.Optional[TrackingCategoriesListRequestCategoryType] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -244,7 +275,7 @@ async def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TrackingCategoriesListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedTrackingCategoryList: """ @@ -252,7 +283,7 @@ async def list( Parameters ---------- - category_type : typing.Optional[str] + category_type : typing.Optional[TrackingCategoriesListRequestCategoryType] If provided, will only return tracking categories with this type. company_id : typing.Optional[str] @@ -300,7 +331,7 @@ async def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[TrackingCategoriesListRequestStatus] If provided, will only return tracking categories with this status. request_options : typing.Optional[RequestOptions] @@ -314,8 +345,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.tracking_categories import ( + TrackingCategoriesListRequestCategoryType, + TrackingCategoriesListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -325,7 +361,28 @@ async def list( async def main() -> None: await client.accounting.tracking_categories.list( + category_type=TrackingCategoriesListRequestCategoryType.EMPTY, + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", + status=TrackingCategoriesListRequestStatus.EMPTY, ) @@ -409,6 +466,8 @@ async def retrieve( async def main() -> None: await client.accounting.tracking_categories.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/tracking_categories/raw_client.py b/src/merge/resources/accounting/resources/tracking_categories/raw_client.py index 7deeed52..2b73c9ef 100644 --- a/src/merge/resources/accounting/resources/tracking_categories/raw_client.py +++ b/src/merge/resources/accounting/resources/tracking_categories/raw_client.py @@ -13,6 +13,8 @@ from .....core.unchecked_base_model import construct_type from ...types.paginated_tracking_category_list import PaginatedTrackingCategoryList from ...types.tracking_category import TrackingCategory +from .types.tracking_categories_list_request_category_type import TrackingCategoriesListRequestCategoryType +from .types.tracking_categories_list_request_status import TrackingCategoriesListRequestStatus class RawTrackingCategoriesClient: @@ -22,7 +24,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - category_type: typing.Optional[str] = None, + category_type: typing.Optional[TrackingCategoriesListRequestCategoryType] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -38,7 +40,7 @@ def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TrackingCategoriesListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedTrackingCategoryList]: """ @@ -46,7 +48,7 @@ def list( Parameters ---------- - category_type : typing.Optional[str] + category_type : typing.Optional[TrackingCategoriesListRequestCategoryType] If provided, will only return tracking categories with this type. company_id : typing.Optional[str] @@ -94,7 +96,7 @@ def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[TrackingCategoriesListRequestStatus] If provided, will only return tracking categories with this status. request_options : typing.Optional[RequestOptions] @@ -220,7 +222,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - category_type: typing.Optional[str] = None, + category_type: typing.Optional[TrackingCategoriesListRequestCategoryType] = None, company_id: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, @@ -236,7 +238,7 @@ async def list( remote_fields: typing.Optional[typing.Literal["status"]] = None, remote_id: typing.Optional[str] = None, show_enum_origins: typing.Optional[typing.Literal["status"]] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TrackingCategoriesListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedTrackingCategoryList]: """ @@ -244,7 +246,7 @@ async def list( Parameters ---------- - category_type : typing.Optional[str] + category_type : typing.Optional[TrackingCategoriesListRequestCategoryType] If provided, will only return tracking categories with this type. company_id : typing.Optional[str] @@ -292,7 +294,7 @@ async def list( show_enum_origins : typing.Optional[typing.Literal["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) - status : typing.Optional[str] + status : typing.Optional[TrackingCategoriesListRequestStatus] If provided, will only return tracking categories with this status. request_options : typing.Optional[RequestOptions] diff --git a/src/merge/resources/accounting/resources/tracking_categories/types/__init__.py b/src/merge/resources/accounting/resources/tracking_categories/types/__init__.py new file mode 100644 index 00000000..702a54d3 --- /dev/null +++ b/src/merge/resources/accounting/resources/tracking_categories/types/__init__.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .tracking_categories_list_request_category_type import TrackingCategoriesListRequestCategoryType + from .tracking_categories_list_request_status import TrackingCategoriesListRequestStatus +_dynamic_imports: typing.Dict[str, str] = { + "TrackingCategoriesListRequestCategoryType": ".tracking_categories_list_request_category_type", + "TrackingCategoriesListRequestStatus": ".tracking_categories_list_request_status", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["TrackingCategoriesListRequestCategoryType", "TrackingCategoriesListRequestStatus"] diff --git a/src/merge/resources/accounting/resources/tracking_categories/types/tracking_categories_list_request_category_type.py b/src/merge/resources/accounting/resources/tracking_categories/types/tracking_categories_list_request_category_type.py new file mode 100644 index 00000000..92354377 --- /dev/null +++ b/src/merge/resources/accounting/resources/tracking_categories/types/tracking_categories_list_request_category_type.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class TrackingCategoriesListRequestCategoryType(str, enum.Enum): + EMPTY = "" + CLASS = "CLASS" + DEPARTMENT = "DEPARTMENT" + + def visit( + self, + empty: typing.Callable[[], T_Result], + class_: typing.Callable[[], T_Result], + department: typing.Callable[[], T_Result], + ) -> T_Result: + if self is TrackingCategoriesListRequestCategoryType.EMPTY: + return empty() + if self is TrackingCategoriesListRequestCategoryType.CLASS: + return class_() + if self is TrackingCategoriesListRequestCategoryType.DEPARTMENT: + return department() diff --git a/src/merge/resources/accounting/resources/tracking_categories/types/tracking_categories_list_request_status.py b/src/merge/resources/accounting/resources/tracking_categories/types/tracking_categories_list_request_status.py new file mode 100644 index 00000000..3f8a0cc3 --- /dev/null +++ b/src/merge/resources/accounting/resources/tracking_categories/types/tracking_categories_list_request_status.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class TrackingCategoriesListRequestStatus(str, enum.Enum): + EMPTY = "" + ACTIVE = "ACTIVE" + ARCHIVED = "ARCHIVED" + + def visit( + self, + empty: typing.Callable[[], T_Result], + active: typing.Callable[[], T_Result], + archived: typing.Callable[[], T_Result], + ) -> T_Result: + if self is TrackingCategoriesListRequestStatus.EMPTY: + return empty() + if self is TrackingCategoriesListRequestStatus.ACTIVE: + return active() + if self is TrackingCategoriesListRequestStatus.ARCHIVED: + return archived() diff --git a/src/merge/resources/accounting/resources/transactions/client.py b/src/merge/resources/accounting/resources/transactions/client.py index 0dd5c1d1..a7842616 100644 --- a/src/merge/resources/accounting/resources/transactions/client.py +++ b/src/merge/resources/accounting/resources/transactions/client.py @@ -103,14 +103,44 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.transactions import ( + TransactionsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.transactions.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TransactionsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -168,6 +198,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.transactions import ( + TransactionsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -175,6 +208,9 @@ def retrieve( ) client.accounting.transactions.retrieve( id="id", + expand=TransactionsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -279,8 +315,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.transactions import ( + TransactionsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -290,7 +330,32 @@ async def list( async def main() -> None: await client.accounting.transactions.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TransactionsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -353,6 +418,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.transactions import ( + TransactionsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -363,6 +431,9 @@ async def retrieve( async def main() -> None: await client.accounting.transactions.retrieve( id="id", + expand=TransactionsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/accounting/resources/vendor_credits/client.py b/src/merge/resources/accounting/resources/vendor_credits/client.py index 35f220c2..7b599489 100644 --- a/src/merge/resources/accounting/resources/vendor_credits/client.py +++ b/src/merge/resources/accounting/resources/vendor_credits/client.py @@ -109,14 +109,44 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.accounting.resources.vendor_credits import ( + VendorCreditsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.vendor_credits.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=VendorCreditsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -177,6 +207,8 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.vendor_credits.create( + is_debug_mode=True, + run_async=True, model=VendorCreditRequest(), ) """ @@ -221,6 +253,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.accounting.resources.vendor_credits import ( + VendorCreditsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -228,6 +263,9 @@ def retrieve( ) client.accounting.vendor_credits.retrieve( id="id", + expand=VendorCreditsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -359,8 +397,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.accounting.resources.vendor_credits import ( + VendorCreditsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -370,7 +412,32 @@ async def list( async def main() -> None: await client.accounting.vendor_credits.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=VendorCreditsListRequestExpand.ACCOUNTING_PERIOD, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + transaction_date_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + transaction_date_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -439,6 +506,8 @@ async def create( async def main() -> None: await client.accounting.vendor_credits.create( + is_debug_mode=True, + run_async=True, model=VendorCreditRequest(), ) @@ -488,6 +557,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.accounting.resources.vendor_credits import ( + VendorCreditsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -498,6 +570,9 @@ async def retrieve( async def main() -> None: await client.accounting.vendor_credits.retrieve( id="id", + expand=VendorCreditsRetrieveRequestExpand.ACCOUNTING_PERIOD, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/activities/client.py b/src/merge/resources/ats/resources/activities/client.py index b3070acf..f7499b30 100644 --- a/src/merge/resources/ats/resources/activities/client.py +++ b/src/merge/resources/ats/resources/activities/client.py @@ -111,14 +111,40 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.activities import ( + ActivitiesListRequestRemoteFields, + ActivitiesListRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.activities.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=ActivitiesListRequestRemoteFields.ACTIVITY_TYPE, + remote_id="remote_id", + show_enum_origins=ActivitiesListRequestShowEnumOrigins.ACTIVITY_TYPE, + user_id="user_id", ) """ _response = self._raw_client.list( @@ -182,6 +208,8 @@ def create( api_key="YOUR_API_KEY", ) client.ats.activities.create( + is_debug_mode=True, + run_async=True, model=ActivityRequest(), remote_user_id="remote_user_id", ) @@ -239,6 +267,10 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.activities import ( + ActivitiesRetrieveRequestRemoteFields, + ActivitiesRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -246,6 +278,10 @@ def retrieve( ) client.ats.activities.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=ActivitiesRetrieveRequestRemoteFields.ACTIVITY_TYPE, + show_enum_origins=ActivitiesRetrieveRequestShowEnumOrigins.ACTIVITY_TYPE, ) """ _response = self._raw_client.retrieve( @@ -379,8 +415,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.activities import ( + ActivitiesListRequestRemoteFields, + ActivitiesListRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -390,7 +431,27 @@ async def list( async def main() -> None: await client.ats.activities.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=ActivitiesListRequestRemoteFields.ACTIVITY_TYPE, + remote_id="remote_id", + show_enum_origins=ActivitiesListRequestShowEnumOrigins.ACTIVITY_TYPE, + user_id="user_id", ) @@ -462,6 +523,8 @@ async def create( async def main() -> None: await client.ats.activities.create( + is_debug_mode=True, + run_async=True, model=ActivityRequest(), remote_user_id="remote_user_id", ) @@ -524,6 +587,10 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.activities import ( + ActivitiesRetrieveRequestRemoteFields, + ActivitiesRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -534,6 +601,10 @@ async def retrieve( async def main() -> None: await client.ats.activities.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=ActivitiesRetrieveRequestRemoteFields.ACTIVITY_TYPE, + show_enum_origins=ActivitiesRetrieveRequestShowEnumOrigins.ACTIVITY_TYPE, ) diff --git a/src/merge/resources/ats/resources/applications/client.py b/src/merge/resources/ats/resources/applications/client.py index e4f5f142..a9eafd97 100644 --- a/src/merge/resources/ats/resources/applications/client.py +++ b/src/merge/resources/ats/resources/applications/client.py @@ -121,14 +121,43 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.applications import ( + ApplicationsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.applications.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + credited_to_id="credited_to_id", + current_stage_id="current_stage_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ApplicationsListRequestExpand.CANDIDATE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + reject_reason_id="reject_reason_id", + remote_id="remote_id", + source="source", ) """ _response = self._raw_client.list( @@ -198,6 +227,8 @@ def create( api_key="YOUR_API_KEY", ) client.ats.applications.create( + is_debug_mode=True, + run_async=True, model=ApplicationRequest(), remote_user_id="remote_user_id", ) @@ -247,6 +278,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.applications import ( + ApplicationsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -254,6 +288,9 @@ def retrieve( ) client.ats.applications.retrieve( id="id", + expand=ApplicationsRetrieveRequestExpand.CANDIDATE, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -311,6 +348,8 @@ def change_stage_create( ) client.ats.applications.change_stage_create( id="id", + is_debug_mode=True, + run_async=True, ) """ _response = self._raw_client.change_stage_create( @@ -353,7 +392,9 @@ def meta_post_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.applications.meta_post_retrieve() + client.ats.applications.meta_post_retrieve( + application_remote_template_id="application_remote_template_id", + ) """ _response = self._raw_client.meta_post_retrieve( application_remote_template_id=application_remote_template_id, request_options=request_options @@ -465,8 +506,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.applications import ( + ApplicationsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -476,7 +521,31 @@ async def list( async def main() -> None: await client.ats.applications.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + credited_to_id="credited_to_id", + current_stage_id="current_stage_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ApplicationsListRequestExpand.CANDIDATE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + reject_reason_id="reject_reason_id", + remote_id="remote_id", + source="source", ) @@ -554,6 +623,8 @@ async def create( async def main() -> None: await client.ats.applications.create( + is_debug_mode=True, + run_async=True, model=ApplicationRequest(), remote_user_id="remote_user_id", ) @@ -608,6 +679,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.applications import ( + ApplicationsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -618,6 +692,9 @@ async def retrieve( async def main() -> None: await client.ats.applications.retrieve( id="id", + expand=ApplicationsRetrieveRequestExpand.CANDIDATE, + include_remote_data=True, + include_shell_data=True, ) @@ -683,6 +760,8 @@ async def change_stage_create( async def main() -> None: await client.ats.applications.change_stage_create( id="id", + is_debug_mode=True, + run_async=True, ) @@ -733,7 +812,9 @@ async def meta_post_retrieve( async def main() -> None: - await client.ats.applications.meta_post_retrieve() + await client.ats.applications.meta_post_retrieve( + application_remote_template_id="application_remote_template_id", + ) asyncio.run(main()) diff --git a/src/merge/resources/ats/resources/attachments/client.py b/src/merge/resources/ats/resources/attachments/client.py index ba606803..df51bb47 100644 --- a/src/merge/resources/ats/resources/attachments/client.py +++ b/src/merge/resources/ats/resources/attachments/client.py @@ -107,6 +107,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -114,7 +116,25 @@ def list( api_key="YOUR_API_KEY", ) client.ats.attachments.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -178,6 +198,8 @@ def create( api_key="YOUR_API_KEY", ) client.ats.attachments.create( + is_debug_mode=True, + run_async=True, model=AttachmentRequest(), remote_user_id="remote_user_id", ) @@ -242,6 +264,8 @@ def retrieve( ) client.ats.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -375,6 +399,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -386,7 +411,25 @@ async def list( async def main() -> None: await client.ats.attachments.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -458,6 +501,8 @@ async def create( async def main() -> None: await client.ats.attachments.create( + is_debug_mode=True, + run_async=True, model=AttachmentRequest(), remote_user_id="remote_user_id", ) @@ -530,6 +575,8 @@ async def retrieve( async def main() -> None: await client.ats.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/audit_trail/client.py b/src/merge/resources/ats/resources/audit_trail/client.py index a9942a91..78d801de 100644 --- a/src/merge/resources/ats/resources/audit_trail/client.py +++ b/src/merge/resources/ats/resources/audit_trail/client.py @@ -75,6 +75,11 @@ def list( ) client.ats.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) """ _response = self._raw_client.list( @@ -161,6 +166,11 @@ async def list( async def main() -> None: await client.ats.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) diff --git a/src/merge/resources/ats/resources/candidates/client.py b/src/merge/resources/ats/resources/candidates/client.py index 434b18a1..3cf356a4 100644 --- a/src/merge/resources/ats/resources/candidates/client.py +++ b/src/merge/resources/ats/resources/candidates/client.py @@ -115,14 +115,39 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.candidates import CandidatesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.candidates.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=CandidatesListRequestExpand.APPLICATIONS, + first_name="first_name", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + last_name="last_name", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + tags="tags", ) """ _response = self._raw_client.list( @@ -187,6 +212,8 @@ def create( api_key="YOUR_API_KEY", ) client.ats.candidates.create( + is_debug_mode=True, + run_async=True, model=CandidateRequest(), remote_user_id="remote_user_id", ) @@ -236,6 +263,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.candidates import ( + CandidatesRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -243,6 +273,9 @@ def retrieve( ) client.ats.candidates.retrieve( id="id", + expand=CandidatesRetrieveRequestExpand.APPLICATIONS, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -300,6 +333,8 @@ def partial_update( ) client.ats.candidates.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedCandidateRequest(), remote_user_id="remote_user_id", ) @@ -514,8 +549,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.candidates import CandidatesListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -525,7 +562,29 @@ async def list( async def main() -> None: await client.ats.candidates.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=CandidatesListRequestExpand.APPLICATIONS, + first_name="first_name", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + last_name="last_name", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + tags="tags", ) @@ -598,6 +657,8 @@ async def create( async def main() -> None: await client.ats.candidates.create( + is_debug_mode=True, + run_async=True, model=CandidateRequest(), remote_user_id="remote_user_id", ) @@ -652,6 +713,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.candidates import ( + CandidatesRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -662,6 +726,9 @@ async def retrieve( async def main() -> None: await client.ats.candidates.retrieve( id="id", + expand=CandidatesRetrieveRequestExpand.APPLICATIONS, + include_remote_data=True, + include_shell_data=True, ) @@ -727,6 +794,8 @@ async def partial_update( async def main() -> None: await client.ats.candidates.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedCandidateRequest(), remote_user_id="remote_user_id", ) diff --git a/src/merge/resources/ats/resources/departments/client.py b/src/merge/resources/ats/resources/departments/client.py index d543959c..f70cd0ba 100644 --- a/src/merge/resources/ats/resources/departments/client.py +++ b/src/merge/resources/ats/resources/departments/client.py @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.ats.departments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.ats.departments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.ats.departments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.ats.departments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/eeocs/client.py b/src/merge/resources/ats/resources/eeocs/client.py index 4a848651..5a54567c 100644 --- a/src/merge/resources/ats/resources/eeocs/client.py +++ b/src/merge/resources/ats/resources/eeocs/client.py @@ -105,14 +105,40 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.eeocs import ( + EeocsListRequestRemoteFields, + EeocsListRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.eeocs.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=EeocsListRequestRemoteFields.DISABILITY_STATUS, + remote_id="remote_id", + show_enum_origins=EeocsListRequestShowEnumOrigins.DISABILITY_STATUS, ) """ _response = self._raw_client.list( @@ -178,6 +204,10 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.eeocs import ( + EeocsRetrieveRequestRemoteFields, + EeocsRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -185,6 +215,10 @@ def retrieve( ) client.ats.eeocs.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS, + show_enum_origins=EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS, ) """ _response = self._raw_client.retrieve( @@ -291,8 +325,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.eeocs import ( + EeocsListRequestRemoteFields, + EeocsListRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -302,7 +341,27 @@ async def list( async def main() -> None: await client.ats.eeocs.list( + candidate_id="candidate_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=EeocsListRequestRemoteFields.DISABILITY_STATUS, + remote_id="remote_id", + show_enum_origins=EeocsListRequestShowEnumOrigins.DISABILITY_STATUS, ) @@ -373,6 +432,10 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.eeocs import ( + EeocsRetrieveRequestRemoteFields, + EeocsRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -383,6 +446,10 @@ async def retrieve( async def main() -> None: await client.ats.eeocs.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS, + show_enum_origins=EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS, ) diff --git a/src/merge/resources/ats/resources/field_mapping/client.py b/src/merge/resources/ats/resources/field_mapping/client.py index aa2a3ffe..8e5e68a8 100644 --- a/src/merge/resources/ats/resources/field_mapping/client.py +++ b/src/merge/resources/ats/resources/field_mapping/client.py @@ -59,7 +59,9 @@ def field_mappings_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.field_mapping.field_mappings_retrieve() + client.ats.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) """ _response = self._raw_client.field_mappings_retrieve( exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options @@ -121,6 +123,7 @@ def field_mappings_create( api_key="YOUR_API_KEY", ) client.ats.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -262,7 +265,10 @@ def remote_fields_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.field_mapping.remote_fields_retrieve() + client.ats.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) """ _response = self._raw_client.remote_fields_retrieve( common_models=common_models, include_example_values=include_example_values, request_options=request_options @@ -349,7 +355,9 @@ async def field_mappings_retrieve( async def main() -> None: - await client.ats.field_mapping.field_mappings_retrieve() + await client.ats.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) asyncio.run(main()) @@ -419,6 +427,7 @@ async def field_mappings_create( async def main() -> None: await client.ats.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -584,7 +593,10 @@ async def remote_fields_retrieve( async def main() -> None: - await client.ats.field_mapping.remote_fields_retrieve() + await client.ats.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) asyncio.run(main()) diff --git a/src/merge/resources/ats/resources/interviews/client.py b/src/merge/resources/ats/resources/interviews/client.py index 9acbef5c..8745eaaf 100644 --- a/src/merge/resources/ats/resources/interviews/client.py +++ b/src/merge/resources/ats/resources/interviews/client.py @@ -121,14 +121,39 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.interviews import InterviewsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.interviews.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=InterviewsListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + job_interview_stage_id="job_interview_stage_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + organizer_id="organizer_id", + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -195,6 +220,8 @@ def create( api_key="YOUR_API_KEY", ) client.ats.interviews.create( + is_debug_mode=True, + run_async=True, model=ScheduledInterviewRequest(), remote_user_id="remote_user_id", ) @@ -252,6 +279,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.interviews import ( + InterviewsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -259,6 +289,9 @@ def retrieve( ) client.ats.interviews.retrieve( id="id", + expand=InterviewsRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -404,8 +437,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.interviews import InterviewsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -415,7 +450,29 @@ async def list( async def main() -> None: await client.ats.interviews.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=InterviewsListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + job_interview_stage_id="job_interview_stage_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + organizer_id="organizer_id", + page_size=1, + remote_id="remote_id", ) @@ -490,6 +547,8 @@ async def create( async def main() -> None: await client.ats.interviews.create( + is_debug_mode=True, + run_async=True, model=ScheduledInterviewRequest(), remote_user_id="remote_user_id", ) @@ -552,6 +611,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.interviews import ( + InterviewsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -562,6 +624,9 @@ async def retrieve( async def main() -> None: await client.ats.interviews.retrieve( id="id", + expand=InterviewsRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/issues/client.py b/src/merge/resources/ats/resources/issues/client.py index c429339f..247d273f 100644 --- a/src/merge/resources/ats/resources/issues/client.py +++ b/src/merge/resources/ats/resources/issues/client.py @@ -102,14 +102,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) """ _response = self._raw_client.list( @@ -255,8 +279,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.issues import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -266,7 +292,28 @@ async def list( async def main() -> None: await client.ats.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) diff --git a/src/merge/resources/ats/resources/job_interview_stages/client.py b/src/merge/resources/ats/resources/job_interview_stages/client.py index 9dbb31c6..65748ba2 100644 --- a/src/merge/resources/ats/resources/job_interview_stages/client.py +++ b/src/merge/resources/ats/resources/job_interview_stages/client.py @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,25 @@ def list( api_key="YOUR_API_KEY", ) client.ats.job_interview_stages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +183,8 @@ def retrieve( ) client.ats.job_interview_stages.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -259,6 +281,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +293,25 @@ async def list( async def main() -> None: await client.ats.job_interview_stages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + job_id="job_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -341,6 +382,8 @@ async def retrieve( async def main() -> None: await client.ats.job_interview_stages.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/job_postings/client.py b/src/merge/resources/ats/resources/job_postings/client.py index 7187c098..d3847a9b 100644 --- a/src/merge/resources/ats/resources/job_postings/client.py +++ b/src/merge/resources/ats/resources/job_postings/client.py @@ -100,14 +100,37 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.job_postings import ( + JobPostingsListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.job_postings.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + status=JobPostingsListRequestStatus.CLOSED, ) """ _response = self._raw_client.list( @@ -170,6 +193,8 @@ def retrieve( ) client.ats.job_postings.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -272,8 +297,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.job_postings import ( + JobPostingsListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -283,7 +312,25 @@ async def list( async def main() -> None: await client.ats.job_postings.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + status=JobPostingsListRequestStatus.CLOSED, ) @@ -354,6 +401,8 @@ async def retrieve( async def main() -> None: await client.ats.job_postings.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/jobs/client.py b/src/merge/resources/ats/resources/jobs/client.py index 1dc28a48..732d144c 100644 --- a/src/merge/resources/ats/resources/jobs/client.py +++ b/src/merge/resources/ats/resources/jobs/client.py @@ -120,14 +120,41 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.jobs import ( + JobsListRequestExpand, + JobsListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.jobs.list( + code="code", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JobsListRequestExpand.DEPARTMENTS, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + offices="offices", + page_size=1, + remote_id="remote_id", + status=JobsListRequestStatus.ARCHIVED, ) """ _response = self._raw_client.list( @@ -195,6 +222,7 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.jobs import JobsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -202,6 +230,9 @@ def retrieve( ) client.ats.jobs.retrieve( id="id", + expand=JobsRetrieveRequestExpand.DEPARTMENTS, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -263,6 +294,9 @@ def screening_questions_list( Examples -------- from merge import Merge + from merge.resources.ats.resources.jobs import ( + JobsScreeningQuestionsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -271,6 +305,11 @@ def screening_questions_list( client.ats.jobs.screening_questions_list( job_id="job_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JobsScreeningQuestionsListRequestExpand.JOB, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.screening_questions_list( @@ -392,8 +431,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.jobs import ( + JobsListRequestExpand, + JobsListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -403,7 +447,28 @@ async def list( async def main() -> None: await client.ats.jobs.list( + code="code", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JobsListRequestExpand.DEPARTMENTS, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + offices="offices", + page_size=1, + remote_id="remote_id", + status=JobsListRequestStatus.ARCHIVED, ) @@ -476,6 +541,7 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.jobs import JobsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -486,6 +552,9 @@ async def retrieve( async def main() -> None: await client.ats.jobs.retrieve( id="id", + expand=JobsRetrieveRequestExpand.DEPARTMENTS, + include_remote_data=True, + include_shell_data=True, ) @@ -552,6 +621,9 @@ async def screening_questions_list( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.jobs import ( + JobsScreeningQuestionsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -563,6 +635,11 @@ async def main() -> None: await client.ats.jobs.screening_questions_list( job_id="job_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=JobsScreeningQuestionsListRequestExpand.JOB, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) diff --git a/src/merge/resources/ats/resources/linked_accounts/client.py b/src/merge/resources/ats/resources/linked_accounts/client.py index d11c05c4..6bce4b50 100644 --- a/src/merge/resources/ats/resources/linked_accounts/client.py +++ b/src/merge/resources/ats/resources/linked_accounts/client.py @@ -104,13 +104,28 @@ def list( Examples -------- from merge import Merge + from merge.resources.ats.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) """ _response = self._raw_client.list( @@ -229,6 +244,9 @@ async def list( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,7 +256,19 @@ async def list( async def main() -> None: await client.ats.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) diff --git a/src/merge/resources/ats/resources/offers/client.py b/src/merge/resources/ats/resources/offers/client.py index 4737bf2e..4d47e1b4 100644 --- a/src/merge/resources/ats/resources/offers/client.py +++ b/src/merge/resources/ats/resources/offers/client.py @@ -107,14 +107,37 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.offers import OffersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.offers.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + creator_id="creator_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=OffersListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -181,6 +204,7 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.offers import OffersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -188,6 +212,9 @@ def retrieve( ) client.ats.offers.retrieve( id="id", + expand=OffersRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -298,8 +325,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.offers import OffersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -309,7 +338,27 @@ async def list( async def main() -> None: await client.ats.offers.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + creator_id="creator_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=OffersListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -381,6 +430,7 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.offers import OffersRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -391,6 +441,9 @@ async def retrieve( async def main() -> None: await client.ats.offers.retrieve( id="id", + expand=OffersRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/offices/client.py b/src/merge/resources/ats/resources/offices/client.py index 173aa017..b4892b81 100644 --- a/src/merge/resources/ats/resources/offices/client.py +++ b/src/merge/resources/ats/resources/offices/client.py @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.ats.offices.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.ats.offices.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.ats.offices.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.ats.offices.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/reject_reasons/client.py b/src/merge/resources/ats/resources/reject_reasons/client.py index 107fb931..f86f8194 100644 --- a/src/merge/resources/ats/resources/reject_reasons/client.py +++ b/src/merge/resources/ats/resources/reject_reasons/client.py @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.ats.reject_reasons.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.ats.reject_reasons.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.ats.reject_reasons.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.ats.reject_reasons.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/scorecards/client.py b/src/merge/resources/ats/resources/scorecards/client.py index d24fa3cf..071dddab 100644 --- a/src/merge/resources/ats/resources/scorecards/client.py +++ b/src/merge/resources/ats/resources/scorecards/client.py @@ -111,14 +111,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ats.resources.scorecards import ScorecardsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.scorecards.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ScorecardsListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + interview_id="interview_id", + interviewer_id="interviewer_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -186,6 +210,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ats.resources.scorecards import ( + ScorecardsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -193,6 +220,9 @@ def retrieve( ) client.ats.scorecards.retrieve( id="id", + expand=ScorecardsRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -307,8 +337,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ats.resources.scorecards import ScorecardsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -318,7 +350,28 @@ async def list( async def main() -> None: await client.ats.scorecards.list( + application_id="application_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ScorecardsListRequestExpand.APPLICATION, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + interview_id="interview_id", + interviewer_id="interviewer_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -391,6 +444,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ats.resources.scorecards import ( + ScorecardsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -401,6 +457,9 @@ async def retrieve( async def main() -> None: await client.ats.scorecards.retrieve( id="id", + expand=ScorecardsRetrieveRequestExpand.APPLICATION, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ats/resources/sync_status/client.py b/src/merge/resources/ats/resources/sync_status/client.py index 7eebd768..ca78911a 100644 --- a/src/merge/resources/ats/resources/sync_status/client.py +++ b/src/merge/resources/ats/resources/sync_status/client.py @@ -59,6 +59,7 @@ def list( ) client.ats.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) """ _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) @@ -121,6 +122,7 @@ async def list( async def main() -> None: await client.ats.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) diff --git a/src/merge/resources/ats/resources/tags/client.py b/src/merge/resources/ats/resources/tags/client.py index 9aa39684..4bd24041 100644 --- a/src/merge/resources/ats/resources/tags/client.py +++ b/src/merge/resources/ats/resources/tags/client.py @@ -84,6 +84,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -91,7 +93,24 @@ def list( api_key="YOUR_API_KEY", ) client.ats.tags.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -186,6 +205,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -197,7 +217,24 @@ async def list( async def main() -> None: await client.ats.tags.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) diff --git a/src/merge/resources/ats/resources/users/client.py b/src/merge/resources/ats/resources/users/client.py index 0046a79f..df8e2b2f 100644 --- a/src/merge/resources/ats/resources/users/client.py +++ b/src/merge/resources/ats/resources/users/client.py @@ -97,6 +97,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -104,7 +106,25 @@ def list( api_key="YOUR_API_KEY", ) client.ats.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email="email", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -172,6 +192,8 @@ def retrieve( ) client.ats.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -273,6 +295,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -284,7 +307,25 @@ async def list( async def main() -> None: await client.ats.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email="email", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -360,6 +401,8 @@ async def retrieve( async def main() -> None: await client.ats.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/chat/__init__.py b/src/merge/resources/chat/__init__.py new file mode 100644 index 00000000..97e03713 --- /dev/null +++ b/src/merge/resources/chat/__init__.py @@ -0,0 +1,385 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + AccountDetails, + AccountDetailsAndActions, + AccountDetailsAndActionsCategory, + AccountDetailsAndActionsIntegration, + AccountDetailsAndActionsStatus, + AccountDetailsAndActionsStatusEnum, + AccountDetailsCategory, + AccountIntegration, + AccountToken, + AdvancedMetadata, + AsyncPassthroughReciept, + AuditLogEvent, + AuditLogEventEventType, + AuditLogEventRole, + AvailableActions, + CategoriesEnum, + CategoryEnum, + CommonModelScopeApi, + CommonModelScopesBodyRequest, + CompletedAccountInitialScreenEnum, + Conversation, + ConversationType, + DataPassthroughRequest, + DataPassthroughRequestMethod, + DataPassthroughRequestRequestFormat, + DebugModeLog, + DebugModelLogSummary, + EnabledActionsEnum, + EncodingEnum, + ErrorValidationProblem, + EventTypeEnum, + ExternalTargetFieldApi, + ExternalTargetFieldApiResponse, + FieldMappingApiInstance, + FieldMappingApiInstanceRemoteField, + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, + FieldMappingApiInstanceResponse, + FieldMappingApiInstanceTargetField, + FieldMappingInstanceResponse, + FieldPermissionDeserializer, + FieldPermissionDeserializerRequest, + Group, + IndividualCommonModelScopeDeserializer, + IndividualCommonModelScopeDeserializerRequest, + Issue, + IssueStatus, + IssueStatusEnum, + LanguageEnum, + LastSyncResultEnum, + LinkToken, + Member, + Message, + MethodEnum, + ModelOperation, + ModelPermissionDeserializer, + ModelPermissionDeserializerRequest, + MultipartFormFieldRequest, + MultipartFormFieldRequestEncoding, + PaginatedAccountDetailsAndActionsList, + PaginatedAuditLogEventList, + PaginatedConversationList, + PaginatedGroupList, + PaginatedIssueList, + PaginatedMemberList, + PaginatedMessageList, + PaginatedSyncStatusList, + PaginatedUserList, + RemoteData, + RemoteEndpointInfo, + RemoteFieldApi, + RemoteFieldApiAdvancedMetadata, + RemoteFieldApiCoverage, + RemoteFieldApiResponse, + RemoteKey, + RemoteResponse, + RemoteResponseResponseType, + RequestFormatEnum, + ResponseTypeEnum, + RoleEnum, + SelectiveSyncConfigurationsUsageEnum, + StatusFd5Enum, + SyncStatus, + SyncStatusLastSyncResult, + SyncStatusStatus, + TypeEnum, + User, + ValidationProblemSource, + WarningValidationProblem, + WebhookReceiver, + ) + from .resources import ( + AsyncPassthroughRetrieveResponse, + ConversationsMembersListRequestExpand, + EndUserDetailsRequestCompletedAccountInitialScreen, + EndUserDetailsRequestLanguage, + IssuesListRequestStatus, + LinkedAccountsListRequestCategory, + account_details, + account_token, + async_passthrough, + audit_trail, + available_actions, + conversations, + delete_account, + field_mapping, + force_resync, + generate_key, + groups, + issues, + link_token, + linked_accounts, + messages, + passthrough, + regenerate_key, + scopes, + sync_status, + users, + webhook_receivers, + ) +_dynamic_imports: typing.Dict[str, str] = { + "AccountDetails": ".types", + "AccountDetailsAndActions": ".types", + "AccountDetailsAndActionsCategory": ".types", + "AccountDetailsAndActionsIntegration": ".types", + "AccountDetailsAndActionsStatus": ".types", + "AccountDetailsAndActionsStatusEnum": ".types", + "AccountDetailsCategory": ".types", + "AccountIntegration": ".types", + "AccountToken": ".types", + "AdvancedMetadata": ".types", + "AsyncPassthroughReciept": ".types", + "AsyncPassthroughRetrieveResponse": ".resources", + "AuditLogEvent": ".types", + "AuditLogEventEventType": ".types", + "AuditLogEventRole": ".types", + "AvailableActions": ".types", + "CategoriesEnum": ".types", + "CategoryEnum": ".types", + "CommonModelScopeApi": ".types", + "CommonModelScopesBodyRequest": ".types", + "CompletedAccountInitialScreenEnum": ".types", + "Conversation": ".types", + "ConversationType": ".types", + "ConversationsMembersListRequestExpand": ".resources", + "DataPassthroughRequest": ".types", + "DataPassthroughRequestMethod": ".types", + "DataPassthroughRequestRequestFormat": ".types", + "DebugModeLog": ".types", + "DebugModelLogSummary": ".types", + "EnabledActionsEnum": ".types", + "EncodingEnum": ".types", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".resources", + "EndUserDetailsRequestLanguage": ".resources", + "ErrorValidationProblem": ".types", + "EventTypeEnum": ".types", + "ExternalTargetFieldApi": ".types", + "ExternalTargetFieldApiResponse": ".types", + "FieldMappingApiInstance": ".types", + "FieldMappingApiInstanceRemoteField": ".types", + "FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo": ".types", + "FieldMappingApiInstanceResponse": ".types", + "FieldMappingApiInstanceTargetField": ".types", + "FieldMappingInstanceResponse": ".types", + "FieldPermissionDeserializer": ".types", + "FieldPermissionDeserializerRequest": ".types", + "Group": ".types", + "IndividualCommonModelScopeDeserializer": ".types", + "IndividualCommonModelScopeDeserializerRequest": ".types", + "Issue": ".types", + "IssueStatus": ".types", + "IssueStatusEnum": ".types", + "IssuesListRequestStatus": ".resources", + "LanguageEnum": ".types", + "LastSyncResultEnum": ".types", + "LinkToken": ".types", + "LinkedAccountsListRequestCategory": ".resources", + "Member": ".types", + "Message": ".types", + "MethodEnum": ".types", + "ModelOperation": ".types", + "ModelPermissionDeserializer": ".types", + "ModelPermissionDeserializerRequest": ".types", + "MultipartFormFieldRequest": ".types", + "MultipartFormFieldRequestEncoding": ".types", + "PaginatedAccountDetailsAndActionsList": ".types", + "PaginatedAuditLogEventList": ".types", + "PaginatedConversationList": ".types", + "PaginatedGroupList": ".types", + "PaginatedIssueList": ".types", + "PaginatedMemberList": ".types", + "PaginatedMessageList": ".types", + "PaginatedSyncStatusList": ".types", + "PaginatedUserList": ".types", + "RemoteData": ".types", + "RemoteEndpointInfo": ".types", + "RemoteFieldApi": ".types", + "RemoteFieldApiAdvancedMetadata": ".types", + "RemoteFieldApiCoverage": ".types", + "RemoteFieldApiResponse": ".types", + "RemoteKey": ".types", + "RemoteResponse": ".types", + "RemoteResponseResponseType": ".types", + "RequestFormatEnum": ".types", + "ResponseTypeEnum": ".types", + "RoleEnum": ".types", + "SelectiveSyncConfigurationsUsageEnum": ".types", + "StatusFd5Enum": ".types", + "SyncStatus": ".types", + "SyncStatusLastSyncResult": ".types", + "SyncStatusStatus": ".types", + "TypeEnum": ".types", + "User": ".types", + "ValidationProblemSource": ".types", + "WarningValidationProblem": ".types", + "WebhookReceiver": ".types", + "account_details": ".resources", + "account_token": ".resources", + "async_passthrough": ".resources", + "audit_trail": ".resources", + "available_actions": ".resources", + "conversations": ".resources", + "delete_account": ".resources", + "field_mapping": ".resources", + "force_resync": ".resources", + "generate_key": ".resources", + "groups": ".resources", + "issues": ".resources", + "link_token": ".resources", + "linked_accounts": ".resources", + "messages": ".resources", + "passthrough": ".resources", + "regenerate_key": ".resources", + "scopes": ".resources", + "sync_status": ".resources", + "users": ".resources", + "webhook_receivers": ".resources", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "AccountDetails", + "AccountDetailsAndActions", + "AccountDetailsAndActionsCategory", + "AccountDetailsAndActionsIntegration", + "AccountDetailsAndActionsStatus", + "AccountDetailsAndActionsStatusEnum", + "AccountDetailsCategory", + "AccountIntegration", + "AccountToken", + "AdvancedMetadata", + "AsyncPassthroughReciept", + "AsyncPassthroughRetrieveResponse", + "AuditLogEvent", + "AuditLogEventEventType", + "AuditLogEventRole", + "AvailableActions", + "CategoriesEnum", + "CategoryEnum", + "CommonModelScopeApi", + "CommonModelScopesBodyRequest", + "CompletedAccountInitialScreenEnum", + "Conversation", + "ConversationType", + "ConversationsMembersListRequestExpand", + "DataPassthroughRequest", + "DataPassthroughRequestMethod", + "DataPassthroughRequestRequestFormat", + "DebugModeLog", + "DebugModelLogSummary", + "EnabledActionsEnum", + "EncodingEnum", + "EndUserDetailsRequestCompletedAccountInitialScreen", + "EndUserDetailsRequestLanguage", + "ErrorValidationProblem", + "EventTypeEnum", + "ExternalTargetFieldApi", + "ExternalTargetFieldApiResponse", + "FieldMappingApiInstance", + "FieldMappingApiInstanceRemoteField", + "FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo", + "FieldMappingApiInstanceResponse", + "FieldMappingApiInstanceTargetField", + "FieldMappingInstanceResponse", + "FieldPermissionDeserializer", + "FieldPermissionDeserializerRequest", + "Group", + "IndividualCommonModelScopeDeserializer", + "IndividualCommonModelScopeDeserializerRequest", + "Issue", + "IssueStatus", + "IssueStatusEnum", + "IssuesListRequestStatus", + "LanguageEnum", + "LastSyncResultEnum", + "LinkToken", + "LinkedAccountsListRequestCategory", + "Member", + "Message", + "MethodEnum", + "ModelOperation", + "ModelPermissionDeserializer", + "ModelPermissionDeserializerRequest", + "MultipartFormFieldRequest", + "MultipartFormFieldRequestEncoding", + "PaginatedAccountDetailsAndActionsList", + "PaginatedAuditLogEventList", + "PaginatedConversationList", + "PaginatedGroupList", + "PaginatedIssueList", + "PaginatedMemberList", + "PaginatedMessageList", + "PaginatedSyncStatusList", + "PaginatedUserList", + "RemoteData", + "RemoteEndpointInfo", + "RemoteFieldApi", + "RemoteFieldApiAdvancedMetadata", + "RemoteFieldApiCoverage", + "RemoteFieldApiResponse", + "RemoteKey", + "RemoteResponse", + "RemoteResponseResponseType", + "RequestFormatEnum", + "ResponseTypeEnum", + "RoleEnum", + "SelectiveSyncConfigurationsUsageEnum", + "StatusFd5Enum", + "SyncStatus", + "SyncStatusLastSyncResult", + "SyncStatusStatus", + "TypeEnum", + "User", + "ValidationProblemSource", + "WarningValidationProblem", + "WebhookReceiver", + "account_details", + "account_token", + "async_passthrough", + "audit_trail", + "available_actions", + "conversations", + "delete_account", + "field_mapping", + "force_resync", + "generate_key", + "groups", + "issues", + "link_token", + "linked_accounts", + "messages", + "passthrough", + "regenerate_key", + "scopes", + "sync_status", + "users", + "webhook_receivers", +] diff --git a/src/merge/resources/chat/client.py b/src/merge/resources/chat/client.py new file mode 100644 index 00000000..acb3b6bd --- /dev/null +++ b/src/merge/resources/chat/client.py @@ -0,0 +1,459 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .raw_client import AsyncRawChatClient, RawChatClient + +if typing.TYPE_CHECKING: + from .resources.account_details.client import AccountDetailsClient, AsyncAccountDetailsClient + from .resources.account_token.client import AccountTokenClient, AsyncAccountTokenClient + from .resources.async_passthrough.client import AsyncAsyncPassthroughClient + from .resources.async_passthrough.client import ( + AsyncPassthroughClient as resources_chat_resources_async_passthrough_client_AsyncPassthroughClient, + ) + from .resources.audit_trail.client import AsyncAuditTrailClient, AuditTrailClient + from .resources.available_actions.client import AsyncAvailableActionsClient, AvailableActionsClient + from .resources.conversations.client import AsyncConversationsClient, ConversationsClient + from .resources.delete_account.client import AsyncDeleteAccountClient, DeleteAccountClient + from .resources.field_mapping.client import AsyncFieldMappingClient, FieldMappingClient + from .resources.force_resync.client import AsyncForceResyncClient, ForceResyncClient + from .resources.generate_key.client import AsyncGenerateKeyClient, GenerateKeyClient + from .resources.groups.client import AsyncGroupsClient, GroupsClient + from .resources.issues.client import AsyncIssuesClient, IssuesClient + from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient + from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient + from .resources.messages.client import AsyncMessagesClient, MessagesClient + from .resources.passthrough.client import ( + AsyncPassthroughClient as resources_chat_resources_passthrough_client_AsyncPassthroughClient, + ) + from .resources.passthrough.client import PassthroughClient + from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient + from .resources.scopes.client import AsyncScopesClient, ScopesClient + from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient + from .resources.users.client import AsyncUsersClient, UsersClient + from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient + + +class ChatClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawChatClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._account_details: typing.Optional[AccountDetailsClient] = None + self._account_token: typing.Optional[AccountTokenClient] = None + self._async_passthrough: typing.Optional[ + resources_chat_resources_async_passthrough_client_AsyncPassthroughClient + ] = None + self._audit_trail: typing.Optional[AuditTrailClient] = None + self._available_actions: typing.Optional[AvailableActionsClient] = None + self._conversations: typing.Optional[ConversationsClient] = None + self._scopes: typing.Optional[ScopesClient] = None + self._delete_account: typing.Optional[DeleteAccountClient] = None + self._field_mapping: typing.Optional[FieldMappingClient] = None + self._generate_key: typing.Optional[GenerateKeyClient] = None + self._groups: typing.Optional[GroupsClient] = None + self._issues: typing.Optional[IssuesClient] = None + self._link_token: typing.Optional[LinkTokenClient] = None + self._linked_accounts: typing.Optional[LinkedAccountsClient] = None + self._messages: typing.Optional[MessagesClient] = None + self._passthrough: typing.Optional[PassthroughClient] = None + self._regenerate_key: typing.Optional[RegenerateKeyClient] = None + self._sync_status: typing.Optional[SyncStatusClient] = None + self._force_resync: typing.Optional[ForceResyncClient] = None + self._users: typing.Optional[UsersClient] = None + self._webhook_receivers: typing.Optional[WebhookReceiversClient] = None + + @property + def with_raw_response(self) -> RawChatClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawChatClient + """ + return self._raw_client + + @property + def account_details(self): + if self._account_details is None: + from .resources.account_details.client import AccountDetailsClient # noqa: E402 + + self._account_details = AccountDetailsClient(client_wrapper=self._client_wrapper) + return self._account_details + + @property + def account_token(self): + if self._account_token is None: + from .resources.account_token.client import AccountTokenClient # noqa: E402 + + self._account_token = AccountTokenClient(client_wrapper=self._client_wrapper) + return self._account_token + + @property + def async_passthrough(self): + if self._async_passthrough is None: + from .resources.async_passthrough.client import ( + AsyncPassthroughClient as resources_chat_resources_async_passthrough_client_AsyncPassthroughClient, # noqa: E402 + ) + + self._async_passthrough = resources_chat_resources_async_passthrough_client_AsyncPassthroughClient( + client_wrapper=self._client_wrapper + ) + return self._async_passthrough + + @property + def audit_trail(self): + if self._audit_trail is None: + from .resources.audit_trail.client import AuditTrailClient # noqa: E402 + + self._audit_trail = AuditTrailClient(client_wrapper=self._client_wrapper) + return self._audit_trail + + @property + def available_actions(self): + if self._available_actions is None: + from .resources.available_actions.client import AvailableActionsClient # noqa: E402 + + self._available_actions = AvailableActionsClient(client_wrapper=self._client_wrapper) + return self._available_actions + + @property + def conversations(self): + if self._conversations is None: + from .resources.conversations.client import ConversationsClient # noqa: E402 + + self._conversations = ConversationsClient(client_wrapper=self._client_wrapper) + return self._conversations + + @property + def scopes(self): + if self._scopes is None: + from .resources.scopes.client import ScopesClient # noqa: E402 + + self._scopes = ScopesClient(client_wrapper=self._client_wrapper) + return self._scopes + + @property + def delete_account(self): + if self._delete_account is None: + from .resources.delete_account.client import DeleteAccountClient # noqa: E402 + + self._delete_account = DeleteAccountClient(client_wrapper=self._client_wrapper) + return self._delete_account + + @property + def field_mapping(self): + if self._field_mapping is None: + from .resources.field_mapping.client import FieldMappingClient # noqa: E402 + + self._field_mapping = FieldMappingClient(client_wrapper=self._client_wrapper) + return self._field_mapping + + @property + def generate_key(self): + if self._generate_key is None: + from .resources.generate_key.client import GenerateKeyClient # noqa: E402 + + self._generate_key = GenerateKeyClient(client_wrapper=self._client_wrapper) + return self._generate_key + + @property + def groups(self): + if self._groups is None: + from .resources.groups.client import GroupsClient # noqa: E402 + + self._groups = GroupsClient(client_wrapper=self._client_wrapper) + return self._groups + + @property + def issues(self): + if self._issues is None: + from .resources.issues.client import IssuesClient # noqa: E402 + + self._issues = IssuesClient(client_wrapper=self._client_wrapper) + return self._issues + + @property + def link_token(self): + if self._link_token is None: + from .resources.link_token.client import LinkTokenClient # noqa: E402 + + self._link_token = LinkTokenClient(client_wrapper=self._client_wrapper) + return self._link_token + + @property + def linked_accounts(self): + if self._linked_accounts is None: + from .resources.linked_accounts.client import LinkedAccountsClient # noqa: E402 + + self._linked_accounts = LinkedAccountsClient(client_wrapper=self._client_wrapper) + return self._linked_accounts + + @property + def messages(self): + if self._messages is None: + from .resources.messages.client import MessagesClient # noqa: E402 + + self._messages = MessagesClient(client_wrapper=self._client_wrapper) + return self._messages + + @property + def passthrough(self): + if self._passthrough is None: + from .resources.passthrough.client import PassthroughClient # noqa: E402 + + self._passthrough = PassthroughClient(client_wrapper=self._client_wrapper) + return self._passthrough + + @property + def regenerate_key(self): + if self._regenerate_key is None: + from .resources.regenerate_key.client import RegenerateKeyClient # noqa: E402 + + self._regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper) + return self._regenerate_key + + @property + def sync_status(self): + if self._sync_status is None: + from .resources.sync_status.client import SyncStatusClient # noqa: E402 + + self._sync_status = SyncStatusClient(client_wrapper=self._client_wrapper) + return self._sync_status + + @property + def force_resync(self): + if self._force_resync is None: + from .resources.force_resync.client import ForceResyncClient # noqa: E402 + + self._force_resync = ForceResyncClient(client_wrapper=self._client_wrapper) + return self._force_resync + + @property + def users(self): + if self._users is None: + from .resources.users.client import UsersClient # noqa: E402 + + self._users = UsersClient(client_wrapper=self._client_wrapper) + return self._users + + @property + def webhook_receivers(self): + if self._webhook_receivers is None: + from .resources.webhook_receivers.client import WebhookReceiversClient # noqa: E402 + + self._webhook_receivers = WebhookReceiversClient(client_wrapper=self._client_wrapper) + return self._webhook_receivers + + +class AsyncChatClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawChatClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._account_details: typing.Optional[AsyncAccountDetailsClient] = None + self._account_token: typing.Optional[AsyncAccountTokenClient] = None + self._async_passthrough: typing.Optional[AsyncAsyncPassthroughClient] = None + self._audit_trail: typing.Optional[AsyncAuditTrailClient] = None + self._available_actions: typing.Optional[AsyncAvailableActionsClient] = None + self._conversations: typing.Optional[AsyncConversationsClient] = None + self._scopes: typing.Optional[AsyncScopesClient] = None + self._delete_account: typing.Optional[AsyncDeleteAccountClient] = None + self._field_mapping: typing.Optional[AsyncFieldMappingClient] = None + self._generate_key: typing.Optional[AsyncGenerateKeyClient] = None + self._groups: typing.Optional[AsyncGroupsClient] = None + self._issues: typing.Optional[AsyncIssuesClient] = None + self._link_token: typing.Optional[AsyncLinkTokenClient] = None + self._linked_accounts: typing.Optional[AsyncLinkedAccountsClient] = None + self._messages: typing.Optional[AsyncMessagesClient] = None + self._passthrough: typing.Optional[resources_chat_resources_passthrough_client_AsyncPassthroughClient] = None + self._regenerate_key: typing.Optional[AsyncRegenerateKeyClient] = None + self._sync_status: typing.Optional[AsyncSyncStatusClient] = None + self._force_resync: typing.Optional[AsyncForceResyncClient] = None + self._users: typing.Optional[AsyncUsersClient] = None + self._webhook_receivers: typing.Optional[AsyncWebhookReceiversClient] = None + + @property + def with_raw_response(self) -> AsyncRawChatClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawChatClient + """ + return self._raw_client + + @property + def account_details(self): + if self._account_details is None: + from .resources.account_details.client import AsyncAccountDetailsClient # noqa: E402 + + self._account_details = AsyncAccountDetailsClient(client_wrapper=self._client_wrapper) + return self._account_details + + @property + def account_token(self): + if self._account_token is None: + from .resources.account_token.client import AsyncAccountTokenClient # noqa: E402 + + self._account_token = AsyncAccountTokenClient(client_wrapper=self._client_wrapper) + return self._account_token + + @property + def async_passthrough(self): + if self._async_passthrough is None: + from .resources.async_passthrough.client import AsyncAsyncPassthroughClient # noqa: E402 + + self._async_passthrough = AsyncAsyncPassthroughClient(client_wrapper=self._client_wrapper) + return self._async_passthrough + + @property + def audit_trail(self): + if self._audit_trail is None: + from .resources.audit_trail.client import AsyncAuditTrailClient # noqa: E402 + + self._audit_trail = AsyncAuditTrailClient(client_wrapper=self._client_wrapper) + return self._audit_trail + + @property + def available_actions(self): + if self._available_actions is None: + from .resources.available_actions.client import AsyncAvailableActionsClient # noqa: E402 + + self._available_actions = AsyncAvailableActionsClient(client_wrapper=self._client_wrapper) + return self._available_actions + + @property + def conversations(self): + if self._conversations is None: + from .resources.conversations.client import AsyncConversationsClient # noqa: E402 + + self._conversations = AsyncConversationsClient(client_wrapper=self._client_wrapper) + return self._conversations + + @property + def scopes(self): + if self._scopes is None: + from .resources.scopes.client import AsyncScopesClient # noqa: E402 + + self._scopes = AsyncScopesClient(client_wrapper=self._client_wrapper) + return self._scopes + + @property + def delete_account(self): + if self._delete_account is None: + from .resources.delete_account.client import AsyncDeleteAccountClient # noqa: E402 + + self._delete_account = AsyncDeleteAccountClient(client_wrapper=self._client_wrapper) + return self._delete_account + + @property + def field_mapping(self): + if self._field_mapping is None: + from .resources.field_mapping.client import AsyncFieldMappingClient # noqa: E402 + + self._field_mapping = AsyncFieldMappingClient(client_wrapper=self._client_wrapper) + return self._field_mapping + + @property + def generate_key(self): + if self._generate_key is None: + from .resources.generate_key.client import AsyncGenerateKeyClient # noqa: E402 + + self._generate_key = AsyncGenerateKeyClient(client_wrapper=self._client_wrapper) + return self._generate_key + + @property + def groups(self): + if self._groups is None: + from .resources.groups.client import AsyncGroupsClient # noqa: E402 + + self._groups = AsyncGroupsClient(client_wrapper=self._client_wrapper) + return self._groups + + @property + def issues(self): + if self._issues is None: + from .resources.issues.client import AsyncIssuesClient # noqa: E402 + + self._issues = AsyncIssuesClient(client_wrapper=self._client_wrapper) + return self._issues + + @property + def link_token(self): + if self._link_token is None: + from .resources.link_token.client import AsyncLinkTokenClient # noqa: E402 + + self._link_token = AsyncLinkTokenClient(client_wrapper=self._client_wrapper) + return self._link_token + + @property + def linked_accounts(self): + if self._linked_accounts is None: + from .resources.linked_accounts.client import AsyncLinkedAccountsClient # noqa: E402 + + self._linked_accounts = AsyncLinkedAccountsClient(client_wrapper=self._client_wrapper) + return self._linked_accounts + + @property + def messages(self): + if self._messages is None: + from .resources.messages.client import AsyncMessagesClient # noqa: E402 + + self._messages = AsyncMessagesClient(client_wrapper=self._client_wrapper) + return self._messages + + @property + def passthrough(self): + if self._passthrough is None: + from .resources.passthrough.client import ( + AsyncPassthroughClient as resources_chat_resources_passthrough_client_AsyncPassthroughClient, # noqa: E402 + ) + + self._passthrough = resources_chat_resources_passthrough_client_AsyncPassthroughClient( + client_wrapper=self._client_wrapper + ) + return self._passthrough + + @property + def regenerate_key(self): + if self._regenerate_key is None: + from .resources.regenerate_key.client import AsyncRegenerateKeyClient # noqa: E402 + + self._regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper) + return self._regenerate_key + + @property + def sync_status(self): + if self._sync_status is None: + from .resources.sync_status.client import AsyncSyncStatusClient # noqa: E402 + + self._sync_status = AsyncSyncStatusClient(client_wrapper=self._client_wrapper) + return self._sync_status + + @property + def force_resync(self): + if self._force_resync is None: + from .resources.force_resync.client import AsyncForceResyncClient # noqa: E402 + + self._force_resync = AsyncForceResyncClient(client_wrapper=self._client_wrapper) + return self._force_resync + + @property + def users(self): + if self._users is None: + from .resources.users.client import AsyncUsersClient # noqa: E402 + + self._users = AsyncUsersClient(client_wrapper=self._client_wrapper) + return self._users + + @property + def webhook_receivers(self): + if self._webhook_receivers is None: + from .resources.webhook_receivers.client import AsyncWebhookReceiversClient # noqa: E402 + + self._webhook_receivers = AsyncWebhookReceiversClient(client_wrapper=self._client_wrapper) + return self._webhook_receivers diff --git a/src/merge/resources/chat/raw_client.py b/src/merge/resources/chat/raw_client.py new file mode 100644 index 00000000..35d27fe5 --- /dev/null +++ b/src/merge/resources/chat/raw_client.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper + + +class RawChatClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + +class AsyncRawChatClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper diff --git a/src/merge/resources/chat/resources/__init__.py b/src/merge/resources/chat/resources/__init__.py new file mode 100644 index 00000000..4b19a9fd --- /dev/null +++ b/src/merge/resources/chat/resources/__init__.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import ( + account_details, + account_token, + async_passthrough, + audit_trail, + available_actions, + conversations, + delete_account, + field_mapping, + force_resync, + generate_key, + groups, + issues, + link_token, + linked_accounts, + messages, + passthrough, + regenerate_key, + scopes, + sync_status, + users, + webhook_receivers, + ) + from .async_passthrough import AsyncPassthroughRetrieveResponse + from .conversations import ConversationsMembersListRequestExpand + from .issues import IssuesListRequestStatus + from .link_token import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage + from .linked_accounts import LinkedAccountsListRequestCategory +_dynamic_imports: typing.Dict[str, str] = { + "AsyncPassthroughRetrieveResponse": ".async_passthrough", + "ConversationsMembersListRequestExpand": ".conversations", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".link_token", + "EndUserDetailsRequestLanguage": ".link_token", + "IssuesListRequestStatus": ".issues", + "LinkedAccountsListRequestCategory": ".linked_accounts", + "account_details": ".", + "account_token": ".", + "async_passthrough": ".", + "audit_trail": ".", + "available_actions": ".", + "conversations": ".", + "delete_account": ".", + "field_mapping": ".", + "force_resync": ".", + "generate_key": ".", + "groups": ".", + "issues": ".", + "link_token": ".", + "linked_accounts": ".", + "messages": ".", + "passthrough": ".", + "regenerate_key": ".", + "scopes": ".", + "sync_status": ".", + "users": ".", + "webhook_receivers": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "AsyncPassthroughRetrieveResponse", + "ConversationsMembersListRequestExpand", + "EndUserDetailsRequestCompletedAccountInitialScreen", + "EndUserDetailsRequestLanguage", + "IssuesListRequestStatus", + "LinkedAccountsListRequestCategory", + "account_details", + "account_token", + "async_passthrough", + "audit_trail", + "available_actions", + "conversations", + "delete_account", + "field_mapping", + "force_resync", + "generate_key", + "groups", + "issues", + "link_token", + "linked_accounts", + "messages", + "passthrough", + "regenerate_key", + "scopes", + "sync_status", + "users", + "webhook_receivers", +] diff --git a/src/merge/resources/chat/resources/account_details/__init__.py b/src/merge/resources/chat/resources/account_details/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/account_details/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/account_details/client.py b/src/merge/resources/chat/resources/account_details/client.py new file mode 100644 index 00000000..4574e858 --- /dev/null +++ b/src/merge/resources/chat/resources/account_details/client.py @@ -0,0 +1,102 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.account_details import AccountDetails +from .raw_client import AsyncRawAccountDetailsClient, RawAccountDetailsClient + + +class AccountDetailsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawAccountDetailsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAccountDetailsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAccountDetailsClient + """ + return self._raw_client + + def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> AccountDetails: + """ + Get details for a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AccountDetails + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.account_details.retrieve() + """ + _response = self._raw_client.retrieve(request_options=request_options) + return _response.data + + +class AsyncAccountDetailsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawAccountDetailsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAccountDetailsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAccountDetailsClient + """ + return self._raw_client + + async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> AccountDetails: + """ + Get details for a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AccountDetails + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.account_details.retrieve() + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve(request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/account_details/raw_client.py b/src/merge/resources/chat/resources/account_details/raw_client.py new file mode 100644 index 00000000..4ea5e641 --- /dev/null +++ b/src/merge/resources/chat/resources/account_details/raw_client.py @@ -0,0 +1,91 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.account_details import AccountDetails + + +class RawAccountDetailsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[AccountDetails]: + """ + Get details for a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[AccountDetails] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/account-details", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AccountDetails, + construct_type( + type_=AccountDetails, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawAccountDetailsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[AccountDetails]: + """ + Get details for a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[AccountDetails] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/account-details", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AccountDetails, + construct_type( + type_=AccountDetails, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/account_token/__init__.py b/src/merge/resources/chat/resources/account_token/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/account_token/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/account_token/client.py b/src/merge/resources/chat/resources/account_token/client.py new file mode 100644 index 00000000..385f91de --- /dev/null +++ b/src/merge/resources/chat/resources/account_token/client.py @@ -0,0 +1,112 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.account_token import AccountToken +from .raw_client import AsyncRawAccountTokenClient, RawAccountTokenClient + + +class AccountTokenClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawAccountTokenClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAccountTokenClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAccountTokenClient + """ + return self._raw_client + + def retrieve(self, public_token: str, *, request_options: typing.Optional[RequestOptions] = None) -> AccountToken: + """ + Returns the account token for the end user with the provided public token. + + Parameters + ---------- + public_token : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AccountToken + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.account_token.retrieve( + public_token="public_token", + ) + """ + _response = self._raw_client.retrieve(public_token, request_options=request_options) + return _response.data + + +class AsyncAccountTokenClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawAccountTokenClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAccountTokenClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAccountTokenClient + """ + return self._raw_client + + async def retrieve( + self, public_token: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AccountToken: + """ + Returns the account token for the end user with the provided public token. + + Parameters + ---------- + public_token : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AccountToken + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.account_token.retrieve( + public_token="public_token", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve(public_token, request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/account_token/raw_client.py b/src/merge/resources/chat/resources/account_token/raw_client.py new file mode 100644 index 00000000..aad17bca --- /dev/null +++ b/src/merge/resources/chat/resources/account_token/raw_client.py @@ -0,0 +1,98 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.account_token import AccountToken + + +class RawAccountTokenClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def retrieve( + self, public_token: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[AccountToken]: + """ + Returns the account token for the end user with the provided public token. + + Parameters + ---------- + public_token : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[AccountToken] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/account-token/{jsonable_encoder(public_token)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AccountToken, + construct_type( + type_=AccountToken, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawAccountTokenClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def retrieve( + self, public_token: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[AccountToken]: + """ + Returns the account token for the end user with the provided public token. + + Parameters + ---------- + public_token : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[AccountToken] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/account-token/{jsonable_encoder(public_token)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AccountToken, + construct_type( + type_=AccountToken, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/async_passthrough/__init__.py b/src/merge/resources/chat/resources/async_passthrough/__init__.py new file mode 100644 index 00000000..375c7953 --- /dev/null +++ b/src/merge/resources/chat/resources/async_passthrough/__init__.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import AsyncPassthroughRetrieveResponse +_dynamic_imports: typing.Dict[str, str] = {"AsyncPassthroughRetrieveResponse": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["AsyncPassthroughRetrieveResponse"] diff --git a/src/merge/resources/chat/resources/async_passthrough/client.py b/src/merge/resources/chat/resources/async_passthrough/client.py new file mode 100644 index 00000000..4bf261a9 --- /dev/null +++ b/src/merge/resources/chat/resources/async_passthrough/client.py @@ -0,0 +1,201 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.async_passthrough_reciept import AsyncPassthroughReciept +from ...types.data_passthrough_request import DataPassthroughRequest +from .raw_client import AsyncRawAsyncPassthroughClient, RawAsyncPassthroughClient +from .types.async_passthrough_retrieve_response import AsyncPassthroughRetrieveResponse + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class AsyncPassthroughClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawAsyncPassthroughClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAsyncPassthroughClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAsyncPassthroughClient + """ + return self._raw_client + + def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncPassthroughReciept: + """ + Asynchronously pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPassthroughReciept + + + Examples + -------- + from merge import Merge + from merge.resources.chat import DataPassthroughRequest, MethodEnum + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), + ) + """ + _response = self._raw_client.create(request=request, request_options=request_options) + return _response.data + + def retrieve( + self, async_passthrough_receipt_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncPassthroughRetrieveResponse: + """ + Retrieves data from earlier async-passthrough POST request + + Parameters + ---------- + async_passthrough_receipt_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPassthroughRetrieveResponse + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", + ) + """ + _response = self._raw_client.retrieve(async_passthrough_receipt_id, request_options=request_options) + return _response.data + + +class AsyncAsyncPassthroughClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawAsyncPassthroughClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAsyncPassthroughClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAsyncPassthroughClient + """ + return self._raw_client + + async def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncPassthroughReciept: + """ + Asynchronously pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPassthroughReciept + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + from merge.resources.chat import DataPassthroughRequest, MethodEnum + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create(request=request, request_options=request_options) + return _response.data + + async def retrieve( + self, async_passthrough_receipt_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncPassthroughRetrieveResponse: + """ + Retrieves data from earlier async-passthrough POST request + + Parameters + ---------- + async_passthrough_receipt_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPassthroughRetrieveResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve(async_passthrough_receipt_id, request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/async_passthrough/raw_client.py b/src/merge/resources/chat/resources/async_passthrough/raw_client.py new file mode 100644 index 00000000..37006b02 --- /dev/null +++ b/src/merge/resources/chat/resources/async_passthrough/raw_client.py @@ -0,0 +1,189 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.async_passthrough_reciept import AsyncPassthroughReciept +from ...types.data_passthrough_request import DataPassthroughRequest +from .types.async_passthrough_retrieve_response import AsyncPassthroughRetrieveResponse + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawAsyncPassthroughClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[AsyncPassthroughReciept]: + """ + Asynchronously pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[AsyncPassthroughReciept] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/async-passthrough", + method="POST", + json=request, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AsyncPassthroughReciept, + construct_type( + type_=AsyncPassthroughReciept, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve( + self, async_passthrough_receipt_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[AsyncPassthroughRetrieveResponse]: + """ + Retrieves data from earlier async-passthrough POST request + + Parameters + ---------- + async_passthrough_receipt_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[AsyncPassthroughRetrieveResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AsyncPassthroughRetrieveResponse, + construct_type( + type_=AsyncPassthroughRetrieveResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawAsyncPassthroughClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[AsyncPassthroughReciept]: + """ + Asynchronously pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[AsyncPassthroughReciept] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/async-passthrough", + method="POST", + json=request, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AsyncPassthroughReciept, + construct_type( + type_=AsyncPassthroughReciept, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, async_passthrough_receipt_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[AsyncPassthroughRetrieveResponse]: + """ + Retrieves data from earlier async-passthrough POST request + + Parameters + ---------- + async_passthrough_receipt_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[AsyncPassthroughRetrieveResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AsyncPassthroughRetrieveResponse, + construct_type( + type_=AsyncPassthroughRetrieveResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/async_passthrough/types/__init__.py b/src/merge/resources/chat/resources/async_passthrough/types/__init__.py new file mode 100644 index 00000000..f6e9bec9 --- /dev/null +++ b/src/merge/resources/chat/resources/async_passthrough/types/__init__.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .async_passthrough_retrieve_response import AsyncPassthroughRetrieveResponse +_dynamic_imports: typing.Dict[str, str] = {"AsyncPassthroughRetrieveResponse": ".async_passthrough_retrieve_response"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["AsyncPassthroughRetrieveResponse"] diff --git a/src/merge/resources/chat/resources/async_passthrough/types/async_passthrough_retrieve_response.py b/src/merge/resources/chat/resources/async_passthrough/types/async_passthrough_retrieve_response.py new file mode 100644 index 00000000..f8f87c18 --- /dev/null +++ b/src/merge/resources/chat/resources/async_passthrough/types/async_passthrough_retrieve_response.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.remote_response import RemoteResponse + +AsyncPassthroughRetrieveResponse = typing.Union[RemoteResponse, str] diff --git a/src/merge/resources/chat/resources/audit_trail/__init__.py b/src/merge/resources/chat/resources/audit_trail/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/audit_trail/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/audit_trail/client.py b/src/merge/resources/chat/resources/audit_trail/client.py new file mode 100644 index 00000000..87803242 --- /dev/null +++ b/src/merge/resources/chat/resources/audit_trail/client.py @@ -0,0 +1,188 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList +from .raw_client import AsyncRawAuditTrailClient, RawAuditTrailClient + + +class AuditTrailClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawAuditTrailClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAuditTrailClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAuditTrailClient + """ + return self._raw_client + + def list( + self, + *, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + event_type: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + user_email: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedAuditLogEventList: + """ + Gets a list of audit trail events. + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include audit trail events that occurred before this time + + event_type : typing.Optional[str] + 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` + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include audit trail events that occurred after this time + + user_email : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedAuditLogEventList + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.audit_trail.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", + ) + """ + _response = self._raw_client.list( + cursor=cursor, + end_date=end_date, + event_type=event_type, + page_size=page_size, + start_date=start_date, + user_email=user_email, + request_options=request_options, + ) + return _response.data + + +class AsyncAuditTrailClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawAuditTrailClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAuditTrailClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAuditTrailClient + """ + return self._raw_client + + async def list( + self, + *, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + event_type: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + user_email: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedAuditLogEventList: + """ + Gets a list of audit trail events. + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include audit trail events that occurred before this time + + event_type : typing.Optional[str] + 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` + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include audit trail events that occurred after this time + + user_email : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedAuditLogEventList + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.audit_trail.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + cursor=cursor, + end_date=end_date, + event_type=event_type, + page_size=page_size, + start_date=start_date, + user_email=user_email, + request_options=request_options, + ) + return _response.data diff --git a/src/merge/resources/chat/resources/audit_trail/raw_client.py b/src/merge/resources/chat/resources/audit_trail/raw_client.py new file mode 100644 index 00000000..3e5f7e89 --- /dev/null +++ b/src/merge/resources/chat/resources/audit_trail/raw_client.py @@ -0,0 +1,161 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList + + +class RawAuditTrailClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + event_type: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + user_email: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedAuditLogEventList]: + """ + Gets a list of audit trail events. + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include audit trail events that occurred before this time + + event_type : typing.Optional[str] + 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` + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include audit trail events that occurred after this time + + user_email : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedAuditLogEventList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/audit-trail", + method="GET", + params={ + "cursor": cursor, + "end_date": end_date, + "event_type": event_type, + "page_size": page_size, + "start_date": start_date, + "user_email": user_email, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedAuditLogEventList, + construct_type( + type_=PaginatedAuditLogEventList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawAuditTrailClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + event_type: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + user_email: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedAuditLogEventList]: + """ + Gets a list of audit trail events. + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include audit trail events that occurred before this time + + event_type : typing.Optional[str] + 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` + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include audit trail events that occurred after this time + + user_email : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedAuditLogEventList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/audit-trail", + method="GET", + params={ + "cursor": cursor, + "end_date": end_date, + "event_type": event_type, + "page_size": page_size, + "start_date": start_date, + "user_email": user_email, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedAuditLogEventList, + construct_type( + type_=PaginatedAuditLogEventList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/available_actions/__init__.py b/src/merge/resources/chat/resources/available_actions/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/available_actions/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/available_actions/client.py b/src/merge/resources/chat/resources/available_actions/client.py new file mode 100644 index 00000000..e6dafbea --- /dev/null +++ b/src/merge/resources/chat/resources/available_actions/client.py @@ -0,0 +1,102 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.available_actions import AvailableActions +from .raw_client import AsyncRawAvailableActionsClient, RawAvailableActionsClient + + +class AvailableActionsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawAvailableActionsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAvailableActionsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAvailableActionsClient + """ + return self._raw_client + + def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> AvailableActions: + """ + Returns a list of models and actions available for an account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AvailableActions + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.available_actions.retrieve() + """ + _response = self._raw_client.retrieve(request_options=request_options) + return _response.data + + +class AsyncAvailableActionsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawAvailableActionsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAvailableActionsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAvailableActionsClient + """ + return self._raw_client + + async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> AvailableActions: + """ + Returns a list of models and actions available for an account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AvailableActions + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.available_actions.retrieve() + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve(request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/available_actions/raw_client.py b/src/merge/resources/chat/resources/available_actions/raw_client.py new file mode 100644 index 00000000..ba47baf7 --- /dev/null +++ b/src/merge/resources/chat/resources/available_actions/raw_client.py @@ -0,0 +1,91 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.available_actions import AvailableActions + + +class RawAvailableActionsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[AvailableActions]: + """ + Returns a list of models and actions available for an account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[AvailableActions] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/available-actions", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AvailableActions, + construct_type( + type_=AvailableActions, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawAvailableActionsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[AvailableActions]: + """ + Returns a list of models and actions available for an account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[AvailableActions] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/available-actions", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AvailableActions, + construct_type( + type_=AvailableActions, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/conversations/__init__.py b/src/merge/resources/chat/resources/conversations/__init__.py new file mode 100644 index 00000000..d53a3f28 --- /dev/null +++ b/src/merge/resources/chat/resources/conversations/__init__.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ConversationsMembersListRequestExpand +_dynamic_imports: typing.Dict[str, str] = {"ConversationsMembersListRequestExpand": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ConversationsMembersListRequestExpand"] diff --git a/src/merge/resources/chat/resources/conversations/client.py b/src/merge/resources/chat/resources/conversations/client.py new file mode 100644 index 00000000..0a9100aa --- /dev/null +++ b/src/merge/resources/chat/resources/conversations/client.py @@ -0,0 +1,553 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.conversation import Conversation +from ...types.paginated_conversation_list import PaginatedConversationList +from ...types.paginated_member_list import PaginatedMemberList +from .raw_client import AsyncRawConversationsClient, RawConversationsClient +from .types.conversations_members_list_request_expand import ConversationsMembersListRequestExpand + + +class ConversationsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawConversationsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawConversationsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawConversationsClient + """ + return self._raw_client + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["members"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedConversationList: + """ + Returns a list of `Conversation` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedConversationList + + + Examples + -------- + import datetime + + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.conversations.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + """ + _response = self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + expand=expand, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + def members_list( + self, + conversation_id: str, + *, + cursor: typing.Optional[str] = None, + expand: typing.Optional[ConversationsMembersListRequestExpand] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedMemberList: + """ + Returns a list of `Member` objects. + + Parameters + ---------- + conversation_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[ConversationsMembersListRequestExpand] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedMemberList + + + Examples + -------- + from merge import Merge + from merge.resources.chat.resources.conversations import ( + ConversationsMembersListRequestExpand, + ) + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.conversations.members_list( + conversation_id="conversation_id", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ConversationsMembersListRequestExpand.GROUP, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, + ) + """ + _response = self._raw_client.members_list( + conversation_id, + cursor=cursor, + expand=expand, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + page_size=page_size, + request_options=request_options, + ) + return _response.data + + def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["members"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Conversation: + """ + Returns a `Conversation` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Conversation + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.conversations.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + """ + _response = self._raw_client.retrieve( + id, + expand=expand, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data + + +class AsyncConversationsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawConversationsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawConversationsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawConversationsClient + """ + return self._raw_client + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["members"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedConversationList: + """ + Returns a list of `Conversation` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedConversationList + + + Examples + -------- + import asyncio + import datetime + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.conversations.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + expand=expand, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + async def members_list( + self, + conversation_id: str, + *, + cursor: typing.Optional[str] = None, + expand: typing.Optional[ConversationsMembersListRequestExpand] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedMemberList: + """ + Returns a list of `Member` objects. + + Parameters + ---------- + conversation_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[ConversationsMembersListRequestExpand] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedMemberList + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + from merge.resources.chat.resources.conversations import ( + ConversationsMembersListRequestExpand, + ) + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.conversations.members_list( + conversation_id="conversation_id", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ConversationsMembersListRequestExpand.GROUP, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.members_list( + conversation_id, + cursor=cursor, + expand=expand, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + page_size=page_size, + request_options=request_options, + ) + return _response.data + + async def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["members"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Conversation: + """ + Returns a `Conversation` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Conversation + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.conversations.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve( + id, + expand=expand, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data diff --git a/src/merge/resources/chat/resources/conversations/raw_client.py b/src/merge/resources/chat/resources/conversations/raw_client.py new file mode 100644 index 00000000..6019eeb3 --- /dev/null +++ b/src/merge/resources/chat/resources/conversations/raw_client.py @@ -0,0 +1,479 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.datetime_utils import serialize_datetime +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.conversation import Conversation +from ...types.paginated_conversation_list import PaginatedConversationList +from ...types.paginated_member_list import PaginatedMemberList +from .types.conversations_members_list_request_expand import ConversationsMembersListRequestExpand + + +class RawConversationsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["members"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedConversationList]: + """ + Returns a list of `Conversation` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedConversationList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/conversations", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "expand": expand, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedConversationList, + construct_type( + type_=PaginatedConversationList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def members_list( + self, + conversation_id: str, + *, + cursor: typing.Optional[str] = None, + expand: typing.Optional[ConversationsMembersListRequestExpand] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedMemberList]: + """ + Returns a list of `Member` objects. + + Parameters + ---------- + conversation_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[ConversationsMembersListRequestExpand] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedMemberList] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/conversations/{jsonable_encoder(conversation_id)}/members", + method="GET", + params={ + "cursor": cursor, + "expand": expand, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedMemberList, + construct_type( + type_=PaginatedMemberList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["members"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Conversation]: + """ + Returns a `Conversation` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Conversation] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/conversations/{jsonable_encoder(id)}", + method="GET", + params={ + "expand": expand, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Conversation, + construct_type( + type_=Conversation, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawConversationsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["members"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedConversationList]: + """ + Returns a list of `Conversation` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedConversationList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/conversations", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "expand": expand, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedConversationList, + construct_type( + type_=PaginatedConversationList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def members_list( + self, + conversation_id: str, + *, + cursor: typing.Optional[str] = None, + expand: typing.Optional[ConversationsMembersListRequestExpand] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedMemberList]: + """ + Returns a list of `Member` objects. + + Parameters + ---------- + conversation_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[ConversationsMembersListRequestExpand] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedMemberList] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/conversations/{jsonable_encoder(conversation_id)}/members", + method="GET", + params={ + "cursor": cursor, + "expand": expand, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedMemberList, + construct_type( + type_=PaginatedMemberList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["members"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Conversation]: + """ + Returns a `Conversation` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["members"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Conversation] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/conversations/{jsonable_encoder(id)}", + method="GET", + params={ + "expand": expand, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Conversation, + construct_type( + type_=Conversation, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/conversations/types/__init__.py b/src/merge/resources/chat/resources/conversations/types/__init__.py new file mode 100644 index 00000000..21ba60f0 --- /dev/null +++ b/src/merge/resources/chat/resources/conversations/types/__init__.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .conversations_members_list_request_expand import ConversationsMembersListRequestExpand +_dynamic_imports: typing.Dict[str, str] = { + "ConversationsMembersListRequestExpand": ".conversations_members_list_request_expand" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ConversationsMembersListRequestExpand"] diff --git a/src/merge/resources/chat/resources/conversations/types/conversations_members_list_request_expand.py b/src/merge/resources/chat/resources/conversations/types/conversations_members_list_request_expand.py new file mode 100644 index 00000000..0653db6d --- /dev/null +++ b/src/merge/resources/chat/resources/conversations/types/conversations_members_list_request_expand.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class ConversationsMembersListRequestExpand(str, enum.Enum): + GROUP = "group" + USER = "user" + USER_GROUP = "user,group" + + def visit( + self, + group: typing.Callable[[], T_Result], + user: typing.Callable[[], T_Result], + user_group: typing.Callable[[], T_Result], + ) -> T_Result: + if self is ConversationsMembersListRequestExpand.GROUP: + return group() + if self is ConversationsMembersListRequestExpand.USER: + return user() + if self is ConversationsMembersListRequestExpand.USER_GROUP: + return user_group() diff --git a/src/merge/resources/chat/resources/delete_account/__init__.py b/src/merge/resources/chat/resources/delete_account/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/delete_account/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/delete_account/client.py b/src/merge/resources/chat/resources/delete_account/client.py new file mode 100644 index 00000000..44dab555 --- /dev/null +++ b/src/merge/resources/chat/resources/delete_account/client.py @@ -0,0 +1,99 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from .raw_client import AsyncRawDeleteAccountClient, RawDeleteAccountClient + + +class DeleteAccountClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawDeleteAccountClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawDeleteAccountClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawDeleteAccountClient + """ + return self._raw_client + + def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Delete a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.delete_account.delete() + """ + _response = self._raw_client.delete(request_options=request_options) + return _response.data + + +class AsyncDeleteAccountClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawDeleteAccountClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawDeleteAccountClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawDeleteAccountClient + """ + return self._raw_client + + async def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Delete a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.delete_account.delete() + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/delete_account/raw_client.py b/src/merge/resources/chat/resources/delete_account/raw_client.py new file mode 100644 index 00000000..67cfa096 --- /dev/null +++ b/src/merge/resources/chat/resources/delete_account/raw_client.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions + + +class RawDeleteAccountClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: + """ + Delete a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/delete-account", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawDeleteAccountClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[None]: + """ + Delete a linked account. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/delete-account", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/field_mapping/__init__.py b/src/merge/resources/chat/resources/field_mapping/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/field_mapping/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/field_mapping/client.py b/src/merge/resources/chat/resources/field_mapping/client.py new file mode 100644 index 00000000..c781dd2c --- /dev/null +++ b/src/merge/resources/chat/resources/field_mapping/client.py @@ -0,0 +1,664 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse +from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse +from ...types.field_mapping_instance_response import FieldMappingInstanceResponse +from ...types.remote_field_api_response import RemoteFieldApiResponse +from .raw_client import AsyncRawFieldMappingClient, RawFieldMappingClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class FieldMappingClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawFieldMappingClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawFieldMappingClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawFieldMappingClient + """ + return self._raw_client + + def field_mappings_retrieve( + self, + *, + exclude_remote_field_metadata: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> FieldMappingApiInstanceResponse: + """ + Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingApiInstanceResponse + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) + """ + _response = self._raw_client.field_mappings_retrieve( + exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options + ) + return _response.data + + def field_mappings_create( + self, + *, + target_field_name: str, + target_field_description: str, + remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]], + remote_method: str, + remote_url_path: str, + common_model_name: str, + exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> FieldMappingInstanceResponse: + """ + Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + target_field_name : str + The name of the target field you want this remote field to map to. + + target_field_description : str + The description of the target field you want this remote field to map to. + + remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : str + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : str + The path of the remote endpoint where the remote field is coming from. + + common_model_name : str + The name of the Common Model that the remote field corresponds to in a given category. + + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingInstanceResponse + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", + ) + """ + _response = self._raw_client.field_mappings_create( + target_field_name=target_field_name, + target_field_description=target_field_description, + remote_field_traversal_path=remote_field_traversal_path, + remote_method=remote_method, + remote_url_path=remote_url_path, + common_model_name=common_model_name, + exclude_remote_field_metadata=exclude_remote_field_metadata, + jmes_path=jmes_path, + request_options=request_options, + ) + return _response.data + + def field_mappings_destroy( + self, field_mapping_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> FieldMappingInstanceResponse: + """ + Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingInstanceResponse + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", + ) + """ + _response = self._raw_client.field_mappings_destroy(field_mapping_id, request_options=request_options) + return _response.data + + def field_mappings_partial_update( + self, + field_mapping_id: str, + *, + remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, + remote_method: typing.Optional[str] = OMIT, + remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> FieldMappingInstanceResponse: + """ + Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : typing.Optional[str] + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : typing.Optional[str] + The path of the remote endpoint where the remote field is coming from. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingInstanceResponse + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", + ) + """ + _response = self._raw_client.field_mappings_partial_update( + field_mapping_id, + remote_field_traversal_path=remote_field_traversal_path, + remote_method=remote_method, + remote_url_path=remote_url_path, + jmes_path=jmes_path, + request_options=request_options, + ) + return _response.data + + def remote_fields_retrieve( + self, + *, + common_models: typing.Optional[str] = None, + include_example_values: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> RemoteFieldApiResponse: + """ + Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + common_models : typing.Optional[str] + A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. + + include_example_values : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteFieldApiResponse + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) + """ + _response = self._raw_client.remote_fields_retrieve( + common_models=common_models, include_example_values=include_example_values, request_options=request_options + ) + return _response.data + + def target_fields_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> ExternalTargetFieldApiResponse: + """ + Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ExternalTargetFieldApiResponse + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.field_mapping.target_fields_retrieve() + """ + _response = self._raw_client.target_fields_retrieve(request_options=request_options) + return _response.data + + +class AsyncFieldMappingClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawFieldMappingClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawFieldMappingClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawFieldMappingClient + """ + return self._raw_client + + async def field_mappings_retrieve( + self, + *, + exclude_remote_field_metadata: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> FieldMappingApiInstanceResponse: + """ + Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingApiInstanceResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.field_mappings_retrieve( + exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options + ) + return _response.data + + async def field_mappings_create( + self, + *, + target_field_name: str, + target_field_description: str, + remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]], + remote_method: str, + remote_url_path: str, + common_model_name: str, + exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> FieldMappingInstanceResponse: + """ + Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + target_field_name : str + The name of the target field you want this remote field to map to. + + target_field_description : str + The description of the target field you want this remote field to map to. + + remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : str + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : str + The path of the remote endpoint where the remote field is coming from. + + common_model_name : str + The name of the Common Model that the remote field corresponds to in a given category. + + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingInstanceResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.field_mappings_create( + target_field_name=target_field_name, + target_field_description=target_field_description, + remote_field_traversal_path=remote_field_traversal_path, + remote_method=remote_method, + remote_url_path=remote_url_path, + common_model_name=common_model_name, + exclude_remote_field_metadata=exclude_remote_field_metadata, + jmes_path=jmes_path, + request_options=request_options, + ) + return _response.data + + async def field_mappings_destroy( + self, field_mapping_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> FieldMappingInstanceResponse: + """ + Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingInstanceResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.field_mappings_destroy(field_mapping_id, request_options=request_options) + return _response.data + + async def field_mappings_partial_update( + self, + field_mapping_id: str, + *, + remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, + remote_method: typing.Optional[str] = OMIT, + remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> FieldMappingInstanceResponse: + """ + Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : typing.Optional[str] + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : typing.Optional[str] + The path of the remote endpoint where the remote field is coming from. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FieldMappingInstanceResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.field_mappings_partial_update( + field_mapping_id, + remote_field_traversal_path=remote_field_traversal_path, + remote_method=remote_method, + remote_url_path=remote_url_path, + jmes_path=jmes_path, + request_options=request_options, + ) + return _response.data + + async def remote_fields_retrieve( + self, + *, + common_models: typing.Optional[str] = None, + include_example_values: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> RemoteFieldApiResponse: + """ + Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + common_models : typing.Optional[str] + A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. + + include_example_values : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteFieldApiResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.remote_fields_retrieve( + common_models=common_models, include_example_values=include_example_values, request_options=request_options + ) + return _response.data + + async def target_fields_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> ExternalTargetFieldApiResponse: + """ + Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ExternalTargetFieldApiResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.field_mapping.target_fields_retrieve() + + + asyncio.run(main()) + """ + _response = await self._raw_client.target_fields_retrieve(request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/field_mapping/raw_client.py b/src/merge/resources/chat/resources/field_mapping/raw_client.py new file mode 100644 index 00000000..e671dd4b --- /dev/null +++ b/src/merge/resources/chat/resources/field_mapping/raw_client.py @@ -0,0 +1,672 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse +from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse +from ...types.field_mapping_instance_response import FieldMappingInstanceResponse +from ...types.remote_field_api_response import RemoteFieldApiResponse + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawFieldMappingClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def field_mappings_retrieve( + self, + *, + exclude_remote_field_metadata: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[FieldMappingApiInstanceResponse]: + """ + Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[FieldMappingApiInstanceResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/field-mappings", + method="GET", + params={ + "exclude_remote_field_metadata": exclude_remote_field_metadata, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingApiInstanceResponse, + construct_type( + type_=FieldMappingApiInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def field_mappings_create( + self, + *, + target_field_name: str, + target_field_description: str, + remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]], + remote_method: str, + remote_url_path: str, + common_model_name: str, + exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[FieldMappingInstanceResponse]: + """ + Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + target_field_name : str + The name of the target field you want this remote field to map to. + + target_field_description : str + The description of the target field you want this remote field to map to. + + remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : str + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : str + The path of the remote endpoint where the remote field is coming from. + + common_model_name : str + The name of the Common Model that the remote field corresponds to in a given category. + + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[FieldMappingInstanceResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/field-mappings", + method="POST", + params={ + "exclude_remote_field_metadata": exclude_remote_field_metadata, + }, + json={ + "target_field_name": target_field_name, + "target_field_description": target_field_description, + "remote_field_traversal_path": remote_field_traversal_path, + "remote_method": remote_method, + "remote_url_path": remote_url_path, + "common_model_name": common_model_name, + "jmes_path": jmes_path, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingInstanceResponse, + construct_type( + type_=FieldMappingInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def field_mappings_destroy( + self, field_mapping_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[FieldMappingInstanceResponse]: + """ + Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[FieldMappingInstanceResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/field-mappings/{jsonable_encoder(field_mapping_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingInstanceResponse, + construct_type( + type_=FieldMappingInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def field_mappings_partial_update( + self, + field_mapping_id: str, + *, + remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, + remote_method: typing.Optional[str] = OMIT, + remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[FieldMappingInstanceResponse]: + """ + Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : typing.Optional[str] + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : typing.Optional[str] + The path of the remote endpoint where the remote field is coming from. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[FieldMappingInstanceResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/field-mappings/{jsonable_encoder(field_mapping_id)}", + method="PATCH", + json={ + "remote_field_traversal_path": remote_field_traversal_path, + "remote_method": remote_method, + "remote_url_path": remote_url_path, + "jmes_path": jmes_path, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingInstanceResponse, + construct_type( + type_=FieldMappingInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def remote_fields_retrieve( + self, + *, + common_models: typing.Optional[str] = None, + include_example_values: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[RemoteFieldApiResponse]: + """ + Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + common_models : typing.Optional[str] + A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. + + include_example_values : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[RemoteFieldApiResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/remote-fields", + method="GET", + params={ + "common_models": common_models, + "include_example_values": include_example_values, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteFieldApiResponse, + construct_type( + type_=RemoteFieldApiResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def target_fields_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ExternalTargetFieldApiResponse]: + """ + Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ExternalTargetFieldApiResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/target-fields", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ExternalTargetFieldApiResponse, + construct_type( + type_=ExternalTargetFieldApiResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawFieldMappingClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def field_mappings_retrieve( + self, + *, + exclude_remote_field_metadata: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[FieldMappingApiInstanceResponse]: + """ + Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[FieldMappingApiInstanceResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/field-mappings", + method="GET", + params={ + "exclude_remote_field_metadata": exclude_remote_field_metadata, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingApiInstanceResponse, + construct_type( + type_=FieldMappingApiInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def field_mappings_create( + self, + *, + target_field_name: str, + target_field_description: str, + remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]], + remote_method: str, + remote_url_path: str, + common_model_name: str, + exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: + """ + Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + target_field_name : str + The name of the target field you want this remote field to map to. + + target_field_description : str + The description of the target field you want this remote field to map to. + + remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : str + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : str + The path of the remote endpoint where the remote field is coming from. + + common_model_name : str + The name of the Common Model that the remote field corresponds to in a given category. + + exclude_remote_field_metadata : typing.Optional[bool] + 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. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[FieldMappingInstanceResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/field-mappings", + method="POST", + params={ + "exclude_remote_field_metadata": exclude_remote_field_metadata, + }, + json={ + "target_field_name": target_field_name, + "target_field_description": target_field_description, + "remote_field_traversal_path": remote_field_traversal_path, + "remote_method": remote_method, + "remote_url_path": remote_url_path, + "common_model_name": common_model_name, + "jmes_path": jmes_path, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingInstanceResponse, + construct_type( + type_=FieldMappingInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def field_mappings_destroy( + self, field_mapping_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: + """ + Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[FieldMappingInstanceResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/field-mappings/{jsonable_encoder(field_mapping_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingInstanceResponse, + construct_type( + type_=FieldMappingInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def field_mappings_partial_update( + self, + field_mapping_id: str, + *, + remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, + remote_method: typing.Optional[str] = OMIT, + remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: + """ + Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + + Parameters + ---------- + field_mapping_id : str + + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + + remote_method : typing.Optional[str] + The method of the remote endpoint where the remote field is coming from. + + remote_url_path : typing.Optional[str] + The path of the remote endpoint where the remote field is coming from. + + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[FieldMappingInstanceResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/field-mappings/{jsonable_encoder(field_mapping_id)}", + method="PATCH", + json={ + "remote_field_traversal_path": remote_field_traversal_path, + "remote_method": remote_method, + "remote_url_path": remote_url_path, + "jmes_path": jmes_path, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + FieldMappingInstanceResponse, + construct_type( + type_=FieldMappingInstanceResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def remote_fields_retrieve( + self, + *, + common_models: typing.Optional[str] = None, + include_example_values: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[RemoteFieldApiResponse]: + """ + Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + + Parameters + ---------- + common_models : typing.Optional[str] + A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. + + include_example_values : typing.Optional[str] + 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. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[RemoteFieldApiResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/remote-fields", + method="GET", + params={ + "common_models": common_models, + "include_example_values": include_example_values, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteFieldApiResponse, + construct_type( + type_=RemoteFieldApiResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def target_fields_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ExternalTargetFieldApiResponse]: + """ + Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ExternalTargetFieldApiResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/target-fields", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ExternalTargetFieldApiResponse, + construct_type( + type_=ExternalTargetFieldApiResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/force_resync/__init__.py b/src/merge/resources/chat/resources/force_resync/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/force_resync/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/force_resync/client.py b/src/merge/resources/chat/resources/force_resync/client.py new file mode 100644 index 00000000..bee5aacd --- /dev/null +++ b/src/merge/resources/chat/resources/force_resync/client.py @@ -0,0 +1,106 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.sync_status import SyncStatus +from .raw_client import AsyncRawForceResyncClient, RawForceResyncClient + + +class ForceResyncClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawForceResyncClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawForceResyncClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawForceResyncClient + """ + return self._raw_client + + def sync_status_resync_create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[SyncStatus]: + """ + Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[SyncStatus] + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.force_resync.sync_status_resync_create() + """ + _response = self._raw_client.sync_status_resync_create(request_options=request_options) + return _response.data + + +class AsyncForceResyncClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawForceResyncClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawForceResyncClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawForceResyncClient + """ + return self._raw_client + + async def sync_status_resync_create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[SyncStatus]: + """ + Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[SyncStatus] + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.force_resync.sync_status_resync_create() + + + asyncio.run(main()) + """ + _response = await self._raw_client.sync_status_resync_create(request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/force_resync/raw_client.py b/src/merge/resources/chat/resources/force_resync/raw_client.py new file mode 100644 index 00000000..76da107a --- /dev/null +++ b/src/merge/resources/chat/resources/force_resync/raw_client.py @@ -0,0 +1,93 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.sync_status import SyncStatus + + +class RawForceResyncClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def sync_status_resync_create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.List[SyncStatus]]: + """ + Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[SyncStatus]] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/sync-status/resync", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[SyncStatus], + construct_type( + type_=typing.List[SyncStatus], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawForceResyncClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def sync_status_resync_create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.List[SyncStatus]]: + """ + Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[SyncStatus]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/sync-status/resync", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[SyncStatus], + construct_type( + type_=typing.List[SyncStatus], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/generate_key/__init__.py b/src/merge/resources/chat/resources/generate_key/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/generate_key/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/generate_key/client.py b/src/merge/resources/chat/resources/generate_key/client.py new file mode 100644 index 00000000..0b0e3276 --- /dev/null +++ b/src/merge/resources/chat/resources/generate_key/client.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.remote_key import RemoteKey +from .raw_client import AsyncRawGenerateKeyClient, RawGenerateKeyClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class GenerateKeyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawGenerateKeyClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawGenerateKeyClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawGenerateKeyClient + """ + return self._raw_client + + def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> RemoteKey: + """ + Create a remote key. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteKey + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.generate_key.create( + name="Remote Deployment Key 1", + ) + """ + _response = self._raw_client.create(name=name, request_options=request_options) + return _response.data + + +class AsyncGenerateKeyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawGenerateKeyClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawGenerateKeyClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawGenerateKeyClient + """ + return self._raw_client + + async def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> RemoteKey: + """ + Create a remote key. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteKey + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.generate_key.create( + name="Remote Deployment Key 1", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create(name=name, request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/generate_key/raw_client.py b/src/merge/resources/chat/resources/generate_key/raw_client.py new file mode 100644 index 00000000..869fcbb1 --- /dev/null +++ b/src/merge/resources/chat/resources/generate_key/raw_client.py @@ -0,0 +1,114 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.remote_key import RemoteKey + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawGenerateKeyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[RemoteKey]: + """ + Create a remote key. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[RemoteKey] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/generate-key", + method="POST", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteKey, + construct_type( + type_=RemoteKey, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawGenerateKeyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, *, name: str, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[RemoteKey]: + """ + Create a remote key. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[RemoteKey] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/generate-key", + method="POST", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteKey, + construct_type( + type_=RemoteKey, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/groups/__init__.py b/src/merge/resources/chat/resources/groups/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/groups/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/groups/client.py b/src/merge/resources/chat/resources/groups/client.py new file mode 100644 index 00000000..6d11e52a --- /dev/null +++ b/src/merge/resources/chat/resources/groups/client.py @@ -0,0 +1,367 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.group import Group +from ...types.paginated_group_list import PaginatedGroupList +from .raw_client import AsyncRawGroupsClient, RawGroupsClient + + +class GroupsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawGroupsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawGroupsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawGroupsClient + """ + return self._raw_client + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedGroupList: + """ + Returns a list of `Group` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedGroupList + + + Examples + -------- + import datetime + + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + """ + _response = self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Group: + """ + Returns a `Group` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Group + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.groups.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + """ + _response = self._raw_client.retrieve( + id, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data + + +class AsyncGroupsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawGroupsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawGroupsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawGroupsClient + """ + return self._raw_client + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedGroupList: + """ + Returns a list of `Group` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedGroupList + + + Examples + -------- + import asyncio + import datetime + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + async def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Group: + """ + Returns a `Group` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Group + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.groups.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve( + id, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data diff --git a/src/merge/resources/chat/resources/groups/raw_client.py b/src/merge/resources/chat/resources/groups/raw_client.py new file mode 100644 index 00000000..dc8f99ba --- /dev/null +++ b/src/merge/resources/chat/resources/groups/raw_client.py @@ -0,0 +1,311 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.datetime_utils import serialize_datetime +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.group import Group +from ...types.paginated_group_list import PaginatedGroupList + + +class RawGroupsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedGroupList]: + """ + Returns a list of `Group` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedGroupList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/groups", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedGroupList, + construct_type( + type_=PaginatedGroupList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Group]: + """ + Returns a `Group` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Group] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/groups/{jsonable_encoder(id)}", + method="GET", + params={ + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Group, + construct_type( + type_=Group, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawGroupsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedGroupList]: + """ + Returns a list of `Group` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedGroupList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/groups", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedGroupList, + construct_type( + type_=PaginatedGroupList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Group]: + """ + Returns a `Group` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Group] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/groups/{jsonable_encoder(id)}", + method="GET", + params={ + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Group, + construct_type( + type_=Group, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/issues/__init__.py b/src/merge/resources/chat/resources/issues/__init__.py new file mode 100644 index 00000000..3ca1094b --- /dev/null +++ b/src/merge/resources/chat/resources/issues/__init__.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import IssuesListRequestStatus +_dynamic_imports: typing.Dict[str, str] = {"IssuesListRequestStatus": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["IssuesListRequestStatus"] diff --git a/src/merge/resources/chat/resources/issues/client.py b/src/merge/resources/chat/resources/issues/client.py new file mode 100644 index 00000000..5f5375b3 --- /dev/null +++ b/src/merge/resources/chat/resources/issues/client.py @@ -0,0 +1,378 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.issue import Issue +from ...types.paginated_issue_list import PaginatedIssueList +from .raw_client import AsyncRawIssuesClient, RawIssuesClient +from .types.issues_list_request_status import IssuesListRequestStatus + + +class IssuesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawIssuesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawIssuesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawIssuesClient + """ + return self._raw_client + + def list( + self, + *, + account_token: typing.Optional[str] = None, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + first_incident_time_after: typing.Optional[dt.datetime] = None, + first_incident_time_before: typing.Optional[dt.datetime] = None, + include_muted: typing.Optional[str] = None, + integration_name: typing.Optional[str] = None, + last_incident_time_after: typing.Optional[dt.datetime] = None, + last_incident_time_before: typing.Optional[dt.datetime] = None, + linked_account_id: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + status: typing.Optional[IssuesListRequestStatus] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedIssueList: + """ + Gets all issues for Organization. + + Parameters + ---------- + account_token : typing.Optional[str] + + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred before this time + + end_user_organization_name : typing.Optional[str] + + first_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was after this datetime. + + first_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was before this datetime. + + include_muted : typing.Optional[str] + If true, will include muted issues + + integration_name : typing.Optional[str] + + last_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was after this datetime. + + last_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was before this datetime. + + linked_account_id : typing.Optional[str] + If provided, will only include issues pertaining to the linked account passed in. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred after this time + + status : typing.Optional[IssuesListRequestStatus] + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedIssueList + + + Examples + -------- + import datetime + + from merge import Merge + from merge.resources.chat.resources.issues import IssuesListRequestStatus + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, + ) + """ + _response = self._raw_client.list( + account_token=account_token, + cursor=cursor, + end_date=end_date, + end_user_organization_name=end_user_organization_name, + first_incident_time_after=first_incident_time_after, + first_incident_time_before=first_incident_time_before, + include_muted=include_muted, + integration_name=integration_name, + last_incident_time_after=last_incident_time_after, + last_incident_time_before=last_incident_time_before, + linked_account_id=linked_account_id, + page_size=page_size, + start_date=start_date, + status=status, + request_options=request_options, + ) + return _response.data + + def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Issue: + """ + Get a specific issue. + + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Issue + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.issues.retrieve( + id="id", + ) + """ + _response = self._raw_client.retrieve(id, request_options=request_options) + return _response.data + + +class AsyncIssuesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawIssuesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawIssuesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawIssuesClient + """ + return self._raw_client + + async def list( + self, + *, + account_token: typing.Optional[str] = None, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + first_incident_time_after: typing.Optional[dt.datetime] = None, + first_incident_time_before: typing.Optional[dt.datetime] = None, + include_muted: typing.Optional[str] = None, + integration_name: typing.Optional[str] = None, + last_incident_time_after: typing.Optional[dt.datetime] = None, + last_incident_time_before: typing.Optional[dt.datetime] = None, + linked_account_id: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + status: typing.Optional[IssuesListRequestStatus] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedIssueList: + """ + Gets all issues for Organization. + + Parameters + ---------- + account_token : typing.Optional[str] + + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred before this time + + end_user_organization_name : typing.Optional[str] + + first_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was after this datetime. + + first_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was before this datetime. + + include_muted : typing.Optional[str] + If true, will include muted issues + + integration_name : typing.Optional[str] + + last_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was after this datetime. + + last_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was before this datetime. + + linked_account_id : typing.Optional[str] + If provided, will only include issues pertaining to the linked account passed in. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred after this time + + status : typing.Optional[IssuesListRequestStatus] + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedIssueList + + + Examples + -------- + import asyncio + import datetime + + from merge import AsyncMerge + from merge.resources.chat.resources.issues import IssuesListRequestStatus + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + account_token=account_token, + cursor=cursor, + end_date=end_date, + end_user_organization_name=end_user_organization_name, + first_incident_time_after=first_incident_time_after, + first_incident_time_before=first_incident_time_before, + include_muted=include_muted, + integration_name=integration_name, + last_incident_time_after=last_incident_time_after, + last_incident_time_before=last_incident_time_before, + linked_account_id=linked_account_id, + page_size=page_size, + start_date=start_date, + status=status, + request_options=request_options, + ) + return _response.data + + async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Issue: + """ + Get a specific issue. + + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Issue + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.issues.retrieve( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve(id, request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/issues/raw_client.py b/src/merge/resources/chat/resources/issues/raw_client.py new file mode 100644 index 00000000..3144b225 --- /dev/null +++ b/src/merge/resources/chat/resources/issues/raw_client.py @@ -0,0 +1,336 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.datetime_utils import serialize_datetime +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.issue import Issue +from ...types.paginated_issue_list import PaginatedIssueList +from .types.issues_list_request_status import IssuesListRequestStatus + + +class RawIssuesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + account_token: typing.Optional[str] = None, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + first_incident_time_after: typing.Optional[dt.datetime] = None, + first_incident_time_before: typing.Optional[dt.datetime] = None, + include_muted: typing.Optional[str] = None, + integration_name: typing.Optional[str] = None, + last_incident_time_after: typing.Optional[dt.datetime] = None, + last_incident_time_before: typing.Optional[dt.datetime] = None, + linked_account_id: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + status: typing.Optional[IssuesListRequestStatus] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedIssueList]: + """ + Gets all issues for Organization. + + Parameters + ---------- + account_token : typing.Optional[str] + + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred before this time + + end_user_organization_name : typing.Optional[str] + + first_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was after this datetime. + + first_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was before this datetime. + + include_muted : typing.Optional[str] + If true, will include muted issues + + integration_name : typing.Optional[str] + + last_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was after this datetime. + + last_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was before this datetime. + + linked_account_id : typing.Optional[str] + If provided, will only include issues pertaining to the linked account passed in. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred after this time + + status : typing.Optional[IssuesListRequestStatus] + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedIssueList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/issues", + method="GET", + params={ + "account_token": account_token, + "cursor": cursor, + "end_date": end_date, + "end_user_organization_name": end_user_organization_name, + "first_incident_time_after": serialize_datetime(first_incident_time_after) + if first_incident_time_after is not None + else None, + "first_incident_time_before": serialize_datetime(first_incident_time_before) + if first_incident_time_before is not None + else None, + "include_muted": include_muted, + "integration_name": integration_name, + "last_incident_time_after": serialize_datetime(last_incident_time_after) + if last_incident_time_after is not None + else None, + "last_incident_time_before": serialize_datetime(last_incident_time_before) + if last_incident_time_before is not None + else None, + "linked_account_id": linked_account_id, + "page_size": page_size, + "start_date": start_date, + "status": status, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedIssueList, + construct_type( + type_=PaginatedIssueList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Issue]: + """ + Get a specific issue. + + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Issue] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/issues/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Issue, + construct_type( + type_=Issue, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawIssuesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + account_token: typing.Optional[str] = None, + cursor: typing.Optional[str] = None, + end_date: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + first_incident_time_after: typing.Optional[dt.datetime] = None, + first_incident_time_before: typing.Optional[dt.datetime] = None, + include_muted: typing.Optional[str] = None, + integration_name: typing.Optional[str] = None, + last_incident_time_after: typing.Optional[dt.datetime] = None, + last_incident_time_before: typing.Optional[dt.datetime] = None, + linked_account_id: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + start_date: typing.Optional[str] = None, + status: typing.Optional[IssuesListRequestStatus] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedIssueList]: + """ + Gets all issues for Organization. + + Parameters + ---------- + account_token : typing.Optional[str] + + cursor : typing.Optional[str] + The pagination cursor value. + + end_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred before this time + + end_user_organization_name : typing.Optional[str] + + first_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was after this datetime. + + first_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose first incident time was before this datetime. + + include_muted : typing.Optional[str] + If true, will include muted issues + + integration_name : typing.Optional[str] + + last_incident_time_after : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was after this datetime. + + last_incident_time_before : typing.Optional[dt.datetime] + If provided, will only return issues whose last incident time was before this datetime. + + linked_account_id : typing.Optional[str] + If provided, will only include issues pertaining to the linked account passed in. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + start_date : typing.Optional[str] + If included, will only include issues whose most recent action occurred after this time + + status : typing.Optional[IssuesListRequestStatus] + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedIssueList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/issues", + method="GET", + params={ + "account_token": account_token, + "cursor": cursor, + "end_date": end_date, + "end_user_organization_name": end_user_organization_name, + "first_incident_time_after": serialize_datetime(first_incident_time_after) + if first_incident_time_after is not None + else None, + "first_incident_time_before": serialize_datetime(first_incident_time_before) + if first_incident_time_before is not None + else None, + "include_muted": include_muted, + "integration_name": integration_name, + "last_incident_time_after": serialize_datetime(last_incident_time_after) + if last_incident_time_after is not None + else None, + "last_incident_time_before": serialize_datetime(last_incident_time_before) + if last_incident_time_before is not None + else None, + "linked_account_id": linked_account_id, + "page_size": page_size, + "start_date": start_date, + "status": status, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedIssueList, + construct_type( + type_=PaginatedIssueList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Issue]: + """ + Get a specific issue. + + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Issue] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/issues/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Issue, + construct_type( + type_=Issue, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/issues/types/__init__.py b/src/merge/resources/chat/resources/issues/types/__init__.py new file mode 100644 index 00000000..88fbf977 --- /dev/null +++ b/src/merge/resources/chat/resources/issues/types/__init__.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .issues_list_request_status import IssuesListRequestStatus +_dynamic_imports: typing.Dict[str, str] = {"IssuesListRequestStatus": ".issues_list_request_status"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["IssuesListRequestStatus"] diff --git a/src/merge/resources/chat/resources/issues/types/issues_list_request_status.py b/src/merge/resources/chat/resources/issues/types/issues_list_request_status.py new file mode 100644 index 00000000..2bd3521e --- /dev/null +++ b/src/merge/resources/chat/resources/issues/types/issues_list_request_status.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class IssuesListRequestStatus(str, enum.Enum): + ONGOING = "ONGOING" + RESOLVED = "RESOLVED" + + def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result: + if self is IssuesListRequestStatus.ONGOING: + return ongoing() + if self is IssuesListRequestStatus.RESOLVED: + return resolved() diff --git a/src/merge/resources/chat/resources/link_token/__init__.py b/src/merge/resources/chat/resources/link_token/__init__.py new file mode 100644 index 00000000..be8c3839 --- /dev/null +++ b/src/merge/resources/chat/resources/link_token/__init__.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".types", + "EndUserDetailsRequestLanguage": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/chat/resources/link_token/client.py b/src/merge/resources/chat/resources/link_token/client.py new file mode 100644 index 00000000..3d5feac9 --- /dev/null +++ b/src/merge/resources/chat/resources/link_token/client.py @@ -0,0 +1,290 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.categories_enum import CategoriesEnum +from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest +from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest +from ...types.link_token import LinkToken +from .raw_client import AsyncRawLinkTokenClient, RawLinkTokenClient +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) +from .types.end_user_details_request_language import EndUserDetailsRequestLanguage + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class LinkTokenClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawLinkTokenClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawLinkTokenClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawLinkTokenClient + """ + return self._raw_client + + def create( + self, + *, + end_user_email_address: str, + end_user_organization_name: str, + end_user_origin_id: str, + categories: typing.Sequence[CategoriesEnum], + integration: typing.Optional[str] = OMIT, + link_expiry_mins: typing.Optional[int] = OMIT, + should_create_magic_link_url: typing.Optional[bool] = OMIT, + hide_admin_magic_link: typing.Optional[bool] = OMIT, + common_models: typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] = OMIT, + category_common_model_scopes: typing.Optional[ + typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]] + ] = OMIT, + language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, + are_syncs_disabled: typing.Optional[bool] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> LinkToken: + """ + Creates a link token to be used when linking a new end user. + + Parameters + ---------- + end_user_email_address : str + Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + + end_user_organization_name : str + Your end user's organization. + + end_user_origin_id : str + This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. + + categories : typing.Sequence[CategoriesEnum] + The integration categories to show in Merge Link. + + integration : typing.Optional[str] + The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. + + link_expiry_mins : typing.Optional[int] + An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. + + should_create_magic_link_url : typing.Optional[bool] + Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + hide_admin_magic_link : typing.Optional[bool] + Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + common_models : typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] + An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. + + category_common_model_scopes : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]] + When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + + language : typing.Optional[EndUserDetailsRequestLanguage] + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + + are_syncs_disabled : typing.Optional[bool] + The boolean that indicates whether initial, periodic, and force syncs will be disabled. + + integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + A JSON object containing integration-specific configuration options. + + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + LinkToken + + + Examples + -------- + from merge import Merge + from merge.resources.chat import CategoriesEnum + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], + ) + """ + _response = self._raw_client.create( + end_user_email_address=end_user_email_address, + end_user_organization_name=end_user_organization_name, + end_user_origin_id=end_user_origin_id, + categories=categories, + integration=integration, + link_expiry_mins=link_expiry_mins, + should_create_magic_link_url=should_create_magic_link_url, + hide_admin_magic_link=hide_admin_magic_link, + common_models=common_models, + category_common_model_scopes=category_common_model_scopes, + language=language, + are_syncs_disabled=are_syncs_disabled, + integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, + request_options=request_options, + ) + return _response.data + + +class AsyncLinkTokenClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawLinkTokenClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawLinkTokenClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawLinkTokenClient + """ + return self._raw_client + + async def create( + self, + *, + end_user_email_address: str, + end_user_organization_name: str, + end_user_origin_id: str, + categories: typing.Sequence[CategoriesEnum], + integration: typing.Optional[str] = OMIT, + link_expiry_mins: typing.Optional[int] = OMIT, + should_create_magic_link_url: typing.Optional[bool] = OMIT, + hide_admin_magic_link: typing.Optional[bool] = OMIT, + common_models: typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] = OMIT, + category_common_model_scopes: typing.Optional[ + typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]] + ] = OMIT, + language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, + are_syncs_disabled: typing.Optional[bool] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> LinkToken: + """ + Creates a link token to be used when linking a new end user. + + Parameters + ---------- + end_user_email_address : str + Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + + end_user_organization_name : str + Your end user's organization. + + end_user_origin_id : str + This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. + + categories : typing.Sequence[CategoriesEnum] + The integration categories to show in Merge Link. + + integration : typing.Optional[str] + The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. + + link_expiry_mins : typing.Optional[int] + An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. + + should_create_magic_link_url : typing.Optional[bool] + Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + hide_admin_magic_link : typing.Optional[bool] + Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + common_models : typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] + An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. + + category_common_model_scopes : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]] + When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + + language : typing.Optional[EndUserDetailsRequestLanguage] + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + + are_syncs_disabled : typing.Optional[bool] + The boolean that indicates whether initial, periodic, and force syncs will be disabled. + + integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + A JSON object containing integration-specific configuration options. + + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + LinkToken + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + from merge.resources.chat import CategoriesEnum + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + end_user_email_address=end_user_email_address, + end_user_organization_name=end_user_organization_name, + end_user_origin_id=end_user_origin_id, + categories=categories, + integration=integration, + link_expiry_mins=link_expiry_mins, + should_create_magic_link_url=should_create_magic_link_url, + hide_admin_magic_link=hide_admin_magic_link, + common_models=common_models, + category_common_model_scopes=category_common_model_scopes, + language=language, + are_syncs_disabled=are_syncs_disabled, + integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, + request_options=request_options, + ) + return _response.data diff --git a/src/merge/resources/chat/resources/link_token/raw_client.py b/src/merge/resources/chat/resources/link_token/raw_client.py new file mode 100644 index 00000000..1ee72cfc --- /dev/null +++ b/src/merge/resources/chat/resources/link_token/raw_client.py @@ -0,0 +1,273 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.categories_enum import CategoriesEnum +from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest +from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest +from ...types.link_token import LinkToken +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) +from .types.end_user_details_request_language import EndUserDetailsRequestLanguage + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawLinkTokenClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, + *, + end_user_email_address: str, + end_user_organization_name: str, + end_user_origin_id: str, + categories: typing.Sequence[CategoriesEnum], + integration: typing.Optional[str] = OMIT, + link_expiry_mins: typing.Optional[int] = OMIT, + should_create_magic_link_url: typing.Optional[bool] = OMIT, + hide_admin_magic_link: typing.Optional[bool] = OMIT, + common_models: typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] = OMIT, + category_common_model_scopes: typing.Optional[ + typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]] + ] = OMIT, + language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, + are_syncs_disabled: typing.Optional[bool] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[LinkToken]: + """ + Creates a link token to be used when linking a new end user. + + Parameters + ---------- + end_user_email_address : str + Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + + end_user_organization_name : str + Your end user's organization. + + end_user_origin_id : str + This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. + + categories : typing.Sequence[CategoriesEnum] + The integration categories to show in Merge Link. + + integration : typing.Optional[str] + The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. + + link_expiry_mins : typing.Optional[int] + An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. + + should_create_magic_link_url : typing.Optional[bool] + Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + hide_admin_magic_link : typing.Optional[bool] + Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + common_models : typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] + An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. + + category_common_model_scopes : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]] + When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + + language : typing.Optional[EndUserDetailsRequestLanguage] + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + + are_syncs_disabled : typing.Optional[bool] + The boolean that indicates whether initial, periodic, and force syncs will be disabled. + + integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + A JSON object containing integration-specific configuration options. + + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[LinkToken] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/link-token", + method="POST", + json={ + "end_user_email_address": end_user_email_address, + "end_user_organization_name": end_user_organization_name, + "end_user_origin_id": end_user_origin_id, + "categories": categories, + "integration": integration, + "link_expiry_mins": link_expiry_mins, + "should_create_magic_link_url": should_create_magic_link_url, + "hide_admin_magic_link": hide_admin_magic_link, + "common_models": common_models, + "category_common_model_scopes": category_common_model_scopes, + "language": language, + "are_syncs_disabled": are_syncs_disabled, + "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + LinkToken, + construct_type( + type_=LinkToken, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawLinkTokenClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, + *, + end_user_email_address: str, + end_user_organization_name: str, + end_user_origin_id: str, + categories: typing.Sequence[CategoriesEnum], + integration: typing.Optional[str] = OMIT, + link_expiry_mins: typing.Optional[int] = OMIT, + should_create_magic_link_url: typing.Optional[bool] = OMIT, + hide_admin_magic_link: typing.Optional[bool] = OMIT, + common_models: typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] = OMIT, + category_common_model_scopes: typing.Optional[ + typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]] + ] = OMIT, + language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, + are_syncs_disabled: typing.Optional[bool] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[LinkToken]: + """ + Creates a link token to be used when linking a new end user. + + Parameters + ---------- + end_user_email_address : str + Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + + end_user_organization_name : str + Your end user's organization. + + end_user_origin_id : str + This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. + + categories : typing.Sequence[CategoriesEnum] + The integration categories to show in Merge Link. + + integration : typing.Optional[str] + The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. + + link_expiry_mins : typing.Optional[int] + An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. + + should_create_magic_link_url : typing.Optional[bool] + Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + hide_admin_magic_link : typing.Optional[bool] + Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + + common_models : typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] + An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. + + category_common_model_scopes : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]] + When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + + language : typing.Optional[EndUserDetailsRequestLanguage] + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + + are_syncs_disabled : typing.Optional[bool] + The boolean that indicates whether initial, periodic, and force syncs will be disabled. + + integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + A JSON object containing integration-specific configuration options. + + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[LinkToken] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/link-token", + method="POST", + json={ + "end_user_email_address": end_user_email_address, + "end_user_organization_name": end_user_organization_name, + "end_user_origin_id": end_user_origin_id, + "categories": categories, + "integration": integration, + "link_expiry_mins": link_expiry_mins, + "should_create_magic_link_url": should_create_magic_link_url, + "hide_admin_magic_link": hide_admin_magic_link, + "common_models": common_models, + "category_common_model_scopes": category_common_model_scopes, + "language": language, + "are_syncs_disabled": are_syncs_disabled, + "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + LinkToken, + construct_type( + type_=LinkToken, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/link_token/types/__init__.py b/src/merge/resources/chat/resources/link_token/types/__init__.py new file mode 100644 index 00000000..55cc1d4e --- /dev/null +++ b/src/merge/resources/chat/resources/link_token/types/__init__.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, + ) + from .end_user_details_request_language import EndUserDetailsRequestLanguage +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".end_user_details_request_completed_account_initial_screen", + "EndUserDetailsRequestLanguage": ".end_user_details_request_language", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/chat/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py b/src/merge/resources/chat/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py new file mode 100644 index 00000000..0c5d586d --- /dev/null +++ b/src/merge/resources/chat/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.completed_account_initial_screen_enum import CompletedAccountInitialScreenEnum + +EndUserDetailsRequestCompletedAccountInitialScreen = typing.Union[CompletedAccountInitialScreenEnum, str] diff --git a/src/merge/resources/chat/resources/link_token/types/end_user_details_request_language.py b/src/merge/resources/chat/resources/link_token/types/end_user_details_request_language.py new file mode 100644 index 00000000..65c4b44a --- /dev/null +++ b/src/merge/resources/chat/resources/link_token/types/end_user_details_request_language.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.language_enum import LanguageEnum + +EndUserDetailsRequestLanguage = typing.Union[LanguageEnum, str] diff --git a/src/merge/resources/chat/resources/linked_accounts/__init__.py b/src/merge/resources/chat/resources/linked_accounts/__init__.py new file mode 100644 index 00000000..0b9e42b4 --- /dev/null +++ b/src/merge/resources/chat/resources/linked_accounts/__init__.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import LinkedAccountsListRequestCategory +_dynamic_imports: typing.Dict[str, str] = {"LinkedAccountsListRequestCategory": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["LinkedAccountsListRequestCategory"] diff --git a/src/merge/resources/chat/resources/linked_accounts/client.py b/src/merge/resources/chat/resources/linked_accounts/client.py new file mode 100644 index 00000000..748f3fbe --- /dev/null +++ b/src/merge/resources/chat/resources/linked_accounts/client.py @@ -0,0 +1,297 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList +from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient +from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory + + +class LinkedAccountsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawLinkedAccountsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawLinkedAccountsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawLinkedAccountsClient + """ + return self._raw_client + + def list( + self, + *, + category: typing.Optional[LinkedAccountsListRequestCategory] = None, + cursor: typing.Optional[str] = None, + end_user_email_address: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + end_user_origin_id: typing.Optional[str] = None, + end_user_origin_ids: typing.Optional[str] = None, + id: typing.Optional[str] = None, + ids: typing.Optional[str] = None, + include_duplicates: typing.Optional[bool] = None, + integration_name: typing.Optional[str] = None, + is_test_account: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + status: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedAccountDetailsAndActionsList: + """ + List linked accounts for your organization. + + Parameters + ---------- + category : typing.Optional[LinkedAccountsListRequestCategory] + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + * `chat` - chat + + cursor : typing.Optional[str] + The pagination cursor value. + + end_user_email_address : typing.Optional[str] + If provided, will only return linked accounts associated with the given email address. + + end_user_organization_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given organization name. + + end_user_origin_id : typing.Optional[str] + If provided, will only return linked accounts associated with the given origin ID. + + end_user_origin_ids : typing.Optional[str] + Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + + id : typing.Optional[str] + + ids : typing.Optional[str] + Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + + include_duplicates : typing.Optional[bool] + 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. + + integration_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given integration name. + + is_test_account : typing.Optional[str] + If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + status : typing.Optional[str] + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedAccountDetailsAndActionsList + + + Examples + -------- + from merge import Merge + from merge.resources.chat.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", + ) + """ + _response = self._raw_client.list( + category=category, + cursor=cursor, + end_user_email_address=end_user_email_address, + end_user_organization_name=end_user_organization_name, + end_user_origin_id=end_user_origin_id, + end_user_origin_ids=end_user_origin_ids, + id=id, + ids=ids, + include_duplicates=include_duplicates, + integration_name=integration_name, + is_test_account=is_test_account, + page_size=page_size, + status=status, + request_options=request_options, + ) + return _response.data + + +class AsyncLinkedAccountsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawLinkedAccountsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawLinkedAccountsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawLinkedAccountsClient + """ + return self._raw_client + + async def list( + self, + *, + category: typing.Optional[LinkedAccountsListRequestCategory] = None, + cursor: typing.Optional[str] = None, + end_user_email_address: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + end_user_origin_id: typing.Optional[str] = None, + end_user_origin_ids: typing.Optional[str] = None, + id: typing.Optional[str] = None, + ids: typing.Optional[str] = None, + include_duplicates: typing.Optional[bool] = None, + integration_name: typing.Optional[str] = None, + is_test_account: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + status: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedAccountDetailsAndActionsList: + """ + List linked accounts for your organization. + + Parameters + ---------- + category : typing.Optional[LinkedAccountsListRequestCategory] + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + * `chat` - chat + + cursor : typing.Optional[str] + The pagination cursor value. + + end_user_email_address : typing.Optional[str] + If provided, will only return linked accounts associated with the given email address. + + end_user_organization_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given organization name. + + end_user_origin_id : typing.Optional[str] + If provided, will only return linked accounts associated with the given origin ID. + + end_user_origin_ids : typing.Optional[str] + Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + + id : typing.Optional[str] + + ids : typing.Optional[str] + Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + + include_duplicates : typing.Optional[bool] + 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. + + integration_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given integration name. + + is_test_account : typing.Optional[str] + If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + status : typing.Optional[str] + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedAccountDetailsAndActionsList + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + from merge.resources.chat.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + category=category, + cursor=cursor, + end_user_email_address=end_user_email_address, + end_user_organization_name=end_user_organization_name, + end_user_origin_id=end_user_origin_id, + end_user_origin_ids=end_user_origin_ids, + id=id, + ids=ids, + include_duplicates=include_duplicates, + integration_name=integration_name, + is_test_account=is_test_account, + page_size=page_size, + status=status, + request_options=request_options, + ) + return _response.data diff --git a/src/merge/resources/chat/resources/linked_accounts/raw_client.py b/src/merge/resources/chat/resources/linked_accounts/raw_client.py new file mode 100644 index 00000000..08e2d29b --- /dev/null +++ b/src/merge/resources/chat/resources/linked_accounts/raw_client.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList +from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory + + +class RawLinkedAccountsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + category: typing.Optional[LinkedAccountsListRequestCategory] = None, + cursor: typing.Optional[str] = None, + end_user_email_address: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + end_user_origin_id: typing.Optional[str] = None, + end_user_origin_ids: typing.Optional[str] = None, + id: typing.Optional[str] = None, + ids: typing.Optional[str] = None, + include_duplicates: typing.Optional[bool] = None, + integration_name: typing.Optional[str] = None, + is_test_account: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + status: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedAccountDetailsAndActionsList]: + """ + List linked accounts for your organization. + + Parameters + ---------- + category : typing.Optional[LinkedAccountsListRequestCategory] + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + * `chat` - chat + + cursor : typing.Optional[str] + The pagination cursor value. + + end_user_email_address : typing.Optional[str] + If provided, will only return linked accounts associated with the given email address. + + end_user_organization_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given organization name. + + end_user_origin_id : typing.Optional[str] + If provided, will only return linked accounts associated with the given origin ID. + + end_user_origin_ids : typing.Optional[str] + Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + + id : typing.Optional[str] + + ids : typing.Optional[str] + Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + + include_duplicates : typing.Optional[bool] + 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. + + integration_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given integration name. + + is_test_account : typing.Optional[str] + If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + status : typing.Optional[str] + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedAccountDetailsAndActionsList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/linked-accounts", + method="GET", + params={ + "category": category, + "cursor": cursor, + "end_user_email_address": end_user_email_address, + "end_user_organization_name": end_user_organization_name, + "end_user_origin_id": end_user_origin_id, + "end_user_origin_ids": end_user_origin_ids, + "id": id, + "ids": ids, + "include_duplicates": include_duplicates, + "integration_name": integration_name, + "is_test_account": is_test_account, + "page_size": page_size, + "status": status, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedAccountDetailsAndActionsList, + construct_type( + type_=PaginatedAccountDetailsAndActionsList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawLinkedAccountsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + category: typing.Optional[LinkedAccountsListRequestCategory] = None, + cursor: typing.Optional[str] = None, + end_user_email_address: typing.Optional[str] = None, + end_user_organization_name: typing.Optional[str] = None, + end_user_origin_id: typing.Optional[str] = None, + end_user_origin_ids: typing.Optional[str] = None, + id: typing.Optional[str] = None, + ids: typing.Optional[str] = None, + include_duplicates: typing.Optional[bool] = None, + integration_name: typing.Optional[str] = None, + is_test_account: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + status: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedAccountDetailsAndActionsList]: + """ + List linked accounts for your organization. + + Parameters + ---------- + category : typing.Optional[LinkedAccountsListRequestCategory] + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + * `chat` - chat + + cursor : typing.Optional[str] + The pagination cursor value. + + end_user_email_address : typing.Optional[str] + If provided, will only return linked accounts associated with the given email address. + + end_user_organization_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given organization name. + + end_user_origin_id : typing.Optional[str] + If provided, will only return linked accounts associated with the given origin ID. + + end_user_origin_ids : typing.Optional[str] + Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + + id : typing.Optional[str] + + ids : typing.Optional[str] + Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + + include_duplicates : typing.Optional[bool] + 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. + + integration_name : typing.Optional[str] + If provided, will only return linked accounts associated with the given integration name. + + is_test_account : typing.Optional[str] + If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + status : typing.Optional[str] + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedAccountDetailsAndActionsList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/linked-accounts", + method="GET", + params={ + "category": category, + "cursor": cursor, + "end_user_email_address": end_user_email_address, + "end_user_organization_name": end_user_organization_name, + "end_user_origin_id": end_user_origin_id, + "end_user_origin_ids": end_user_origin_ids, + "id": id, + "ids": ids, + "include_duplicates": include_duplicates, + "integration_name": integration_name, + "is_test_account": is_test_account, + "page_size": page_size, + "status": status, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedAccountDetailsAndActionsList, + construct_type( + type_=PaginatedAccountDetailsAndActionsList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/linked_accounts/types/__init__.py b/src/merge/resources/chat/resources/linked_accounts/types/__init__.py new file mode 100644 index 00000000..a28f38cc --- /dev/null +++ b/src/merge/resources/chat/resources/linked_accounts/types/__init__.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .linked_accounts_list_request_category import LinkedAccountsListRequestCategory +_dynamic_imports: typing.Dict[str, str] = { + "LinkedAccountsListRequestCategory": ".linked_accounts_list_request_category" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["LinkedAccountsListRequestCategory"] diff --git a/src/merge/resources/chat/resources/linked_accounts/types/linked_accounts_list_request_category.py b/src/merge/resources/chat/resources/linked_accounts/types/linked_accounts_list_request_category.py new file mode 100644 index 00000000..97df0150 --- /dev/null +++ b/src/merge/resources/chat/resources/linked_accounts/types/linked_accounts_list_request_category.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class LinkedAccountsListRequestCategory(str, enum.Enum): + ACCOUNTING = "accounting" + ATS = "ats" + CHAT = "chat" + CRM = "crm" + FILESTORAGE = "filestorage" + HRIS = "hris" + KNOWLEDGEBASE = "knowledgebase" + MKTG = "mktg" + TICKETING = "ticketing" + + def visit( + self, + accounting: typing.Callable[[], T_Result], + ats: typing.Callable[[], T_Result], + chat: typing.Callable[[], T_Result], + crm: typing.Callable[[], T_Result], + filestorage: typing.Callable[[], T_Result], + hris: typing.Callable[[], T_Result], + knowledgebase: typing.Callable[[], T_Result], + mktg: typing.Callable[[], T_Result], + ticketing: typing.Callable[[], T_Result], + ) -> T_Result: + if self is LinkedAccountsListRequestCategory.ACCOUNTING: + return accounting() + if self is LinkedAccountsListRequestCategory.ATS: + return ats() + if self is LinkedAccountsListRequestCategory.CHAT: + return chat() + if self is LinkedAccountsListRequestCategory.CRM: + return crm() + if self is LinkedAccountsListRequestCategory.FILESTORAGE: + return filestorage() + if self is LinkedAccountsListRequestCategory.HRIS: + return hris() + if self is LinkedAccountsListRequestCategory.KNOWLEDGEBASE: + return knowledgebase() + if self is LinkedAccountsListRequestCategory.MKTG: + return mktg() + if self is LinkedAccountsListRequestCategory.TICKETING: + return ticketing() diff --git a/src/merge/resources/chat/resources/messages/__init__.py b/src/merge/resources/chat/resources/messages/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/messages/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/messages/client.py b/src/merge/resources/chat/resources/messages/client.py new file mode 100644 index 00000000..4b033d56 --- /dev/null +++ b/src/merge/resources/chat/resources/messages/client.py @@ -0,0 +1,513 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.message import Message +from ...types.paginated_message_list import PaginatedMessageList +from .raw_client import AsyncRawMessagesClient, RawMessagesClient + + +class MessagesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawMessagesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawMessagesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawMessagesClient + """ + return self._raw_client + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedMessageList: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedMessageList + + + Examples + -------- + import datetime + + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.messages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + """ + _response = self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Message: + """ + Returns a `Message` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Message + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.messages.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + """ + _response = self._raw_client.retrieve( + id, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data + + def replies_list( + self, + message_id: str, + *, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedMessageList: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + message_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedMessageList + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.messages.replies_list( + message_id="message_id", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, + ) + """ + _response = self._raw_client.replies_list( + message_id, + cursor=cursor, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + page_size=page_size, + request_options=request_options, + ) + return _response.data + + +class AsyncMessagesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawMessagesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawMessagesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawMessagesClient + """ + return self._raw_client + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedMessageList: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedMessageList + + + Examples + -------- + import asyncio + import datetime + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.messages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + async def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Message: + """ + Returns a `Message` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Message + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.messages.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve( + id, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data + + async def replies_list( + self, + message_id: str, + *, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedMessageList: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + message_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedMessageList + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.messages.replies_list( + message_id="message_id", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.replies_list( + message_id, + cursor=cursor, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + page_size=page_size, + request_options=request_options, + ) + return _response.data diff --git a/src/merge/resources/chat/resources/messages/raw_client.py b/src/merge/resources/chat/resources/messages/raw_client.py new file mode 100644 index 00000000..83d745a6 --- /dev/null +++ b/src/merge/resources/chat/resources/messages/raw_client.py @@ -0,0 +1,447 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.datetime_utils import serialize_datetime +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.message import Message +from ...types.paginated_message_list import PaginatedMessageList + + +class RawMessagesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedMessageList]: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedMessageList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/messages", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedMessageList, + construct_type( + type_=PaginatedMessageList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Message]: + """ + Returns a `Message` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Message] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/messages/{jsonable_encoder(id)}", + method="GET", + params={ + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Message, + construct_type( + type_=Message, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def replies_list( + self, + message_id: str, + *, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedMessageList]: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + message_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedMessageList] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/messages/{jsonable_encoder(message_id)}/replies", + method="GET", + params={ + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedMessageList, + construct_type( + type_=PaginatedMessageList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawMessagesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedMessageList]: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedMessageList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/messages", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedMessageList, + construct_type( + type_=PaginatedMessageList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Message]: + """ + Returns a `Message` object with the given `id`. + + Parameters + ---------- + id : str + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Message] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/messages/{jsonable_encoder(id)}", + method="GET", + params={ + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Message, + construct_type( + type_=Message, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def replies_list( + self, + message_id: str, + *, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedMessageList]: + """ + Returns a list of `Message` objects. + + Parameters + ---------- + message_id : str + + cursor : typing.Optional[str] + The pagination cursor value. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedMessageList] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/messages/{jsonable_encoder(message_id)}/replies", + method="GET", + params={ + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedMessageList, + construct_type( + type_=PaginatedMessageList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/passthrough/__init__.py b/src/merge/resources/chat/resources/passthrough/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/passthrough/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/passthrough/client.py b/src/merge/resources/chat/resources/passthrough/client.py new file mode 100644 index 00000000..d5479c3b --- /dev/null +++ b/src/merge/resources/chat/resources/passthrough/client.py @@ -0,0 +1,126 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.data_passthrough_request import DataPassthroughRequest +from ...types.remote_response import RemoteResponse +from .raw_client import AsyncRawPassthroughClient, RawPassthroughClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class PassthroughClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawPassthroughClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawPassthroughClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawPassthroughClient + """ + return self._raw_client + + def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> RemoteResponse: + """ + Pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteResponse + + + Examples + -------- + from merge import Merge + from merge.resources.chat import DataPassthroughRequest, MethodEnum + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), + ) + """ + _response = self._raw_client.create(request=request, request_options=request_options) + return _response.data + + +class AsyncPassthroughClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawPassthroughClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawPassthroughClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawPassthroughClient + """ + return self._raw_client + + async def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> RemoteResponse: + """ + Pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteResponse + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + from merge.resources.chat import DataPassthroughRequest, MethodEnum + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create(request=request, request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/passthrough/raw_client.py b/src/merge/resources/chat/resources/passthrough/raw_client.py new file mode 100644 index 00000000..d87bb971 --- /dev/null +++ b/src/merge/resources/chat/resources/passthrough/raw_client.py @@ -0,0 +1,111 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.data_passthrough_request import DataPassthroughRequest +from ...types.remote_response import RemoteResponse + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawPassthroughClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[RemoteResponse]: + """ + Pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[RemoteResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/passthrough", + method="POST", + json=request, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteResponse, + construct_type( + type_=RemoteResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawPassthroughClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, *, request: DataPassthroughRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[RemoteResponse]: + """ + Pull data from an endpoint not currently supported by Merge. + + Parameters + ---------- + request : DataPassthroughRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[RemoteResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/passthrough", + method="POST", + json=request, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteResponse, + construct_type( + type_=RemoteResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/regenerate_key/__init__.py b/src/merge/resources/chat/resources/regenerate_key/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/regenerate_key/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/regenerate_key/client.py b/src/merge/resources/chat/resources/regenerate_key/client.py new file mode 100644 index 00000000..f5de51ae --- /dev/null +++ b/src/merge/resources/chat/resources/regenerate_key/client.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.remote_key import RemoteKey +from .raw_client import AsyncRawRegenerateKeyClient, RawRegenerateKeyClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RegenerateKeyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawRegenerateKeyClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawRegenerateKeyClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawRegenerateKeyClient + """ + return self._raw_client + + def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> RemoteKey: + """ + Exchange remote keys. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteKey + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.regenerate_key.create( + name="Remote Deployment Key 1", + ) + """ + _response = self._raw_client.create(name=name, request_options=request_options) + return _response.data + + +class AsyncRegenerateKeyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawRegenerateKeyClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawRegenerateKeyClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawRegenerateKeyClient + """ + return self._raw_client + + async def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> RemoteKey: + """ + Exchange remote keys. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RemoteKey + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.regenerate_key.create( + name="Remote Deployment Key 1", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create(name=name, request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/regenerate_key/raw_client.py b/src/merge/resources/chat/resources/regenerate_key/raw_client.py new file mode 100644 index 00000000..55fed130 --- /dev/null +++ b/src/merge/resources/chat/resources/regenerate_key/raw_client.py @@ -0,0 +1,114 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.remote_key import RemoteKey + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawRegenerateKeyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[RemoteKey]: + """ + Exchange remote keys. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[RemoteKey] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/regenerate-key", + method="POST", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteKey, + construct_type( + type_=RemoteKey, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawRegenerateKeyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, *, name: str, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[RemoteKey]: + """ + Exchange remote keys. + + Parameters + ---------- + name : str + The name of the remote key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[RemoteKey] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/regenerate-key", + method="POST", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RemoteKey, + construct_type( + type_=RemoteKey, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/scopes/__init__.py b/src/merge/resources/chat/resources/scopes/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/scopes/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/scopes/client.py b/src/merge/resources/chat/resources/scopes/client.py new file mode 100644 index 00000000..6d0bbdda --- /dev/null +++ b/src/merge/resources/chat/resources/scopes/client.py @@ -0,0 +1,320 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.common_model_scope_api import CommonModelScopeApi +from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest +from .raw_client import AsyncRawScopesClient, RawScopesClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ScopesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawScopesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawScopesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawScopesClient + """ + return self._raw_client + + def default_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> CommonModelScopeApi: + """ + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CommonModelScopeApi + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.scopes.default_scopes_retrieve() + """ + _response = self._raw_client.default_scopes_retrieve(request_options=request_options) + return _response.data + + def linked_account_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> CommonModelScopeApi: + """ + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CommonModelScopeApi + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.scopes.linked_account_scopes_retrieve() + """ + _response = self._raw_client.linked_account_scopes_retrieve(request_options=request_options) + return _response.data + + def linked_account_scopes_create( + self, + *, + common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest], + request_options: typing.Optional[RequestOptions] = None, + ) -> CommonModelScopeApi: + """ + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + + Parameters + ---------- + common_models : typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + The common models you want to update the scopes for + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CommonModelScopeApi + + + Examples + -------- + from merge import Merge + from merge.resources.chat import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, + ) + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], + ) + """ + _response = self._raw_client.linked_account_scopes_create( + common_models=common_models, request_options=request_options + ) + return _response.data + + +class AsyncScopesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawScopesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawScopesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawScopesClient + """ + return self._raw_client + + async def default_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> CommonModelScopeApi: + """ + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CommonModelScopeApi + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.scopes.default_scopes_retrieve() + + + asyncio.run(main()) + """ + _response = await self._raw_client.default_scopes_retrieve(request_options=request_options) + return _response.data + + async def linked_account_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> CommonModelScopeApi: + """ + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CommonModelScopeApi + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.scopes.linked_account_scopes_retrieve() + + + asyncio.run(main()) + """ + _response = await self._raw_client.linked_account_scopes_retrieve(request_options=request_options) + return _response.data + + async def linked_account_scopes_create( + self, + *, + common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest], + request_options: typing.Optional[RequestOptions] = None, + ) -> CommonModelScopeApi: + """ + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + + Parameters + ---------- + common_models : typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + The common models you want to update the scopes for + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CommonModelScopeApi + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + from merge.resources.chat import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, + ) + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.linked_account_scopes_create( + common_models=common_models, request_options=request_options + ) + return _response.data diff --git a/src/merge/resources/chat/resources/scopes/raw_client.py b/src/merge/resources/chat/resources/scopes/raw_client.py new file mode 100644 index 00000000..5b80be62 --- /dev/null +++ b/src/merge/resources/chat/resources/scopes/raw_client.py @@ -0,0 +1,267 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.common_model_scope_api import CommonModelScopeApi +from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawScopesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def default_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[CommonModelScopeApi]: + """ + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CommonModelScopeApi] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/default-scopes", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CommonModelScopeApi, + construct_type( + type_=CommonModelScopeApi, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def linked_account_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[CommonModelScopeApi]: + """ + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CommonModelScopeApi] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/linked-account-scopes", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CommonModelScopeApi, + construct_type( + type_=CommonModelScopeApi, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def linked_account_scopes_create( + self, + *, + common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest], + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CommonModelScopeApi]: + """ + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + + Parameters + ---------- + common_models : typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + The common models you want to update the scopes for + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CommonModelScopeApi] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/linked-account-scopes", + method="POST", + json={ + "common_models": common_models, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CommonModelScopeApi, + construct_type( + type_=CommonModelScopeApi, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawScopesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def default_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[CommonModelScopeApi]: + """ + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CommonModelScopeApi] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/default-scopes", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CommonModelScopeApi, + construct_type( + type_=CommonModelScopeApi, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def linked_account_scopes_retrieve( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[CommonModelScopeApi]: + """ + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CommonModelScopeApi] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/linked-account-scopes", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CommonModelScopeApi, + construct_type( + type_=CommonModelScopeApi, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def linked_account_scopes_create( + self, + *, + common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest], + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CommonModelScopeApi]: + """ + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + + Parameters + ---------- + common_models : typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + The common models you want to update the scopes for + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CommonModelScopeApi] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/linked-account-scopes", + method="POST", + json={ + "common_models": common_models, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CommonModelScopeApi, + construct_type( + type_=CommonModelScopeApi, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/sync_status/__init__.py b/src/merge/resources/chat/resources/sync_status/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/sync_status/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/sync_status/client.py b/src/merge/resources/chat/resources/sync_status/client.py new file mode 100644 index 00000000..20b0a2af --- /dev/null +++ b/src/merge/resources/chat/resources/sync_status/client.py @@ -0,0 +1,132 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.paginated_sync_status_list import PaginatedSyncStatusList +from .raw_client import AsyncRawSyncStatusClient, RawSyncStatusClient + + +class SyncStatusClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawSyncStatusClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawSyncStatusClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawSyncStatusClient + """ + return self._raw_client + + def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedSyncStatusList: + """ + Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedSyncStatusList + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, + ) + """ + _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) + return _response.data + + +class AsyncSyncStatusClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawSyncStatusClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawSyncStatusClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawSyncStatusClient + """ + return self._raw_client + + async def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedSyncStatusList: + """ + Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedSyncStatusList + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) + return _response.data diff --git a/src/merge/resources/chat/resources/sync_status/raw_client.py b/src/merge/resources/chat/resources/sync_status/raw_client.py new file mode 100644 index 00000000..2e94b022 --- /dev/null +++ b/src/merge/resources/chat/resources/sync_status/raw_client.py @@ -0,0 +1,121 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.paginated_sync_status_list import PaginatedSyncStatusList + + +class RawSyncStatusClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedSyncStatusList]: + """ + Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedSyncStatusList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/sync-status", + method="GET", + params={ + "cursor": cursor, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedSyncStatusList, + construct_type( + type_=PaginatedSyncStatusList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawSyncStatusClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedSyncStatusList]: + """ + Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + + Parameters + ---------- + cursor : typing.Optional[str] + The pagination cursor value. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedSyncStatusList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/sync-status", + method="GET", + params={ + "cursor": cursor, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedSyncStatusList, + construct_type( + type_=PaginatedSyncStatusList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/users/__init__.py b/src/merge/resources/chat/resources/users/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/users/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/users/client.py b/src/merge/resources/chat/resources/users/client.py new file mode 100644 index 00000000..cdc6ba3c --- /dev/null +++ b/src/merge/resources/chat/resources/users/client.py @@ -0,0 +1,387 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.paginated_user_list import PaginatedUserList +from ...types.user import User +from .raw_client import AsyncRawUsersClient, RawUsersClient + + +class UsersClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawUsersClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawUsersClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawUsersClient + """ + return self._raw_client + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedUserList: + """ + Returns a list of `User` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedUserList + + + Examples + -------- + import datetime + + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + """ + _response = self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + expand=expand, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> User: + """ + Returns a `User` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + User + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.users.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + """ + _response = self._raw_client.retrieve( + id, + expand=expand, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data + + +class AsyncUsersClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawUsersClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawUsersClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawUsersClient + """ + return self._raw_client + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedUserList: + """ + Returns a list of `User` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedUserList + + + Examples + -------- + import asyncio + import datetime + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + created_after=created_after, + created_before=created_before, + cursor=cursor, + expand=expand, + include_deleted_data=include_deleted_data, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + modified_after=modified_after, + modified_before=modified_before, + page_size=page_size, + remote_id=remote_id, + request_options=request_options, + ) + return _response.data + + async def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> User: + """ + Returns a `User` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + User + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.users.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve( + id, + expand=expand, + include_remote_data=include_remote_data, + include_shell_data=include_shell_data, + request_options=request_options, + ) + return _response.data diff --git a/src/merge/resources/chat/resources/users/raw_client.py b/src/merge/resources/chat/resources/users/raw_client.py new file mode 100644 index 00000000..c8c16441 --- /dev/null +++ b/src/merge/resources/chat/resources/users/raw_client.py @@ -0,0 +1,331 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.datetime_utils import serialize_datetime +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.jsonable_encoder import jsonable_encoder +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.paginated_user_list import PaginatedUserList +from ...types.user import User + + +class RawUsersClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PaginatedUserList]: + """ + Returns a list of `User` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PaginatedUserList] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/users", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "expand": expand, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedUserList, + construct_type( + type_=PaginatedUserList, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[User]: + """ + Returns a `User` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[User] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/v1/users/{jsonable_encoder(id)}", + method="GET", + params={ + "expand": expand, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + User, + construct_type( + type_=User, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawUsersClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PaginatedUserList]: + """ + Returns a list of `User` objects. + + Parameters + ---------- + created_after : typing.Optional[dt.datetime] + If provided, will only return objects created after this datetime. + + created_before : typing.Optional[dt.datetime] + If provided, will only return objects created before this datetime. + + cursor : typing.Optional[str] + The pagination cursor value. + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_deleted_data : typing.Optional[bool] + 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/). + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + modified_after : typing.Optional[dt.datetime] + If provided, only objects synced by Merge after this date time will be returned. + + modified_before : typing.Optional[dt.datetime] + If provided, only objects synced by Merge before this date time will be returned. + + page_size : typing.Optional[int] + Number of results to return per page. The maximum limit is 100. + + remote_id : typing.Optional[str] + The API provider's ID for the given object. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PaginatedUserList] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/users", + method="GET", + params={ + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "expand": expand, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PaginatedUserList, + construct_type( + type_=PaginatedUserList, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, + id: str, + *, + expand: typing.Optional[typing.Literal["groups"]] = None, + include_remote_data: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[User]: + """ + Returns a `User` object with the given `id`. + + Parameters + ---------- + id : str + + expand : typing.Optional[typing.Literal["groups"]] + Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + + include_remote_data : typing.Optional[bool] + Whether to include the original data Merge fetched from the third-party to produce these models. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[User] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/v1/users/{jsonable_encoder(id)}", + method="GET", + params={ + "expand": expand, + "include_remote_data": include_remote_data, + "include_shell_data": include_shell_data, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + User, + construct_type( + type_=User, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/resources/webhook_receivers/__init__.py b/src/merge/resources/chat/resources/webhook_receivers/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/merge/resources/chat/resources/webhook_receivers/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/merge/resources/chat/resources/webhook_receivers/client.py b/src/merge/resources/chat/resources/webhook_receivers/client.py new file mode 100644 index 00000000..266d80a5 --- /dev/null +++ b/src/merge/resources/chat/resources/webhook_receivers/client.py @@ -0,0 +1,201 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.request_options import RequestOptions +from ...types.webhook_receiver import WebhookReceiver +from .raw_client import AsyncRawWebhookReceiversClient, RawWebhookReceiversClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class WebhookReceiversClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawWebhookReceiversClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawWebhookReceiversClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawWebhookReceiversClient + """ + return self._raw_client + + def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[WebhookReceiver]: + """ + Returns a list of `WebhookReceiver` objects. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[WebhookReceiver] + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.webhook_receivers.list() + """ + _response = self._raw_client.list(request_options=request_options) + return _response.data + + def create( + self, + *, + event: str, + is_active: bool, + key: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> WebhookReceiver: + """ + Creates a `WebhookReceiver` object with the given values. + + Parameters + ---------- + event : str + + is_active : bool + + key : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WebhookReceiver + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.chat.webhook_receivers.create( + event="event", + is_active=True, + ) + """ + _response = self._raw_client.create(event=event, is_active=is_active, key=key, request_options=request_options) + return _response.data + + +class AsyncWebhookReceiversClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawWebhookReceiversClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawWebhookReceiversClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawWebhookReceiversClient + """ + return self._raw_client + + async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[WebhookReceiver]: + """ + Returns a list of `WebhookReceiver` objects. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[WebhookReceiver] + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.webhook_receivers.list() + + + asyncio.run(main()) + """ + _response = await self._raw_client.list(request_options=request_options) + return _response.data + + async def create( + self, + *, + event: str, + is_active: bool, + key: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> WebhookReceiver: + """ + Creates a `WebhookReceiver` object with the given values. + + Parameters + ---------- + event : str + + is_active : bool + + key : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WebhookReceiver + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.chat.webhook_receivers.create( + event="event", + is_active=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + event=event, is_active=is_active, key=key, request_options=request_options + ) + return _response.data diff --git a/src/merge/resources/chat/resources/webhook_receivers/raw_client.py b/src/merge/resources/chat/resources/webhook_receivers/raw_client.py new file mode 100644 index 00000000..56ad6750 --- /dev/null +++ b/src/merge/resources/chat/resources/webhook_receivers/raw_client.py @@ -0,0 +1,208 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.http_response import AsyncHttpResponse, HttpResponse +from .....core.request_options import RequestOptions +from .....core.unchecked_base_model import construct_type +from ...types.webhook_receiver import WebhookReceiver + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawWebhookReceiversClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.List[WebhookReceiver]]: + """ + Returns a list of `WebhookReceiver` objects. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[WebhookReceiver]] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/webhook-receivers", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[WebhookReceiver], + construct_type( + type_=typing.List[WebhookReceiver], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + *, + event: str, + is_active: bool, + key: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[WebhookReceiver]: + """ + Creates a `WebhookReceiver` object with the given values. + + Parameters + ---------- + event : str + + is_active : bool + + key : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[WebhookReceiver] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat/v1/webhook-receivers", + method="POST", + json={ + "event": event, + "is_active": is_active, + "key": key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WebhookReceiver, + construct_type( + type_=WebhookReceiver, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawWebhookReceiversClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.List[WebhookReceiver]]: + """ + Returns a list of `WebhookReceiver` objects. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[WebhookReceiver]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/webhook-receivers", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[WebhookReceiver], + construct_type( + type_=typing.List[WebhookReceiver], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + *, + event: str, + is_active: bool, + key: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[WebhookReceiver]: + """ + Creates a `WebhookReceiver` object with the given values. + + Parameters + ---------- + event : str + + is_active : bool + + key : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[WebhookReceiver] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/v1/webhook-receivers", + method="POST", + json={ + "event": event, + "is_active": is_active, + "key": key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WebhookReceiver, + construct_type( + type_=WebhookReceiver, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/chat/types/__init__.py b/src/merge/resources/chat/types/__init__.py new file mode 100644 index 00000000..83dc82b8 --- /dev/null +++ b/src/merge/resources/chat/types/__init__.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .account_details import AccountDetails + from .account_details_and_actions import AccountDetailsAndActions + from .account_details_and_actions_category import AccountDetailsAndActionsCategory + from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration + from .account_details_and_actions_status import AccountDetailsAndActionsStatus + from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum + from .account_details_category import AccountDetailsCategory + from .account_integration import AccountIntegration + from .account_token import AccountToken + from .advanced_metadata import AdvancedMetadata + from .async_passthrough_reciept import AsyncPassthroughReciept + from .audit_log_event import AuditLogEvent + from .audit_log_event_event_type import AuditLogEventEventType + from .audit_log_event_role import AuditLogEventRole + from .available_actions import AvailableActions + from .categories_enum import CategoriesEnum + from .category_enum import CategoryEnum + from .common_model_scope_api import CommonModelScopeApi + from .common_model_scopes_body_request import CommonModelScopesBodyRequest + from .completed_account_initial_screen_enum import CompletedAccountInitialScreenEnum + from .conversation import Conversation + from .conversation_type import ConversationType + from .data_passthrough_request import DataPassthroughRequest + from .data_passthrough_request_method import DataPassthroughRequestMethod + from .data_passthrough_request_request_format import DataPassthroughRequestRequestFormat + from .debug_mode_log import DebugModeLog + from .debug_model_log_summary import DebugModelLogSummary + from .enabled_actions_enum import EnabledActionsEnum + from .encoding_enum import EncodingEnum + from .error_validation_problem import ErrorValidationProblem + from .event_type_enum import EventTypeEnum + from .external_target_field_api import ExternalTargetFieldApi + from .external_target_field_api_response import ExternalTargetFieldApiResponse + from .field_mapping_api_instance import FieldMappingApiInstance + from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField + from .field_mapping_api_instance_remote_field_remote_endpoint_info import ( + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, + ) + from .field_mapping_api_instance_response import FieldMappingApiInstanceResponse + from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField + from .field_mapping_instance_response import FieldMappingInstanceResponse + from .field_permission_deserializer import FieldPermissionDeserializer + from .field_permission_deserializer_request import FieldPermissionDeserializerRequest + from .group import Group + from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer + from .individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest + from .issue import Issue + from .issue_status import IssueStatus + from .issue_status_enum import IssueStatusEnum + from .language_enum import LanguageEnum + from .last_sync_result_enum import LastSyncResultEnum + from .link_token import LinkToken + from .member import Member + from .message import Message + from .method_enum import MethodEnum + from .model_operation import ModelOperation + from .model_permission_deserializer import ModelPermissionDeserializer + from .model_permission_deserializer_request import ModelPermissionDeserializerRequest + from .multipart_form_field_request import MultipartFormFieldRequest + from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding + from .paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList + from .paginated_audit_log_event_list import PaginatedAuditLogEventList + from .paginated_conversation_list import PaginatedConversationList + from .paginated_group_list import PaginatedGroupList + from .paginated_issue_list import PaginatedIssueList + from .paginated_member_list import PaginatedMemberList + from .paginated_message_list import PaginatedMessageList + from .paginated_sync_status_list import PaginatedSyncStatusList + from .paginated_user_list import PaginatedUserList + from .remote_data import RemoteData + from .remote_endpoint_info import RemoteEndpointInfo + from .remote_field_api import RemoteFieldApi + from .remote_field_api_advanced_metadata import RemoteFieldApiAdvancedMetadata + from .remote_field_api_coverage import RemoteFieldApiCoverage + from .remote_field_api_response import RemoteFieldApiResponse + from .remote_key import RemoteKey + from .remote_response import RemoteResponse + from .remote_response_response_type import RemoteResponseResponseType + from .request_format_enum import RequestFormatEnum + from .response_type_enum import ResponseTypeEnum + from .role_enum import RoleEnum + from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum + from .status_fd_5_enum import StatusFd5Enum + from .sync_status import SyncStatus + from .sync_status_last_sync_result import SyncStatusLastSyncResult + from .sync_status_status import SyncStatusStatus + from .type_enum import TypeEnum + from .user import User + from .validation_problem_source import ValidationProblemSource + from .warning_validation_problem import WarningValidationProblem + from .webhook_receiver import WebhookReceiver +_dynamic_imports: typing.Dict[str, str] = { + "AccountDetails": ".account_details", + "AccountDetailsAndActions": ".account_details_and_actions", + "AccountDetailsAndActionsCategory": ".account_details_and_actions_category", + "AccountDetailsAndActionsIntegration": ".account_details_and_actions_integration", + "AccountDetailsAndActionsStatus": ".account_details_and_actions_status", + "AccountDetailsAndActionsStatusEnum": ".account_details_and_actions_status_enum", + "AccountDetailsCategory": ".account_details_category", + "AccountIntegration": ".account_integration", + "AccountToken": ".account_token", + "AdvancedMetadata": ".advanced_metadata", + "AsyncPassthroughReciept": ".async_passthrough_reciept", + "AuditLogEvent": ".audit_log_event", + "AuditLogEventEventType": ".audit_log_event_event_type", + "AuditLogEventRole": ".audit_log_event_role", + "AvailableActions": ".available_actions", + "CategoriesEnum": ".categories_enum", + "CategoryEnum": ".category_enum", + "CommonModelScopeApi": ".common_model_scope_api", + "CommonModelScopesBodyRequest": ".common_model_scopes_body_request", + "CompletedAccountInitialScreenEnum": ".completed_account_initial_screen_enum", + "Conversation": ".conversation", + "ConversationType": ".conversation_type", + "DataPassthroughRequest": ".data_passthrough_request", + "DataPassthroughRequestMethod": ".data_passthrough_request_method", + "DataPassthroughRequestRequestFormat": ".data_passthrough_request_request_format", + "DebugModeLog": ".debug_mode_log", + "DebugModelLogSummary": ".debug_model_log_summary", + "EnabledActionsEnum": ".enabled_actions_enum", + "EncodingEnum": ".encoding_enum", + "ErrorValidationProblem": ".error_validation_problem", + "EventTypeEnum": ".event_type_enum", + "ExternalTargetFieldApi": ".external_target_field_api", + "ExternalTargetFieldApiResponse": ".external_target_field_api_response", + "FieldMappingApiInstance": ".field_mapping_api_instance", + "FieldMappingApiInstanceRemoteField": ".field_mapping_api_instance_remote_field", + "FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo": ".field_mapping_api_instance_remote_field_remote_endpoint_info", + "FieldMappingApiInstanceResponse": ".field_mapping_api_instance_response", + "FieldMappingApiInstanceTargetField": ".field_mapping_api_instance_target_field", + "FieldMappingInstanceResponse": ".field_mapping_instance_response", + "FieldPermissionDeserializer": ".field_permission_deserializer", + "FieldPermissionDeserializerRequest": ".field_permission_deserializer_request", + "Group": ".group", + "IndividualCommonModelScopeDeserializer": ".individual_common_model_scope_deserializer", + "IndividualCommonModelScopeDeserializerRequest": ".individual_common_model_scope_deserializer_request", + "Issue": ".issue", + "IssueStatus": ".issue_status", + "IssueStatusEnum": ".issue_status_enum", + "LanguageEnum": ".language_enum", + "LastSyncResultEnum": ".last_sync_result_enum", + "LinkToken": ".link_token", + "Member": ".member", + "Message": ".message", + "MethodEnum": ".method_enum", + "ModelOperation": ".model_operation", + "ModelPermissionDeserializer": ".model_permission_deserializer", + "ModelPermissionDeserializerRequest": ".model_permission_deserializer_request", + "MultipartFormFieldRequest": ".multipart_form_field_request", + "MultipartFormFieldRequestEncoding": ".multipart_form_field_request_encoding", + "PaginatedAccountDetailsAndActionsList": ".paginated_account_details_and_actions_list", + "PaginatedAuditLogEventList": ".paginated_audit_log_event_list", + "PaginatedConversationList": ".paginated_conversation_list", + "PaginatedGroupList": ".paginated_group_list", + "PaginatedIssueList": ".paginated_issue_list", + "PaginatedMemberList": ".paginated_member_list", + "PaginatedMessageList": ".paginated_message_list", + "PaginatedSyncStatusList": ".paginated_sync_status_list", + "PaginatedUserList": ".paginated_user_list", + "RemoteData": ".remote_data", + "RemoteEndpointInfo": ".remote_endpoint_info", + "RemoteFieldApi": ".remote_field_api", + "RemoteFieldApiAdvancedMetadata": ".remote_field_api_advanced_metadata", + "RemoteFieldApiCoverage": ".remote_field_api_coverage", + "RemoteFieldApiResponse": ".remote_field_api_response", + "RemoteKey": ".remote_key", + "RemoteResponse": ".remote_response", + "RemoteResponseResponseType": ".remote_response_response_type", + "RequestFormatEnum": ".request_format_enum", + "ResponseTypeEnum": ".response_type_enum", + "RoleEnum": ".role_enum", + "SelectiveSyncConfigurationsUsageEnum": ".selective_sync_configurations_usage_enum", + "StatusFd5Enum": ".status_fd_5_enum", + "SyncStatus": ".sync_status", + "SyncStatusLastSyncResult": ".sync_status_last_sync_result", + "SyncStatusStatus": ".sync_status_status", + "TypeEnum": ".type_enum", + "User": ".user", + "ValidationProblemSource": ".validation_problem_source", + "WarningValidationProblem": ".warning_validation_problem", + "WebhookReceiver": ".webhook_receiver", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "AccountDetails", + "AccountDetailsAndActions", + "AccountDetailsAndActionsCategory", + "AccountDetailsAndActionsIntegration", + "AccountDetailsAndActionsStatus", + "AccountDetailsAndActionsStatusEnum", + "AccountDetailsCategory", + "AccountIntegration", + "AccountToken", + "AdvancedMetadata", + "AsyncPassthroughReciept", + "AuditLogEvent", + "AuditLogEventEventType", + "AuditLogEventRole", + "AvailableActions", + "CategoriesEnum", + "CategoryEnum", + "CommonModelScopeApi", + "CommonModelScopesBodyRequest", + "CompletedAccountInitialScreenEnum", + "Conversation", + "ConversationType", + "DataPassthroughRequest", + "DataPassthroughRequestMethod", + "DataPassthroughRequestRequestFormat", + "DebugModeLog", + "DebugModelLogSummary", + "EnabledActionsEnum", + "EncodingEnum", + "ErrorValidationProblem", + "EventTypeEnum", + "ExternalTargetFieldApi", + "ExternalTargetFieldApiResponse", + "FieldMappingApiInstance", + "FieldMappingApiInstanceRemoteField", + "FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo", + "FieldMappingApiInstanceResponse", + "FieldMappingApiInstanceTargetField", + "FieldMappingInstanceResponse", + "FieldPermissionDeserializer", + "FieldPermissionDeserializerRequest", + "Group", + "IndividualCommonModelScopeDeserializer", + "IndividualCommonModelScopeDeserializerRequest", + "Issue", + "IssueStatus", + "IssueStatusEnum", + "LanguageEnum", + "LastSyncResultEnum", + "LinkToken", + "Member", + "Message", + "MethodEnum", + "ModelOperation", + "ModelPermissionDeserializer", + "ModelPermissionDeserializerRequest", + "MultipartFormFieldRequest", + "MultipartFormFieldRequestEncoding", + "PaginatedAccountDetailsAndActionsList", + "PaginatedAuditLogEventList", + "PaginatedConversationList", + "PaginatedGroupList", + "PaginatedIssueList", + "PaginatedMemberList", + "PaginatedMessageList", + "PaginatedSyncStatusList", + "PaginatedUserList", + "RemoteData", + "RemoteEndpointInfo", + "RemoteFieldApi", + "RemoteFieldApiAdvancedMetadata", + "RemoteFieldApiCoverage", + "RemoteFieldApiResponse", + "RemoteKey", + "RemoteResponse", + "RemoteResponseResponseType", + "RequestFormatEnum", + "ResponseTypeEnum", + "RoleEnum", + "SelectiveSyncConfigurationsUsageEnum", + "StatusFd5Enum", + "SyncStatus", + "SyncStatusLastSyncResult", + "SyncStatusStatus", + "TypeEnum", + "User", + "ValidationProblemSource", + "WarningValidationProblem", + "WebhookReceiver", +] diff --git a/src/merge/resources/chat/types/account_details.py b/src/merge/resources/chat/types/account_details.py new file mode 100644 index 00000000..98923cd8 --- /dev/null +++ b/src/merge/resources/chat/types/account_details.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .account_details_category import AccountDetailsCategory + + +class AccountDetails(UncheckedBaseModel): + id: typing.Optional[str] = None + integration: typing.Optional[str] = None + integration_slug: typing.Optional[str] = None + category: typing.Optional[AccountDetailsCategory] = None + end_user_origin_id: typing.Optional[str] = None + end_user_organization_name: typing.Optional[str] = None + end_user_email_address: typing.Optional[str] = None + status: typing.Optional[str] = None + webhook_listener_url: typing.Optional[str] = None + is_duplicate: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets. + """ + + account_type: typing.Optional[str] = None + completed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The time at which account completes the linking flow. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/account_details_and_actions.py b/src/merge/resources/chat/types/account_details_and_actions.py new file mode 100644 index 00000000..93c874ed --- /dev/null +++ b/src/merge/resources/chat/types/account_details_and_actions.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .account_details_and_actions_category import AccountDetailsAndActionsCategory +from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration +from .account_details_and_actions_status import AccountDetailsAndActionsStatus + + +class AccountDetailsAndActions(UncheckedBaseModel): + """ + # The LinkedAccount Object + ### Description + The `LinkedAccount` object is used to represent an end user's link with a specific integration. + + ### Usage Example + View a list of your organization's `LinkedAccount` objects. + """ + + id: str + category: typing.Optional[AccountDetailsAndActionsCategory] = None + status: AccountDetailsAndActionsStatus + status_detail: typing.Optional[str] = None + end_user_origin_id: typing.Optional[str] = None + end_user_organization_name: str + end_user_email_address: str + subdomain: typing.Optional[str] = pydantic.Field(default=None) + """ + The tenant or domain the customer has provided access to. + """ + + webhook_listener_url: str + is_duplicate: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets. + """ + + integration: typing.Optional[AccountDetailsAndActionsIntegration] = None + account_type: str + completed_at: dt.datetime + integration_specific_fields: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/account_details_and_actions_category.py b/src/merge/resources/chat/types/account_details_and_actions_category.py new file mode 100644 index 00000000..93b4188b --- /dev/null +++ b/src/merge/resources/chat/types/account_details_and_actions_category.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .category_enum import CategoryEnum + +AccountDetailsAndActionsCategory = typing.Union[CategoryEnum, str] diff --git a/src/merge/resources/chat/types/account_details_and_actions_integration.py b/src/merge/resources/chat/types/account_details_and_actions_integration.py new file mode 100644 index 00000000..73467bbb --- /dev/null +++ b/src/merge/resources/chat/types/account_details_and_actions_integration.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .categories_enum import CategoriesEnum +from .model_operation import ModelOperation + + +class AccountDetailsAndActionsIntegration(UncheckedBaseModel): + name: str + categories: typing.List[CategoriesEnum] + image: typing.Optional[str] = None + square_image: typing.Optional[str] = None + color: str + slug: str + passthrough_available: bool + available_model_operations: typing.Optional[typing.List[ModelOperation]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/account_details_and_actions_status.py b/src/merge/resources/chat/types/account_details_and_actions_status.py new file mode 100644 index 00000000..445922f8 --- /dev/null +++ b/src/merge/resources/chat/types/account_details_and_actions_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum + +AccountDetailsAndActionsStatus = typing.Union[AccountDetailsAndActionsStatusEnum, str] diff --git a/src/merge/resources/chat/types/account_details_and_actions_status_enum.py b/src/merge/resources/chat/types/account_details_and_actions_status_enum.py new file mode 100644 index 00000000..df37f582 --- /dev/null +++ b/src/merge/resources/chat/types/account_details_and_actions_status_enum.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class AccountDetailsAndActionsStatusEnum(str, enum.Enum): + """ + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + """ + + COMPLETE = "COMPLETE" + INCOMPLETE = "INCOMPLETE" + RELINK_NEEDED = "RELINK_NEEDED" + IDLE = "IDLE" + + def visit( + self, + complete: typing.Callable[[], T_Result], + incomplete: typing.Callable[[], T_Result], + relink_needed: typing.Callable[[], T_Result], + idle: typing.Callable[[], T_Result], + ) -> T_Result: + if self is AccountDetailsAndActionsStatusEnum.COMPLETE: + return complete() + if self is AccountDetailsAndActionsStatusEnum.INCOMPLETE: + return incomplete() + if self is AccountDetailsAndActionsStatusEnum.RELINK_NEEDED: + return relink_needed() + if self is AccountDetailsAndActionsStatusEnum.IDLE: + return idle() diff --git a/src/merge/resources/chat/types/account_details_category.py b/src/merge/resources/chat/types/account_details_category.py new file mode 100644 index 00000000..8a0cc59c --- /dev/null +++ b/src/merge/resources/chat/types/account_details_category.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .category_enum import CategoryEnum + +AccountDetailsCategory = typing.Union[CategoryEnum, str] diff --git a/src/merge/resources/chat/types/account_integration.py b/src/merge/resources/chat/types/account_integration.py new file mode 100644 index 00000000..ef8b260d --- /dev/null +++ b/src/merge/resources/chat/types/account_integration.py @@ -0,0 +1,67 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .categories_enum import CategoriesEnum + + +class AccountIntegration(UncheckedBaseModel): + name: str = pydantic.Field() + """ + Company name. + """ + + abbreviated_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) + """ + + categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic.Field(default=None) + """ + Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. + """ + + image: typing.Optional[str] = pydantic.Field(default=None) + """ + Company logo in rectangular shape. + """ + + square_image: typing.Optional[str] = pydantic.Field(default=None) + """ + Company logo in square shape. + """ + + color: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. + """ + + slug: typing.Optional[str] = None + api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = ( + pydantic.Field(default=None) + ) + """ + Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} + """ + + webhook_setup_guide_url: typing.Optional[str] = pydantic.Field(default=None) + """ + Setup guide URL for third party webhook creation. Exposed in Merge Docs. + """ + + category_beta_status: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + Category or categories this integration is in beta status for. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/account_token.py b/src/merge/resources/chat/types/account_token.py new file mode 100644 index 00000000..6e82c8ac --- /dev/null +++ b/src/merge/resources/chat/types/account_token.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .account_integration import AccountIntegration + + +class AccountToken(UncheckedBaseModel): + account_token: str + integration: AccountIntegration + id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/advanced_metadata.py b/src/merge/resources/chat/types/advanced_metadata.py new file mode 100644 index 00000000..60b5d072 --- /dev/null +++ b/src/merge/resources/chat/types/advanced_metadata.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class AdvancedMetadata(UncheckedBaseModel): + id: str + display_name: typing.Optional[str] = None + description: typing.Optional[str] = None + is_required: typing.Optional[bool] = None + is_custom: typing.Optional[bool] = None + field_choices: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/async_passthrough_reciept.py b/src/merge/resources/chat/types/async_passthrough_reciept.py new file mode 100644 index 00000000..21c95080 --- /dev/null +++ b/src/merge/resources/chat/types/async_passthrough_reciept.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class AsyncPassthroughReciept(UncheckedBaseModel): + async_passthrough_receipt_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/audit_log_event.py b/src/merge/resources/chat/types/audit_log_event.py new file mode 100644 index 00000000..ab69fd32 --- /dev/null +++ b/src/merge/resources/chat/types/audit_log_event.py @@ -0,0 +1,97 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .audit_log_event_event_type import AuditLogEventEventType +from .audit_log_event_role import AuditLogEventRole + + +class AuditLogEvent(UncheckedBaseModel): + id: typing.Optional[str] = None + user_name: typing.Optional[str] = pydantic.Field(default=None) + """ + The User's full name at the time of this Event occurring. + """ + + user_email: typing.Optional[str] = pydantic.Field(default=None) + """ + The User's email at the time of this Event occurring. + """ + + role: AuditLogEventRole = pydantic.Field() + """ + Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + """ + + ip_address: str + event_type: AuditLogEventEventType = pydantic.Field() + """ + Designates the type of event that occurred. + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + """ + + event_description: str + created_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/audit_log_event_event_type.py b/src/merge/resources/chat/types/audit_log_event_event_type.py new file mode 100644 index 00000000..f9c9d2b3 --- /dev/null +++ b/src/merge/resources/chat/types/audit_log_event_event_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .event_type_enum import EventTypeEnum + +AuditLogEventEventType = typing.Union[EventTypeEnum, str] diff --git a/src/merge/resources/chat/types/audit_log_event_role.py b/src/merge/resources/chat/types/audit_log_event_role.py new file mode 100644 index 00000000..fe91ed6f --- /dev/null +++ b/src/merge/resources/chat/types/audit_log_event_role.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .role_enum import RoleEnum + +AuditLogEventRole = typing.Union[RoleEnum, str] diff --git a/src/merge/resources/chat/types/available_actions.py b/src/merge/resources/chat/types/available_actions.py new file mode 100644 index 00000000..8b5019d7 --- /dev/null +++ b/src/merge/resources/chat/types/available_actions.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .account_integration import AccountIntegration +from .model_operation import ModelOperation + + +class AvailableActions(UncheckedBaseModel): + """ + # The AvailableActions Object + ### Description + The `Activity` object is used to see all available model/operation combinations for an integration. + + ### Usage Example + Fetch all the actions available for the `Zenefits` integration. + """ + + integration: AccountIntegration + passthrough_available: bool + available_model_operations: typing.Optional[typing.List[ModelOperation]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/categories_enum.py b/src/merge/resources/chat/types/categories_enum.py new file mode 100644 index 00000000..da1e0dc0 --- /dev/null +++ b/src/merge/resources/chat/types/categories_enum.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class CategoriesEnum(str, enum.Enum): + """ + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + """ + + HRIS = "hris" + ATS = "ats" + ACCOUNTING = "accounting" + TICKETING = "ticketing" + CRM = "crm" + MKTG = "mktg" + FILESTORAGE = "filestorage" + KNOWLEDGEBASE = "knowledgebase" + + def visit( + self, + hris: typing.Callable[[], T_Result], + ats: typing.Callable[[], T_Result], + accounting: typing.Callable[[], T_Result], + ticketing: typing.Callable[[], T_Result], + crm: typing.Callable[[], T_Result], + mktg: typing.Callable[[], T_Result], + filestorage: typing.Callable[[], T_Result], + knowledgebase: typing.Callable[[], T_Result], + ) -> T_Result: + if self is CategoriesEnum.HRIS: + return hris() + if self is CategoriesEnum.ATS: + return ats() + if self is CategoriesEnum.ACCOUNTING: + return accounting() + if self is CategoriesEnum.TICKETING: + return ticketing() + if self is CategoriesEnum.CRM: + return crm() + if self is CategoriesEnum.MKTG: + return mktg() + if self is CategoriesEnum.FILESTORAGE: + return filestorage() + if self is CategoriesEnum.KNOWLEDGEBASE: + return knowledgebase() diff --git a/src/merge/resources/chat/types/category_enum.py b/src/merge/resources/chat/types/category_enum.py new file mode 100644 index 00000000..1d7cd2c0 --- /dev/null +++ b/src/merge/resources/chat/types/category_enum.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class CategoryEnum(str, enum.Enum): + """ + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + """ + + HRIS = "hris" + ATS = "ats" + ACCOUNTING = "accounting" + TICKETING = "ticketing" + CRM = "crm" + MKTG = "mktg" + FILESTORAGE = "filestorage" + KNOWLEDGEBASE = "knowledgebase" + + def visit( + self, + hris: typing.Callable[[], T_Result], + ats: typing.Callable[[], T_Result], + accounting: typing.Callable[[], T_Result], + ticketing: typing.Callable[[], T_Result], + crm: typing.Callable[[], T_Result], + mktg: typing.Callable[[], T_Result], + filestorage: typing.Callable[[], T_Result], + knowledgebase: typing.Callable[[], T_Result], + ) -> T_Result: + if self is CategoryEnum.HRIS: + return hris() + if self is CategoryEnum.ATS: + return ats() + if self is CategoryEnum.ACCOUNTING: + return accounting() + if self is CategoryEnum.TICKETING: + return ticketing() + if self is CategoryEnum.CRM: + return crm() + if self is CategoryEnum.MKTG: + return mktg() + if self is CategoryEnum.FILESTORAGE: + return filestorage() + if self is CategoryEnum.KNOWLEDGEBASE: + return knowledgebase() diff --git a/src/merge/resources/chat/types/common_model_scope_api.py b/src/merge/resources/chat/types/common_model_scope_api.py new file mode 100644 index 00000000..5484808d --- /dev/null +++ b/src/merge/resources/chat/types/common_model_scope_api.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer + + +class CommonModelScopeApi(UncheckedBaseModel): + common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic.Field() + """ + The common models you want to update the scopes for + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/common_model_scopes_body_request.py b/src/merge/resources/chat/types/common_model_scopes_body_request.py new file mode 100644 index 00000000..a9fed25b --- /dev/null +++ b/src/merge/resources/chat/types/common_model_scopes_body_request.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .enabled_actions_enum import EnabledActionsEnum + + +class CommonModelScopesBodyRequest(UncheckedBaseModel): + model_id: str + enabled_actions: typing.List[EnabledActionsEnum] + disabled_fields: typing.List[str] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/completed_account_initial_screen_enum.py b/src/merge/resources/chat/types/completed_account_initial_screen_enum.py new file mode 100644 index 00000000..c112dfd1 --- /dev/null +++ b/src/merge/resources/chat/types/completed_account_initial_screen_enum.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CompletedAccountInitialScreenEnum = typing.Literal["SELECTIVE_SYNC"] diff --git a/src/merge/resources/chat/types/conversation.py b/src/merge/resources/chat/types/conversation.py new file mode 100644 index 00000000..def862bc --- /dev/null +++ b/src/merge/resources/chat/types/conversation.py @@ -0,0 +1,80 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .conversation_type import ConversationType +from .remote_data import RemoteData + + +class Conversation(UncheckedBaseModel): + """ + # The Conversation Object + ### Description + The `Conversation` object is used to represent a conversation within the Chat account. + + ### Usage Example + Fetch from the `GET /api/chat/v1/conversations` endpoint and view their conversations. + """ + + id: typing.Optional[str] = None + remote_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The third-party API ID of the matching object. + """ + + created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was created by Merge. + """ + + modified_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was modified by Merge. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + The name of the conversation + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + The description of the conversation. + """ + + url: typing.Optional[str] = pydantic.Field(default=None) + """ + The url of the conversation. + """ + + type: typing.Optional[ConversationType] = pydantic.Field(default=None) + """ + The type of the conversation. + + * `PRIVATE_INTERNAL` - PRIVATE_INTERNAL + * `PRIVATE_EXTERNAL` - PRIVATE_EXTERNAL + * `PUBLIC_INTERNAL` - PUBLIC_INTERNAL + * `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL + """ + + members: typing.Optional[typing.List[typing.Optional[str]]] = None + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) + """ + 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/). + """ + + field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + remote_data: typing.Optional[typing.List[RemoteData]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/conversation_type.py b/src/merge/resources/chat/types/conversation_type.py new file mode 100644 index 00000000..c54e60bf --- /dev/null +++ b/src/merge/resources/chat/types/conversation_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .type_enum import TypeEnum + +ConversationType = typing.Union[TypeEnum, str] diff --git a/src/merge/resources/chat/types/data_passthrough_request.py b/src/merge/resources/chat/types/data_passthrough_request.py new file mode 100644 index 00000000..5a60bfb6 --- /dev/null +++ b/src/merge/resources/chat/types/data_passthrough_request.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .data_passthrough_request_method import DataPassthroughRequestMethod +from .data_passthrough_request_request_format import DataPassthroughRequestRequestFormat +from .multipart_form_field_request import MultipartFormFieldRequest + + +class DataPassthroughRequest(UncheckedBaseModel): + """ + # The DataPassthrough Object + ### Description + The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + + ### Usage Example + Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + """ + + method: DataPassthroughRequestMethod + path: str = pydantic.Field() + """ + The path of the request in the third party's platform. + """ + + base_url_override: typing.Optional[str] = pydantic.Field(default=None) + """ + An optional override of the third party's base url for the request. + """ + + data: typing.Optional[str] = pydantic.Field(default=None) + """ + The data with the request. You must include a `request_format` parameter matching the data's format + """ + + multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field(default=None) + """ + Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. + """ + + headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. + """ + + request_format: typing.Optional[DataPassthroughRequestRequestFormat] = None + normalize_response: typing.Optional[bool] = pydantic.Field(default=None) + """ + Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/data_passthrough_request_method.py b/src/merge/resources/chat/types/data_passthrough_request_method.py new file mode 100644 index 00000000..58874cbf --- /dev/null +++ b/src/merge/resources/chat/types/data_passthrough_request_method.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .method_enum import MethodEnum + +DataPassthroughRequestMethod = typing.Union[MethodEnum, str] diff --git a/src/merge/resources/chat/types/data_passthrough_request_request_format.py b/src/merge/resources/chat/types/data_passthrough_request_request_format.py new file mode 100644 index 00000000..13dc95f0 --- /dev/null +++ b/src/merge/resources/chat/types/data_passthrough_request_request_format.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .request_format_enum import RequestFormatEnum + +DataPassthroughRequestRequestFormat = typing.Union[RequestFormatEnum, str] diff --git a/src/merge/resources/chat/types/debug_mode_log.py b/src/merge/resources/chat/types/debug_mode_log.py new file mode 100644 index 00000000..9c7d2a3f --- /dev/null +++ b/src/merge/resources/chat/types/debug_mode_log.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .debug_model_log_summary import DebugModelLogSummary + + +class DebugModeLog(UncheckedBaseModel): + log_id: str + dashboard_view: str + log_summary: DebugModelLogSummary + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/debug_model_log_summary.py b/src/merge/resources/chat/types/debug_model_log_summary.py new file mode 100644 index 00000000..d7e1d3e6 --- /dev/null +++ b/src/merge/resources/chat/types/debug_model_log_summary.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class DebugModelLogSummary(UncheckedBaseModel): + url: str + method: str + status_code: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/enabled_actions_enum.py b/src/merge/resources/chat/types/enabled_actions_enum.py new file mode 100644 index 00000000..29cf9839 --- /dev/null +++ b/src/merge/resources/chat/types/enabled_actions_enum.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class EnabledActionsEnum(str, enum.Enum): + """ + * `READ` - READ + * `WRITE` - WRITE + """ + + READ = "READ" + WRITE = "WRITE" + + def visit(self, read: typing.Callable[[], T_Result], write: typing.Callable[[], T_Result]) -> T_Result: + if self is EnabledActionsEnum.READ: + return read() + if self is EnabledActionsEnum.WRITE: + return write() diff --git a/src/merge/resources/chat/types/encoding_enum.py b/src/merge/resources/chat/types/encoding_enum.py new file mode 100644 index 00000000..7454647e --- /dev/null +++ b/src/merge/resources/chat/types/encoding_enum.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class EncodingEnum(str, enum.Enum): + """ + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + """ + + RAW = "RAW" + BASE_64 = "BASE64" + GZIP_BASE_64 = "GZIP_BASE64" + + def visit( + self, + raw: typing.Callable[[], T_Result], + base_64: typing.Callable[[], T_Result], + gzip_base_64: typing.Callable[[], T_Result], + ) -> T_Result: + if self is EncodingEnum.RAW: + return raw() + if self is EncodingEnum.BASE_64: + return base_64() + if self is EncodingEnum.GZIP_BASE_64: + return gzip_base_64() diff --git a/src/merge/resources/chat/types/error_validation_problem.py b/src/merge/resources/chat/types/error_validation_problem.py new file mode 100644 index 00000000..57188343 --- /dev/null +++ b/src/merge/resources/chat/types/error_validation_problem.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .validation_problem_source import ValidationProblemSource + + +class ErrorValidationProblem(UncheckedBaseModel): + source: typing.Optional[ValidationProblemSource] = None + title: str + detail: str + problem_type: str + block_merge_link: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/event_type_enum.py b/src/merge/resources/chat/types/event_type_enum.py new file mode 100644 index 00000000..537cea3f --- /dev/null +++ b/src/merge/resources/chat/types/event_type_enum.py @@ -0,0 +1,231 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class EventTypeEnum(str, enum.Enum): + """ + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + """ + + CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" + DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY" + CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY" + DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY" + REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY" + REGENERATED_WEBHOOK_SIGNATURE = "REGENERATED_WEBHOOK_SIGNATURE" + INVITED_USER = "INVITED_USER" + TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED" + TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED" + DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT" + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT = "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + CREATED_DESTINATION = "CREATED_DESTINATION" + DELETED_DESTINATION = "DELETED_DESTINATION" + CHANGED_DESTINATION = "CHANGED_DESTINATION" + CHANGED_SCOPES = "CHANGED_SCOPES" + CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION" + CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS" + ENABLED_INTEGRATION = "ENABLED_INTEGRATION" + DISABLED_INTEGRATION = "DISABLED_INTEGRATION" + ENABLED_CATEGORY = "ENABLED_CATEGORY" + DISABLED_CATEGORY = "DISABLED_CATEGORY" + CHANGED_PASSWORD = "CHANGED_PASSWORD" + RESET_PASSWORD = "RESET_PASSWORD" + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC" + MUTED_ISSUE = "MUTED_ISSUE" + GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK" + ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK" + DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK" + MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED" + END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED" + + def visit( + self, + created_remote_production_api_key: typing.Callable[[], T_Result], + deleted_remote_production_api_key: typing.Callable[[], T_Result], + created_test_api_key: typing.Callable[[], T_Result], + deleted_test_api_key: typing.Callable[[], T_Result], + regenerated_production_api_key: typing.Callable[[], T_Result], + regenerated_webhook_signature: typing.Callable[[], T_Result], + invited_user: typing.Callable[[], T_Result], + two_factor_auth_enabled: typing.Callable[[], T_Result], + two_factor_auth_disabled: typing.Callable[[], T_Result], + deleted_linked_account: typing.Callable[[], T_Result], + deleted_all_common_models_for_linked_account: typing.Callable[[], T_Result], + created_destination: typing.Callable[[], T_Result], + deleted_destination: typing.Callable[[], T_Result], + changed_destination: typing.Callable[[], T_Result], + changed_scopes: typing.Callable[[], T_Result], + changed_personal_information: typing.Callable[[], T_Result], + changed_organization_settings: typing.Callable[[], T_Result], + enabled_integration: typing.Callable[[], T_Result], + disabled_integration: typing.Callable[[], T_Result], + enabled_category: typing.Callable[[], T_Result], + disabled_category: typing.Callable[[], T_Result], + changed_password: typing.Callable[[], T_Result], + reset_password: typing.Callable[[], T_Result], + enabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result], + enabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result], + disabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result], + disabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result], + created_integration_wide_field_mapping: typing.Callable[[], T_Result], + created_linked_account_field_mapping: typing.Callable[[], T_Result], + changed_integration_wide_field_mapping: typing.Callable[[], T_Result], + changed_linked_account_field_mapping: typing.Callable[[], T_Result], + deleted_integration_wide_field_mapping: typing.Callable[[], T_Result], + deleted_linked_account_field_mapping: typing.Callable[[], T_Result], + created_linked_account_common_model_override: typing.Callable[[], T_Result], + changed_linked_account_common_model_override: typing.Callable[[], T_Result], + deleted_linked_account_common_model_override: typing.Callable[[], T_Result], + forced_linked_account_resync: typing.Callable[[], T_Result], + muted_issue: typing.Callable[[], T_Result], + generated_magic_link: typing.Callable[[], T_Result], + enabled_merge_webhook: typing.Callable[[], T_Result], + disabled_merge_webhook: typing.Callable[[], T_Result], + merge_webhook_target_changed: typing.Callable[[], T_Result], + end_user_credentials_accessed: typing.Callable[[], T_Result], + ) -> T_Result: + if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: + return created_remote_production_api_key() + if self is EventTypeEnum.DELETED_REMOTE_PRODUCTION_API_KEY: + return deleted_remote_production_api_key() + if self is EventTypeEnum.CREATED_TEST_API_KEY: + return created_test_api_key() + if self is EventTypeEnum.DELETED_TEST_API_KEY: + return deleted_test_api_key() + if self is EventTypeEnum.REGENERATED_PRODUCTION_API_KEY: + return regenerated_production_api_key() + if self is EventTypeEnum.REGENERATED_WEBHOOK_SIGNATURE: + return regenerated_webhook_signature() + if self is EventTypeEnum.INVITED_USER: + return invited_user() + if self is EventTypeEnum.TWO_FACTOR_AUTH_ENABLED: + return two_factor_auth_enabled() + if self is EventTypeEnum.TWO_FACTOR_AUTH_DISABLED: + return two_factor_auth_disabled() + if self is EventTypeEnum.DELETED_LINKED_ACCOUNT: + return deleted_linked_account() + if self is EventTypeEnum.DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT: + return deleted_all_common_models_for_linked_account() + if self is EventTypeEnum.CREATED_DESTINATION: + return created_destination() + if self is EventTypeEnum.DELETED_DESTINATION: + return deleted_destination() + if self is EventTypeEnum.CHANGED_DESTINATION: + return changed_destination() + if self is EventTypeEnum.CHANGED_SCOPES: + return changed_scopes() + if self is EventTypeEnum.CHANGED_PERSONAL_INFORMATION: + return changed_personal_information() + if self is EventTypeEnum.CHANGED_ORGANIZATION_SETTINGS: + return changed_organization_settings() + if self is EventTypeEnum.ENABLED_INTEGRATION: + return enabled_integration() + if self is EventTypeEnum.DISABLED_INTEGRATION: + return disabled_integration() + if self is EventTypeEnum.ENABLED_CATEGORY: + return enabled_category() + if self is EventTypeEnum.DISABLED_CATEGORY: + return disabled_category() + if self is EventTypeEnum.CHANGED_PASSWORD: + return changed_password() + if self is EventTypeEnum.RESET_PASSWORD: + return reset_password() + if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION: + return enabled_redact_unmapped_data_for_organization() + if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT: + return enabled_redact_unmapped_data_for_linked_account() + if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION: + return disabled_redact_unmapped_data_for_organization() + if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT: + return disabled_redact_unmapped_data_for_linked_account() + if self is EventTypeEnum.CREATED_INTEGRATION_WIDE_FIELD_MAPPING: + return created_integration_wide_field_mapping() + if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_FIELD_MAPPING: + return created_linked_account_field_mapping() + if self is EventTypeEnum.CHANGED_INTEGRATION_WIDE_FIELD_MAPPING: + return changed_integration_wide_field_mapping() + if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_FIELD_MAPPING: + return changed_linked_account_field_mapping() + if self is EventTypeEnum.DELETED_INTEGRATION_WIDE_FIELD_MAPPING: + return deleted_integration_wide_field_mapping() + if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING: + return deleted_linked_account_field_mapping() + if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE: + return created_linked_account_common_model_override() + if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE: + return changed_linked_account_common_model_override() + if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE: + return deleted_linked_account_common_model_override() + if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC: + return forced_linked_account_resync() + if self is EventTypeEnum.MUTED_ISSUE: + return muted_issue() + if self is EventTypeEnum.GENERATED_MAGIC_LINK: + return generated_magic_link() + if self is EventTypeEnum.ENABLED_MERGE_WEBHOOK: + return enabled_merge_webhook() + if self is EventTypeEnum.DISABLED_MERGE_WEBHOOK: + return disabled_merge_webhook() + if self is EventTypeEnum.MERGE_WEBHOOK_TARGET_CHANGED: + return merge_webhook_target_changed() + if self is EventTypeEnum.END_USER_CREDENTIALS_ACCESSED: + return end_user_credentials_accessed() diff --git a/src/merge/resources/chat/types/external_target_field_api.py b/src/merge/resources/chat/types/external_target_field_api.py new file mode 100644 index 00000000..c0fea1eb --- /dev/null +++ b/src/merge/resources/chat/types/external_target_field_api.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class ExternalTargetFieldApi(UncheckedBaseModel): + name: typing.Optional[str] = None + description: typing.Optional[str] = None + is_mapped: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/external_target_field_api_response.py b/src/merge/resources/chat/types/external_target_field_api_response.py new file mode 100644 index 00000000..624d13ef --- /dev/null +++ b/src/merge/resources/chat/types/external_target_field_api_response.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .external_target_field_api import ExternalTargetFieldApi + + +class ExternalTargetFieldApiResponse(UncheckedBaseModel): + user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="User", default=None) + group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Group", default=None) + conversation: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field( + alias="Conversation", default=None + ) + member: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Member", default=None) + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_mapping_api_instance.py b/src/merge/resources/chat/types/field_mapping_api_instance.py new file mode 100644 index 00000000..0d257dcb --- /dev/null +++ b/src/merge/resources/chat/types/field_mapping_api_instance.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField +from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField + + +class FieldMappingApiInstance(UncheckedBaseModel): + id: typing.Optional[str] = None + is_integration_wide: typing.Optional[bool] = None + target_field: typing.Optional[FieldMappingApiInstanceTargetField] = None + remote_field: typing.Optional[FieldMappingApiInstanceRemoteField] = None + jmes_path: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_mapping_api_instance_remote_field.py b/src/merge/resources/chat/types/field_mapping_api_instance_remote_field.py new file mode 100644 index 00000000..578a2b10 --- /dev/null +++ b/src/merge/resources/chat/types/field_mapping_api_instance_remote_field.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .field_mapping_api_instance_remote_field_remote_endpoint_info import ( + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, +) + + +class FieldMappingApiInstanceRemoteField(UncheckedBaseModel): + remote_key_name: typing.Optional[str] = None + schema_: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field( + alias="schema", default=None + ) + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py b/src/merge/resources/chat/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py new file mode 100644 index 00000000..4171f08b --- /dev/null +++ b/src/merge/resources/chat/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(UncheckedBaseModel): + method: typing.Optional[str] = None + url_path: typing.Optional[str] = None + field_traversal_path: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_mapping_api_instance_response.py b/src/merge/resources/chat/types/field_mapping_api_instance_response.py new file mode 100644 index 00000000..ebded9e9 --- /dev/null +++ b/src/merge/resources/chat/types/field_mapping_api_instance_response.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .field_mapping_api_instance import FieldMappingApiInstance + + +class FieldMappingApiInstanceResponse(UncheckedBaseModel): + user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="User", default=None) + group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Group", default=None) + conversation: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field( + alias="Conversation", default=None + ) + member: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Member", default=None) + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_mapping_api_instance_target_field.py b/src/merge/resources/chat/types/field_mapping_api_instance_target_field.py new file mode 100644 index 00000000..e6474cba --- /dev/null +++ b/src/merge/resources/chat/types/field_mapping_api_instance_target_field.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class FieldMappingApiInstanceTargetField(UncheckedBaseModel): + name: str + description: str + is_organization_wide: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_mapping_instance_response.py b/src/merge/resources/chat/types/field_mapping_instance_response.py new file mode 100644 index 00000000..f921e641 --- /dev/null +++ b/src/merge/resources/chat/types/field_mapping_instance_response.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .debug_mode_log import DebugModeLog +from .error_validation_problem import ErrorValidationProblem +from .field_mapping_api_instance import FieldMappingApiInstance +from .warning_validation_problem import WarningValidationProblem + + +class FieldMappingInstanceResponse(UncheckedBaseModel): + model: FieldMappingApiInstance + warnings: typing.List[WarningValidationProblem] + errors: typing.List[ErrorValidationProblem] + logs: typing.Optional[typing.List[DebugModeLog]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_permission_deserializer.py b/src/merge/resources/chat/types/field_permission_deserializer.py new file mode 100644 index 00000000..1d71ae04 --- /dev/null +++ b/src/merge/resources/chat/types/field_permission_deserializer.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class FieldPermissionDeserializer(UncheckedBaseModel): + enabled_fields: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None + disabled_fields: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/field_permission_deserializer_request.py b/src/merge/resources/chat/types/field_permission_deserializer_request.py new file mode 100644 index 00000000..a4113b46 --- /dev/null +++ b/src/merge/resources/chat/types/field_permission_deserializer_request.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class FieldPermissionDeserializerRequest(UncheckedBaseModel): + enabled_fields: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None + disabled_fields: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/group.py b/src/merge/resources/chat/types/group.py new file mode 100644 index 00000000..79f31c25 --- /dev/null +++ b/src/merge/resources/chat/types/group.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .remote_data import RemoteData + + +class Group(UncheckedBaseModel): + """ + # The Group Object + ### Description + The `Group` object is used to represent any subset of `Users`. + ### Usage Example + Fetch from the `GET /api/chat/v1/groups` endpoint and view their groups. + """ + + id: typing.Optional[str] = None + remote_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The third-party API ID of the matching object. + """ + + created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was created by Merge. + """ + + modified_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was modified by Merge. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + The name of the Group + """ + + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) + """ + 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/). + """ + + field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + remote_data: typing.Optional[typing.List[RemoteData]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/individual_common_model_scope_deserializer.py b/src/merge/resources/chat/types/individual_common_model_scope_deserializer.py new file mode 100644 index 00000000..4b1ef6a4 --- /dev/null +++ b/src/merge/resources/chat/types/individual_common_model_scope_deserializer.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .field_permission_deserializer import FieldPermissionDeserializer +from .model_permission_deserializer import ModelPermissionDeserializer + + +class IndividualCommonModelScopeDeserializer(UncheckedBaseModel): + model_name: str + model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializer]] = None + field_permissions: typing.Optional[FieldPermissionDeserializer] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/individual_common_model_scope_deserializer_request.py b/src/merge/resources/chat/types/individual_common_model_scope_deserializer_request.py new file mode 100644 index 00000000..1dcda203 --- /dev/null +++ b/src/merge/resources/chat/types/individual_common_model_scope_deserializer_request.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .field_permission_deserializer_request import FieldPermissionDeserializerRequest +from .model_permission_deserializer_request import ModelPermissionDeserializerRequest + + +class IndividualCommonModelScopeDeserializerRequest(UncheckedBaseModel): + model_name: str + model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializerRequest]] = None + field_permissions: typing.Optional[FieldPermissionDeserializerRequest] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/issue.py b/src/merge/resources/chat/types/issue.py new file mode 100644 index 00000000..df31be95 --- /dev/null +++ b/src/merge/resources/chat/types/issue.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .issue_status import IssueStatus + + +class Issue(UncheckedBaseModel): + id: typing.Optional[str] = None + status: typing.Optional[IssueStatus] = pydantic.Field(default=None) + """ + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + """ + + error_description: str + end_user: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + first_incident_time: typing.Optional[dt.datetime] = None + last_incident_time: typing.Optional[dt.datetime] = None + is_muted: typing.Optional[bool] = None + error_details: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/issue_status.py b/src/merge/resources/chat/types/issue_status.py new file mode 100644 index 00000000..8e4d6516 --- /dev/null +++ b/src/merge/resources/chat/types/issue_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .issue_status_enum import IssueStatusEnum + +IssueStatus = typing.Union[IssueStatusEnum, str] diff --git a/src/merge/resources/chat/types/issue_status_enum.py b/src/merge/resources/chat/types/issue_status_enum.py new file mode 100644 index 00000000..57eb9618 --- /dev/null +++ b/src/merge/resources/chat/types/issue_status_enum.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class IssueStatusEnum(str, enum.Enum): + """ + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + """ + + ONGOING = "ONGOING" + RESOLVED = "RESOLVED" + + def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result: + if self is IssueStatusEnum.ONGOING: + return ongoing() + if self is IssueStatusEnum.RESOLVED: + return resolved() diff --git a/src/merge/resources/chat/types/language_enum.py b/src/merge/resources/chat/types/language_enum.py new file mode 100644 index 00000000..44b693f2 --- /dev/null +++ b/src/merge/resources/chat/types/language_enum.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class LanguageEnum(str, enum.Enum): + """ + * `en` - en + * `de` - de + """ + + EN = "en" + DE = "de" + + def visit(self, en: typing.Callable[[], T_Result], de: typing.Callable[[], T_Result]) -> T_Result: + if self is LanguageEnum.EN: + return en() + if self is LanguageEnum.DE: + return de() diff --git a/src/merge/resources/chat/types/last_sync_result_enum.py b/src/merge/resources/chat/types/last_sync_result_enum.py new file mode 100644 index 00000000..ec777ee6 --- /dev/null +++ b/src/merge/resources/chat/types/last_sync_result_enum.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class LastSyncResultEnum(str, enum.Enum): + """ + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + """ + + SYNCING = "SYNCING" + DONE = "DONE" + FAILED = "FAILED" + DISABLED = "DISABLED" + PAUSED = "PAUSED" + PARTIALLY_SYNCED = "PARTIALLY_SYNCED" + + def visit( + self, + syncing: typing.Callable[[], T_Result], + done: typing.Callable[[], T_Result], + failed: typing.Callable[[], T_Result], + disabled: typing.Callable[[], T_Result], + paused: typing.Callable[[], T_Result], + partially_synced: typing.Callable[[], T_Result], + ) -> T_Result: + if self is LastSyncResultEnum.SYNCING: + return syncing() + if self is LastSyncResultEnum.DONE: + return done() + if self is LastSyncResultEnum.FAILED: + return failed() + if self is LastSyncResultEnum.DISABLED: + return disabled() + if self is LastSyncResultEnum.PAUSED: + return paused() + if self is LastSyncResultEnum.PARTIALLY_SYNCED: + return partially_synced() diff --git a/src/merge/resources/chat/types/link_token.py b/src/merge/resources/chat/types/link_token.py new file mode 100644 index 00000000..f78dedeb --- /dev/null +++ b/src/merge/resources/chat/types/link_token.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class LinkToken(UncheckedBaseModel): + link_token: str + integration_name: typing.Optional[str] = None + magic_link_url: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/member.py b/src/merge/resources/chat/types/member.py new file mode 100644 index 00000000..d7acb701 --- /dev/null +++ b/src/merge/resources/chat/types/member.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .remote_data import RemoteData + + +class Member(UncheckedBaseModel): + """ + # The Member Object + ### Description + The `Member` object is used to represent a member within the Chat account. + + ### Usage Example + Fetch from the `GET /api/chat/v1/members` endpoint and view their members. + """ + + id: typing.Optional[str] = None + remote_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The third-party API ID of the matching object. + """ + + created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was created by Merge. + """ + + modified_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was modified by Merge. + """ + + user: typing.Optional[str] = pydantic.Field(default=None) + """ + The user that is a member of the conversation. Only populated if the member is a user. + """ + + group: typing.Optional[str] = pydantic.Field(default=None) + """ + The group that is a member of the conversation. Only populated if the member is a group. + """ + + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) + """ + 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/). + """ + + field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + remote_data: typing.Optional[typing.List[RemoteData]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/message.py b/src/merge/resources/chat/types/message.py new file mode 100644 index 00000000..71b0da11 --- /dev/null +++ b/src/merge/resources/chat/types/message.py @@ -0,0 +1,78 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class Message(UncheckedBaseModel): + """ + # The Message Object + ### Description + The `Message` object is used to represent a message within the Chat account. + ### Usage Example + Fetch from the `GET /api/chat/v1/messages` endpoint and view their message. + """ + + id: typing.Optional[str] = None + remote_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The third-party API ID of the matching object. + """ + + created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was created by Merge. + """ + + modified_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was modified by Merge. + """ + + user_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The user that sent the message. + """ + + conversation_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The conversation this message belongs to. + """ + + body: typing.Optional[str] = pydantic.Field(default=None) + """ + The body of the message. + """ + + subject_line: typing.Optional[str] = pydantic.Field(default=None) + """ + The subject line of the message. + """ + + root_message_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The root message this message belongs to. + """ + + url: typing.Optional[str] = pydantic.Field(default=None) + """ + The url of the message. + """ + + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) + """ + 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/). + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/method_enum.py b/src/merge/resources/chat/types/method_enum.py new file mode 100644 index 00000000..57bcde10 --- /dev/null +++ b/src/merge/resources/chat/types/method_enum.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class MethodEnum(str, enum.Enum): + """ + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + """ + + GET = "GET" + OPTIONS = "OPTIONS" + HEAD = "HEAD" + POST = "POST" + PUT = "PUT" + PATCH = "PATCH" + DELETE = "DELETE" + + def visit( + self, + get: typing.Callable[[], T_Result], + options: typing.Callable[[], T_Result], + head: typing.Callable[[], T_Result], + post: typing.Callable[[], T_Result], + put: typing.Callable[[], T_Result], + patch: typing.Callable[[], T_Result], + delete: typing.Callable[[], T_Result], + ) -> T_Result: + if self is MethodEnum.GET: + return get() + if self is MethodEnum.OPTIONS: + return options() + if self is MethodEnum.HEAD: + return head() + if self is MethodEnum.POST: + return post() + if self is MethodEnum.PUT: + return put() + if self is MethodEnum.PATCH: + return patch() + if self is MethodEnum.DELETE: + return delete() diff --git a/src/merge/resources/chat/types/model_operation.py b/src/merge/resources/chat/types/model_operation.py new file mode 100644 index 00000000..c367572d --- /dev/null +++ b/src/merge/resources/chat/types/model_operation.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class ModelOperation(UncheckedBaseModel): + """ + # The ModelOperation Object + ### Description + The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + + ### Usage Example + View what operations are supported for the `Candidate` endpoint. + """ + + model_name: str + available_operations: typing.List[str] + required_post_parameters: typing.List[str] + supported_fields: typing.List[str] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/model_permission_deserializer.py b/src/merge/resources/chat/types/model_permission_deserializer.py new file mode 100644 index 00000000..6381814c --- /dev/null +++ b/src/merge/resources/chat/types/model_permission_deserializer.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class ModelPermissionDeserializer(UncheckedBaseModel): + is_enabled: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/model_permission_deserializer_request.py b/src/merge/resources/chat/types/model_permission_deserializer_request.py new file mode 100644 index 00000000..cdc2ff4c --- /dev/null +++ b/src/merge/resources/chat/types/model_permission_deserializer_request.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class ModelPermissionDeserializerRequest(UncheckedBaseModel): + is_enabled: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/multipart_form_field_request.py b/src/merge/resources/chat/types/multipart_form_field_request.py new file mode 100644 index 00000000..abc37692 --- /dev/null +++ b/src/merge/resources/chat/types/multipart_form_field_request.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding + + +class MultipartFormFieldRequest(UncheckedBaseModel): + """ + # The MultipartFormField Object + ### Description + The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + + ### Usage Example + Create a `MultipartFormField` to define a multipart form entry. + """ + + name: str = pydantic.Field() + """ + The name of the form field + """ + + data: str = pydantic.Field() + """ + The data for the form field. + """ + + encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic.Field(default=None) + """ + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + """ + + file_name: typing.Optional[str] = pydantic.Field(default=None) + """ + The file name of the form field, if the field is for a file. + """ + + content_type: typing.Optional[str] = pydantic.Field(default=None) + """ + The MIME type of the file, if the field is for a file. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/multipart_form_field_request_encoding.py b/src/merge/resources/chat/types/multipart_form_field_request_encoding.py new file mode 100644 index 00000000..c6513b6b --- /dev/null +++ b/src/merge/resources/chat/types/multipart_form_field_request_encoding.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .encoding_enum import EncodingEnum + +MultipartFormFieldRequestEncoding = typing.Union[EncodingEnum, str] diff --git a/src/merge/resources/chat/types/paginated_account_details_and_actions_list.py b/src/merge/resources/chat/types/paginated_account_details_and_actions_list.py new file mode 100644 index 00000000..d2d16116 --- /dev/null +++ b/src/merge/resources/chat/types/paginated_account_details_and_actions_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .account_details_and_actions import AccountDetailsAndActions + + +class PaginatedAccountDetailsAndActionsList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[AccountDetailsAndActions]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_audit_log_event_list.py b/src/merge/resources/chat/types/paginated_audit_log_event_list.py new file mode 100644 index 00000000..24139397 --- /dev/null +++ b/src/merge/resources/chat/types/paginated_audit_log_event_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .audit_log_event import AuditLogEvent + + +class PaginatedAuditLogEventList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[AuditLogEvent]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_conversation_list.py b/src/merge/resources/chat/types/paginated_conversation_list.py new file mode 100644 index 00000000..66ae6ad4 --- /dev/null +++ b/src/merge/resources/chat/types/paginated_conversation_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .conversation import Conversation + + +class PaginatedConversationList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[Conversation]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_group_list.py b/src/merge/resources/chat/types/paginated_group_list.py new file mode 100644 index 00000000..90702e1f --- /dev/null +++ b/src/merge/resources/chat/types/paginated_group_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .group import Group + + +class PaginatedGroupList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[Group]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_issue_list.py b/src/merge/resources/chat/types/paginated_issue_list.py new file mode 100644 index 00000000..686173e5 --- /dev/null +++ b/src/merge/resources/chat/types/paginated_issue_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .issue import Issue + + +class PaginatedIssueList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[Issue]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_member_list.py b/src/merge/resources/chat/types/paginated_member_list.py new file mode 100644 index 00000000..97a567c2 --- /dev/null +++ b/src/merge/resources/chat/types/paginated_member_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .member import Member + + +class PaginatedMemberList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[Member]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_message_list.py b/src/merge/resources/chat/types/paginated_message_list.py new file mode 100644 index 00000000..6e8a7aee --- /dev/null +++ b/src/merge/resources/chat/types/paginated_message_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .message import Message + + +class PaginatedMessageList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[Message]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_sync_status_list.py b/src/merge/resources/chat/types/paginated_sync_status_list.py new file mode 100644 index 00000000..cc4bd7a8 --- /dev/null +++ b/src/merge/resources/chat/types/paginated_sync_status_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .sync_status import SyncStatus + + +class PaginatedSyncStatusList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[SyncStatus]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/paginated_user_list.py b/src/merge/resources/chat/types/paginated_user_list.py new file mode 100644 index 00000000..809b285c --- /dev/null +++ b/src/merge/resources/chat/types/paginated_user_list.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .user import User + + +class PaginatedUserList(UncheckedBaseModel): + next: typing.Optional[str] = None + previous: typing.Optional[str] = None + results: typing.Optional[typing.List[User]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/remote_data.py b/src/merge/resources/chat/types/remote_data.py new file mode 100644 index 00000000..b60f53bf --- /dev/null +++ b/src/merge/resources/chat/types/remote_data.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class RemoteData(UncheckedBaseModel): + """ + # The RemoteData Object + ### Description + The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + + ### Usage Example + TODO + """ + + path: str = pydantic.Field() + """ + The third-party API path that is being called. + """ + + data: typing.Optional[typing.Optional[typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/remote_endpoint_info.py b/src/merge/resources/chat/types/remote_endpoint_info.py new file mode 100644 index 00000000..07ceff6a --- /dev/null +++ b/src/merge/resources/chat/types/remote_endpoint_info.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class RemoteEndpointInfo(UncheckedBaseModel): + method: str + url_path: str + field_traversal_path: typing.List[typing.Optional[typing.Any]] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/remote_field_api.py b/src/merge/resources/chat/types/remote_field_api.py new file mode 100644 index 00000000..0756bfc3 --- /dev/null +++ b/src/merge/resources/chat/types/remote_field_api.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .remote_endpoint_info import RemoteEndpointInfo +from .remote_field_api_advanced_metadata import RemoteFieldApiAdvancedMetadata +from .remote_field_api_coverage import RemoteFieldApiCoverage + + +class RemoteFieldApi(UncheckedBaseModel): + schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema") + remote_key_name: str + remote_endpoint_info: RemoteEndpointInfo + example_values: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None + advanced_metadata: typing.Optional[RemoteFieldApiAdvancedMetadata] = None + coverage: typing.Optional[RemoteFieldApiCoverage] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/remote_field_api_advanced_metadata.py b/src/merge/resources/chat/types/remote_field_api_advanced_metadata.py new file mode 100644 index 00000000..e93da936 --- /dev/null +++ b/src/merge/resources/chat/types/remote_field_api_advanced_metadata.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .advanced_metadata import AdvancedMetadata + +RemoteFieldApiAdvancedMetadata = typing.Union[AdvancedMetadata, str] diff --git a/src/merge/resources/chat/types/remote_field_api_coverage.py b/src/merge/resources/chat/types/remote_field_api_coverage.py new file mode 100644 index 00000000..adcd9be9 --- /dev/null +++ b/src/merge/resources/chat/types/remote_field_api_coverage.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RemoteFieldApiCoverage = typing.Union[int, float] diff --git a/src/merge/resources/chat/types/remote_field_api_response.py b/src/merge/resources/chat/types/remote_field_api_response.py new file mode 100644 index 00000000..7e47f247 --- /dev/null +++ b/src/merge/resources/chat/types/remote_field_api_response.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .remote_field_api import RemoteFieldApi + + +class RemoteFieldApiResponse(UncheckedBaseModel): + user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="User", default=None) + group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Group", default=None) + conversation: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Conversation", default=None) + member: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Member", default=None) + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/remote_key.py b/src/merge/resources/chat/types/remote_key.py new file mode 100644 index 00000000..e5d9758c --- /dev/null +++ b/src/merge/resources/chat/types/remote_key.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class RemoteKey(UncheckedBaseModel): + """ + # The RemoteKey Object + ### Description + The `RemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + """ + + name: str + key: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/remote_response.py b/src/merge/resources/chat/types/remote_response.py new file mode 100644 index 00000000..db01131f --- /dev/null +++ b/src/merge/resources/chat/types/remote_response.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .remote_response_response_type import RemoteResponseResponseType + + +class RemoteResponse(UncheckedBaseModel): + """ + # The RemoteResponse Object + ### Description + The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + + ### Usage Example + View the `RemoteResponse` returned from your `DataPassthrough`. + """ + + method: str + path: str + status: int + response: typing.Optional[typing.Any] = None + response_headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + response_type: typing.Optional[RemoteResponseResponseType] = None + headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/remote_response_response_type.py b/src/merge/resources/chat/types/remote_response_response_type.py new file mode 100644 index 00000000..2556417a --- /dev/null +++ b/src/merge/resources/chat/types/remote_response_response_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .response_type_enum import ResponseTypeEnum + +RemoteResponseResponseType = typing.Union[ResponseTypeEnum, str] diff --git a/src/merge/resources/chat/types/request_format_enum.py b/src/merge/resources/chat/types/request_format_enum.py new file mode 100644 index 00000000..21c272f2 --- /dev/null +++ b/src/merge/resources/chat/types/request_format_enum.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class RequestFormatEnum(str, enum.Enum): + """ + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + """ + + JSON = "JSON" + XML = "XML" + MULTIPART = "MULTIPART" + + def visit( + self, + json: typing.Callable[[], T_Result], + xml: typing.Callable[[], T_Result], + multipart: typing.Callable[[], T_Result], + ) -> T_Result: + if self is RequestFormatEnum.JSON: + return json() + if self is RequestFormatEnum.XML: + return xml() + if self is RequestFormatEnum.MULTIPART: + return multipart() diff --git a/src/merge/resources/chat/types/response_type_enum.py b/src/merge/resources/chat/types/response_type_enum.py new file mode 100644 index 00000000..ef241302 --- /dev/null +++ b/src/merge/resources/chat/types/response_type_enum.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class ResponseTypeEnum(str, enum.Enum): + """ + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + """ + + JSON = "JSON" + BASE_64_GZIP = "BASE64_GZIP" + + def visit(self, json: typing.Callable[[], T_Result], base_64_gzip: typing.Callable[[], T_Result]) -> T_Result: + if self is ResponseTypeEnum.JSON: + return json() + if self is ResponseTypeEnum.BASE_64_GZIP: + return base_64_gzip() diff --git a/src/merge/resources/chat/types/role_enum.py b/src/merge/resources/chat/types/role_enum.py new file mode 100644 index 00000000..a6cfcc6f --- /dev/null +++ b/src/merge/resources/chat/types/role_enum.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class RoleEnum(str, enum.Enum): + """ + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + """ + + ADMIN = "ADMIN" + DEVELOPER = "DEVELOPER" + MEMBER = "MEMBER" + API = "API" + SYSTEM = "SYSTEM" + MERGE_TEAM = "MERGE_TEAM" + + def visit( + self, + admin: typing.Callable[[], T_Result], + developer: typing.Callable[[], T_Result], + member: typing.Callable[[], T_Result], + api: typing.Callable[[], T_Result], + system: typing.Callable[[], T_Result], + merge_team: typing.Callable[[], T_Result], + ) -> T_Result: + if self is RoleEnum.ADMIN: + return admin() + if self is RoleEnum.DEVELOPER: + return developer() + if self is RoleEnum.MEMBER: + return member() + if self is RoleEnum.API: + return api() + if self is RoleEnum.SYSTEM: + return system() + if self is RoleEnum.MERGE_TEAM: + return merge_team() diff --git a/src/merge/resources/chat/types/selective_sync_configurations_usage_enum.py b/src/merge/resources/chat/types/selective_sync_configurations_usage_enum.py new file mode 100644 index 00000000..9ff43813 --- /dev/null +++ b/src/merge/resources/chat/types/selective_sync_configurations_usage_enum.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class SelectiveSyncConfigurationsUsageEnum(str, enum.Enum): + """ + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + """ + + IN_NEXT_SYNC = "IN_NEXT_SYNC" + IN_LAST_SYNC = "IN_LAST_SYNC" + + def visit( + self, in_next_sync: typing.Callable[[], T_Result], in_last_sync: typing.Callable[[], T_Result] + ) -> T_Result: + if self is SelectiveSyncConfigurationsUsageEnum.IN_NEXT_SYNC: + return in_next_sync() + if self is SelectiveSyncConfigurationsUsageEnum.IN_LAST_SYNC: + return in_last_sync() diff --git a/src/merge/resources/chat/types/status_fd_5_enum.py b/src/merge/resources/chat/types/status_fd_5_enum.py new file mode 100644 index 00000000..d753f77c --- /dev/null +++ b/src/merge/resources/chat/types/status_fd_5_enum.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class StatusFd5Enum(str, enum.Enum): + """ + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + """ + + SYNCING = "SYNCING" + DONE = "DONE" + FAILED = "FAILED" + DISABLED = "DISABLED" + PAUSED = "PAUSED" + PARTIALLY_SYNCED = "PARTIALLY_SYNCED" + + def visit( + self, + syncing: typing.Callable[[], T_Result], + done: typing.Callable[[], T_Result], + failed: typing.Callable[[], T_Result], + disabled: typing.Callable[[], T_Result], + paused: typing.Callable[[], T_Result], + partially_synced: typing.Callable[[], T_Result], + ) -> T_Result: + if self is StatusFd5Enum.SYNCING: + return syncing() + if self is StatusFd5Enum.DONE: + return done() + if self is StatusFd5Enum.FAILED: + return failed() + if self is StatusFd5Enum.DISABLED: + return disabled() + if self is StatusFd5Enum.PAUSED: + return paused() + if self is StatusFd5Enum.PARTIALLY_SYNCED: + return partially_synced() diff --git a/src/merge/resources/chat/types/sync_status.py b/src/merge/resources/chat/types/sync_status.py new file mode 100644 index 00000000..07ab1dc2 --- /dev/null +++ b/src/merge/resources/chat/types/sync_status.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum +from .sync_status_last_sync_result import SyncStatusLastSyncResult +from .sync_status_status import SyncStatusStatus + + +class SyncStatus(UncheckedBaseModel): + """ + # The SyncStatus Object + ### Description + The `SyncStatus` object is used to represent the syncing state of an account + + ### Usage Example + View the `SyncStatus` for an account to see how recently its models were synced. + """ + + model_name: str + model_id: str + last_sync_start: typing.Optional[dt.datetime] = None + next_sync_start: typing.Optional[dt.datetime] = None + last_sync_result: typing.Optional[SyncStatusLastSyncResult] = None + last_sync_finished: typing.Optional[dt.datetime] = None + status: SyncStatusStatus + is_initial_sync: bool + selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/sync_status_last_sync_result.py b/src/merge/resources/chat/types/sync_status_last_sync_result.py new file mode 100644 index 00000000..980e7d94 --- /dev/null +++ b/src/merge/resources/chat/types/sync_status_last_sync_result.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .last_sync_result_enum import LastSyncResultEnum + +SyncStatusLastSyncResult = typing.Union[LastSyncResultEnum, str] diff --git a/src/merge/resources/chat/types/sync_status_status.py b/src/merge/resources/chat/types/sync_status_status.py new file mode 100644 index 00000000..78e4cc47 --- /dev/null +++ b/src/merge/resources/chat/types/sync_status_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .status_fd_5_enum import StatusFd5Enum + +SyncStatusStatus = typing.Union[StatusFd5Enum, str] diff --git a/src/merge/resources/chat/types/type_enum.py b/src/merge/resources/chat/types/type_enum.py new file mode 100644 index 00000000..37cdd1ef --- /dev/null +++ b/src/merge/resources/chat/types/type_enum.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class TypeEnum(str, enum.Enum): + """ + * `PRIVATE_INTERNAL` - PRIVATE_INTERNAL + * `PRIVATE_EXTERNAL` - PRIVATE_EXTERNAL + * `PUBLIC_INTERNAL` - PUBLIC_INTERNAL + * `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL + """ + + PRIVATE_INTERNAL = "PRIVATE_INTERNAL" + PRIVATE_EXTERNAL = "PRIVATE_EXTERNAL" + PUBLIC_INTERNAL = "PUBLIC_INTERNAL" + PUBLIC_EXTERNAL = "PUBLIC_EXTERNAL" + + def visit( + self, + private_internal: typing.Callable[[], T_Result], + private_external: typing.Callable[[], T_Result], + public_internal: typing.Callable[[], T_Result], + public_external: typing.Callable[[], T_Result], + ) -> T_Result: + if self is TypeEnum.PRIVATE_INTERNAL: + return private_internal() + if self is TypeEnum.PRIVATE_EXTERNAL: + return private_external() + if self is TypeEnum.PUBLIC_INTERNAL: + return public_internal() + if self is TypeEnum.PUBLIC_EXTERNAL: + return public_external() diff --git a/src/merge/resources/chat/types/user.py b/src/merge/resources/chat/types/user.py new file mode 100644 index 00000000..3f01ca47 --- /dev/null +++ b/src/merge/resources/chat/types/user.py @@ -0,0 +1,84 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .remote_data import RemoteData + + +class User(UncheckedBaseModel): + """ + # The User Object + ### Description + The `User` object is used to represent a user within the Chat account. + + ### Usage Example + Fetch from the `GET /api/chat/v1/users` endpoint and view their users. + """ + + id: typing.Optional[str] = None + remote_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The third-party API ID of the matching object. + """ + + created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was created by Merge. + """ + + modified_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was modified by Merge. + """ + + username: typing.Optional[str] = pydantic.Field(default=None) + """ + Username or handle + """ + + display_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Full name or display name + """ + + first_name: typing.Optional[str] = pydantic.Field(default=None) + """ + The user's first name + """ + + last_name: typing.Optional[str] = pydantic.Field(default=None) + """ + The user's last name + """ + + is_bot: typing.Optional[bool] = pydantic.Field(default=None) + """ + Returns true if the user is a bot + """ + + groups: typing.Optional[typing.List[typing.Optional[str]]] = None + avatar: typing.Optional[str] = pydantic.Field(default=None) + """ + The user's avatar image + """ + + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) + """ + 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/). + """ + + field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + remote_data: typing.Optional[typing.List[RemoteData]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/validation_problem_source.py b/src/merge/resources/chat/types/validation_problem_source.py new file mode 100644 index 00000000..fbebe626 --- /dev/null +++ b/src/merge/resources/chat/types/validation_problem_source.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class ValidationProblemSource(UncheckedBaseModel): + pointer: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/warning_validation_problem.py b/src/merge/resources/chat/types/warning_validation_problem.py new file mode 100644 index 00000000..960a315f --- /dev/null +++ b/src/merge/resources/chat/types/warning_validation_problem.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .validation_problem_source import ValidationProblemSource + + +class WarningValidationProblem(UncheckedBaseModel): + source: typing.Optional[ValidationProblemSource] = None + title: str + detail: str + problem_type: str + block_merge_link: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/chat/types/webhook_receiver.py b/src/merge/resources/chat/types/webhook_receiver.py new file mode 100644 index 00000000..fb49c044 --- /dev/null +++ b/src/merge/resources/chat/types/webhook_receiver.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class WebhookReceiver(UncheckedBaseModel): + event: str + is_active: bool + key: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/crm/resources/accounts/client.py b/src/merge/resources/crm/resources/accounts/client.py index 88508090..54d26f13 100644 --- a/src/merge/resources/crm/resources/accounts/client.py +++ b/src/merge/resources/crm/resources/accounts/client.py @@ -109,6 +109,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -116,7 +118,27 @@ def list( api_key="YOUR_API_KEY", ) client.crm.accounts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + owner_id="owner_id", + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -177,6 +199,8 @@ def create( api_key="YOUR_API_KEY", ) client.crm.accounts.create( + is_debug_mode=True, + run_async=True, model=AccountRequest(), ) """ @@ -232,6 +256,9 @@ def retrieve( ) client.crm.accounts.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -287,6 +314,8 @@ def partial_update( ) client.crm.accounts.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedAccountRequest(), ) """ @@ -413,6 +442,13 @@ def remote_field_classes_list( ) client.crm.accounts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -521,6 +557,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -532,7 +569,27 @@ async def list( async def main() -> None: await client.crm.accounts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + owner_id="owner_id", + page_size=1, + remote_id="remote_id", ) @@ -601,6 +658,8 @@ async def create( async def main() -> None: await client.crm.accounts.create( + is_debug_mode=True, + run_async=True, model=AccountRequest(), ) @@ -664,6 +723,9 @@ async def retrieve( async def main() -> None: await client.crm.accounts.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -727,6 +789,8 @@ async def partial_update( async def main() -> None: await client.crm.accounts.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedAccountRequest(), ) @@ -879,6 +943,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.accounts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/association_types/client.py b/src/merge/resources/crm/resources/association_types/client.py index cb747530..b7f4611c 100644 --- a/src/merge/resources/crm/resources/association_types/client.py +++ b/src/merge/resources/crm/resources/association_types/client.py @@ -98,6 +98,8 @@ def custom_object_classes_association_types_list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -106,7 +108,24 @@ def custom_object_classes_association_types_list( ) client.crm.association_types.custom_object_classes_association_types_list( custom_object_class_id="custom_object_class_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.custom_object_classes_association_types_list( @@ -173,6 +192,8 @@ def custom_object_classes_association_types_create( ) client.crm.association_types.custom_object_classes_association_types_create( custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, model=AssociationTypeRequestRequest( source_object_class=ObjectClassDescriptionRequest( id="id", @@ -244,6 +265,8 @@ def custom_object_classes_association_types_retrieve( client.crm.association_types.custom_object_classes_association_types_retrieve( custom_object_class_id="custom_object_class_id", id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.custom_object_classes_association_types_retrieve( @@ -375,6 +398,7 @@ async def custom_object_classes_association_types_list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -387,7 +411,24 @@ async def custom_object_classes_association_types_list( async def main() -> None: await client.crm.association_types.custom_object_classes_association_types_list( custom_object_class_id="custom_object_class_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -462,6 +503,8 @@ async def custom_object_classes_association_types_create( async def main() -> None: await client.crm.association_types.custom_object_classes_association_types_create( custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, model=AssociationTypeRequestRequest( source_object_class=ObjectClassDescriptionRequest( id="id", @@ -541,6 +584,8 @@ async def main() -> None: await client.crm.association_types.custom_object_classes_association_types_retrieve( custom_object_class_id="custom_object_class_id", id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/crm/resources/associations/client.py b/src/merge/resources/crm/resources/associations/client.py index e2d95ae8..28d8f541 100644 --- a/src/merge/resources/crm/resources/associations/client.py +++ b/src/merge/resources/crm/resources/associations/client.py @@ -99,6 +99,8 @@ def custom_object_classes_custom_objects_associations_list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -108,7 +110,25 @@ def custom_object_classes_custom_objects_associations_list( client.crm.associations.custom_object_classes_custom_objects_associations_list( custom_object_class_id="custom_object_class_id", object_id="object_id", + association_type_id="association_type_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.custom_object_classes_custom_objects_associations_list( @@ -132,11 +152,11 @@ def custom_object_classes_custom_objects_associations_list( def custom_object_classes_custom_objects_associations_update( self, - association_type_id: str, source_class_id: str, source_object_id: str, target_class_id: str, target_object_id: str, + association_type_id: str, *, is_debug_mode: typing.Optional[bool] = None, run_async: typing.Optional[bool] = None, @@ -147,8 +167,6 @@ def custom_object_classes_custom_objects_associations_update( Parameters ---------- - association_type_id : str - source_class_id : str source_object_id : str @@ -157,6 +175,8 @@ def custom_object_classes_custom_objects_associations_update( target_object_id : str + association_type_id : str + is_debug_mode : typing.Optional[bool] Whether to include debug fields (such as log file links) in the response. @@ -180,19 +200,21 @@ def custom_object_classes_custom_objects_associations_update( api_key="YOUR_API_KEY", ) client.crm.associations.custom_object_classes_custom_objects_associations_update( - association_type_id="association_type_id", source_class_id="source_class_id", source_object_id="source_object_id", target_class_id="target_class_id", target_object_id="target_object_id", + association_type_id="association_type_id", + is_debug_mode=True, + run_async=True, ) """ _response = self._raw_client.custom_object_classes_custom_objects_associations_update( - association_type_id, source_class_id, source_object_id, target_class_id, target_object_id, + association_type_id, is_debug_mode=is_debug_mode, run_async=run_async, request_options=request_options, @@ -290,6 +312,7 @@ async def custom_object_classes_custom_objects_associations_list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -303,7 +326,25 @@ async def main() -> None: await client.crm.associations.custom_object_classes_custom_objects_associations_list( custom_object_class_id="custom_object_class_id", object_id="object_id", + association_type_id="association_type_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -330,11 +371,11 @@ async def main() -> None: async def custom_object_classes_custom_objects_associations_update( self, - association_type_id: str, source_class_id: str, source_object_id: str, target_class_id: str, target_object_id: str, + association_type_id: str, *, is_debug_mode: typing.Optional[bool] = None, run_async: typing.Optional[bool] = None, @@ -345,8 +386,6 @@ async def custom_object_classes_custom_objects_associations_update( Parameters ---------- - association_type_id : str - source_class_id : str source_object_id : str @@ -355,6 +394,8 @@ async def custom_object_classes_custom_objects_associations_update( target_object_id : str + association_type_id : str + is_debug_mode : typing.Optional[bool] Whether to include debug fields (such as log file links) in the response. @@ -383,22 +424,24 @@ async def custom_object_classes_custom_objects_associations_update( async def main() -> None: await client.crm.associations.custom_object_classes_custom_objects_associations_update( - association_type_id="association_type_id", source_class_id="source_class_id", source_object_id="source_object_id", target_class_id="target_class_id", target_object_id="target_object_id", + association_type_id="association_type_id", + is_debug_mode=True, + run_async=True, ) asyncio.run(main()) """ _response = await self._raw_client.custom_object_classes_custom_objects_associations_update( - association_type_id, source_class_id, source_object_id, target_class_id, target_object_id, + association_type_id, is_debug_mode=is_debug_mode, run_async=run_async, request_options=request_options, diff --git a/src/merge/resources/crm/resources/associations/raw_client.py b/src/merge/resources/crm/resources/associations/raw_client.py index 6d94f746..a78ef724 100644 --- a/src/merge/resources/crm/resources/associations/raw_client.py +++ b/src/merge/resources/crm/resources/associations/raw_client.py @@ -127,11 +127,11 @@ def custom_object_classes_custom_objects_associations_list( def custom_object_classes_custom_objects_associations_update( self, - association_type_id: str, source_class_id: str, source_object_id: str, target_class_id: str, target_object_id: str, + association_type_id: str, *, is_debug_mode: typing.Optional[bool] = None, run_async: typing.Optional[bool] = None, @@ -142,8 +142,6 @@ def custom_object_classes_custom_objects_associations_update( Parameters ---------- - association_type_id : str - source_class_id : str source_object_id : str @@ -152,6 +150,8 @@ def custom_object_classes_custom_objects_associations_update( target_object_id : str + association_type_id : str + is_debug_mode : typing.Optional[bool] Whether to include debug fields (such as log file links) in the response. @@ -303,11 +303,11 @@ async def custom_object_classes_custom_objects_associations_list( async def custom_object_classes_custom_objects_associations_update( self, - association_type_id: str, source_class_id: str, source_object_id: str, target_class_id: str, target_object_id: str, + association_type_id: str, *, is_debug_mode: typing.Optional[bool] = None, run_async: typing.Optional[bool] = None, @@ -318,8 +318,6 @@ async def custom_object_classes_custom_objects_associations_update( Parameters ---------- - association_type_id : str - source_class_id : str source_object_id : str @@ -328,6 +326,8 @@ async def custom_object_classes_custom_objects_associations_update( target_object_id : str + association_type_id : str + is_debug_mode : typing.Optional[bool] Whether to include debug fields (such as log file links) in the response. diff --git a/src/merge/resources/crm/resources/audit_trail/client.py b/src/merge/resources/crm/resources/audit_trail/client.py index 71e19cdb..3d1fcc71 100644 --- a/src/merge/resources/crm/resources/audit_trail/client.py +++ b/src/merge/resources/crm/resources/audit_trail/client.py @@ -75,6 +75,11 @@ def list( ) client.crm.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) """ _response = self._raw_client.list( @@ -161,6 +166,11 @@ async def list( async def main() -> None: await client.crm.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) diff --git a/src/merge/resources/crm/resources/contacts/client.py b/src/merge/resources/crm/resources/contacts/client.py index a51b2f47..7fe8c8b0 100644 --- a/src/merge/resources/crm/resources/contacts/client.py +++ b/src/merge/resources/crm/resources/contacts/client.py @@ -116,14 +116,39 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.crm.resources.contacts import ContactsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.contacts.list( + account_id="account_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=ContactsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + phone_numbers="phone_numbers", + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -185,6 +210,8 @@ def create( api_key="YOUR_API_KEY", ) client.crm.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) """ @@ -233,6 +260,7 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.crm.resources.contacts import ContactsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -240,6 +268,10 @@ def retrieve( ) client.crm.contacts.retrieve( id="id", + expand=ContactsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -295,6 +327,8 @@ def partial_update( ) client.crm.contacts.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedContactRequest(), ) """ @@ -463,6 +497,13 @@ def remote_field_classes_list( ) client.crm.contacts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -575,8 +616,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.crm.resources.contacts import ContactsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -586,7 +629,29 @@ async def list( async def main() -> None: await client.crm.contacts.list( + account_id="account_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=ContactsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + phone_numbers="phone_numbers", + remote_id="remote_id", ) @@ -656,6 +721,8 @@ async def create( async def main() -> None: await client.crm.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) @@ -709,6 +776,7 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.crm.resources.contacts import ContactsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -719,6 +787,10 @@ async def retrieve( async def main() -> None: await client.crm.contacts.retrieve( id="id", + expand=ContactsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -782,6 +854,8 @@ async def partial_update( async def main() -> None: await client.crm.contacts.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedContactRequest(), ) @@ -984,6 +1058,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.contacts.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/custom_object_classes/client.py b/src/merge/resources/crm/resources/custom_object_classes/client.py index 9289295c..5d3f37c5 100644 --- a/src/merge/resources/crm/resources/custom_object_classes/client.py +++ b/src/merge/resources/crm/resources/custom_object_classes/client.py @@ -89,6 +89,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -96,7 +98,24 @@ def list( api_key="YOUR_API_KEY", ) client.crm.custom_object_classes.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -158,6 +177,8 @@ def retrieve( ) client.crm.custom_object_classes.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -250,6 +271,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -261,7 +283,24 @@ async def list( async def main() -> None: await client.crm.custom_object_classes.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -331,6 +370,8 @@ async def retrieve( async def main() -> None: await client.crm.custom_object_classes.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/crm/resources/custom_objects/client.py b/src/merge/resources/crm/resources/custom_objects/client.py index 41354143..f8fa3719 100644 --- a/src/merge/resources/crm/resources/custom_objects/client.py +++ b/src/merge/resources/crm/resources/custom_objects/client.py @@ -99,6 +99,8 @@ def custom_object_classes_custom_objects_list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -107,7 +109,25 @@ def custom_object_classes_custom_objects_list( ) client.crm.custom_objects.custom_object_classes_custom_objects_list( custom_object_class_id="custom_object_class_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.custom_object_classes_custom_objects_list( @@ -170,6 +190,8 @@ def custom_object_classes_custom_objects_create( ) client.crm.custom_objects.custom_object_classes_custom_objects_create( custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, model=CustomObjectRequest( fields={"test_field": "hello"}, ), @@ -231,6 +253,9 @@ def custom_object_classes_custom_objects_retrieve( client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( custom_object_class_id="custom_object_class_id", id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.custom_object_classes_custom_objects_retrieve( @@ -338,6 +363,13 @@ def custom_object_classes_custom_objects_remote_field_classes_list( ) client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.custom_object_classes_custom_objects_remote_field_classes_list( @@ -437,6 +469,7 @@ async def custom_object_classes_custom_objects_list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -449,7 +482,25 @@ async def custom_object_classes_custom_objects_list( async def main() -> None: await client.crm.custom_objects.custom_object_classes_custom_objects_list( custom_object_class_id="custom_object_class_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -520,6 +571,8 @@ async def custom_object_classes_custom_objects_create( async def main() -> None: await client.crm.custom_objects.custom_object_classes_custom_objects_create( custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, model=CustomObjectRequest( fields={"test_field": "hello"}, ), @@ -589,6 +642,9 @@ async def main() -> None: await client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( custom_object_class_id="custom_object_class_id", id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -712,6 +768,13 @@ async def custom_object_classes_custom_objects_remote_field_classes_list( async def main() -> None: await client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/engagement_types/client.py b/src/merge/resources/crm/resources/engagement_types/client.py index df7faa0f..dc5086d2 100644 --- a/src/merge/resources/crm/resources/engagement_types/client.py +++ b/src/merge/resources/crm/resources/engagement_types/client.py @@ -90,6 +90,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -97,7 +99,25 @@ def list( api_key="YOUR_API_KEY", ) client.crm.engagement_types.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -159,6 +179,9 @@ def retrieve( ) client.crm.engagement_types.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -230,6 +253,13 @@ def remote_field_classes_list( ) client.crm.engagement_types.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -326,6 +356,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -337,7 +368,25 @@ async def list( async def main() -> None: await client.crm.engagement_types.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -407,6 +456,9 @@ async def retrieve( async def main() -> None: await client.crm.engagement_types.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -486,6 +538,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.engagement_types.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/engagements/client.py b/src/merge/resources/crm/resources/engagements/client.py index 42174adf..24baf967 100644 --- a/src/merge/resources/crm/resources/engagements/client.py +++ b/src/merge/resources/crm/resources/engagements/client.py @@ -111,14 +111,44 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.crm.resources.engagements import ( + EngagementsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.engagements.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=EngagementsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -179,6 +209,8 @@ def create( api_key="YOUR_API_KEY", ) client.crm.engagements.create( + is_debug_mode=True, + run_async=True, model=EngagementRequest(), ) """ @@ -227,6 +259,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.crm.resources.engagements import ( + EngagementsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -234,6 +269,10 @@ def retrieve( ) client.crm.engagements.retrieve( id="id", + expand=EngagementsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -289,6 +328,8 @@ def partial_update( ) client.crm.engagements.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedEngagementRequest(), ) """ @@ -415,6 +456,13 @@ def remote_field_classes_list( ) client.crm.engagements.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -523,8 +571,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.crm.resources.engagements import ( + EngagementsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -534,7 +586,32 @@ async def list( async def main() -> None: await client.crm.engagements.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=EngagementsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -603,6 +680,8 @@ async def create( async def main() -> None: await client.crm.engagements.create( + is_debug_mode=True, + run_async=True, model=EngagementRequest(), ) @@ -656,6 +735,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.crm.resources.engagements import ( + EngagementsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -666,6 +748,10 @@ async def retrieve( async def main() -> None: await client.crm.engagements.retrieve( id="id", + expand=EngagementsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -729,6 +815,8 @@ async def partial_update( async def main() -> None: await client.crm.engagements.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedEngagementRequest(), ) @@ -881,6 +969,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.engagements.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/field_mapping/client.py b/src/merge/resources/crm/resources/field_mapping/client.py index 559f3fa3..851e71cd 100644 --- a/src/merge/resources/crm/resources/field_mapping/client.py +++ b/src/merge/resources/crm/resources/field_mapping/client.py @@ -59,7 +59,9 @@ def field_mappings_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.field_mapping.field_mappings_retrieve() + client.crm.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) """ _response = self._raw_client.field_mappings_retrieve( exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options @@ -121,6 +123,7 @@ def field_mappings_create( api_key="YOUR_API_KEY", ) client.crm.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -262,7 +265,10 @@ def remote_fields_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.field_mapping.remote_fields_retrieve() + client.crm.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) """ _response = self._raw_client.remote_fields_retrieve( common_models=common_models, include_example_values=include_example_values, request_options=request_options @@ -349,7 +355,9 @@ async def field_mappings_retrieve( async def main() -> None: - await client.crm.field_mapping.field_mappings_retrieve() + await client.crm.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) asyncio.run(main()) @@ -419,6 +427,7 @@ async def field_mappings_create( async def main() -> None: await client.crm.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -584,7 +593,10 @@ async def remote_fields_retrieve( async def main() -> None: - await client.crm.field_mapping.remote_fields_retrieve() + await client.crm.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) asyncio.run(main()) diff --git a/src/merge/resources/crm/resources/issues/client.py b/src/merge/resources/crm/resources/issues/client.py index a9237e53..2e460bd0 100644 --- a/src/merge/resources/crm/resources/issues/client.py +++ b/src/merge/resources/crm/resources/issues/client.py @@ -102,14 +102,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.crm.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) """ _response = self._raw_client.list( @@ -255,8 +279,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.crm.resources.issues import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -266,7 +292,28 @@ async def list( async def main() -> None: await client.crm.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) diff --git a/src/merge/resources/crm/resources/leads/client.py b/src/merge/resources/crm/resources/leads/client.py index 793ea73b..1ede9f02 100644 --- a/src/merge/resources/crm/resources/leads/client.py +++ b/src/merge/resources/crm/resources/leads/client.py @@ -122,14 +122,41 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.crm.resources.leads import LeadsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.leads.list( + converted_account_id="converted_account_id", + converted_contact_id="converted_contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=LeadsListRequestExpand.CONVERTED_ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + owner_id="owner_id", + page_size=1, + phone_numbers="phone_numbers", + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -193,6 +220,8 @@ def create( api_key="YOUR_API_KEY", ) client.crm.leads.create( + is_debug_mode=True, + run_async=True, model=LeadRequest(), ) """ @@ -241,6 +270,7 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.crm.resources.leads import LeadsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -248,6 +278,10 @@ def retrieve( ) client.crm.leads.retrieve( id="id", + expand=LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -347,6 +381,13 @@ def remote_field_classes_list( ) client.crm.leads.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -467,8 +508,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.crm.resources.leads import LeadsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -478,7 +521,31 @@ async def list( async def main() -> None: await client.crm.leads.list( + converted_account_id="converted_account_id", + converted_contact_id="converted_contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=LeadsListRequestExpand.CONVERTED_ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + owner_id="owner_id", + page_size=1, + phone_numbers="phone_numbers", + remote_id="remote_id", ) @@ -550,6 +617,8 @@ async def create( async def main() -> None: await client.crm.leads.create( + is_debug_mode=True, + run_async=True, model=LeadRequest(), ) @@ -603,6 +672,7 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.crm.resources.leads import LeadsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -613,6 +683,10 @@ async def retrieve( async def main() -> None: await client.crm.leads.retrieve( id="id", + expand=LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -728,6 +802,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.leads.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/linked_accounts/client.py b/src/merge/resources/crm/resources/linked_accounts/client.py index 80b19ced..7587420a 100644 --- a/src/merge/resources/crm/resources/linked_accounts/client.py +++ b/src/merge/resources/crm/resources/linked_accounts/client.py @@ -104,13 +104,28 @@ def list( Examples -------- from merge import Merge + from merge.resources.crm.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) """ _response = self._raw_client.list( @@ -229,6 +244,9 @@ async def list( import asyncio from merge import AsyncMerge + from merge.resources.crm.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,7 +256,19 @@ async def list( async def main() -> None: await client.crm.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) diff --git a/src/merge/resources/crm/resources/notes/client.py b/src/merge/resources/crm/resources/notes/client.py index f7fbd530..171e94d2 100644 --- a/src/merge/resources/crm/resources/notes/client.py +++ b/src/merge/resources/crm/resources/notes/client.py @@ -118,14 +118,40 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.crm.resources.notes import NotesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.notes.list( + account_id="account_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=NotesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + opportunity_id="opportunity_id", + owner_id="owner_id", + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -188,6 +214,8 @@ def create( api_key="YOUR_API_KEY", ) client.crm.notes.create( + is_debug_mode=True, + run_async=True, model=NoteRequest(), ) """ @@ -236,6 +264,7 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.crm.resources.notes import NotesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -243,6 +272,10 @@ def retrieve( ) client.crm.notes.retrieve( id="id", + expand=NotesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -342,6 +375,13 @@ def remote_field_classes_list( ) client.crm.notes.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -458,8 +498,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.crm.resources.notes import NotesListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -469,7 +511,30 @@ async def list( async def main() -> None: await client.crm.notes.list( + account_id="account_id", + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=NotesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + opportunity_id="opportunity_id", + owner_id="owner_id", + page_size=1, + remote_id="remote_id", ) @@ -540,6 +605,8 @@ async def create( async def main() -> None: await client.crm.notes.create( + is_debug_mode=True, + run_async=True, model=NoteRequest(), ) @@ -593,6 +660,7 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.crm.resources.notes import NotesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -603,6 +671,10 @@ async def retrieve( async def main() -> None: await client.crm.notes.retrieve( id="id", + expand=NotesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -718,6 +790,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.notes.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/opportunities/client.py b/src/merge/resources/crm/resources/opportunities/client.py index 9e0e15e0..198ce722 100644 --- a/src/merge/resources/crm/resources/opportunities/client.py +++ b/src/merge/resources/crm/resources/opportunities/client.py @@ -136,14 +136,46 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.crm.resources.opportunities import ( + OpportunitiesListRequestExpand, + OpportunitiesListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.opportunities.list( + account_id="account_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=OpportunitiesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + owner_id="owner_id", + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + stage_id="stage_id", + status=OpportunitiesListRequestStatus.LOST, ) """ _response = self._raw_client.list( @@ -209,6 +241,8 @@ def create( api_key="YOUR_API_KEY", ) client.crm.opportunities.create( + is_debug_mode=True, + run_async=True, model=OpportunityRequest(), ) """ @@ -265,6 +299,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.crm.resources.opportunities import ( + OpportunitiesRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -272,6 +309,10 @@ def retrieve( ) client.crm.opportunities.retrieve( id="id", + expand=OpportunitiesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -329,6 +370,8 @@ def partial_update( ) client.crm.opportunities.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedOpportunityRequest(), ) """ @@ -455,6 +498,13 @@ def remote_field_classes_list( ) client.crm.opportunities.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -587,8 +637,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.crm.resources.opportunities import ( + OpportunitiesListRequestExpand, + OpportunitiesListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -598,7 +653,33 @@ async def list( async def main() -> None: await client.crm.opportunities.list( + account_id="account_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=OpportunitiesListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + owner_id="owner_id", + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + stage_id="stage_id", + status=OpportunitiesListRequestStatus.LOST, ) @@ -672,6 +753,8 @@ async def create( async def main() -> None: await client.crm.opportunities.create( + is_debug_mode=True, + run_async=True, model=OpportunityRequest(), ) @@ -733,6 +816,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.crm.resources.opportunities import ( + OpportunitiesRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -743,6 +829,10 @@ async def retrieve( async def main() -> None: await client.crm.opportunities.retrieve( id="id", + expand=OpportunitiesRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -808,6 +898,8 @@ async def partial_update( async def main() -> None: await client.crm.opportunities.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedOpportunityRequest(), ) @@ -960,6 +1052,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.opportunities.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/stages/client.py b/src/merge/resources/crm/resources/stages/client.py index efe35689..630ece33 100644 --- a/src/merge/resources/crm/resources/stages/client.py +++ b/src/merge/resources/crm/resources/stages/client.py @@ -90,6 +90,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -97,7 +99,25 @@ def list( api_key="YOUR_API_KEY", ) client.crm.stages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -159,6 +179,9 @@ def retrieve( ) client.crm.stages.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -230,6 +253,13 @@ def remote_field_classes_list( ) client.crm.stages.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -326,6 +356,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -337,7 +368,25 @@ async def list( async def main() -> None: await client.crm.stages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -407,6 +456,9 @@ async def retrieve( async def main() -> None: await client.crm.stages.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -486,6 +538,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.stages.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/sync_status/client.py b/src/merge/resources/crm/resources/sync_status/client.py index 9a72c5cc..0cce890a 100644 --- a/src/merge/resources/crm/resources/sync_status/client.py +++ b/src/merge/resources/crm/resources/sync_status/client.py @@ -59,6 +59,7 @@ def list( ) client.crm.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) """ _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) @@ -121,6 +122,7 @@ async def list( async def main() -> None: await client.crm.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) diff --git a/src/merge/resources/crm/resources/tasks/client.py b/src/merge/resources/crm/resources/tasks/client.py index 15a16cee..ccc25868 100644 --- a/src/merge/resources/crm/resources/tasks/client.py +++ b/src/merge/resources/crm/resources/tasks/client.py @@ -103,14 +103,36 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.crm.resources.tasks import TasksListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.tasks.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TasksListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -169,6 +191,8 @@ def create( api_key="YOUR_API_KEY", ) client.crm.tasks.create( + is_debug_mode=True, + run_async=True, model=TaskRequest(), ) """ @@ -217,6 +241,7 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.crm.resources.tasks import TasksRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -224,6 +249,10 @@ def retrieve( ) client.crm.tasks.retrieve( id="id", + expand=TasksRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -279,6 +308,8 @@ def partial_update( ) client.crm.tasks.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedTaskRequest(), ) """ @@ -405,6 +436,13 @@ def remote_field_classes_list( ) client.crm.tasks.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -505,8 +543,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.crm.resources.tasks import TasksListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -516,7 +556,26 @@ async def list( async def main() -> None: await client.crm.tasks.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TasksListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -583,6 +642,8 @@ async def create( async def main() -> None: await client.crm.tasks.create( + is_debug_mode=True, + run_async=True, model=TaskRequest(), ) @@ -636,6 +697,7 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.crm.resources.tasks import TasksRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -646,6 +708,10 @@ async def retrieve( async def main() -> None: await client.crm.tasks.retrieve( id="id", + expand=TasksRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -709,6 +775,8 @@ async def partial_update( async def main() -> None: await client.crm.tasks.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedTaskRequest(), ) @@ -861,6 +929,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.tasks.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/crm/resources/users/client.py b/src/merge/resources/crm/resources/users/client.py index d5671794..e0986039 100644 --- a/src/merge/resources/crm/resources/users/client.py +++ b/src/merge/resources/crm/resources/users/client.py @@ -98,6 +98,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -105,7 +107,26 @@ def list( api_key="YOUR_API_KEY", ) client.crm.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email="email", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -168,6 +189,9 @@ def retrieve( ) client.crm.users.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -281,6 +305,13 @@ def remote_field_classes_list( ) client.crm.users.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -381,6 +412,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -392,7 +424,26 @@ async def list( async def main() -> None: await client.crm.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email="email", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -463,6 +514,9 @@ async def retrieve( async def main() -> None: await client.crm.users.retrieve( id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) @@ -592,6 +646,13 @@ async def remote_field_classes_list( async def main() -> None: await client.crm.users.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/filestorage/resources/audit_trail/client.py b/src/merge/resources/filestorage/resources/audit_trail/client.py index 05d30b6f..cd4b170a 100644 --- a/src/merge/resources/filestorage/resources/audit_trail/client.py +++ b/src/merge/resources/filestorage/resources/audit_trail/client.py @@ -75,6 +75,11 @@ def list( ) client.filestorage.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) """ _response = self._raw_client.list( @@ -161,6 +166,11 @@ async def list( async def main() -> None: await client.filestorage.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) diff --git a/src/merge/resources/filestorage/resources/drives/client.py b/src/merge/resources/filestorage/resources/drives/client.py index 655ed370..76710f4b 100644 --- a/src/merge/resources/filestorage/resources/drives/client.py +++ b/src/merge/resources/filestorage/resources/drives/client.py @@ -89,6 +89,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -96,7 +98,25 @@ def list( api_key="YOUR_API_KEY", ) client.filestorage.drives.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -154,6 +174,8 @@ def retrieve( ) client.filestorage.drives.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -245,6 +267,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -256,7 +279,25 @@ async def list( async def main() -> None: await client.filestorage.drives.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", ) @@ -322,6 +363,8 @@ async def retrieve( async def main() -> None: await client.filestorage.drives.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/filestorage/resources/field_mapping/client.py b/src/merge/resources/filestorage/resources/field_mapping/client.py index bae68a02..e1e40571 100644 --- a/src/merge/resources/filestorage/resources/field_mapping/client.py +++ b/src/merge/resources/filestorage/resources/field_mapping/client.py @@ -59,7 +59,9 @@ def field_mappings_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.filestorage.field_mapping.field_mappings_retrieve() + client.filestorage.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) """ _response = self._raw_client.field_mappings_retrieve( exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options @@ -121,6 +123,7 @@ def field_mappings_create( api_key="YOUR_API_KEY", ) client.filestorage.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -262,7 +265,10 @@ def remote_fields_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.filestorage.field_mapping.remote_fields_retrieve() + client.filestorage.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) """ _response = self._raw_client.remote_fields_retrieve( common_models=common_models, include_example_values=include_example_values, request_options=request_options @@ -349,7 +355,9 @@ async def field_mappings_retrieve( async def main() -> None: - await client.filestorage.field_mapping.field_mappings_retrieve() + await client.filestorage.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) asyncio.run(main()) @@ -419,6 +427,7 @@ async def field_mappings_create( async def main() -> None: await client.filestorage.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -584,7 +593,10 @@ async def remote_fields_retrieve( async def main() -> None: - await client.filestorage.field_mapping.remote_fields_retrieve() + await client.filestorage.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) asyncio.run(main()) diff --git a/src/merge/resources/filestorage/resources/files/client.py b/src/merge/resources/filestorage/resources/files/client.py index 1ef80108..80a119ed 100644 --- a/src/merge/resources/filestorage/resources/files/client.py +++ b/src/merge/resources/filestorage/resources/files/client.py @@ -129,14 +129,49 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.filestorage.resources.files import ( + FilesListRequestExpand, + FilesListRequestOrderBy, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.files.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FilesListRequestExpand.DRIVE, + folder_id="folder_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + mime_type="mime_type", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + order_by=FilesListRequestOrderBy.CREATED_AT_DESCENDING, + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -201,6 +236,8 @@ def create( api_key="YOUR_API_KEY", ) client.filestorage.files.create( + is_debug_mode=True, + run_async=True, model=FileRequest(), ) """ @@ -245,6 +282,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.filestorage.resources.files import ( + FilesRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -252,6 +292,9 @@ def retrieve( ) client.filestorage.files.retrieve( id="id", + expand=FilesRetrieveRequestExpand.DRIVE, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -332,6 +375,7 @@ def download_request_meta_retrieve( ) client.filestorage.files.download_request_meta_retrieve( id="id", + mime_type="mime_type", ) """ _response = self._raw_client.download_request_meta_retrieve( @@ -400,13 +444,24 @@ def download_request_meta_list( Examples -------- from merge import Merge + from merge.resources.filestorage.resources.files import ( + FilesDownloadRequestMetaListRequestOrderBy, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.files.download_request_meta_list( + created_after="created_after", + created_before="created_before", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + mime_types="mime_types", + modified_after="modified_after", + modified_before="modified_before", + order_by=FilesDownloadRequestMetaListRequestOrderBy.CREATED_AT_DESCENDING, + page_size=1, ) """ _response = self._raw_client.download_request_meta_list( @@ -560,8 +615,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.filestorage.resources.files import ( + FilesListRequestExpand, + FilesListRequestOrderBy, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -571,7 +631,36 @@ async def list( async def main() -> None: await client.filestorage.files.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FilesListRequestExpand.DRIVE, + folder_id="folder_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + mime_type="mime_type", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + order_by=FilesListRequestOrderBy.CREATED_AT_DESCENDING, + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", ) @@ -644,6 +733,8 @@ async def create( async def main() -> None: await client.filestorage.files.create( + is_debug_mode=True, + run_async=True, model=FileRequest(), ) @@ -693,6 +784,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.filestorage.resources.files import ( + FilesRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -703,6 +797,9 @@ async def retrieve( async def main() -> None: await client.filestorage.files.retrieve( id="id", + expand=FilesRetrieveRequestExpand.DRIVE, + include_remote_data=True, + include_shell_data=True, ) @@ -792,6 +889,7 @@ async def download_request_meta_retrieve( async def main() -> None: await client.filestorage.files.download_request_meta_retrieve( id="id", + mime_type="mime_type", ) @@ -865,6 +963,9 @@ async def download_request_meta_list( import asyncio from merge import AsyncMerge + from merge.resources.filestorage.resources.files import ( + FilesDownloadRequestMetaListRequestOrderBy, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -874,7 +975,15 @@ async def download_request_meta_list( async def main() -> None: await client.filestorage.files.download_request_meta_list( + created_after="created_after", + created_before="created_before", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + mime_types="mime_types", + modified_after="modified_after", + modified_before="modified_before", + order_by=FilesDownloadRequestMetaListRequestOrderBy.CREATED_AT_DESCENDING, + page_size=1, ) diff --git a/src/merge/resources/filestorage/resources/folders/client.py b/src/merge/resources/filestorage/resources/folders/client.py index 85276beb..56600980 100644 --- a/src/merge/resources/filestorage/resources/folders/client.py +++ b/src/merge/resources/filestorage/resources/folders/client.py @@ -109,14 +109,40 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.filestorage.resources.folders import ( + FoldersListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.folders.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FoldersListRequestExpand.DRIVE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_folder_id="parent_folder_id", + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -177,6 +203,8 @@ def create( api_key="YOUR_API_KEY", ) client.filestorage.folders.create( + is_debug_mode=True, + run_async=True, model=FolderRequest(), ) """ @@ -221,6 +249,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.filestorage.resources.folders import ( + FoldersRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -228,6 +259,9 @@ def retrieve( ) client.filestorage.folders.retrieve( id="id", + expand=FoldersRetrieveRequestExpand.DRIVE, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -359,8 +393,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.filestorage.resources.folders import ( + FoldersListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -370,7 +408,28 @@ async def list( async def main() -> None: await client.filestorage.folders.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FoldersListRequestExpand.DRIVE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_folder_id="parent_folder_id", + remote_id="remote_id", ) @@ -439,6 +498,8 @@ async def create( async def main() -> None: await client.filestorage.folders.create( + is_debug_mode=True, + run_async=True, model=FolderRequest(), ) @@ -488,6 +549,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.filestorage.resources.folders import ( + FoldersRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -498,6 +562,9 @@ async def retrieve( async def main() -> None: await client.filestorage.folders.retrieve( id="id", + expand=FoldersRetrieveRequestExpand.DRIVE, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/filestorage/resources/groups/client.py b/src/merge/resources/filestorage/resources/groups/client.py index 9db5bbc6..dd9c8e65 100644 --- a/src/merge/resources/filestorage/resources/groups/client.py +++ b/src/merge/resources/filestorage/resources/groups/client.py @@ -89,6 +89,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -96,7 +98,24 @@ def list( api_key="YOUR_API_KEY", ) client.filestorage.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -158,6 +177,8 @@ def retrieve( ) client.filestorage.groups.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -250,6 +271,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -261,7 +283,24 @@ async def list( async def main() -> None: await client.filestorage.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -331,6 +370,8 @@ async def retrieve( async def main() -> None: await client.filestorage.groups.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/filestorage/resources/issues/client.py b/src/merge/resources/filestorage/resources/issues/client.py index 888a1f8e..423a956a 100644 --- a/src/merge/resources/filestorage/resources/issues/client.py +++ b/src/merge/resources/filestorage/resources/issues/client.py @@ -102,14 +102,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.filestorage.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) """ _response = self._raw_client.list( @@ -255,8 +279,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.filestorage.resources.issues import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -266,7 +292,28 @@ async def list( async def main() -> None: await client.filestorage.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) diff --git a/src/merge/resources/filestorage/resources/linked_accounts/client.py b/src/merge/resources/filestorage/resources/linked_accounts/client.py index 8ab62895..dbe48ae0 100644 --- a/src/merge/resources/filestorage/resources/linked_accounts/client.py +++ b/src/merge/resources/filestorage/resources/linked_accounts/client.py @@ -104,13 +104,28 @@ def list( Examples -------- from merge import Merge + from merge.resources.filestorage.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) """ _response = self._raw_client.list( @@ -229,6 +244,9 @@ async def list( import asyncio from merge import AsyncMerge + from merge.resources.filestorage.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,7 +256,19 @@ async def list( async def main() -> None: await client.filestorage.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) diff --git a/src/merge/resources/filestorage/resources/sync_status/client.py b/src/merge/resources/filestorage/resources/sync_status/client.py index 4611a846..1ac89821 100644 --- a/src/merge/resources/filestorage/resources/sync_status/client.py +++ b/src/merge/resources/filestorage/resources/sync_status/client.py @@ -59,6 +59,7 @@ def list( ) client.filestorage.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) """ _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) @@ -121,6 +122,7 @@ async def list( async def main() -> None: await client.filestorage.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) diff --git a/src/merge/resources/filestorage/resources/users/client.py b/src/merge/resources/filestorage/resources/users/client.py index dc0d037e..47767f06 100644 --- a/src/merge/resources/filestorage/resources/users/client.py +++ b/src/merge/resources/filestorage/resources/users/client.py @@ -89,6 +89,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -96,7 +98,25 @@ def list( api_key="YOUR_API_KEY", ) client.filestorage.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_me="is_me", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -154,6 +174,8 @@ def retrieve( ) client.filestorage.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -245,6 +267,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -256,7 +279,25 @@ async def list( async def main() -> None: await client.filestorage.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_me="is_me", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -322,6 +363,8 @@ async def retrieve( async def main() -> None: await client.filestorage.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/__init__.py b/src/merge/resources/hris/__init__.py index e2a95341..634ca2a4 100644 --- a/src/merge/resources/hris/__init__.py +++ b/src/merge/resources/hris/__init__.py @@ -11,6 +11,7 @@ AccountDetailsAndActions, AccountDetailsAndActionsCategory, AccountDetailsAndActionsIntegration, + AccountDetailsAndActionsStatus, AccountDetailsAndActionsStatusEnum, AccountDetailsCategory, AccountIntegration, @@ -33,6 +34,7 @@ CommonModelScopeApi, CommonModelScopesBodyRequest, Company, + CompletedAccountInitialScreenEnum, CountryEnum, DataPassthroughRequest, DebugModeLog, @@ -225,6 +227,7 @@ EmploymentsRetrieveRequestExpand, EmploymentsRetrieveRequestRemoteFields, EmploymentsRetrieveRequestShowEnumOrigins, + EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage, IgnoreCommonModelRequestReason, IssuesListRequestStatus, @@ -288,6 +291,7 @@ "AccountDetailsAndActions": ".types", "AccountDetailsAndActionsCategory": ".types", "AccountDetailsAndActionsIntegration": ".types", + "AccountDetailsAndActionsStatus": ".types", "AccountDetailsAndActionsStatusEnum": ".types", "AccountDetailsCategory": ".types", "AccountIntegration": ".types", @@ -313,6 +317,7 @@ "CommonModelScopeApi": ".types", "CommonModelScopesBodyRequest": ".types", "Company": ".types", + "CompletedAccountInitialScreenEnum": ".types", "CountryEnum": ".types", "DataPassthroughRequest": ".types", "DebugModeLog": ".types", @@ -384,6 +389,7 @@ "EmploymentsRetrieveRequestShowEnumOrigins": ".resources", "EnabledActionsEnum": ".types", "EncodingEnum": ".types", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".resources", "EndUserDetailsRequestLanguage": ".resources", "ErrorValidationProblem": ".types", "EthnicityEnum": ".types", @@ -584,6 +590,7 @@ def __dir__(): "AccountDetailsAndActions", "AccountDetailsAndActionsCategory", "AccountDetailsAndActionsIntegration", + "AccountDetailsAndActionsStatus", "AccountDetailsAndActionsStatusEnum", "AccountDetailsCategory", "AccountIntegration", @@ -609,6 +616,7 @@ def __dir__(): "CommonModelScopeApi", "CommonModelScopesBodyRequest", "Company", + "CompletedAccountInitialScreenEnum", "CountryEnum", "DataPassthroughRequest", "DebugModeLog", @@ -680,6 +688,7 @@ def __dir__(): "EmploymentsRetrieveRequestShowEnumOrigins", "EnabledActionsEnum", "EncodingEnum", + "EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage", "ErrorValidationProblem", "EthnicityEnum", diff --git a/src/merge/resources/hris/resources/__init__.py b/src/merge/resources/hris/resources/__init__.py index 686bacfd..18381433 100644 --- a/src/merge/resources/hris/resources/__init__.py +++ b/src/merge/resources/hris/resources/__init__.py @@ -64,7 +64,7 @@ EmploymentsRetrieveRequestShowEnumOrigins, ) from .issues import IssuesListRequestStatus - from .link_token import EndUserDetailsRequestLanguage + from .link_token import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage from .linked_accounts import LinkedAccountsListRequestCategory from .locations import ( LocationsListRequestLocationType, @@ -112,6 +112,7 @@ "EmploymentsRetrieveRequestExpand": ".employments", "EmploymentsRetrieveRequestRemoteFields": ".employments", "EmploymentsRetrieveRequestShowEnumOrigins": ".employments", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".link_token", "EndUserDetailsRequestLanguage": ".link_token", "IgnoreCommonModelRequestReason": ".employees", "IssuesListRequestStatus": ".issues", @@ -211,6 +212,7 @@ def __dir__(): "EmploymentsRetrieveRequestExpand", "EmploymentsRetrieveRequestRemoteFields", "EmploymentsRetrieveRequestShowEnumOrigins", + "EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage", "IgnoreCommonModelRequestReason", "IssuesListRequestStatus", diff --git a/src/merge/resources/hris/resources/audit_trail/client.py b/src/merge/resources/hris/resources/audit_trail/client.py index 4f8aa7d3..629f1716 100644 --- a/src/merge/resources/hris/resources/audit_trail/client.py +++ b/src/merge/resources/hris/resources/audit_trail/client.py @@ -75,6 +75,11 @@ def list( ) client.hris.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) """ _response = self._raw_client.list( @@ -161,6 +166,11 @@ async def list( async def main() -> None: await client.hris.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) diff --git a/src/merge/resources/hris/resources/bank_info/client.py b/src/merge/resources/hris/resources/bank_info/client.py index 8923a387..d8b8421b 100644 --- a/src/merge/resources/hris/resources/bank_info/client.py +++ b/src/merge/resources/hris/resources/bank_info/client.py @@ -97,7 +97,7 @@ def list( Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["account_type"]] Deprecated. Use show_enum_origins. @@ -118,14 +118,41 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.bank_info import ( + BankInfoListRequestAccountType, + BankInfoListRequestOrderBy, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.bank_info.list( + account_type=BankInfoListRequestAccountType.CHECKING, + bank_name="bank_name", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=BankInfoListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -201,6 +228,8 @@ def retrieve( ) client.hris.bank_info.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -300,7 +329,7 @@ async def list( Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["account_type"]] Deprecated. Use show_enum_origins. @@ -322,8 +351,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.bank_info import ( + BankInfoListRequestAccountType, + BankInfoListRequestOrderBy, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -333,7 +367,28 @@ async def list( async def main() -> None: await client.hris.bank_info.list( + account_type=BankInfoListRequestAccountType.CHECKING, + bank_name="bank_name", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=BankInfoListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, + page_size=1, + remote_id="remote_id", ) @@ -417,6 +472,8 @@ async def retrieve( async def main() -> None: await client.hris.bank_info.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/bank_info/raw_client.py b/src/merge/resources/hris/resources/bank_info/raw_client.py index c0455b75..c031bf3b 100644 --- a/src/merge/resources/hris/resources/bank_info/raw_client.py +++ b/src/merge/resources/hris/resources/bank_info/raw_client.py @@ -91,7 +91,7 @@ def list( Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["account_type"]] Deprecated. Use show_enum_origins. @@ -292,7 +292,7 @@ async def list( Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["account_type"]] Deprecated. Use show_enum_origins. diff --git a/src/merge/resources/hris/resources/benefits/client.py b/src/merge/resources/hris/resources/benefits/client.py index a6f19dad..2a7380c8 100644 --- a/src/merge/resources/hris/resources/benefits/client.py +++ b/src/merge/resources/hris/resources/benefits/client.py @@ -78,7 +78,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,25 @@ def list( api_key="YOUR_API_KEY", ) client.hris.benefits.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +183,8 @@ def retrieve( ) client.hris.benefits.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -243,7 +265,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -259,6 +281,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +293,25 @@ async def list( async def main() -> None: await client.hris.benefits.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -341,6 +382,8 @@ async def retrieve( async def main() -> None: await client.hris.benefits.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/benefits/raw_client.py b/src/merge/resources/hris/resources/benefits/raw_client.py index b3a5eb75..0a3b37cf 100644 --- a/src/merge/resources/hris/resources/benefits/raw_client.py +++ b/src/merge/resources/hris/resources/benefits/raw_client.py @@ -72,7 +72,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -235,7 +235,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/hris/resources/companies/client.py b/src/merge/resources/hris/resources/companies/client.py index 5b756b5f..598582d5 100644 --- a/src/merge/resources/hris/resources/companies/client.py +++ b/src/merge/resources/hris/resources/companies/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.hris.companies.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.hris.companies.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.hris.companies.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.hris.companies.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/companies/raw_client.py b/src/merge/resources/hris/resources/companies/raw_client.py index e6bfd64f..99a8715e 100644 --- a/src/merge/resources/hris/resources/companies/raw_client.py +++ b/src/merge/resources/hris/resources/companies/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/hris/resources/dependents/client.py b/src/merge/resources/hris/resources/dependents/client.py index 0cf75736..a87e7ca9 100644 --- a/src/merge/resources/hris/resources/dependents/client.py +++ b/src/merge/resources/hris/resources/dependents/client.py @@ -78,7 +78,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,26 @@ def list( api_key="YOUR_API_KEY", ) client.hris.dependents.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +184,9 @@ def retrieve( ) client.hris.dependents.retrieve( id="id", + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -243,7 +267,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -259,6 +283,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +295,26 @@ async def list( async def main() -> None: await client.hris.dependents.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -341,6 +385,9 @@ async def retrieve( async def main() -> None: await client.hris.dependents.retrieve( id="id", + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/dependents/raw_client.py b/src/merge/resources/hris/resources/dependents/raw_client.py index a7d16b86..5e9fd5ef 100644 --- a/src/merge/resources/hris/resources/dependents/raw_client.py +++ b/src/merge/resources/hris/resources/dependents/raw_client.py @@ -72,7 +72,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -235,7 +235,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/hris/resources/employee_payroll_runs/client.py b/src/merge/resources/hris/resources/employee_payroll_runs/client.py index 0ab87bf7..8ccd63c3 100644 --- a/src/merge/resources/hris/resources/employee_payroll_runs/client.py +++ b/src/merge/resources/hris/resources/employee_payroll_runs/client.py @@ -91,7 +91,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. payroll_run_id : typing.Optional[str] If provided, will only return employee payroll runs for this employee. @@ -115,14 +115,51 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.employee_payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=EmployeePayrollRunsListRequestExpand.EMPLOYEE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + payroll_run_id="payroll_run_id", + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -183,6 +220,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -190,6 +230,9 @@ def retrieve( ) client.hris.employee_payroll_runs.retrieve( id="id", + expand=EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -281,7 +324,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. payroll_run_id : typing.Optional[str] If provided, will only return employee payroll runs for this employee. @@ -306,8 +349,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -317,7 +364,39 @@ async def list( async def main() -> None: await client.hris.employee_payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=EmployeePayrollRunsListRequestExpand.EMPLOYEE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + payroll_run_id="payroll_run_id", + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -383,6 +462,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -393,6 +475,9 @@ async def retrieve( async def main() -> None: await client.hris.employee_payroll_runs.retrieve( id="id", + expand=EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/employee_payroll_runs/raw_client.py b/src/merge/resources/hris/resources/employee_payroll_runs/raw_client.py index 21ab6938..a9280452 100644 --- a/src/merge/resources/hris/resources/employee_payroll_runs/raw_client.py +++ b/src/merge/resources/hris/resources/employee_payroll_runs/raw_client.py @@ -85,7 +85,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. payroll_run_id : typing.Optional[str] If provided, will only return employee payroll runs for this employee. @@ -273,7 +273,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. payroll_run_id : typing.Optional[str] If provided, will only return employee payroll runs for this employee. diff --git a/src/merge/resources/hris/resources/employees/client.py b/src/merge/resources/hris/resources/employees/client.py index f6ae2e76..6f1b7fee 100644 --- a/src/merge/resources/hris/resources/employees/client.py +++ b/src/merge/resources/hris/resources/employees/client.py @@ -109,7 +109,7 @@ def list( * `INACTIVE` - INACTIVE employment_type : typing.Optional[str] - 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. expand : typing.Optional[EmployeesListRequestExpand] Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. @@ -136,7 +136,7 @@ def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). job_title : typing.Optional[str] - 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. last_name : typing.Optional[str] If provided, will only return employees with this last name. @@ -199,14 +199,71 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.employees import ( + EmployeesListRequestEmploymentStatus, + EmployeesListRequestExpand, + EmployeesListRequestRemoteFields, + EmployeesListRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.employees.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + display_full_name="display_full_name", + employee_number="employee_number", + employment_status=EmployeesListRequestEmploymentStatus.ACTIVE, + employment_type="employment_type", + expand=EmployeesListRequestExpand.COMPANY, + first_name="first_name", + groups="groups", + home_location_id="home_location_id", + include_deleted_data=True, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + job_title="job_title", + last_name="last_name", + manager_id="manager_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + pay_group_id="pay_group_id", + personal_email="personal_email", + remote_fields=EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS, + remote_id="remote_id", + show_enum_origins=EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + team_id="team_id", + terminated_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + terminated_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + work_email="work_email", + work_location_id="work_location_id", ) """ _response = self._raw_client.list( @@ -287,6 +344,8 @@ def create( api_key="YOUR_API_KEY", ) client.hris.employees.create( + is_debug_mode=True, + run_async=True, model=EmployeeRequest(), ) """ @@ -343,6 +402,11 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.hris.resources.employees import ( + EmployeesRetrieveRequestExpand, + EmployeesRetrieveRequestRemoteFields, + EmployeesRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -350,6 +414,12 @@ def retrieve( ) client.hris.employees.retrieve( id="id", + expand=EmployeesRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + remote_fields=EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS, + show_enum_origins=EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS, ) """ _response = self._raw_client.retrieve( @@ -522,7 +592,7 @@ async def list( * `INACTIVE` - INACTIVE employment_type : typing.Optional[str] - 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. expand : typing.Optional[EmployeesListRequestExpand] Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. @@ -549,7 +619,7 @@ async def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). job_title : typing.Optional[str] - 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. last_name : typing.Optional[str] If provided, will only return employees with this last name. @@ -613,8 +683,15 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.employees import ( + EmployeesListRequestEmploymentStatus, + EmployeesListRequestExpand, + EmployeesListRequestRemoteFields, + EmployeesListRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -624,7 +701,56 @@ async def list( async def main() -> None: await client.hris.employees.list( + company_id="company_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + display_full_name="display_full_name", + employee_number="employee_number", + employment_status=EmployeesListRequestEmploymentStatus.ACTIVE, + employment_type="employment_type", + expand=EmployeesListRequestExpand.COMPANY, + first_name="first_name", + groups="groups", + home_location_id="home_location_id", + include_deleted_data=True, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + job_title="job_title", + last_name="last_name", + manager_id="manager_id", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + pay_group_id="pay_group_id", + personal_email="personal_email", + remote_fields=EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS, + remote_id="remote_id", + show_enum_origins=EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + team_id="team_id", + terminated_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + terminated_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + work_email="work_email", + work_location_id="work_location_id", ) @@ -713,6 +839,8 @@ async def create( async def main() -> None: await client.hris.employees.create( + is_debug_mode=True, + run_async=True, model=EmployeeRequest(), ) @@ -774,6 +902,11 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.hris.resources.employees import ( + EmployeesRetrieveRequestExpand, + EmployeesRetrieveRequestRemoteFields, + EmployeesRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -784,6 +917,12 @@ async def retrieve( async def main() -> None: await client.hris.employees.retrieve( id="id", + expand=EmployeesRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + remote_fields=EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS, + show_enum_origins=EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS, ) diff --git a/src/merge/resources/hris/resources/employees/raw_client.py b/src/merge/resources/hris/resources/employees/raw_client.py index 15a17bf7..96b80f82 100644 --- a/src/merge/resources/hris/resources/employees/raw_client.py +++ b/src/merge/resources/hris/resources/employees/raw_client.py @@ -103,7 +103,7 @@ def list( * `INACTIVE` - INACTIVE employment_type : typing.Optional[str] - 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. expand : typing.Optional[EmployeesListRequestExpand] Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. @@ -130,7 +130,7 @@ def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). job_title : typing.Optional[str] - 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. last_name : typing.Optional[str] If provided, will only return employees with this last name. @@ -538,7 +538,7 @@ async def list( * `INACTIVE` - INACTIVE employment_type : typing.Optional[str] - 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. expand : typing.Optional[EmployeesListRequestExpand] Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. @@ -565,7 +565,7 @@ async def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). job_title : typing.Optional[str] - 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. last_name : typing.Optional[str] If provided, will only return employees with this last name. diff --git a/src/merge/resources/hris/resources/employer_benefits/client.py b/src/merge/resources/hris/resources/employer_benefits/client.py index 11737216..9c6cd4d6 100644 --- a/src/merge/resources/hris/resources/employer_benefits/client.py +++ b/src/merge/resources/hris/resources/employer_benefits/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.hris.employer_benefits.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.hris.employer_benefits.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.hris.employer_benefits.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.hris.employer_benefits.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/employer_benefits/raw_client.py b/src/merge/resources/hris/resources/employer_benefits/raw_client.py index 53596759..8d186abf 100644 --- a/src/merge/resources/hris/resources/employer_benefits/raw_client.py +++ b/src/merge/resources/hris/resources/employer_benefits/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/hris/resources/employments/client.py b/src/merge/resources/hris/resources/employments/client.py index 581e1875..49118beb 100644 --- a/src/merge/resources/hris/resources/employments/client.py +++ b/src/merge/resources/hris/resources/employments/client.py @@ -91,7 +91,7 @@ def list( Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[EmploymentsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -112,14 +112,44 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.employments import ( + EmploymentsListRequestExpand, + EmploymentsListRequestOrderBy, + EmploymentsListRequestRemoteFields, + EmploymentsListRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.employments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + expand=EmploymentsListRequestExpand.EMPLOYEE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=EmploymentsListRequestOrderBy.EFFECTIVE_DATE_DESCENDING, + page_size=1, + remote_fields=EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE, + remote_id="remote_id", + show_enum_origins=EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE, ) """ _response = self._raw_client.list( @@ -186,6 +216,11 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.hris.resources.employments import ( + EmploymentsRetrieveRequestExpand, + EmploymentsRetrieveRequestRemoteFields, + EmploymentsRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -193,6 +228,11 @@ def retrieve( ) client.hris.employments.retrieve( id="id", + expand=EmploymentsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, + remote_fields=EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE, + show_enum_origins=EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE, ) """ _response = self._raw_client.retrieve( @@ -281,7 +321,7 @@ async def list( Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[EmploymentsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -303,8 +343,15 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.employments import ( + EmploymentsListRequestExpand, + EmploymentsListRequestOrderBy, + EmploymentsListRequestRemoteFields, + EmploymentsListRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -314,7 +361,29 @@ async def list( async def main() -> None: await client.hris.employments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + expand=EmploymentsListRequestExpand.EMPLOYEE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=EmploymentsListRequestOrderBy.EFFECTIVE_DATE_DESCENDING, + page_size=1, + remote_fields=EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE, + remote_id="remote_id", + show_enum_origins=EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE, ) @@ -386,6 +455,11 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.hris.resources.employments import ( + EmploymentsRetrieveRequestExpand, + EmploymentsRetrieveRequestRemoteFields, + EmploymentsRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -396,6 +470,11 @@ async def retrieve( async def main() -> None: await client.hris.employments.retrieve( id="id", + expand=EmploymentsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, + remote_fields=EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE, + show_enum_origins=EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE, ) diff --git a/src/merge/resources/hris/resources/employments/raw_client.py b/src/merge/resources/hris/resources/employments/raw_client.py index 42f39f73..06dd96ac 100644 --- a/src/merge/resources/hris/resources/employments/raw_client.py +++ b/src/merge/resources/hris/resources/employments/raw_client.py @@ -85,7 +85,7 @@ def list( Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[EmploymentsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -273,7 +273,7 @@ async def list( Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[EmploymentsListRequestRemoteFields] Deprecated. Use show_enum_origins. diff --git a/src/merge/resources/hris/resources/field_mapping/client.py b/src/merge/resources/hris/resources/field_mapping/client.py index deab70e3..a7019942 100644 --- a/src/merge/resources/hris/resources/field_mapping/client.py +++ b/src/merge/resources/hris/resources/field_mapping/client.py @@ -59,7 +59,9 @@ def field_mappings_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.field_mapping.field_mappings_retrieve() + client.hris.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) """ _response = self._raw_client.field_mappings_retrieve( exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options @@ -76,6 +78,7 @@ def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -104,6 +107,9 @@ def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -121,6 +127,7 @@ def field_mappings_create( api_key="YOUR_API_KEY", ) client.hris.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -137,6 +144,7 @@ def field_mappings_create( remote_url_path=remote_url_path, common_model_name=common_model_name, exclude_remote_field_metadata=exclude_remote_field_metadata, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -181,6 +189,7 @@ def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -199,6 +208,9 @@ def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -224,6 +236,7 @@ def field_mappings_partial_update( remote_field_traversal_path=remote_field_traversal_path, remote_method=remote_method, remote_url_path=remote_url_path, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -262,7 +275,10 @@ def remote_fields_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.field_mapping.remote_fields_retrieve() + client.hris.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) """ _response = self._raw_client.remote_fields_retrieve( common_models=common_models, include_example_values=include_example_values, request_options=request_options @@ -349,7 +365,9 @@ async def field_mappings_retrieve( async def main() -> None: - await client.hris.field_mapping.field_mappings_retrieve() + await client.hris.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) asyncio.run(main()) @@ -369,6 +387,7 @@ async def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -397,6 +416,9 @@ async def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -419,6 +441,7 @@ async def field_mappings_create( async def main() -> None: await client.hris.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -438,6 +461,7 @@ async def main() -> None: remote_url_path=remote_url_path, common_model_name=common_model_name, exclude_remote_field_metadata=exclude_remote_field_metadata, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -490,6 +514,7 @@ async def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -508,6 +533,9 @@ async def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -541,6 +569,7 @@ async def main() -> None: remote_field_traversal_path=remote_field_traversal_path, remote_method=remote_method, remote_url_path=remote_url_path, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -584,7 +613,10 @@ async def remote_fields_retrieve( async def main() -> None: - await client.hris.field_mapping.remote_fields_retrieve() + await client.hris.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) asyncio.run(main()) diff --git a/src/merge/resources/hris/resources/field_mapping/raw_client.py b/src/merge/resources/hris/resources/field_mapping/raw_client.py index 6480b0b2..e484a3d9 100644 --- a/src/merge/resources/hris/resources/field_mapping/raw_client.py +++ b/src/merge/resources/hris/resources/field_mapping/raw_client.py @@ -77,6 +77,7 @@ def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[FieldMappingInstanceResponse]: """ @@ -105,6 +106,9 @@ def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -126,6 +130,7 @@ def field_mappings_create( "remote_method": remote_method, "remote_url_path": remote_url_path, "common_model_name": common_model_name, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", @@ -193,6 +198,7 @@ def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[FieldMappingInstanceResponse]: """ @@ -211,6 +217,9 @@ def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -226,6 +235,7 @@ def field_mappings_partial_update( "remote_field_traversal_path": remote_field_traversal_path, "remote_method": remote_method, "remote_url_path": remote_url_path, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", @@ -394,6 +404,7 @@ async def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: """ @@ -422,6 +433,9 @@ async def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -443,6 +457,7 @@ async def field_mappings_create( "remote_method": remote_method, "remote_url_path": remote_url_path, "common_model_name": common_model_name, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", @@ -510,6 +525,7 @@ async def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: """ @@ -528,6 +544,9 @@ async def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -543,6 +562,7 @@ async def field_mappings_partial_update( "remote_field_traversal_path": remote_field_traversal_path, "remote_method": remote_method, "remote_url_path": remote_url_path, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", diff --git a/src/merge/resources/hris/resources/groups/client.py b/src/merge/resources/hris/resources/groups/client.py index 60d862f2..ebb637f4 100644 --- a/src/merge/resources/hris/resources/groups/client.py +++ b/src/merge/resources/hris/resources/groups/client.py @@ -81,7 +81,7 @@ def list( If provided, will only return groups with these names. Multiple values can be separated by commas. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["type"]] Deprecated. Use show_enum_origins. @@ -105,6 +105,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -112,7 +114,27 @@ def list( api_key="YOUR_API_KEY", ) client.hris.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_commonly_used_as_team="is_commonly_used_as_team", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + names="names", + page_size=1, + remote_id="remote_id", + types="types", ) """ _response = self._raw_client.list( @@ -182,6 +204,8 @@ def retrieve( ) client.hris.groups.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -266,7 +290,7 @@ async def list( If provided, will only return groups with these names. Multiple values can be separated by commas. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["type"]] Deprecated. Use show_enum_origins. @@ -291,6 +315,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -302,7 +327,27 @@ async def list( async def main() -> None: await client.hris.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_commonly_used_as_team="is_commonly_used_as_team", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + names="names", + page_size=1, + remote_id="remote_id", + types="types", ) @@ -380,6 +425,8 @@ async def retrieve( async def main() -> None: await client.hris.groups.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/groups/raw_client.py b/src/merge/resources/hris/resources/groups/raw_client.py index f8256948..1bf09946 100644 --- a/src/merge/resources/hris/resources/groups/raw_client.py +++ b/src/merge/resources/hris/resources/groups/raw_client.py @@ -75,7 +75,7 @@ def list( If provided, will only return groups with these names. Multiple values can be separated by commas. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["type"]] Deprecated. Use show_enum_origins. @@ -258,7 +258,7 @@ async def list( If provided, will only return groups with these names. Multiple values can be separated by commas. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[typing.Literal["type"]] Deprecated. Use show_enum_origins. diff --git a/src/merge/resources/hris/resources/issues/client.py b/src/merge/resources/hris/resources/issues/client.py index 02a8ddc3..211669fd 100644 --- a/src/merge/resources/hris/resources/issues/client.py +++ b/src/merge/resources/hris/resources/issues/client.py @@ -81,7 +81,7 @@ def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -102,14 +102,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) """ _response = self._raw_client.list( @@ -233,7 +257,7 @@ async def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -255,8 +279,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.issues import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -266,7 +292,28 @@ async def list( async def main() -> None: await client.hris.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) diff --git a/src/merge/resources/hris/resources/issues/raw_client.py b/src/merge/resources/hris/resources/issues/raw_client.py index 02305941..bd80ca52 100644 --- a/src/merge/resources/hris/resources/issues/raw_client.py +++ b/src/merge/resources/hris/resources/issues/raw_client.py @@ -75,7 +75,7 @@ def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -234,7 +234,7 @@ async def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time diff --git a/src/merge/resources/hris/resources/link_token/__init__.py b/src/merge/resources/hris/resources/link_token/__init__.py index 3bad6adf..be8c3839 100644 --- a/src/merge/resources/hris/resources/link_token/__init__.py +++ b/src/merge/resources/hris/resources/link_token/__init__.py @@ -6,8 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import EndUserDetailsRequestLanguage -_dynamic_imports: typing.Dict[str, str] = {"EndUserDetailsRequestLanguage": ".types"} + from .types import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".types", + "EndUserDetailsRequestLanguage": ".types", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +32,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["EndUserDetailsRequestLanguage"] +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/hris/resources/link_token/client.py b/src/merge/resources/hris/resources/link_token/client.py index 31db9dd8..15620041 100644 --- a/src/merge/resources/hris/resources/link_token/client.py +++ b/src/merge/resources/hris/resources/link_token/client.py @@ -9,6 +9,9 @@ from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest from ...types.link_token import LinkToken from .raw_client import AsyncRawLinkTokenClient, RawLinkTokenClient +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) from .types.end_user_details_request_language import EndUserDetailsRequestLanguage # this is used as the default value for optional parameters @@ -48,6 +51,7 @@ def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -97,6 +101,11 @@ def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -135,6 +144,7 @@ def create( language=language, are_syncs_disabled=are_syncs_disabled, integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, request_options=request_options, ) return _response.data @@ -173,6 +183,7 @@ async def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -222,6 +233,11 @@ async def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -268,6 +284,7 @@ async def main() -> None: language=language, are_syncs_disabled=are_syncs_disabled, integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, request_options=request_options, ) return _response.data diff --git a/src/merge/resources/hris/resources/link_token/raw_client.py b/src/merge/resources/hris/resources/link_token/raw_client.py index 53e50f72..979a2af4 100644 --- a/src/merge/resources/hris/resources/link_token/raw_client.py +++ b/src/merge/resources/hris/resources/link_token/raw_client.py @@ -12,6 +12,9 @@ from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest from ...types.link_token import LinkToken +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) from .types.end_user_details_request_language import EndUserDetailsRequestLanguage # this is used as the default value for optional parameters @@ -40,6 +43,7 @@ def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[LinkToken]: """ @@ -89,6 +93,11 @@ def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -114,6 +123,7 @@ def create( "language": language, "are_syncs_disabled": are_syncs_disabled, "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, }, headers={ "content-type": "application/json", @@ -159,6 +169,7 @@ async def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[LinkToken]: """ @@ -208,6 +219,11 @@ async def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -233,6 +249,7 @@ async def create( "language": language, "are_syncs_disabled": are_syncs_disabled, "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, }, headers={ "content-type": "application/json", diff --git a/src/merge/resources/hris/resources/link_token/types/__init__.py b/src/merge/resources/hris/resources/link_token/types/__init__.py index e9a7d3b9..55cc1d4e 100644 --- a/src/merge/resources/hris/resources/link_token/types/__init__.py +++ b/src/merge/resources/hris/resources/link_token/types/__init__.py @@ -6,8 +6,14 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, + ) from .end_user_details_request_language import EndUserDetailsRequestLanguage -_dynamic_imports: typing.Dict[str, str] = {"EndUserDetailsRequestLanguage": ".end_user_details_request_language"} +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".end_user_details_request_completed_account_initial_screen", + "EndUserDetailsRequestLanguage": ".end_user_details_request_language", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["EndUserDetailsRequestLanguage"] +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/hris/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py b/src/merge/resources/hris/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py new file mode 100644 index 00000000..0c5d586d --- /dev/null +++ b/src/merge/resources/hris/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.completed_account_initial_screen_enum import CompletedAccountInitialScreenEnum + +EndUserDetailsRequestCompletedAccountInitialScreen = typing.Union[CompletedAccountInitialScreenEnum, str] diff --git a/src/merge/resources/hris/resources/linked_accounts/client.py b/src/merge/resources/hris/resources/linked_accounts/client.py index 464827a7..ada41b71 100644 --- a/src/merge/resources/hris/resources/linked_accounts/client.py +++ b/src/merge/resources/hris/resources/linked_accounts/client.py @@ -88,7 +88,7 @@ def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -104,13 +104,28 @@ def list( Examples -------- from merge import Merge + from merge.resources.hris.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) """ _response = self._raw_client.list( @@ -211,7 +226,7 @@ async def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -229,6 +244,9 @@ async def list( import asyncio from merge import AsyncMerge + from merge.resources.hris.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,7 +256,19 @@ async def list( async def main() -> None: await client.hris.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) diff --git a/src/merge/resources/hris/resources/linked_accounts/raw_client.py b/src/merge/resources/hris/resources/linked_accounts/raw_client.py index 07984ecd..cd2639e5 100644 --- a/src/merge/resources/hris/resources/linked_accounts/raw_client.py +++ b/src/merge/resources/hris/resources/linked_accounts/raw_client.py @@ -80,7 +80,7 @@ def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -197,7 +197,7 @@ async def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` diff --git a/src/merge/resources/hris/resources/locations/client.py b/src/merge/resources/hris/resources/locations/client.py index 12fa7031..7663787c 100644 --- a/src/merge/resources/hris/resources/locations/client.py +++ b/src/merge/resources/hris/resources/locations/client.py @@ -72,7 +72,7 @@ def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). location_type : typing.Optional[LocationsListRequestLocationType] - If provided, will only return locations with this location_type + If provided, will only return locations with this location type * `HOME` - HOME * `WORK` - WORK @@ -84,7 +84,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[LocationsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -105,14 +105,41 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.locations import ( + LocationsListRequestLocationType, + LocationsListRequestRemoteFields, + LocationsListRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.locations.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + location_type=LocationsListRequestLocationType.HOME, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=LocationsListRequestRemoteFields.COUNTRY, + remote_id="remote_id", + show_enum_origins=LocationsListRequestShowEnumOrigins.COUNTRY, ) """ _response = self._raw_client.list( @@ -173,6 +200,10 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.hris.resources.locations import ( + LocationsRetrieveRequestRemoteFields, + LocationsRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -180,6 +211,10 @@ def retrieve( ) client.hris.locations.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=LocationsRetrieveRequestRemoteFields.COUNTRY, + show_enum_origins=LocationsRetrieveRequestShowEnumOrigins.COUNTRY, ) """ _response = self._raw_client.retrieve( @@ -250,7 +285,7 @@ async def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). location_type : typing.Optional[LocationsListRequestLocationType] - If provided, will only return locations with this location_type + If provided, will only return locations with this location type * `HOME` - HOME * `WORK` - WORK @@ -262,7 +297,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[LocationsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -284,8 +319,14 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.locations import ( + LocationsListRequestLocationType, + LocationsListRequestRemoteFields, + LocationsListRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -295,7 +336,27 @@ async def list( async def main() -> None: await client.hris.locations.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + location_type=LocationsListRequestLocationType.HOME, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=LocationsListRequestRemoteFields.COUNTRY, + remote_id="remote_id", + show_enum_origins=LocationsListRequestShowEnumOrigins.COUNTRY, ) @@ -361,6 +422,10 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.hris.resources.locations import ( + LocationsRetrieveRequestRemoteFields, + LocationsRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -371,6 +436,10 @@ async def retrieve( async def main() -> None: await client.hris.locations.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=LocationsRetrieveRequestRemoteFields.COUNTRY, + show_enum_origins=LocationsRetrieveRequestShowEnumOrigins.COUNTRY, ) diff --git a/src/merge/resources/hris/resources/locations/raw_client.py b/src/merge/resources/hris/resources/locations/raw_client.py index 1b57f08f..cdf539bd 100644 --- a/src/merge/resources/hris/resources/locations/raw_client.py +++ b/src/merge/resources/hris/resources/locations/raw_client.py @@ -66,7 +66,7 @@ def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). location_type : typing.Optional[LocationsListRequestLocationType] - If provided, will only return locations with this location_type + If provided, will only return locations with this location type * `HOME` - HOME * `WORK` - WORK @@ -78,7 +78,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[LocationsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -242,7 +242,7 @@ async def list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). location_type : typing.Optional[LocationsListRequestLocationType] - If provided, will only return locations with this location_type + If provided, will only return locations with this location type * `HOME` - HOME * `WORK` - WORK @@ -254,7 +254,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[LocationsListRequestRemoteFields] Deprecated. Use show_enum_origins. diff --git a/src/merge/resources/hris/resources/pay_groups/client.py b/src/merge/resources/hris/resources/pay_groups/client.py index abccf33a..dd944a00 100644 --- a/src/merge/resources/hris/resources/pay_groups/client.py +++ b/src/merge/resources/hris/resources/pay_groups/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.hris.pay_groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.hris.pay_groups.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.hris.pay_groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.hris.pay_groups.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/pay_groups/raw_client.py b/src/merge/resources/hris/resources/pay_groups/raw_client.py index 551ed951..8a3fdb7d 100644 --- a/src/merge/resources/hris/resources/pay_groups/raw_client.py +++ b/src/merge/resources/hris/resources/pay_groups/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/hris/resources/payroll_runs/client.py b/src/merge/resources/hris/resources/payroll_runs/client.py index 5638f7df..b7f01c0a 100644 --- a/src/merge/resources/hris/resources/payroll_runs/client.py +++ b/src/merge/resources/hris/resources/payroll_runs/client.py @@ -88,7 +88,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[PayrollRunsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -124,14 +124,53 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsListRequestRemoteFields, + PayrollRunsListRequestRunType, + PayrollRunsListRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=PayrollRunsListRequestRemoteFields.RUN_STATE, + remote_id="remote_id", + run_type=PayrollRunsListRequestRunType.CORRECTION, + show_enum_origins=PayrollRunsListRequestShowEnumOrigins.RUN_STATE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -196,6 +235,10 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsRetrieveRequestRemoteFields, + PayrollRunsRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -203,6 +246,10 @@ def retrieve( ) client.hris.payroll_runs.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=PayrollRunsRetrieveRequestRemoteFields.RUN_STATE, + show_enum_origins=PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE, ) """ _response = self._raw_client.retrieve( @@ -289,7 +336,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[PayrollRunsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -326,8 +373,14 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsListRequestRemoteFields, + PayrollRunsListRequestRunType, + PayrollRunsListRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -337,7 +390,39 @@ async def list( async def main() -> None: await client.hris.payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=PayrollRunsListRequestRemoteFields.RUN_STATE, + remote_id="remote_id", + run_type=PayrollRunsListRequestRunType.CORRECTION, + show_enum_origins=PayrollRunsListRequestShowEnumOrigins.RUN_STATE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -407,6 +492,10 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsRetrieveRequestRemoteFields, + PayrollRunsRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -417,6 +506,10 @@ async def retrieve( async def main() -> None: await client.hris.payroll_runs.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=PayrollRunsRetrieveRequestRemoteFields.RUN_STATE, + show_enum_origins=PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE, ) diff --git a/src/merge/resources/hris/resources/payroll_runs/raw_client.py b/src/merge/resources/hris/resources/payroll_runs/raw_client.py index 7510c611..ae455ae9 100644 --- a/src/merge/resources/hris/resources/payroll_runs/raw_client.py +++ b/src/merge/resources/hris/resources/payroll_runs/raw_client.py @@ -82,7 +82,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[PayrollRunsListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -281,7 +281,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[PayrollRunsListRequestRemoteFields] Deprecated. Use show_enum_origins. diff --git a/src/merge/resources/hris/resources/sync_status/client.py b/src/merge/resources/hris/resources/sync_status/client.py index aa845f9e..17a75770 100644 --- a/src/merge/resources/hris/resources/sync_status/client.py +++ b/src/merge/resources/hris/resources/sync_status/client.py @@ -39,7 +39,7 @@ def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -59,6 +59,7 @@ def list( ) client.hris.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) """ _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) @@ -96,7 +97,7 @@ async def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -121,6 +122,7 @@ async def list( async def main() -> None: await client.hris.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) diff --git a/src/merge/resources/hris/resources/sync_status/raw_client.py b/src/merge/resources/hris/resources/sync_status/raw_client.py index d331289d..5f49dd4b 100644 --- a/src/merge/resources/hris/resources/sync_status/raw_client.py +++ b/src/merge/resources/hris/resources/sync_status/raw_client.py @@ -31,7 +31,7 @@ def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -86,7 +86,7 @@ async def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/merge/resources/hris/resources/teams/client.py b/src/merge/resources/hris/resources/teams/client.py index f17a9a47..52d2093d 100644 --- a/src/merge/resources/hris/resources/teams/client.py +++ b/src/merge/resources/hris/resources/teams/client.py @@ -75,7 +75,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_team_id : typing.Optional[str] If provided, will only return teams with this parent team. @@ -93,6 +93,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -100,7 +102,25 @@ def list( api_key="YOUR_API_KEY", ) client.hris.teams.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_team_id="parent_team_id", + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -163,6 +183,8 @@ def retrieve( ) client.hris.teams.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -240,7 +262,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_team_id : typing.Optional[str] If provided, will only return teams with this parent team. @@ -259,6 +281,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -270,7 +293,25 @@ async def list( async def main() -> None: await client.hris.teams.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_team_id="parent_team_id", + remote_id="remote_id", ) @@ -341,6 +382,8 @@ async def retrieve( async def main() -> None: await client.hris.teams.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/teams/raw_client.py b/src/merge/resources/hris/resources/teams/raw_client.py index dd176649..ef38a115 100644 --- a/src/merge/resources/hris/resources/teams/raw_client.py +++ b/src/merge/resources/hris/resources/teams/raw_client.py @@ -69,7 +69,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_team_id : typing.Optional[str] If provided, will only return teams with this parent team. @@ -232,7 +232,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_team_id : typing.Optional[str] If provided, will only return teams with this parent team. diff --git a/src/merge/resources/hris/resources/time_off/client.py b/src/merge/resources/hris/resources/time_off/client.py index 5d3d3239..2f0f9663 100644 --- a/src/merge/resources/hris/resources/time_off/client.py +++ b/src/merge/resources/hris/resources/time_off/client.py @@ -110,7 +110,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[TimeOffListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -156,14 +156,59 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.time_off import ( + TimeOffListRequestExpand, + TimeOffListRequestRemoteFields, + TimeOffListRequestRequestType, + TimeOffListRequestShowEnumOrigins, + TimeOffListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.time_off.list( + approver_id="approver_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=TimeOffListRequestExpand.APPROVER, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=TimeOffListRequestRemoteFields.REQUEST_TYPE, + remote_id="remote_id", + request_type=TimeOffListRequestRequestType.BEREAVEMENT, + show_enum_origins=TimeOffListRequestShowEnumOrigins.REQUEST_TYPE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + status=TimeOffListRequestStatus.APPROVED, ) """ _response = self._raw_client.list( @@ -231,6 +276,8 @@ def create( api_key="YOUR_API_KEY", ) client.hris.time_off.create( + is_debug_mode=True, + run_async=True, model=TimeOffRequest(), ) """ @@ -283,6 +330,11 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.hris.resources.time_off import ( + TimeOffRetrieveRequestExpand, + TimeOffRetrieveRequestRemoteFields, + TimeOffRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -290,6 +342,11 @@ def retrieve( ) client.hris.time_off.retrieve( id="id", + expand=TimeOffRetrieveRequestExpand.APPROVER, + include_remote_data=True, + include_shell_data=True, + remote_fields=TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE, + show_enum_origins=TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE, ) """ _response = self._raw_client.retrieve( @@ -417,7 +474,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[TimeOffListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -464,8 +521,16 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.time_off import ( + TimeOffListRequestExpand, + TimeOffListRequestRemoteFields, + TimeOffListRequestRequestType, + TimeOffListRequestShowEnumOrigins, + TimeOffListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -475,7 +540,43 @@ async def list( async def main() -> None: await client.hris.time_off.list( + approver_id="approver_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=TimeOffListRequestExpand.APPROVER, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=TimeOffListRequestRemoteFields.REQUEST_TYPE, + remote_id="remote_id", + request_type=TimeOffListRequestRequestType.BEREAVEMENT, + show_enum_origins=TimeOffListRequestShowEnumOrigins.REQUEST_TYPE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + status=TimeOffListRequestStatus.APPROVED, ) @@ -551,6 +652,8 @@ async def create( async def main() -> None: await client.hris.time_off.create( + is_debug_mode=True, + run_async=True, model=TimeOffRequest(), ) @@ -608,6 +711,11 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.hris.resources.time_off import ( + TimeOffRetrieveRequestExpand, + TimeOffRetrieveRequestRemoteFields, + TimeOffRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -618,6 +726,11 @@ async def retrieve( async def main() -> None: await client.hris.time_off.retrieve( id="id", + expand=TimeOffRetrieveRequestExpand.APPROVER, + include_remote_data=True, + include_shell_data=True, + remote_fields=TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE, + show_enum_origins=TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE, ) diff --git a/src/merge/resources/hris/resources/time_off/raw_client.py b/src/merge/resources/hris/resources/time_off/raw_client.py index 01a3af78..ada13edd 100644 --- a/src/merge/resources/hris/resources/time_off/raw_client.py +++ b/src/merge/resources/hris/resources/time_off/raw_client.py @@ -104,7 +104,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[TimeOffListRequestRemoteFields] Deprecated. Use show_enum_origins. @@ -431,7 +431,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_fields : typing.Optional[TimeOffListRequestRemoteFields] Deprecated. Use show_enum_origins. diff --git a/src/merge/resources/hris/resources/time_off_balances/client.py b/src/merge/resources/hris/resources/time_off_balances/client.py index 6f272e00..99968e26 100644 --- a/src/merge/resources/hris/resources/time_off_balances/client.py +++ b/src/merge/resources/hris/resources/time_off_balances/client.py @@ -82,7 +82,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. policy_type : typing.Optional[TimeOffBalancesListRequestPolicyType] If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') @@ -113,14 +113,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.time_off_balances import ( + TimeOffBalancesListRequestPolicyType, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.time_off_balances.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + policy_type=TimeOffBalancesListRequestPolicyType.BEREAVEMENT, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -194,6 +218,8 @@ def retrieve( ) client.hris.time_off_balances.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -279,7 +305,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. policy_type : typing.Optional[TimeOffBalancesListRequestPolicyType] If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') @@ -311,8 +337,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.time_off_balances import ( + TimeOffBalancesListRequestPolicyType, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -322,7 +352,26 @@ async def list( async def main() -> None: await client.hris.time_off_balances.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + policy_type=TimeOffBalancesListRequestPolicyType.BEREAVEMENT, + remote_id="remote_id", ) @@ -404,6 +453,8 @@ async def retrieve( async def main() -> None: await client.hris.time_off_balances.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/time_off_balances/raw_client.py b/src/merge/resources/hris/resources/time_off_balances/raw_client.py index 42ba06ef..156d341d 100644 --- a/src/merge/resources/hris/resources/time_off_balances/raw_client.py +++ b/src/merge/resources/hris/resources/time_off_balances/raw_client.py @@ -76,7 +76,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. policy_type : typing.Optional[TimeOffBalancesListRequestPolicyType] If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') @@ -271,7 +271,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. policy_type : typing.Optional[TimeOffBalancesListRequestPolicyType] If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') diff --git a/src/merge/resources/hris/resources/timesheet_entries/client.py b/src/merge/resources/hris/resources/timesheet_entries/client.py index 5689a64a..76335fdd 100644 --- a/src/merge/resources/hris/resources/timesheet_entries/client.py +++ b/src/merge/resources/hris/resources/timesheet_entries/client.py @@ -99,7 +99,7 @@ def list( Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -120,14 +120,50 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.hris.resources.timesheet_entries import ( + TimesheetEntriesListRequestOrderBy, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.timesheet_entries.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=TimesheetEntriesListRequestOrderBy.START_TIME_DESCENDING, + page_size=1, + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) """ _response = self._raw_client.list( @@ -191,6 +227,8 @@ def create( api_key="YOUR_API_KEY", ) client.hris.timesheet_entries.create( + is_debug_mode=True, + run_async=True, model=TimesheetEntryRequest(), ) """ @@ -242,6 +280,8 @@ def retrieve( ) client.hris.timesheet_entries.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -363,7 +403,7 @@ async def list( Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -385,8 +425,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.hris.resources.timesheet_entries import ( + TimesheetEntriesListRequestOrderBy, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -396,7 +440,38 @@ async def list( async def main() -> None: await client.hris.timesheet_entries.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=TimesheetEntriesListRequestOrderBy.START_TIME_DESCENDING, + page_size=1, + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) @@ -468,6 +543,8 @@ async def create( async def main() -> None: await client.hris.timesheet_entries.create( + is_debug_mode=True, + run_async=True, model=TimesheetEntryRequest(), ) @@ -527,6 +604,8 @@ async def retrieve( async def main() -> None: await client.hris.timesheet_entries.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/hris/resources/timesheet_entries/raw_client.py b/src/merge/resources/hris/resources/timesheet_entries/raw_client.py index 6cf4cbb1..ba12d21e 100644 --- a/src/merge/resources/hris/resources/timesheet_entries/raw_client.py +++ b/src/merge/resources/hris/resources/timesheet_entries/raw_client.py @@ -93,7 +93,7 @@ def list( Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -377,7 +377,7 @@ async def list( Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/hris/types/__init__.py b/src/merge/resources/hris/types/__init__.py index 838a46c1..2fd80be2 100644 --- a/src/merge/resources/hris/types/__init__.py +++ b/src/merge/resources/hris/types/__init__.py @@ -10,6 +10,7 @@ from .account_details_and_actions import AccountDetailsAndActions from .account_details_and_actions_category import AccountDetailsAndActionsCategory from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration + from .account_details_and_actions_status import AccountDetailsAndActionsStatus from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum from .account_details_category import AccountDetailsCategory from .account_integration import AccountIntegration @@ -32,6 +33,7 @@ from .common_model_scope_api import CommonModelScopeApi from .common_model_scopes_body_request import CommonModelScopesBodyRequest from .company import Company + from .completed_account_initial_screen_enum import CompletedAccountInitialScreenEnum from .country_enum import CountryEnum from .data_passthrough_request import DataPassthroughRequest from .debug_mode_log import DebugModeLog @@ -210,6 +212,7 @@ "AccountDetailsAndActions": ".account_details_and_actions", "AccountDetailsAndActionsCategory": ".account_details_and_actions_category", "AccountDetailsAndActionsIntegration": ".account_details_and_actions_integration", + "AccountDetailsAndActionsStatus": ".account_details_and_actions_status", "AccountDetailsAndActionsStatusEnum": ".account_details_and_actions_status_enum", "AccountDetailsCategory": ".account_details_category", "AccountIntegration": ".account_integration", @@ -232,6 +235,7 @@ "CommonModelScopeApi": ".common_model_scope_api", "CommonModelScopesBodyRequest": ".common_model_scopes_body_request", "Company": ".company", + "CompletedAccountInitialScreenEnum": ".completed_account_initial_screen_enum", "CountryEnum": ".country_enum", "DataPassthroughRequest": ".data_passthrough_request", "DebugModeLog": ".debug_mode_log", @@ -430,6 +434,7 @@ def __dir__(): "AccountDetailsAndActions", "AccountDetailsAndActionsCategory", "AccountDetailsAndActionsIntegration", + "AccountDetailsAndActionsStatus", "AccountDetailsAndActionsStatusEnum", "AccountDetailsCategory", "AccountIntegration", @@ -452,6 +457,7 @@ def __dir__(): "CommonModelScopeApi", "CommonModelScopesBodyRequest", "Company", + "CompletedAccountInitialScreenEnum", "CountryEnum", "DataPassthroughRequest", "DebugModeLog", diff --git a/src/merge/resources/hris/types/account_details_and_actions.py b/src/merge/resources/hris/types/account_details_and_actions.py index 551a4fa5..93c874ed 100644 --- a/src/merge/resources/hris/types/account_details_and_actions.py +++ b/src/merge/resources/hris/types/account_details_and_actions.py @@ -8,7 +8,7 @@ from ....core.unchecked_base_model import UncheckedBaseModel from .account_details_and_actions_category import AccountDetailsAndActionsCategory from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration -from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum +from .account_details_and_actions_status import AccountDetailsAndActionsStatus class AccountDetailsAndActions(UncheckedBaseModel): @@ -23,7 +23,7 @@ class AccountDetailsAndActions(UncheckedBaseModel): id: str category: typing.Optional[AccountDetailsAndActionsCategory] = None - status: AccountDetailsAndActionsStatusEnum + status: AccountDetailsAndActionsStatus status_detail: typing.Optional[str] = None end_user_origin_id: typing.Optional[str] = None end_user_organization_name: str diff --git a/src/merge/resources/hris/types/account_details_and_actions_status.py b/src/merge/resources/hris/types/account_details_and_actions_status.py new file mode 100644 index 00000000..445922f8 --- /dev/null +++ b/src/merge/resources/hris/types/account_details_and_actions_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum + +AccountDetailsAndActionsStatus = typing.Union[AccountDetailsAndActionsStatusEnum, str] diff --git a/src/merge/resources/hris/types/completed_account_initial_screen_enum.py b/src/merge/resources/hris/types/completed_account_initial_screen_enum.py new file mode 100644 index 00000000..c112dfd1 --- /dev/null +++ b/src/merge/resources/hris/types/completed_account_initial_screen_enum.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CompletedAccountInitialScreenEnum = typing.Literal["SELECTIVE_SYNC"] diff --git a/src/merge/resources/hris/types/field_mapping_api_instance.py b/src/merge/resources/hris/types/field_mapping_api_instance.py index a5815313..0d257dcb 100644 --- a/src/merge/resources/hris/types/field_mapping_api_instance.py +++ b/src/merge/resources/hris/types/field_mapping_api_instance.py @@ -14,6 +14,7 @@ class FieldMappingApiInstance(UncheckedBaseModel): is_integration_wide: typing.Optional[bool] = None target_field: typing.Optional[FieldMappingApiInstanceTargetField] = None remote_field: typing.Optional[FieldMappingApiInstanceRemoteField] = None + jmes_path: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/merge/resources/knowledgebase/__init__.py b/src/merge/resources/knowledgebase/__init__.py index 70e1a1d8..877949ae 100644 --- a/src/merge/resources/knowledgebase/__init__.py +++ b/src/merge/resources/knowledgebase/__init__.py @@ -123,10 +123,13 @@ ) from .resources import ( ArticlesListRequestExpand, + ArticlesListRequestType, ArticlesRetrieveRequestExpand, AsyncPassthroughRetrieveResponse, ContainersListRequestExpand, + ContainersListRequestType, ContainersRetrieveRequestExpand, + EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage, GroupsListRequestExpand, GroupsRetrieveRequestExpand, @@ -179,6 +182,7 @@ "ArticleTypeEnum": ".types", "ArticleVisibility": ".types", "ArticlesListRequestExpand": ".resources", + "ArticlesListRequestType": ".resources", "ArticlesRetrieveRequestExpand": ".resources", "AsyncPassthroughReciept": ".types", "AsyncPassthroughRetrieveResponse": ".resources", @@ -199,6 +203,7 @@ "ContainerTypeEnum": ".types", "ContainerVisibility": ".types", "ContainersListRequestExpand": ".resources", + "ContainersListRequestType": ".resources", "ContainersRetrieveRequestExpand": ".resources", "DataPassthroughRequest": ".types", "DataPassthroughRequestMethod": ".types", @@ -207,6 +212,7 @@ "DebugModelLogSummary": ".types", "EnabledActionsEnum": ".types", "EncodingEnum": ".types", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".resources", "EndUserDetailsRequestLanguage": ".resources", "ErrorValidationProblem": ".types", "EventTypeEnum": ".types", @@ -347,6 +353,7 @@ def __dir__(): "ArticleTypeEnum", "ArticleVisibility", "ArticlesListRequestExpand", + "ArticlesListRequestType", "ArticlesRetrieveRequestExpand", "AsyncPassthroughReciept", "AsyncPassthroughRetrieveResponse", @@ -367,6 +374,7 @@ def __dir__(): "ContainerTypeEnum", "ContainerVisibility", "ContainersListRequestExpand", + "ContainersListRequestType", "ContainersRetrieveRequestExpand", "DataPassthroughRequest", "DataPassthroughRequestMethod", @@ -375,6 +383,7 @@ def __dir__(): "DebugModelLogSummary", "EnabledActionsEnum", "EncodingEnum", + "EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage", "ErrorValidationProblem", "EventTypeEnum", diff --git a/src/merge/resources/knowledgebase/resources/__init__.py b/src/merge/resources/knowledgebase/resources/__init__.py index d9322f75..ba4fd94a 100644 --- a/src/merge/resources/knowledgebase/resources/__init__.py +++ b/src/merge/resources/knowledgebase/resources/__init__.py @@ -30,19 +30,22 @@ users, webhook_receivers, ) - from .articles import ArticlesListRequestExpand, ArticlesRetrieveRequestExpand + from .articles import ArticlesListRequestExpand, ArticlesListRequestType, ArticlesRetrieveRequestExpand from .async_passthrough import AsyncPassthroughRetrieveResponse - from .containers import ContainersListRequestExpand, ContainersRetrieveRequestExpand + from .containers import ContainersListRequestExpand, ContainersListRequestType, ContainersRetrieveRequestExpand from .groups import GroupsListRequestExpand, GroupsRetrieveRequestExpand from .issues import IssuesListRequestStatus - from .link_token import EndUserDetailsRequestLanguage + from .link_token import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage from .linked_accounts import LinkedAccountsListRequestCategory _dynamic_imports: typing.Dict[str, str] = { "ArticlesListRequestExpand": ".articles", + "ArticlesListRequestType": ".articles", "ArticlesRetrieveRequestExpand": ".articles", "AsyncPassthroughRetrieveResponse": ".async_passthrough", "ContainersListRequestExpand": ".containers", + "ContainersListRequestType": ".containers", "ContainersRetrieveRequestExpand": ".containers", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".link_token", "EndUserDetailsRequestLanguage": ".link_token", "GroupsListRequestExpand": ".groups", "GroupsRetrieveRequestExpand": ".groups", @@ -94,10 +97,13 @@ def __dir__(): __all__ = [ "ArticlesListRequestExpand", + "ArticlesListRequestType", "ArticlesRetrieveRequestExpand", "AsyncPassthroughRetrieveResponse", "ContainersListRequestExpand", + "ContainersListRequestType", "ContainersRetrieveRequestExpand", + "EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage", "GroupsListRequestExpand", "GroupsRetrieveRequestExpand", diff --git a/src/merge/resources/knowledgebase/resources/articles/__init__.py b/src/merge/resources/knowledgebase/resources/articles/__init__.py index 9e487c23..007aef5a 100644 --- a/src/merge/resources/knowledgebase/resources/articles/__init__.py +++ b/src/merge/resources/knowledgebase/resources/articles/__init__.py @@ -6,9 +6,10 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import ArticlesListRequestExpand, ArticlesRetrieveRequestExpand + from .types import ArticlesListRequestExpand, ArticlesListRequestType, ArticlesRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { "ArticlesListRequestExpand": ".types", + "ArticlesListRequestType": ".types", "ArticlesRetrieveRequestExpand": ".types", } @@ -32,4 +33,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["ArticlesListRequestExpand", "ArticlesRetrieveRequestExpand"] +__all__ = ["ArticlesListRequestExpand", "ArticlesListRequestType", "ArticlesRetrieveRequestExpand"] diff --git a/src/merge/resources/knowledgebase/resources/articles/client.py b/src/merge/resources/knowledgebase/resources/articles/client.py index 5c14b7b2..e507768b 100644 --- a/src/merge/resources/knowledgebase/resources/articles/client.py +++ b/src/merge/resources/knowledgebase/resources/articles/client.py @@ -9,6 +9,7 @@ from ...types.paginated_article_list import PaginatedArticleList from .raw_client import AsyncRawArticlesClient, RawArticlesClient from .types.articles_list_request_expand import ArticlesListRequestExpand +from .types.articles_list_request_type import ArticlesListRequestType from .types.articles_retrieve_request_expand import ArticlesRetrieveRequestExpand @@ -43,7 +44,9 @@ def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + root_container_id: typing.Optional[str] = None, + status: typing.Optional[str] = None, + type: typing.Optional[ArticlesListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedArticleList: """ @@ -79,7 +82,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub articles of the parent_article_id. @@ -90,7 +93,13 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + root_container_id : typing.Optional[str] + If provided, will only return sub articles of the root_container_id. + + status : typing.Optional[str] + If provided, will only return articles of the given status; multiple statuses can be separated by commas. + + type : typing.Optional[ArticlesListRequestType] If provided, will only return articles of the given type. request_options : typing.Optional[RequestOptions] @@ -103,14 +112,43 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.knowledgebase.resources.articles import ( + ArticlesListRequestExpand, + ArticlesListRequestType, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.knowledgebase.articles.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ArticlesListRequestExpand.ATTACHMENTS, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", + remote_id="remote_id", + root_container_id="root_container_id", + status="status", + type=ArticlesListRequestType.EMPTY, ) """ _response = self._raw_client.list( @@ -127,6 +165,8 @@ def list( parent_article_id=parent_article_id, parent_container_id=parent_container_id, remote_id=remote_id, + root_container_id=root_container_id, + status=status, type=type, request_options=request_options, ) @@ -168,6 +208,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.knowledgebase.resources.articles import ( + ArticlesRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -175,6 +218,9 @@ def retrieve( ) client.knowledgebase.articles.retrieve( id="id", + expand=ArticlesRetrieveRequestExpand.ATTACHMENTS, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -218,7 +264,9 @@ async def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + root_container_id: typing.Optional[str] = None, + status: typing.Optional[str] = None, + type: typing.Optional[ArticlesListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedArticleList: """ @@ -254,7 +302,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub articles of the parent_article_id. @@ -265,7 +313,13 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + root_container_id : typing.Optional[str] + If provided, will only return sub articles of the root_container_id. + + status : typing.Optional[str] + If provided, will only return articles of the given status; multiple statuses can be separated by commas. + + type : typing.Optional[ArticlesListRequestType] If provided, will only return articles of the given type. request_options : typing.Optional[RequestOptions] @@ -279,8 +333,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.knowledgebase.resources.articles import ( + ArticlesListRequestExpand, + ArticlesListRequestType, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -290,7 +349,30 @@ async def list( async def main() -> None: await client.knowledgebase.articles.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ArticlesListRequestExpand.ATTACHMENTS, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", + remote_id="remote_id", + root_container_id="root_container_id", + status="status", + type=ArticlesListRequestType.EMPTY, ) @@ -310,6 +392,8 @@ async def main() -> None: parent_article_id=parent_article_id, parent_container_id=parent_container_id, remote_id=remote_id, + root_container_id=root_container_id, + status=status, type=type, request_options=request_options, ) @@ -353,6 +437,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.knowledgebase.resources.articles import ( + ArticlesRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -363,6 +450,9 @@ async def retrieve( async def main() -> None: await client.knowledgebase.articles.retrieve( id="id", + expand=ArticlesRetrieveRequestExpand.ATTACHMENTS, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/knowledgebase/resources/articles/raw_client.py b/src/merge/resources/knowledgebase/resources/articles/raw_client.py index 0e4474ef..0c3b85c8 100644 --- a/src/merge/resources/knowledgebase/resources/articles/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/articles/raw_client.py @@ -14,6 +14,7 @@ from ...types.article import Article from ...types.paginated_article_list import PaginatedArticleList from .types.articles_list_request_expand import ArticlesListRequestExpand +from .types.articles_list_request_type import ArticlesListRequestType from .types.articles_retrieve_request_expand import ArticlesRetrieveRequestExpand @@ -37,7 +38,9 @@ def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + root_container_id: typing.Optional[str] = None, + status: typing.Optional[str] = None, + type: typing.Optional[ArticlesListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedArticleList]: """ @@ -73,7 +76,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub articles of the parent_article_id. @@ -84,7 +87,13 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + root_container_id : typing.Optional[str] + If provided, will only return sub articles of the root_container_id. + + status : typing.Optional[str] + If provided, will only return articles of the given status; multiple statuses can be separated by commas. + + type : typing.Optional[ArticlesListRequestType] If provided, will only return articles of the given type. request_options : typing.Optional[RequestOptions] @@ -112,6 +121,8 @@ def list( "parent_article_id": parent_article_id, "parent_container_id": parent_container_id, "remote_id": remote_id, + "root_container_id": root_container_id, + "status": status, "type": type, }, request_options=request_options, @@ -210,7 +221,9 @@ async def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + root_container_id: typing.Optional[str] = None, + status: typing.Optional[str] = None, + type: typing.Optional[ArticlesListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedArticleList]: """ @@ -246,7 +259,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub articles of the parent_article_id. @@ -257,7 +270,13 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + root_container_id : typing.Optional[str] + If provided, will only return sub articles of the root_container_id. + + status : typing.Optional[str] + If provided, will only return articles of the given status; multiple statuses can be separated by commas. + + type : typing.Optional[ArticlesListRequestType] If provided, will only return articles of the given type. request_options : typing.Optional[RequestOptions] @@ -285,6 +304,8 @@ async def list( "parent_article_id": parent_article_id, "parent_container_id": parent_container_id, "remote_id": remote_id, + "root_container_id": root_container_id, + "status": status, "type": type, }, request_options=request_options, diff --git a/src/merge/resources/knowledgebase/resources/articles/types/__init__.py b/src/merge/resources/knowledgebase/resources/articles/types/__init__.py index 0201e80e..d9e6daf4 100644 --- a/src/merge/resources/knowledgebase/resources/articles/types/__init__.py +++ b/src/merge/resources/knowledgebase/resources/articles/types/__init__.py @@ -7,9 +7,11 @@ if typing.TYPE_CHECKING: from .articles_list_request_expand import ArticlesListRequestExpand + from .articles_list_request_type import ArticlesListRequestType from .articles_retrieve_request_expand import ArticlesRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { "ArticlesListRequestExpand": ".articles_list_request_expand", + "ArticlesListRequestType": ".articles_list_request_type", "ArticlesRetrieveRequestExpand": ".articles_retrieve_request_expand", } @@ -33,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["ArticlesListRequestExpand", "ArticlesRetrieveRequestExpand"] +__all__ = ["ArticlesListRequestExpand", "ArticlesListRequestType", "ArticlesRetrieveRequestExpand"] diff --git a/src/merge/resources/knowledgebase/resources/articles/types/articles_list_request_type.py b/src/merge/resources/knowledgebase/resources/articles/types/articles_list_request_type.py new file mode 100644 index 00000000..c09a8782 --- /dev/null +++ b/src/merge/resources/knowledgebase/resources/articles/types/articles_list_request_type.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class ArticlesListRequestType(str, enum.Enum): + EMPTY = "" + BLOG_POST = "BLOG_POST" + PAGE = "PAGE" + SMART_LINK = "SMART_LINK" + + def visit( + self, + empty: typing.Callable[[], T_Result], + blog_post: typing.Callable[[], T_Result], + page: typing.Callable[[], T_Result], + smart_link: typing.Callable[[], T_Result], + ) -> T_Result: + if self is ArticlesListRequestType.EMPTY: + return empty() + if self is ArticlesListRequestType.BLOG_POST: + return blog_post() + if self is ArticlesListRequestType.PAGE: + return page() + if self is ArticlesListRequestType.SMART_LINK: + return smart_link() diff --git a/src/merge/resources/knowledgebase/resources/attachments/client.py b/src/merge/resources/knowledgebase/resources/attachments/client.py index 6d0da962..8998590d 100644 --- a/src/merge/resources/knowledgebase/resources/attachments/client.py +++ b/src/merge/resources/knowledgebase/resources/attachments/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.knowledgebase.attachments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.knowledgebase.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.knowledgebase.attachments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.knowledgebase.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/knowledgebase/resources/attachments/raw_client.py b/src/merge/resources/knowledgebase/resources/attachments/raw_client.py index 1b64b0c7..1da00a24 100644 --- a/src/merge/resources/knowledgebase/resources/attachments/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/attachments/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/knowledgebase/resources/audit_trail/client.py b/src/merge/resources/knowledgebase/resources/audit_trail/client.py index aeba70bb..3f0ab341 100644 --- a/src/merge/resources/knowledgebase/resources/audit_trail/client.py +++ b/src/merge/resources/knowledgebase/resources/audit_trail/client.py @@ -75,6 +75,11 @@ def list( ) client.knowledgebase.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) """ _response = self._raw_client.list( @@ -161,6 +166,11 @@ async def list( async def main() -> None: await client.knowledgebase.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) diff --git a/src/merge/resources/knowledgebase/resources/containers/__init__.py b/src/merge/resources/knowledgebase/resources/containers/__init__.py index b66d2970..6ccf6d9d 100644 --- a/src/merge/resources/knowledgebase/resources/containers/__init__.py +++ b/src/merge/resources/knowledgebase/resources/containers/__init__.py @@ -6,9 +6,10 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import ContainersListRequestExpand, ContainersRetrieveRequestExpand + from .types import ContainersListRequestExpand, ContainersListRequestType, ContainersRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { "ContainersListRequestExpand": ".types", + "ContainersListRequestType": ".types", "ContainersRetrieveRequestExpand": ".types", } @@ -32,4 +33,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["ContainersListRequestExpand", "ContainersRetrieveRequestExpand"] +__all__ = ["ContainersListRequestExpand", "ContainersListRequestType", "ContainersRetrieveRequestExpand"] diff --git a/src/merge/resources/knowledgebase/resources/containers/client.py b/src/merge/resources/knowledgebase/resources/containers/client.py index 3438434d..74e798c0 100644 --- a/src/merge/resources/knowledgebase/resources/containers/client.py +++ b/src/merge/resources/knowledgebase/resources/containers/client.py @@ -9,6 +9,7 @@ from ...types.paginated_container_list import PaginatedContainerList from .raw_client import AsyncRawContainersClient, RawContainersClient from .types.containers_list_request_expand import ContainersListRequestExpand +from .types.containers_list_request_type import ContainersListRequestType from .types.containers_retrieve_request_expand import ContainersRetrieveRequestExpand @@ -43,7 +44,7 @@ def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + type: typing.Optional[ContainersListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedContainerList: """ @@ -79,7 +80,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub containers of the parent_article_id. @@ -90,7 +91,7 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + type : typing.Optional[ContainersListRequestType] If provided, will only return containers of the given type. request_options : typing.Optional[RequestOptions] @@ -103,14 +104,41 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.knowledgebase.resources.containers import ( + ContainersListRequestExpand, + ContainersListRequestType, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.knowledgebase.containers.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ContainersListRequestExpand.PARENT_ARTICLE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", + remote_id="remote_id", + type=ContainersListRequestType.EMPTY, ) """ _response = self._raw_client.list( @@ -168,6 +196,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.knowledgebase.resources.containers import ( + ContainersRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -175,6 +206,9 @@ def retrieve( ) client.knowledgebase.containers.retrieve( id="id", + expand=ContainersRetrieveRequestExpand.PARENT_ARTICLE, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -218,7 +252,7 @@ async def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + type: typing.Optional[ContainersListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedContainerList: """ @@ -254,7 +288,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub containers of the parent_article_id. @@ -265,7 +299,7 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + type : typing.Optional[ContainersListRequestType] If provided, will only return containers of the given type. request_options : typing.Optional[RequestOptions] @@ -279,8 +313,13 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.knowledgebase.resources.containers import ( + ContainersListRequestExpand, + ContainersListRequestType, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -290,7 +329,28 @@ async def list( async def main() -> None: await client.knowledgebase.containers.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ContainersListRequestExpand.PARENT_ARTICLE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", + remote_id="remote_id", + type=ContainersListRequestType.EMPTY, ) @@ -353,6 +413,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.knowledgebase.resources.containers import ( + ContainersRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -363,6 +426,9 @@ async def retrieve( async def main() -> None: await client.knowledgebase.containers.retrieve( id="id", + expand=ContainersRetrieveRequestExpand.PARENT_ARTICLE, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/knowledgebase/resources/containers/raw_client.py b/src/merge/resources/knowledgebase/resources/containers/raw_client.py index ff1d134e..76b1a68b 100644 --- a/src/merge/resources/knowledgebase/resources/containers/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/containers/raw_client.py @@ -14,6 +14,7 @@ from ...types.container import Container from ...types.paginated_container_list import PaginatedContainerList from .types.containers_list_request_expand import ContainersListRequestExpand +from .types.containers_list_request_type import ContainersListRequestType from .types.containers_retrieve_request_expand import ContainersRetrieveRequestExpand @@ -37,7 +38,7 @@ def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + type: typing.Optional[ContainersListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedContainerList]: """ @@ -73,7 +74,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub containers of the parent_article_id. @@ -84,7 +85,7 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + type : typing.Optional[ContainersListRequestType] If provided, will only return containers of the given type. request_options : typing.Optional[RequestOptions] @@ -210,7 +211,7 @@ async def list( parent_article_id: typing.Optional[str] = None, parent_container_id: typing.Optional[str] = None, remote_id: typing.Optional[str] = None, - type: typing.Optional[str] = None, + type: typing.Optional[ContainersListRequestType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedContainerList]: """ @@ -246,7 +247,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_article_id : typing.Optional[str] If provided, will only return sub containers of the parent_article_id. @@ -257,7 +258,7 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. - type : typing.Optional[str] + type : typing.Optional[ContainersListRequestType] If provided, will only return containers of the given type. request_options : typing.Optional[RequestOptions] diff --git a/src/merge/resources/knowledgebase/resources/containers/types/__init__.py b/src/merge/resources/knowledgebase/resources/containers/types/__init__.py index 352ce242..5bbf7132 100644 --- a/src/merge/resources/knowledgebase/resources/containers/types/__init__.py +++ b/src/merge/resources/knowledgebase/resources/containers/types/__init__.py @@ -7,9 +7,11 @@ if typing.TYPE_CHECKING: from .containers_list_request_expand import ContainersListRequestExpand + from .containers_list_request_type import ContainersListRequestType from .containers_retrieve_request_expand import ContainersRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { "ContainersListRequestExpand": ".containers_list_request_expand", + "ContainersListRequestType": ".containers_list_request_type", "ContainersRetrieveRequestExpand": ".containers_retrieve_request_expand", } @@ -33,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["ContainersListRequestExpand", "ContainersRetrieveRequestExpand"] +__all__ = ["ContainersListRequestExpand", "ContainersListRequestType", "ContainersRetrieveRequestExpand"] diff --git a/src/merge/resources/knowledgebase/resources/containers/types/containers_list_request_type.py b/src/merge/resources/knowledgebase/resources/containers/types/containers_list_request_type.py new file mode 100644 index 00000000..c40414d7 --- /dev/null +++ b/src/merge/resources/knowledgebase/resources/containers/types/containers_list_request_type.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class ContainersListRequestType(str, enum.Enum): + EMPTY = "" + CATEGORY = "CATEGORY" + COLLECTION = "COLLECTION" + DATABASE = "DATABASE" + FOLDER = "FOLDER" + SECTION = "SECTION" + SPACE = "SPACE" + + def visit( + self, + empty: typing.Callable[[], T_Result], + category: typing.Callable[[], T_Result], + collection: typing.Callable[[], T_Result], + database: typing.Callable[[], T_Result], + folder: typing.Callable[[], T_Result], + section: typing.Callable[[], T_Result], + space: typing.Callable[[], T_Result], + ) -> T_Result: + if self is ContainersListRequestType.EMPTY: + return empty() + if self is ContainersListRequestType.CATEGORY: + return category() + if self is ContainersListRequestType.COLLECTION: + return collection() + if self is ContainersListRequestType.DATABASE: + return database() + if self is ContainersListRequestType.FOLDER: + return folder() + if self is ContainersListRequestType.SECTION: + return section() + if self is ContainersListRequestType.SPACE: + return space() diff --git a/src/merge/resources/knowledgebase/resources/field_mapping/client.py b/src/merge/resources/knowledgebase/resources/field_mapping/client.py index 4c25ae11..f28fd73d 100644 --- a/src/merge/resources/knowledgebase/resources/field_mapping/client.py +++ b/src/merge/resources/knowledgebase/resources/field_mapping/client.py @@ -59,7 +59,9 @@ def field_mappings_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.knowledgebase.field_mapping.field_mappings_retrieve() + client.knowledgebase.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) """ _response = self._raw_client.field_mappings_retrieve( exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options @@ -125,6 +127,7 @@ def field_mappings_create( api_key="YOUR_API_KEY", ) client.knowledgebase.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -272,7 +275,10 @@ def remote_fields_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.knowledgebase.field_mapping.remote_fields_retrieve() + client.knowledgebase.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) """ _response = self._raw_client.remote_fields_retrieve( common_models=common_models, include_example_values=include_example_values, request_options=request_options @@ -359,7 +365,9 @@ async def field_mappings_retrieve( async def main() -> None: - await client.knowledgebase.field_mapping.field_mappings_retrieve() + await client.knowledgebase.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) asyncio.run(main()) @@ -433,6 +441,7 @@ async def field_mappings_create( async def main() -> None: await client.knowledgebase.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -604,7 +613,10 @@ async def remote_fields_retrieve( async def main() -> None: - await client.knowledgebase.field_mapping.remote_fields_retrieve() + await client.knowledgebase.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) asyncio.run(main()) diff --git a/src/merge/resources/knowledgebase/resources/groups/client.py b/src/merge/resources/knowledgebase/resources/groups/client.py index acca352d..b2e89602 100644 --- a/src/merge/resources/knowledgebase/resources/groups/client.py +++ b/src/merge/resources/knowledgebase/resources/groups/client.py @@ -76,7 +76,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -91,14 +91,37 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.knowledgebase.resources.groups import ( + GroupsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.knowledgebase.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=GroupsListRequestExpand.PARENT_GROUP, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -153,6 +176,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.knowledgebase.resources.groups import ( + GroupsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -160,6 +186,9 @@ def retrieve( ) client.knowledgebase.groups.retrieve( id="id", + expand=GroupsRetrieveRequestExpand.PARENT_GROUP, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -236,7 +265,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -252,8 +281,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.knowledgebase.resources.groups import ( + GroupsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -263,7 +296,25 @@ async def list( async def main() -> None: await client.knowledgebase.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=GroupsListRequestExpand.PARENT_GROUP, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -323,6 +374,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.knowledgebase.resources.groups import ( + GroupsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -333,6 +387,9 @@ async def retrieve( async def main() -> None: await client.knowledgebase.groups.retrieve( id="id", + expand=GroupsRetrieveRequestExpand.PARENT_GROUP, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/knowledgebase/resources/groups/raw_client.py b/src/merge/resources/knowledgebase/resources/groups/raw_client.py index ee98e9eb..231ff57c 100644 --- a/src/merge/resources/knowledgebase/resources/groups/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/groups/raw_client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -228,7 +228,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/knowledgebase/resources/issues/client.py b/src/merge/resources/knowledgebase/resources/issues/client.py index 44ee02d0..b74d6cbc 100644 --- a/src/merge/resources/knowledgebase/resources/issues/client.py +++ b/src/merge/resources/knowledgebase/resources/issues/client.py @@ -81,7 +81,7 @@ def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -102,14 +102,40 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.knowledgebase.resources.issues import ( + IssuesListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.knowledgebase.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) """ _response = self._raw_client.list( @@ -233,7 +259,7 @@ async def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -255,8 +281,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.knowledgebase.resources.issues import ( + IssuesListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -266,7 +296,28 @@ async def list( async def main() -> None: await client.knowledgebase.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) diff --git a/src/merge/resources/knowledgebase/resources/issues/raw_client.py b/src/merge/resources/knowledgebase/resources/issues/raw_client.py index c568a658..14652d5d 100644 --- a/src/merge/resources/knowledgebase/resources/issues/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/issues/raw_client.py @@ -75,7 +75,7 @@ def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -234,7 +234,7 @@ async def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time diff --git a/src/merge/resources/knowledgebase/resources/link_token/__init__.py b/src/merge/resources/knowledgebase/resources/link_token/__init__.py index 3bad6adf..be8c3839 100644 --- a/src/merge/resources/knowledgebase/resources/link_token/__init__.py +++ b/src/merge/resources/knowledgebase/resources/link_token/__init__.py @@ -6,8 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import EndUserDetailsRequestLanguage -_dynamic_imports: typing.Dict[str, str] = {"EndUserDetailsRequestLanguage": ".types"} + from .types import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".types", + "EndUserDetailsRequestLanguage": ".types", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +32,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["EndUserDetailsRequestLanguage"] +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/knowledgebase/resources/link_token/client.py b/src/merge/resources/knowledgebase/resources/link_token/client.py index 91cf9d2e..3eb69c7c 100644 --- a/src/merge/resources/knowledgebase/resources/link_token/client.py +++ b/src/merge/resources/knowledgebase/resources/link_token/client.py @@ -9,6 +9,9 @@ from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest from ...types.link_token import LinkToken from .raw_client import AsyncRawLinkTokenClient, RawLinkTokenClient +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) from .types.end_user_details_request_language import EndUserDetailsRequestLanguage # this is used as the default value for optional parameters @@ -48,6 +51,7 @@ def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -97,6 +101,11 @@ def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -135,6 +144,7 @@ def create( language=language, are_syncs_disabled=are_syncs_disabled, integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, request_options=request_options, ) return _response.data @@ -173,6 +183,7 @@ async def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -222,6 +233,11 @@ async def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -268,6 +284,7 @@ async def main() -> None: language=language, are_syncs_disabled=are_syncs_disabled, integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, request_options=request_options, ) return _response.data diff --git a/src/merge/resources/knowledgebase/resources/link_token/raw_client.py b/src/merge/resources/knowledgebase/resources/link_token/raw_client.py index 95e153e2..fad77f74 100644 --- a/src/merge/resources/knowledgebase/resources/link_token/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/link_token/raw_client.py @@ -12,6 +12,9 @@ from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest from ...types.link_token import LinkToken +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) from .types.end_user_details_request_language import EndUserDetailsRequestLanguage # this is used as the default value for optional parameters @@ -40,6 +43,7 @@ def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[LinkToken]: """ @@ -89,6 +93,11 @@ def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -114,6 +123,7 @@ def create( "language": language, "are_syncs_disabled": are_syncs_disabled, "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, }, headers={ "content-type": "application/json", @@ -159,6 +169,7 @@ async def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[LinkToken]: """ @@ -208,6 +219,11 @@ async def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -233,6 +249,7 @@ async def create( "language": language, "are_syncs_disabled": are_syncs_disabled, "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, }, headers={ "content-type": "application/json", diff --git a/src/merge/resources/knowledgebase/resources/link_token/types/__init__.py b/src/merge/resources/knowledgebase/resources/link_token/types/__init__.py index e9a7d3b9..55cc1d4e 100644 --- a/src/merge/resources/knowledgebase/resources/link_token/types/__init__.py +++ b/src/merge/resources/knowledgebase/resources/link_token/types/__init__.py @@ -6,8 +6,14 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, + ) from .end_user_details_request_language import EndUserDetailsRequestLanguage -_dynamic_imports: typing.Dict[str, str] = {"EndUserDetailsRequestLanguage": ".end_user_details_request_language"} +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".end_user_details_request_completed_account_initial_screen", + "EndUserDetailsRequestLanguage": ".end_user_details_request_language", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["EndUserDetailsRequestLanguage"] +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/knowledgebase/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py b/src/merge/resources/knowledgebase/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py new file mode 100644 index 00000000..0c5d586d --- /dev/null +++ b/src/merge/resources/knowledgebase/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.completed_account_initial_screen_enum import CompletedAccountInitialScreenEnum + +EndUserDetailsRequestCompletedAccountInitialScreen = typing.Union[CompletedAccountInitialScreenEnum, str] diff --git a/src/merge/resources/knowledgebase/resources/linked_accounts/client.py b/src/merge/resources/knowledgebase/resources/linked_accounts/client.py index 53ef5fa2..58aff4bc 100644 --- a/src/merge/resources/knowledgebase/resources/linked_accounts/client.py +++ b/src/merge/resources/knowledgebase/resources/linked_accounts/client.py @@ -89,7 +89,7 @@ def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -105,13 +105,28 @@ def list( Examples -------- from merge import Merge + from merge.resources.knowledgebase.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.knowledgebase.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) """ _response = self._raw_client.list( @@ -213,7 +228,7 @@ async def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -231,6 +246,9 @@ async def list( import asyncio from merge import AsyncMerge + from merge.resources.knowledgebase.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -240,7 +258,19 @@ async def list( async def main() -> None: await client.knowledgebase.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) diff --git a/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py b/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py index 85effb94..8f51faac 100644 --- a/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py @@ -81,7 +81,7 @@ def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -199,7 +199,7 @@ async def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` diff --git a/src/merge/resources/knowledgebase/resources/sync_status/client.py b/src/merge/resources/knowledgebase/resources/sync_status/client.py index 1d2aa5e9..5dc61338 100644 --- a/src/merge/resources/knowledgebase/resources/sync_status/client.py +++ b/src/merge/resources/knowledgebase/resources/sync_status/client.py @@ -39,7 +39,7 @@ def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -59,6 +59,7 @@ def list( ) client.knowledgebase.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) """ _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) @@ -96,7 +97,7 @@ async def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -121,6 +122,7 @@ async def list( async def main() -> None: await client.knowledgebase.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) diff --git a/src/merge/resources/knowledgebase/resources/sync_status/raw_client.py b/src/merge/resources/knowledgebase/resources/sync_status/raw_client.py index d19287b2..9a9760cd 100644 --- a/src/merge/resources/knowledgebase/resources/sync_status/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/sync_status/raw_client.py @@ -31,7 +31,7 @@ def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -86,7 +86,7 @@ async def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/merge/resources/knowledgebase/resources/users/client.py b/src/merge/resources/knowledgebase/resources/users/client.py index 8ac8e82c..88089fd5 100644 --- a/src/merge/resources/knowledgebase/resources/users/client.py +++ b/src/merge/resources/knowledgebase/resources/users/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.knowledgebase.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.knowledgebase.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.knowledgebase.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.knowledgebase.users.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/knowledgebase/resources/users/raw_client.py b/src/merge/resources/knowledgebase/resources/users/raw_client.py index c44e59f5..0cf2bc46 100644 --- a/src/merge/resources/knowledgebase/resources/users/raw_client.py +++ b/src/merge/resources/knowledgebase/resources/users/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/__init__.py b/src/merge/resources/ticketing/__init__.py index 98e3e1dc..13477e7f 100644 --- a/src/merge/resources/ticketing/__init__.py +++ b/src/merge/resources/ticketing/__init__.py @@ -46,6 +46,7 @@ CommentUser, CommonModelScopeApi, CommonModelScopesBodyRequest, + CompletedAccountInitialScreenEnum, Contact, ContactAccount, ContactRequest, @@ -181,9 +182,11 @@ ) from .resources import ( AsyncPassthroughRetrieveResponse, + CollectionsListRequestCollectionType, CollectionsViewersListRequestExpand, CommentsListRequestExpand, CommentsRetrieveRequestExpand, + EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage, IssuesListRequestStatus, LinkedAccountsListRequestCategory, @@ -192,6 +195,7 @@ TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, + TicketsListRequestStatus, TicketsRetrieveRequestExpand, TicketsRetrieveRequestRemoteFields, TicketsRetrieveRequestShowEnumOrigins, @@ -257,6 +261,7 @@ "CollectionCollectionType": ".types", "CollectionParentCollection": ".types", "CollectionTypeEnum": ".types", + "CollectionsListRequestCollectionType": ".resources", "CollectionsViewersListRequestExpand": ".resources", "Comment": ".types", "CommentContact": ".types", @@ -271,6 +276,7 @@ "CommentsRetrieveRequestExpand": ".resources", "CommonModelScopeApi": ".types", "CommonModelScopesBodyRequest": ".types", + "CompletedAccountInitialScreenEnum": ".types", "Contact": ".types", "ContactAccount": ".types", "ContactRequest": ".types", @@ -280,6 +286,7 @@ "DebugModelLogSummary": ".types", "EnabledActionsEnum": ".types", "EncodingEnum": ".types", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".resources", "EndUserDetailsRequestLanguage": ".resources", "ErrorValidationProblem": ".types", "EventTypeEnum": ".types", @@ -402,6 +409,7 @@ "TicketsListRequestPriority": ".resources", "TicketsListRequestRemoteFields": ".resources", "TicketsListRequestShowEnumOrigins": ".resources", + "TicketsListRequestStatus": ".resources", "TicketsRetrieveRequestExpand": ".resources", "TicketsRetrieveRequestRemoteFields": ".resources", "TicketsRetrieveRequestShowEnumOrigins": ".resources", @@ -497,6 +505,7 @@ def __dir__(): "CollectionCollectionType", "CollectionParentCollection", "CollectionTypeEnum", + "CollectionsListRequestCollectionType", "CollectionsViewersListRequestExpand", "Comment", "CommentContact", @@ -511,6 +520,7 @@ def __dir__(): "CommentsRetrieveRequestExpand", "CommonModelScopeApi", "CommonModelScopesBodyRequest", + "CompletedAccountInitialScreenEnum", "Contact", "ContactAccount", "ContactRequest", @@ -520,6 +530,7 @@ def __dir__(): "DebugModelLogSummary", "EnabledActionsEnum", "EncodingEnum", + "EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage", "ErrorValidationProblem", "EventTypeEnum", @@ -642,6 +653,7 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", + "TicketsListRequestStatus", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/__init__.py b/src/merge/resources/ticketing/resources/__init__.py index 2b7a4157..801852a6 100644 --- a/src/merge/resources/ticketing/resources/__init__.py +++ b/src/merge/resources/ticketing/resources/__init__.py @@ -37,10 +37,10 @@ webhook_receivers, ) from .async_passthrough import AsyncPassthroughRetrieveResponse - from .collections import CollectionsViewersListRequestExpand + from .collections import CollectionsListRequestCollectionType, CollectionsViewersListRequestExpand from .comments import CommentsListRequestExpand, CommentsRetrieveRequestExpand from .issues import IssuesListRequestStatus - from .link_token import EndUserDetailsRequestLanguage + from .link_token import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage from .linked_accounts import LinkedAccountsListRequestCategory from .projects import ProjectsUsersListRequestExpand from .tickets import ( @@ -48,6 +48,7 @@ TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, + TicketsListRequestStatus, TicketsRetrieveRequestExpand, TicketsRetrieveRequestRemoteFields, TicketsRetrieveRequestShowEnumOrigins, @@ -56,9 +57,11 @@ from .users import UsersListRequestExpand, UsersRetrieveRequestExpand _dynamic_imports: typing.Dict[str, str] = { "AsyncPassthroughRetrieveResponse": ".async_passthrough", + "CollectionsListRequestCollectionType": ".collections", "CollectionsViewersListRequestExpand": ".collections", "CommentsListRequestExpand": ".comments", "CommentsRetrieveRequestExpand": ".comments", + "EndUserDetailsRequestCompletedAccountInitialScreen": ".link_token", "EndUserDetailsRequestLanguage": ".link_token", "IssuesListRequestStatus": ".issues", "LinkedAccountsListRequestCategory": ".linked_accounts", @@ -67,6 +70,7 @@ "TicketsListRequestPriority": ".tickets", "TicketsListRequestRemoteFields": ".tickets", "TicketsListRequestShowEnumOrigins": ".tickets", + "TicketsListRequestStatus": ".tickets", "TicketsRetrieveRequestExpand": ".tickets", "TicketsRetrieveRequestRemoteFields": ".tickets", "TicketsRetrieveRequestShowEnumOrigins": ".tickets", @@ -125,9 +129,11 @@ def __dir__(): __all__ = [ "AsyncPassthroughRetrieveResponse", + "CollectionsListRequestCollectionType", "CollectionsViewersListRequestExpand", "CommentsListRequestExpand", "CommentsRetrieveRequestExpand", + "EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage", "IssuesListRequestStatus", "LinkedAccountsListRequestCategory", @@ -136,6 +142,7 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", + "TicketsListRequestStatus", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/accounts/client.py b/src/merge/resources/ticketing/resources/accounts/client.py index 0eb93e75..86947a64 100644 --- a/src/merge/resources/ticketing/resources/accounts/client.py +++ b/src/merge/resources/ticketing/resources/accounts/client.py @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.accounts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.ticketing.accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.ticketing.accounts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.ticketing.accounts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/attachments/client.py b/src/merge/resources/ticketing/resources/attachments/client.py index ff82e3cf..8b5be527 100644 --- a/src/merge/resources/ticketing/resources/attachments/client.py +++ b/src/merge/resources/ticketing/resources/attachments/client.py @@ -82,7 +82,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return attachments created in the third party platform after this datetime. @@ -103,6 +103,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -110,7 +112,28 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.attachments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + ticket_id="ticket_id", ) """ _response = self._raw_client.list( @@ -170,6 +193,8 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.attachments.create( + is_debug_mode=True, + run_async=True, model=AttachmentRequest(), ) """ @@ -221,6 +246,8 @@ def retrieve( ) client.ticketing.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -360,7 +387,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return attachments created in the third party platform after this datetime. @@ -382,6 +409,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -393,7 +421,28 @@ async def list( async def main() -> None: await client.ticketing.attachments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + ticket_id="ticket_id", ) @@ -461,6 +510,8 @@ async def create( async def main() -> None: await client.ticketing.attachments.create( + is_debug_mode=True, + run_async=True, model=AttachmentRequest(), ) @@ -520,6 +571,8 @@ async def retrieve( async def main() -> None: await client.ticketing.attachments.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/attachments/raw_client.py b/src/merge/resources/ticketing/resources/attachments/raw_client.py index afdeba4a..c98707ce 100644 --- a/src/merge/resources/ticketing/resources/attachments/raw_client.py +++ b/src/merge/resources/ticketing/resources/attachments/raw_client.py @@ -77,7 +77,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return attachments created in the third party platform after this datetime. @@ -400,7 +400,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return attachments created in the third party platform after this datetime. diff --git a/src/merge/resources/ticketing/resources/audit_trail/client.py b/src/merge/resources/ticketing/resources/audit_trail/client.py index 40225482..900cda44 100644 --- a/src/merge/resources/ticketing/resources/audit_trail/client.py +++ b/src/merge/resources/ticketing/resources/audit_trail/client.py @@ -49,7 +49,7 @@ def list( 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` page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include audit trail events that occurred after this time @@ -75,6 +75,11 @@ def list( ) client.ticketing.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) """ _response = self._raw_client.list( @@ -130,7 +135,7 @@ async def list( 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` page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include audit trail events that occurred after this time @@ -161,6 +166,11 @@ async def list( async def main() -> None: await client.ticketing.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) diff --git a/src/merge/resources/ticketing/resources/audit_trail/raw_client.py b/src/merge/resources/ticketing/resources/audit_trail/raw_client.py index 57b0895b..6960431a 100644 --- a/src/merge/resources/ticketing/resources/audit_trail/raw_client.py +++ b/src/merge/resources/ticketing/resources/audit_trail/raw_client.py @@ -41,7 +41,7 @@ def list( 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` page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include audit trail events that occurred after this time @@ -116,7 +116,7 @@ async def list( 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` page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include audit trail events that occurred after this time diff --git a/src/merge/resources/ticketing/resources/collections/__init__.py b/src/merge/resources/ticketing/resources/collections/__init__.py index 6c97d632..7b5531f7 100644 --- a/src/merge/resources/ticketing/resources/collections/__init__.py +++ b/src/merge/resources/ticketing/resources/collections/__init__.py @@ -6,8 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import CollectionsViewersListRequestExpand -_dynamic_imports: typing.Dict[str, str] = {"CollectionsViewersListRequestExpand": ".types"} + from .types import CollectionsListRequestCollectionType, CollectionsViewersListRequestExpand +_dynamic_imports: typing.Dict[str, str] = { + "CollectionsListRequestCollectionType": ".types", + "CollectionsViewersListRequestExpand": ".types", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +32,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["CollectionsViewersListRequestExpand"] +__all__ = ["CollectionsListRequestCollectionType", "CollectionsViewersListRequestExpand"] diff --git a/src/merge/resources/ticketing/resources/collections/client.py b/src/merge/resources/ticketing/resources/collections/client.py index 11d7f2b2..8a54426f 100644 --- a/src/merge/resources/ticketing/resources/collections/client.py +++ b/src/merge/resources/ticketing/resources/collections/client.py @@ -9,6 +9,7 @@ from ...types.paginated_collection_list import PaginatedCollectionList from ...types.paginated_viewer_list import PaginatedViewerList from .raw_client import AsyncRawCollectionsClient, RawCollectionsClient +from .types.collections_list_request_collection_type import CollectionsListRequestCollectionType from .types.collections_viewers_list_request_expand import CollectionsViewersListRequestExpand @@ -30,7 +31,7 @@ def with_raw_response(self) -> RawCollectionsClient: def list( self, *, - collection_type: typing.Optional[str] = None, + collection_type: typing.Optional[CollectionsListRequestCollectionType] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -53,7 +54,7 @@ def list( Parameters ---------- - collection_type : typing.Optional[str] + collection_type : typing.Optional[CollectionsListRequestCollectionType] If provided, will only return collections of the given type. created_after : typing.Optional[dt.datetime] @@ -87,7 +88,7 @@ def list( If provided, will only return collections with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_collection_id : typing.Optional[str] If provided, will only return collections whose parent collection matches the given id. @@ -111,14 +112,39 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ticketing.resources.collections import ( + CollectionsListRequestCollectionType, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.collections.list( + collection_type=CollectionsListRequestCollectionType.EMPTY, + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_collection_id="parent_collection_id", + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -190,6 +216,9 @@ def viewers_list( Examples -------- from merge import Merge + from merge.resources.ticketing.resources.collections import ( + CollectionsViewersListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -198,6 +227,11 @@ def viewers_list( client.ticketing.collections.viewers_list( collection_id="collection_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CollectionsViewersListRequestExpand.TEAM, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.viewers_list( @@ -263,6 +297,8 @@ def retrieve( ) client.ticketing.collections.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -295,7 +331,7 @@ def with_raw_response(self) -> AsyncRawCollectionsClient: async def list( self, *, - collection_type: typing.Optional[str] = None, + collection_type: typing.Optional[CollectionsListRequestCollectionType] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -318,7 +354,7 @@ async def list( Parameters ---------- - collection_type : typing.Optional[str] + collection_type : typing.Optional[CollectionsListRequestCollectionType] If provided, will only return collections of the given type. created_after : typing.Optional[dt.datetime] @@ -352,7 +388,7 @@ async def list( If provided, will only return collections with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_collection_id : typing.Optional[str] If provided, will only return collections whose parent collection matches the given id. @@ -377,8 +413,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ticketing.resources.collections import ( + CollectionsListRequestCollectionType, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -388,7 +428,27 @@ async def list( async def main() -> None: await client.ticketing.collections.list( + collection_type=CollectionsListRequestCollectionType.EMPTY, + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_collection_id="parent_collection_id", + remote_id="remote_id", ) @@ -465,6 +525,9 @@ async def viewers_list( import asyncio from merge import AsyncMerge + from merge.resources.ticketing.resources.collections import ( + CollectionsViewersListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -476,6 +539,11 @@ async def main() -> None: await client.ticketing.collections.viewers_list( collection_id="collection_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CollectionsViewersListRequestExpand.TEAM, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) @@ -549,6 +617,8 @@ async def retrieve( async def main() -> None: await client.ticketing.collections.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/collections/raw_client.py b/src/merge/resources/ticketing/resources/collections/raw_client.py index c6e9c765..d44a6e8f 100644 --- a/src/merge/resources/ticketing/resources/collections/raw_client.py +++ b/src/merge/resources/ticketing/resources/collections/raw_client.py @@ -14,6 +14,7 @@ from ...types.collection import Collection from ...types.paginated_collection_list import PaginatedCollectionList from ...types.paginated_viewer_list import PaginatedViewerList +from .types.collections_list_request_collection_type import CollectionsListRequestCollectionType from .types.collections_viewers_list_request_expand import CollectionsViewersListRequestExpand @@ -24,7 +25,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - collection_type: typing.Optional[str] = None, + collection_type: typing.Optional[CollectionsListRequestCollectionType] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -47,7 +48,7 @@ def list( Parameters ---------- - collection_type : typing.Optional[str] + collection_type : typing.Optional[CollectionsListRequestCollectionType] If provided, will only return collections of the given type. created_after : typing.Optional[dt.datetime] @@ -81,7 +82,7 @@ def list( If provided, will only return collections with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_collection_id : typing.Optional[str] If provided, will only return collections whose parent collection matches the given id. @@ -290,7 +291,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - collection_type: typing.Optional[str] = None, + collection_type: typing.Optional[CollectionsListRequestCollectionType] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -313,7 +314,7 @@ async def list( Parameters ---------- - collection_type : typing.Optional[str] + collection_type : typing.Optional[CollectionsListRequestCollectionType] If provided, will only return collections of the given type. created_after : typing.Optional[dt.datetime] @@ -347,7 +348,7 @@ async def list( If provided, will only return collections with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_collection_id : typing.Optional[str] If provided, will only return collections whose parent collection matches the given id. diff --git a/src/merge/resources/ticketing/resources/collections/types/__init__.py b/src/merge/resources/ticketing/resources/collections/types/__init__.py index d0b5675c..e0b3499d 100644 --- a/src/merge/resources/ticketing/resources/collections/types/__init__.py +++ b/src/merge/resources/ticketing/resources/collections/types/__init__.py @@ -6,9 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .collections_list_request_collection_type import CollectionsListRequestCollectionType from .collections_viewers_list_request_expand import CollectionsViewersListRequestExpand _dynamic_imports: typing.Dict[str, str] = { - "CollectionsViewersListRequestExpand": ".collections_viewers_list_request_expand" + "CollectionsListRequestCollectionType": ".collections_list_request_collection_type", + "CollectionsViewersListRequestExpand": ".collections_viewers_list_request_expand", } @@ -31,4 +33,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["CollectionsViewersListRequestExpand"] +__all__ = ["CollectionsListRequestCollectionType", "CollectionsViewersListRequestExpand"] diff --git a/src/merge/resources/ticketing/resources/collections/types/collections_list_request_collection_type.py b/src/merge/resources/ticketing/resources/collections/types/collections_list_request_collection_type.py new file mode 100644 index 00000000..131be5b6 --- /dev/null +++ b/src/merge/resources/ticketing/resources/collections/types/collections_list_request_collection_type.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class CollectionsListRequestCollectionType(str, enum.Enum): + EMPTY = "" + LIST = "LIST" + PROJECT = "PROJECT" + + def visit( + self, + empty: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], + project: typing.Callable[[], T_Result], + ) -> T_Result: + if self is CollectionsListRequestCollectionType.EMPTY: + return empty() + if self is CollectionsListRequestCollectionType.LIST: + return list_() + if self is CollectionsListRequestCollectionType.PROJECT: + return project() diff --git a/src/merge/resources/ticketing/resources/comments/client.py b/src/merge/resources/ticketing/resources/comments/client.py index 179ad2a1..73fa1ee6 100644 --- a/src/merge/resources/ticketing/resources/comments/client.py +++ b/src/merge/resources/ticketing/resources/comments/client.py @@ -84,7 +84,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return Comments created in the third party platform after this datetime. @@ -105,14 +105,41 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ticketing.resources.comments import ( + CommentsListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.comments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CommentsListRequestExpand.CONTACT, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + ticket_id="ticket_id", ) """ _response = self._raw_client.list( @@ -172,6 +199,8 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.comments.create( + is_debug_mode=True, + run_async=True, model=CommentRequest(), ) """ @@ -216,6 +245,9 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ticketing.resources.comments import ( + CommentsRetrieveRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -223,6 +255,9 @@ def retrieve( ) client.ticketing.comments.retrieve( id="id", + expand=CommentsRetrieveRequestExpand.CONTACT, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -328,7 +363,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return Comments created in the third party platform after this datetime. @@ -350,8 +385,12 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ticketing.resources.comments import ( + CommentsListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -361,7 +400,29 @@ async def list( async def main() -> None: await client.ticketing.comments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=CommentsListRequestExpand.CONTACT, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_id="remote_id", + ticket_id="ticket_id", ) @@ -429,6 +490,8 @@ async def create( async def main() -> None: await client.ticketing.comments.create( + is_debug_mode=True, + run_async=True, model=CommentRequest(), ) @@ -478,6 +541,9 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ticketing.resources.comments import ( + CommentsRetrieveRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -488,6 +554,9 @@ async def retrieve( async def main() -> None: await client.ticketing.comments.retrieve( id="id", + expand=CommentsRetrieveRequestExpand.CONTACT, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/comments/raw_client.py b/src/merge/resources/ticketing/resources/comments/raw_client.py index 0cbef575..b4c11960 100644 --- a/src/merge/resources/ticketing/resources/comments/raw_client.py +++ b/src/merge/resources/ticketing/resources/comments/raw_client.py @@ -78,7 +78,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return Comments created in the third party platform after this datetime. @@ -344,7 +344,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_created_after : typing.Optional[dt.datetime] If provided, will only return Comments created in the third party platform after this datetime. diff --git a/src/merge/resources/ticketing/resources/contacts/client.py b/src/merge/resources/ticketing/resources/contacts/client.py index 2b29b8c0..7d63c6f3 100644 --- a/src/merge/resources/ticketing/resources/contacts/client.py +++ b/src/merge/resources/ticketing/resources/contacts/client.py @@ -84,7 +84,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -99,6 +99,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -106,7 +108,25 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.contacts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -165,6 +185,8 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) """ @@ -216,6 +238,8 @@ def retrieve( ) client.ticketing.contacts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -323,7 +347,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -339,6 +363,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -350,7 +375,25 @@ async def list( async def main() -> None: await client.ticketing.contacts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -417,6 +460,8 @@ async def create( async def main() -> None: await client.ticketing.contacts.create( + is_debug_mode=True, + run_async=True, model=ContactRequest(), ) @@ -476,6 +521,8 @@ async def retrieve( async def main() -> None: await client.ticketing.contacts.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/contacts/raw_client.py b/src/merge/resources/ticketing/resources/contacts/raw_client.py index 2ba84bbb..d4f89160 100644 --- a/src/merge/resources/ticketing/resources/contacts/raw_client.py +++ b/src/merge/resources/ticketing/resources/contacts/raw_client.py @@ -78,7 +78,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -337,7 +337,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/resources/field_mapping/client.py b/src/merge/resources/ticketing/resources/field_mapping/client.py index ef095879..8cbd3674 100644 --- a/src/merge/resources/ticketing/resources/field_mapping/client.py +++ b/src/merge/resources/ticketing/resources/field_mapping/client.py @@ -59,7 +59,9 @@ def field_mappings_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.field_mapping.field_mappings_retrieve() + client.ticketing.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) """ _response = self._raw_client.field_mappings_retrieve( exclude_remote_field_metadata=exclude_remote_field_metadata, request_options=request_options @@ -76,6 +78,7 @@ def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -104,6 +107,9 @@ def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -121,6 +127,7 @@ def field_mappings_create( api_key="YOUR_API_KEY", ) client.ticketing.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -137,6 +144,7 @@ def field_mappings_create( remote_url_path=remote_url_path, common_model_name=common_model_name, exclude_remote_field_metadata=exclude_remote_field_metadata, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -181,6 +189,7 @@ def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -199,6 +208,9 @@ def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -224,6 +236,7 @@ def field_mappings_partial_update( remote_field_traversal_path=remote_field_traversal_path, remote_method=remote_method, remote_url_path=remote_url_path, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -262,7 +275,10 @@ def remote_fields_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.field_mapping.remote_fields_retrieve() + client.ticketing.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) """ _response = self._raw_client.remote_fields_retrieve( common_models=common_models, include_example_values=include_example_values, request_options=request_options @@ -349,7 +365,9 @@ async def field_mappings_retrieve( async def main() -> None: - await client.ticketing.field_mapping.field_mappings_retrieve() + await client.ticketing.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, + ) asyncio.run(main()) @@ -369,6 +387,7 @@ async def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -397,6 +416,9 @@ async def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -419,6 +441,7 @@ async def field_mappings_create( async def main() -> None: await client.ticketing.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -438,6 +461,7 @@ async def main() -> None: remote_url_path=remote_url_path, common_model_name=common_model_name, exclude_remote_field_metadata=exclude_remote_field_metadata, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -490,6 +514,7 @@ async def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: """ @@ -508,6 +533,9 @@ async def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -541,6 +569,7 @@ async def main() -> None: remote_field_traversal_path=remote_field_traversal_path, remote_method=remote_method, remote_url_path=remote_url_path, + jmes_path=jmes_path, request_options=request_options, ) return _response.data @@ -584,7 +613,10 @@ async def remote_fields_retrieve( async def main() -> None: - await client.ticketing.field_mapping.remote_fields_retrieve() + await client.ticketing.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", + ) asyncio.run(main()) diff --git a/src/merge/resources/ticketing/resources/field_mapping/raw_client.py b/src/merge/resources/ticketing/resources/field_mapping/raw_client.py index ebbc08e8..1609c8ac 100644 --- a/src/merge/resources/ticketing/resources/field_mapping/raw_client.py +++ b/src/merge/resources/ticketing/resources/field_mapping/raw_client.py @@ -77,6 +77,7 @@ def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[FieldMappingInstanceResponse]: """ @@ -105,6 +106,9 @@ def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -126,6 +130,7 @@ def field_mappings_create( "remote_method": remote_method, "remote_url_path": remote_url_path, "common_model_name": common_model_name, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", @@ -193,6 +198,7 @@ def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[FieldMappingInstanceResponse]: """ @@ -211,6 +217,9 @@ def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -226,6 +235,7 @@ def field_mappings_partial_update( "remote_field_traversal_path": remote_field_traversal_path, "remote_method": remote_method, "remote_url_path": remote_url_path, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", @@ -394,6 +404,7 @@ async def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: """ @@ -422,6 +433,9 @@ async def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] 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. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -443,6 +457,7 @@ async def field_mappings_create( "remote_method": remote_method, "remote_url_path": remote_url_path, "common_model_name": common_model_name, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", @@ -510,6 +525,7 @@ async def field_mappings_partial_update( remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, + jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: """ @@ -528,6 +544,9 @@ async def field_mappings_partial_update( remote_url_path : typing.Optional[str] The path of the remote endpoint where the remote field is coming from. + jmes_path : typing.Optional[str] + JMES path to specify json query expression to be used on field mapping. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -543,6 +562,7 @@ async def field_mappings_partial_update( "remote_field_traversal_path": remote_field_traversal_path, "remote_method": remote_method, "remote_url_path": remote_url_path, + "jmes_path": jmes_path, }, headers={ "content-type": "application/json", diff --git a/src/merge/resources/ticketing/resources/issues/client.py b/src/merge/resources/ticketing/resources/issues/client.py index 24550de7..d5bd9179 100644 --- a/src/merge/resources/ticketing/resources/issues/client.py +++ b/src/merge/resources/ticketing/resources/issues/client.py @@ -81,7 +81,7 @@ def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -102,14 +102,38 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ticketing.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) """ _response = self._raw_client.list( @@ -233,7 +257,7 @@ async def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -255,8 +279,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ticketing.resources.issues import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -266,7 +292,28 @@ async def list( async def main() -> None: await client.ticketing.issues.list( + account_token="account_token", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) diff --git a/src/merge/resources/ticketing/resources/issues/raw_client.py b/src/merge/resources/ticketing/resources/issues/raw_client.py index 6e00cb0b..09986b0c 100644 --- a/src/merge/resources/ticketing/resources/issues/raw_client.py +++ b/src/merge/resources/ticketing/resources/issues/raw_client.py @@ -75,7 +75,7 @@ def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time @@ -234,7 +234,7 @@ async def list( If provided, will only include issues pertaining to the linked account passed in. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. start_date : typing.Optional[str] If included, will only include issues whose most recent action occurred after this time diff --git a/src/merge/resources/ticketing/resources/link_token/__init__.py b/src/merge/resources/ticketing/resources/link_token/__init__.py index 3bad6adf..be8c3839 100644 --- a/src/merge/resources/ticketing/resources/link_token/__init__.py +++ b/src/merge/resources/ticketing/resources/link_token/__init__.py @@ -6,8 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import EndUserDetailsRequestLanguage -_dynamic_imports: typing.Dict[str, str] = {"EndUserDetailsRequestLanguage": ".types"} + from .types import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".types", + "EndUserDetailsRequestLanguage": ".types", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +32,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["EndUserDetailsRequestLanguage"] +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/ticketing/resources/link_token/client.py b/src/merge/resources/ticketing/resources/link_token/client.py index db048de5..9dba6f77 100644 --- a/src/merge/resources/ticketing/resources/link_token/client.py +++ b/src/merge/resources/ticketing/resources/link_token/client.py @@ -9,6 +9,9 @@ from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest from ...types.link_token import LinkToken from .raw_client import AsyncRawLinkTokenClient, RawLinkTokenClient +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) from .types.end_user_details_request_language import EndUserDetailsRequestLanguage # this is used as the default value for optional parameters @@ -48,6 +51,7 @@ def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -97,6 +101,11 @@ def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -135,6 +144,7 @@ def create( language=language, are_syncs_disabled=are_syncs_disabled, integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, request_options=request_options, ) return _response.data @@ -173,6 +183,7 @@ async def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -222,6 +233,11 @@ async def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -268,6 +284,7 @@ async def main() -> None: language=language, are_syncs_disabled=are_syncs_disabled, integration_specific_config=integration_specific_config, + completed_account_initial_screen=completed_account_initial_screen, request_options=request_options, ) return _response.data diff --git a/src/merge/resources/ticketing/resources/link_token/raw_client.py b/src/merge/resources/ticketing/resources/link_token/raw_client.py index 8095d3d1..b93faced 100644 --- a/src/merge/resources/ticketing/resources/link_token/raw_client.py +++ b/src/merge/resources/ticketing/resources/link_token/raw_client.py @@ -12,6 +12,9 @@ from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest from ...types.link_token import LinkToken +from .types.end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, +) from .types.end_user_details_request_language import EndUserDetailsRequestLanguage # this is used as the default value for optional parameters @@ -40,6 +43,7 @@ def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[LinkToken]: """ @@ -89,6 +93,11 @@ def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -114,6 +123,7 @@ def create( "language": language, "are_syncs_disabled": are_syncs_disabled, "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, }, headers={ "content-type": "application/json", @@ -159,6 +169,7 @@ async def create( language: typing.Optional[EndUserDetailsRequestLanguage] = OMIT, are_syncs_disabled: typing.Optional[bool] = OMIT, integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + completed_account_initial_screen: typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[LinkToken]: """ @@ -208,6 +219,11 @@ async def create( integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] A JSON object containing integration-specific configuration options. + completed_account_initial_screen : typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen] + When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + + * `SELECTIVE_SYNC` - SELECTIVE_SYNC + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -233,6 +249,7 @@ async def create( "language": language, "are_syncs_disabled": are_syncs_disabled, "integration_specific_config": integration_specific_config, + "completed_account_initial_screen": completed_account_initial_screen, }, headers={ "content-type": "application/json", diff --git a/src/merge/resources/ticketing/resources/link_token/types/__init__.py b/src/merge/resources/ticketing/resources/link_token/types/__init__.py index e9a7d3b9..55cc1d4e 100644 --- a/src/merge/resources/ticketing/resources/link_token/types/__init__.py +++ b/src/merge/resources/ticketing/resources/link_token/types/__init__.py @@ -6,8 +6,14 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .end_user_details_request_completed_account_initial_screen import ( + EndUserDetailsRequestCompletedAccountInitialScreen, + ) from .end_user_details_request_language import EndUserDetailsRequestLanguage -_dynamic_imports: typing.Dict[str, str] = {"EndUserDetailsRequestLanguage": ".end_user_details_request_language"} +_dynamic_imports: typing.Dict[str, str] = { + "EndUserDetailsRequestCompletedAccountInitialScreen": ".end_user_details_request_completed_account_initial_screen", + "EndUserDetailsRequestLanguage": ".end_user_details_request_language", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["EndUserDetailsRequestLanguage"] +__all__ = ["EndUserDetailsRequestCompletedAccountInitialScreen", "EndUserDetailsRequestLanguage"] diff --git a/src/merge/resources/ticketing/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py b/src/merge/resources/ticketing/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py new file mode 100644 index 00000000..0c5d586d --- /dev/null +++ b/src/merge/resources/ticketing/resources/link_token/types/end_user_details_request_completed_account_initial_screen.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.completed_account_initial_screen_enum import CompletedAccountInitialScreenEnum + +EndUserDetailsRequestCompletedAccountInitialScreen = typing.Union[CompletedAccountInitialScreenEnum, str] diff --git a/src/merge/resources/ticketing/resources/linked_accounts/client.py b/src/merge/resources/ticketing/resources/linked_accounts/client.py index 31a9f3db..59ed7936 100644 --- a/src/merge/resources/ticketing/resources/linked_accounts/client.py +++ b/src/merge/resources/ticketing/resources/linked_accounts/client.py @@ -88,7 +88,7 @@ def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -104,13 +104,28 @@ def list( Examples -------- from merge import Merge + from merge.resources.ticketing.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) """ _response = self._raw_client.list( @@ -211,7 +226,7 @@ async def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -229,6 +244,9 @@ async def list( import asyncio from merge import AsyncMerge + from merge.resources.ticketing.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -238,7 +256,19 @@ async def list( async def main() -> None: await client.ticketing.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) diff --git a/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py b/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py index 30029cec..5526d4f8 100644 --- a/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py +++ b/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py @@ -80,7 +80,7 @@ def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` @@ -197,7 +197,7 @@ async def list( If included, will only include test linked accounts. If not included, will only include non-test linked accounts. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. status : typing.Optional[str] Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` diff --git a/src/merge/resources/ticketing/resources/projects/client.py b/src/merge/resources/ticketing/resources/projects/client.py index edb34c7f..133cfa0d 100644 --- a/src/merge/resources/ticketing/resources/projects/client.py +++ b/src/merge/resources/ticketing/resources/projects/client.py @@ -72,7 +72,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -87,6 +87,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -94,7 +96,24 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.projects.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -151,6 +170,8 @@ def retrieve( ) client.ticketing.projects.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -196,7 +217,7 @@ def users_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -209,6 +230,9 @@ def users_list( Examples -------- from merge import Merge + from merge.resources.ticketing.resources.projects import ( + ProjectsUsersListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -217,6 +241,11 @@ def users_list( client.ticketing.projects.users_list( parent_id="parent_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ProjectsUsersListRequestExpand.ROLES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.users_list( @@ -292,7 +321,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -308,6 +337,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -319,7 +349,24 @@ async def list( async def main() -> None: await client.ticketing.projects.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -384,6 +431,8 @@ async def retrieve( async def main() -> None: await client.ticketing.projects.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) @@ -432,7 +481,7 @@ async def users_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -447,6 +496,9 @@ async def users_list( import asyncio from merge import AsyncMerge + from merge.resources.ticketing.resources.projects import ( + ProjectsUsersListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -458,6 +510,11 @@ async def main() -> None: await client.ticketing.projects.users_list( parent_id="parent_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ProjectsUsersListRequestExpand.ROLES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) diff --git a/src/merge/resources/ticketing/resources/projects/raw_client.py b/src/merge/resources/ticketing/resources/projects/raw_client.py index 1feb7fc5..ccc990a5 100644 --- a/src/merge/resources/ticketing/resources/projects/raw_client.py +++ b/src/merge/resources/ticketing/resources/projects/raw_client.py @@ -66,7 +66,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -199,7 +199,7 @@ def users_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -287,7 +287,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -420,7 +420,7 @@ async def users_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/merge/resources/ticketing/resources/roles/client.py b/src/merge/resources/ticketing/resources/roles/client.py index d4c63c42..69432e4c 100644 --- a/src/merge/resources/ticketing/resources/roles/client.py +++ b/src/merge/resources/ticketing/resources/roles/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.roles.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.ticketing.roles.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.ticketing.roles.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.ticketing.roles.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/roles/raw_client.py b/src/merge/resources/ticketing/resources/roles/raw_client.py index cad3a639..5f40ef03 100644 --- a/src/merge/resources/ticketing/resources/roles/raw_client.py +++ b/src/merge/resources/ticketing/resources/roles/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/resources/sync_status/client.py b/src/merge/resources/ticketing/resources/sync_status/client.py index 4e7f6d88..9a69dc0c 100644 --- a/src/merge/resources/ticketing/resources/sync_status/client.py +++ b/src/merge/resources/ticketing/resources/sync_status/client.py @@ -39,7 +39,7 @@ def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -59,6 +59,7 @@ def list( ) client.ticketing.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) """ _response = self._raw_client.list(cursor=cursor, page_size=page_size, request_options=request_options) @@ -96,7 +97,7 @@ async def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -121,6 +122,7 @@ async def list( async def main() -> None: await client.ticketing.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, ) diff --git a/src/merge/resources/ticketing/resources/sync_status/raw_client.py b/src/merge/resources/ticketing/resources/sync_status/raw_client.py index 38d09cc8..0052fc35 100644 --- a/src/merge/resources/ticketing/resources/sync_status/raw_client.py +++ b/src/merge/resources/ticketing/resources/sync_status/raw_client.py @@ -31,7 +31,7 @@ def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -86,7 +86,7 @@ async def list( The pagination cursor value. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/merge/resources/ticketing/resources/tags/client.py b/src/merge/resources/ticketing/resources/tags/client.py index 74abf54f..c6184fb8 100644 --- a/src/merge/resources/ticketing/resources/tags/client.py +++ b/src/merge/resources/ticketing/resources/tags/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.tags.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.ticketing.tags.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.ticketing.tags.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.ticketing.tags.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/tags/raw_client.py b/src/merge/resources/ticketing/resources/tags/raw_client.py index 5172d85c..8a283c5b 100644 --- a/src/merge/resources/ticketing/resources/tags/raw_client.py +++ b/src/merge/resources/ticketing/resources/tags/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/resources/teams/client.py b/src/merge/resources/ticketing/resources/teams/client.py index 625edb78..79af0f1c 100644 --- a/src/merge/resources/ticketing/resources/teams/client.py +++ b/src/merge/resources/ticketing/resources/teams/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -85,6 +85,8 @@ def list( Examples -------- + import datetime + from merge import Merge client = Merge( @@ -92,7 +94,24 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.teams.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) """ _response = self._raw_client.list( @@ -149,6 +168,8 @@ def retrieve( ) client.ticketing.teams.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -220,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -236,6 +257,7 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge @@ -247,7 +269,24 @@ async def list( async def main() -> None: await client.ticketing.teams.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) @@ -312,6 +351,8 @@ async def retrieve( async def main() -> None: await client.ticketing.teams.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/teams/raw_client.py b/src/merge/resources/ticketing/resources/teams/raw_client.py index 246ca9f7..05f6264d 100644 --- a/src/merge/resources/ticketing/resources/teams/raw_client.py +++ b/src/merge/resources/ticketing/resources/teams/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/resources/tickets/__init__.py b/src/merge/resources/ticketing/resources/tickets/__init__.py index 1b4e06b4..564c5c59 100644 --- a/src/merge/resources/ticketing/resources/tickets/__init__.py +++ b/src/merge/resources/ticketing/resources/tickets/__init__.py @@ -11,6 +11,7 @@ TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, + TicketsListRequestStatus, TicketsRetrieveRequestExpand, TicketsRetrieveRequestRemoteFields, TicketsRetrieveRequestShowEnumOrigins, @@ -21,6 +22,7 @@ "TicketsListRequestPriority": ".types", "TicketsListRequestRemoteFields": ".types", "TicketsListRequestShowEnumOrigins": ".types", + "TicketsListRequestStatus": ".types", "TicketsRetrieveRequestExpand": ".types", "TicketsRetrieveRequestRemoteFields": ".types", "TicketsRetrieveRequestShowEnumOrigins": ".types", @@ -52,6 +54,7 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", + "TicketsListRequestStatus", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/tickets/client.py b/src/merge/resources/ticketing/resources/tickets/client.py index fe5cccad..f23cd724 100644 --- a/src/merge/resources/ticketing/resources/tickets/client.py +++ b/src/merge/resources/ticketing/resources/tickets/client.py @@ -18,6 +18,7 @@ from .types.tickets_list_request_priority import TicketsListRequestPriority from .types.tickets_list_request_remote_fields import TicketsListRequestRemoteFields from .types.tickets_list_request_show_enum_origins import TicketsListRequestShowEnumOrigins +from .types.tickets_list_request_status import TicketsListRequestStatus from .types.tickets_retrieve_request_expand import TicketsRetrieveRequestExpand from .types.tickets_retrieve_request_remote_fields import TicketsRetrieveRequestRemoteFields from .types.tickets_retrieve_request_show_enum_origins import TicketsRetrieveRequestShowEnumOrigins @@ -54,6 +55,7 @@ def list( created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, creator_id: typing.Optional[str] = None, + creator_ids: typing.Optional[str] = None, cursor: typing.Optional[str] = None, due_after: typing.Optional[dt.datetime] = None, due_before: typing.Optional[dt.datetime] = None, @@ -75,7 +77,7 @@ def list( remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TicketsListRequestStatus] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -113,6 +115,9 @@ def list( creator_id : typing.Optional[str] If provided, will only return tickets created by this creator_id. + creator_ids : typing.Optional[str] + If provided, will only return tickets created by the creator_ids; multiple creator_ids can be separated by commas. + cursor : typing.Optional[str] The pagination cursor value. @@ -147,7 +152,7 @@ def list( If provided, will only return tickets with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_ticket_id : typing.Optional[str] If provided, will only return sub tickets of the parent_ticket_id. @@ -181,7 +186,7 @@ def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[TicketsListRequestStatus] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -203,14 +208,81 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ticketing.resources.tickets import ( + TicketsListRequestExpand, + TicketsListRequestPriority, + TicketsListRequestRemoteFields, + TicketsListRequestShowEnumOrigins, + TicketsListRequestStatus, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.tickets.list( + account_id="account_id", + assignee_ids="assignee_ids", + collection_ids="collection_ids", + completed_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + completed_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + creator_id="creator_id", + creator_ids="creator_ids", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + due_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + due_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=TicketsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_ticket_id="parent_ticket_id", + priority=TicketsListRequestPriority.HIGH, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_fields=TicketsListRequestRemoteFields.PRIORITY, + remote_id="remote_id", + remote_updated_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_updated_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, + status=TicketsListRequestStatus.EMPTY, + tags="tags", + ticket_type="ticket_type", + ticket_url="ticket_url", ) """ _response = self._raw_client.list( @@ -223,6 +295,7 @@ def list( created_after=created_after, created_before=created_before, creator_id=creator_id, + creator_ids=creator_ids, cursor=cursor, due_after=due_after, due_before=due_before, @@ -291,6 +364,8 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.tickets.create( + is_debug_mode=True, + run_async=True, model=TicketRequest(), ) """ @@ -347,6 +422,11 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ticketing.resources.tickets import ( + TicketsRetrieveRequestExpand, + TicketsRetrieveRequestRemoteFields, + TicketsRetrieveRequestShowEnumOrigins, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -354,6 +434,12 @@ def retrieve( ) client.ticketing.tickets.retrieve( id="id", + expand=TicketsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + remote_fields=TicketsRetrieveRequestRemoteFields.PRIORITY, + show_enum_origins=TicketsRetrieveRequestShowEnumOrigins.PRIORITY, ) """ _response = self._raw_client.retrieve( @@ -411,6 +497,8 @@ def partial_update( ) client.ticketing.tickets.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedTicketRequest(), ) """ @@ -454,7 +542,7 @@ def viewers_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -467,6 +555,9 @@ def viewers_list( Examples -------- from merge import Merge + from merge.resources.ticketing.resources.tickets import ( + TicketsViewersListRequestExpand, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -475,6 +566,11 @@ def viewers_list( client.ticketing.tickets.viewers_list( ticket_id="ticket_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TicketsViewersListRequestExpand.TEAM, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) """ _response = self._raw_client.viewers_list( @@ -554,7 +650,10 @@ def meta_post_retrieve( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.tickets.meta_post_retrieve() + client.ticketing.tickets.meta_post_retrieve( + collection_id="collection_id", + ticket_type="ticket_type", + ) """ _response = self._raw_client.meta_post_retrieve( collection_id=collection_id, ticket_type=ticket_type, request_options=request_options @@ -601,7 +700,7 @@ def remote_field_classes_list( If provided, will only return remote fields classes with this is_custom value page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -621,6 +720,13 @@ def remote_field_classes_list( ) client.ticketing.tickets.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + ids="ids", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) """ _response = self._raw_client.remote_field_classes_list( @@ -664,6 +770,7 @@ async def list( created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, creator_id: typing.Optional[str] = None, + creator_ids: typing.Optional[str] = None, cursor: typing.Optional[str] = None, due_after: typing.Optional[dt.datetime] = None, due_before: typing.Optional[dt.datetime] = None, @@ -685,7 +792,7 @@ async def list( remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TicketsListRequestStatus] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -723,6 +830,9 @@ async def list( creator_id : typing.Optional[str] If provided, will only return tickets created by this creator_id. + creator_ids : typing.Optional[str] + If provided, will only return tickets created by the creator_ids; multiple creator_ids can be separated by commas. + cursor : typing.Optional[str] The pagination cursor value. @@ -757,7 +867,7 @@ async def list( If provided, will only return tickets with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_ticket_id : typing.Optional[str] If provided, will only return sub tickets of the parent_ticket_id. @@ -791,7 +901,7 @@ async def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[TicketsListRequestStatus] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -814,8 +924,16 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ticketing.resources.tickets import ( + TicketsListRequestExpand, + TicketsListRequestPriority, + TicketsListRequestRemoteFields, + TicketsListRequestShowEnumOrigins, + TicketsListRequestStatus, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -825,7 +943,65 @@ async def list( async def main() -> None: await client.ticketing.tickets.list( + account_id="account_id", + assignee_ids="assignee_ids", + collection_ids="collection_ids", + completed_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + completed_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + contact_id="contact_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + creator_id="creator_id", + creator_ids="creator_ids", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + due_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + due_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=TicketsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_ticket_id="parent_ticket_id", + priority=TicketsListRequestPriority.HIGH, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_fields=TicketsListRequestRemoteFields.PRIORITY, + remote_id="remote_id", + remote_updated_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_updated_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, + status=TicketsListRequestStatus.EMPTY, + tags="tags", + ticket_type="ticket_type", + ticket_url="ticket_url", ) @@ -841,6 +1017,7 @@ async def main() -> None: created_after=created_after, created_before=created_before, creator_id=creator_id, + creator_ids=creator_ids, cursor=cursor, due_after=due_after, due_before=due_before, @@ -914,6 +1091,8 @@ async def create( async def main() -> None: await client.ticketing.tickets.create( + is_debug_mode=True, + run_async=True, model=TicketRequest(), ) @@ -975,6 +1154,11 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ticketing.resources.tickets import ( + TicketsRetrieveRequestExpand, + TicketsRetrieveRequestRemoteFields, + TicketsRetrieveRequestShowEnumOrigins, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -985,6 +1169,12 @@ async def retrieve( async def main() -> None: await client.ticketing.tickets.retrieve( id="id", + expand=TicketsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + remote_fields=TicketsRetrieveRequestRemoteFields.PRIORITY, + show_enum_origins=TicketsRetrieveRequestShowEnumOrigins.PRIORITY, ) @@ -1050,6 +1240,8 @@ async def partial_update( async def main() -> None: await client.ticketing.tickets.partial_update( id="id", + is_debug_mode=True, + run_async=True, model=PatchedTicketRequest(), ) @@ -1096,7 +1288,7 @@ async def viewers_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1111,6 +1303,9 @@ async def viewers_list( import asyncio from merge import AsyncMerge + from merge.resources.ticketing.resources.tickets import ( + TicketsViewersListRequestExpand, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -1122,6 +1317,11 @@ async def main() -> None: await client.ticketing.tickets.viewers_list( ticket_id="ticket_id", cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TicketsViewersListRequestExpand.TEAM, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) @@ -1219,7 +1419,10 @@ async def meta_post_retrieve( async def main() -> None: - await client.ticketing.tickets.meta_post_retrieve() + await client.ticketing.tickets.meta_post_retrieve( + collection_id="collection_id", + ticket_type="ticket_type", + ) asyncio.run(main()) @@ -1269,7 +1472,7 @@ async def remote_field_classes_list( If provided, will only return remote fields classes with this is_custom value page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1294,6 +1497,13 @@ async def remote_field_classes_list( async def main() -> None: await client.ticketing.tickets.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + ids="ids", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) diff --git a/src/merge/resources/ticketing/resources/tickets/raw_client.py b/src/merge/resources/ticketing/resources/tickets/raw_client.py index 27ebad8e..b9bb7a0d 100644 --- a/src/merge/resources/ticketing/resources/tickets/raw_client.py +++ b/src/merge/resources/ticketing/resources/tickets/raw_client.py @@ -23,6 +23,7 @@ from .types.tickets_list_request_priority import TicketsListRequestPriority from .types.tickets_list_request_remote_fields import TicketsListRequestRemoteFields from .types.tickets_list_request_show_enum_origins import TicketsListRequestShowEnumOrigins +from .types.tickets_list_request_status import TicketsListRequestStatus from .types.tickets_retrieve_request_expand import TicketsRetrieveRequestExpand from .types.tickets_retrieve_request_remote_fields import TicketsRetrieveRequestRemoteFields from .types.tickets_retrieve_request_show_enum_origins import TicketsRetrieveRequestShowEnumOrigins @@ -48,6 +49,7 @@ def list( created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, creator_id: typing.Optional[str] = None, + creator_ids: typing.Optional[str] = None, cursor: typing.Optional[str] = None, due_after: typing.Optional[dt.datetime] = None, due_before: typing.Optional[dt.datetime] = None, @@ -69,7 +71,7 @@ def list( remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TicketsListRequestStatus] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -107,6 +109,9 @@ def list( creator_id : typing.Optional[str] If provided, will only return tickets created by this creator_id. + creator_ids : typing.Optional[str] + If provided, will only return tickets created by the creator_ids; multiple creator_ids can be separated by commas. + cursor : typing.Optional[str] The pagination cursor value. @@ -141,7 +146,7 @@ def list( If provided, will only return tickets with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_ticket_id : typing.Optional[str] If provided, will only return sub tickets of the parent_ticket_id. @@ -175,7 +180,7 @@ def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[TicketsListRequestStatus] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -208,6 +213,7 @@ def list( "created_after": serialize_datetime(created_after) if created_after is not None else None, "created_before": serialize_datetime(created_before) if created_before is not None else None, "creator_id": creator_id, + "creator_ids": creator_ids, "cursor": cursor, "due_after": serialize_datetime(due_after) if due_after is not None else None, "due_before": serialize_datetime(due_before) if due_before is not None else None, @@ -490,7 +496,7 @@ def viewers_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -656,7 +662,7 @@ def remote_field_classes_list( If provided, will only return remote fields classes with this is_custom value page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -713,6 +719,7 @@ async def list( created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, creator_id: typing.Optional[str] = None, + creator_ids: typing.Optional[str] = None, cursor: typing.Optional[str] = None, due_after: typing.Optional[dt.datetime] = None, due_before: typing.Optional[dt.datetime] = None, @@ -734,7 +741,7 @@ async def list( remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[str] = None, + status: typing.Optional[TicketsListRequestStatus] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -772,6 +779,9 @@ async def list( creator_id : typing.Optional[str] If provided, will only return tickets created by this creator_id. + creator_ids : typing.Optional[str] + If provided, will only return tickets created by the creator_ids; multiple creator_ids can be separated by commas. + cursor : typing.Optional[str] The pagination cursor value. @@ -806,7 +816,7 @@ async def list( If provided, will only return tickets with this name. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. parent_ticket_id : typing.Optional[str] If provided, will only return sub tickets of the parent_ticket_id. @@ -840,7 +850,7 @@ async def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] 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) - status : typing.Optional[str] + status : typing.Optional[TicketsListRequestStatus] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -873,6 +883,7 @@ async def list( "created_after": serialize_datetime(created_after) if created_after is not None else None, "created_before": serialize_datetime(created_before) if created_before is not None else None, "creator_id": creator_id, + "creator_ids": creator_ids, "cursor": cursor, "due_after": serialize_datetime(due_after) if due_after is not None else None, "due_before": serialize_datetime(due_before) if due_before is not None else None, @@ -1155,7 +1166,7 @@ async def viewers_list( Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1321,7 +1332,7 @@ async def remote_field_classes_list( If provided, will only return remote fields classes with this is_custom value page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/merge/resources/ticketing/resources/tickets/types/__init__.py b/src/merge/resources/ticketing/resources/tickets/types/__init__.py index 9853dcf0..af027d4e 100644 --- a/src/merge/resources/ticketing/resources/tickets/types/__init__.py +++ b/src/merge/resources/ticketing/resources/tickets/types/__init__.py @@ -10,6 +10,7 @@ from .tickets_list_request_priority import TicketsListRequestPriority from .tickets_list_request_remote_fields import TicketsListRequestRemoteFields from .tickets_list_request_show_enum_origins import TicketsListRequestShowEnumOrigins + from .tickets_list_request_status import TicketsListRequestStatus from .tickets_retrieve_request_expand import TicketsRetrieveRequestExpand from .tickets_retrieve_request_remote_fields import TicketsRetrieveRequestRemoteFields from .tickets_retrieve_request_show_enum_origins import TicketsRetrieveRequestShowEnumOrigins @@ -19,6 +20,7 @@ "TicketsListRequestPriority": ".tickets_list_request_priority", "TicketsListRequestRemoteFields": ".tickets_list_request_remote_fields", "TicketsListRequestShowEnumOrigins": ".tickets_list_request_show_enum_origins", + "TicketsListRequestStatus": ".tickets_list_request_status", "TicketsRetrieveRequestExpand": ".tickets_retrieve_request_expand", "TicketsRetrieveRequestRemoteFields": ".tickets_retrieve_request_remote_fields", "TicketsRetrieveRequestShowEnumOrigins": ".tickets_retrieve_request_show_enum_origins", @@ -50,6 +52,7 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", + "TicketsListRequestStatus", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py new file mode 100644 index 00000000..edb298e9 --- /dev/null +++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class TicketsListRequestStatus(str, enum.Enum): + EMPTY = "" + CLOSED = "CLOSED" + IN_PROGRESS = "IN_PROGRESS" + ON_HOLD = "ON_HOLD" + OPEN = "OPEN" + + def visit( + self, + empty: typing.Callable[[], T_Result], + closed: typing.Callable[[], T_Result], + in_progress: typing.Callable[[], T_Result], + on_hold: typing.Callable[[], T_Result], + open: typing.Callable[[], T_Result], + ) -> T_Result: + if self is TicketsListRequestStatus.EMPTY: + return empty() + if self is TicketsListRequestStatus.CLOSED: + return closed() + if self is TicketsListRequestStatus.IN_PROGRESS: + return in_progress() + if self is TicketsListRequestStatus.ON_HOLD: + return on_hold() + if self is TicketsListRequestStatus.OPEN: + return open() diff --git a/src/merge/resources/ticketing/resources/users/client.py b/src/merge/resources/ticketing/resources/users/client.py index d770ab9e..69855e85 100644 --- a/src/merge/resources/ticketing/resources/users/client.py +++ b/src/merge/resources/ticketing/resources/users/client.py @@ -81,7 +81,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -99,14 +99,37 @@ def list( Examples -------- + import datetime + from merge import Merge + from merge.resources.ticketing.resources.users import UsersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + expand=UsersListRequestExpand.ROLES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + team="team", ) """ _response = self._raw_client.list( @@ -163,6 +186,7 @@ def retrieve( Examples -------- from merge import Merge + from merge.resources.ticketing.resources.users import UsersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -170,6 +194,9 @@ def retrieve( ) client.ticketing.users.retrieve( id="id", + expand=UsersRetrieveRequestExpand.ROLES, + include_remote_data=True, + include_shell_data=True, ) """ _response = self._raw_client.retrieve( @@ -251,7 +278,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -270,8 +297,10 @@ async def list( Examples -------- import asyncio + import datetime from merge import AsyncMerge + from merge.resources.ticketing.resources.users import UsersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -281,7 +310,27 @@ async def list( async def main() -> None: await client.ticketing.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_address="email_address", + expand=UsersListRequestExpand.ROLES, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", + team="team", ) @@ -343,6 +392,7 @@ async def retrieve( import asyncio from merge import AsyncMerge + from merge.resources.ticketing.resources.users import UsersRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -353,6 +403,9 @@ async def retrieve( async def main() -> None: await client.ticketing.users.retrieve( id="id", + expand=UsersRetrieveRequestExpand.ROLES, + include_remote_data=True, + include_shell_data=True, ) diff --git a/src/merge/resources/ticketing/resources/users/raw_client.py b/src/merge/resources/ticketing/resources/users/raw_client.py index 389a95d3..b7f9c286 100644 --- a/src/merge/resources/ticketing/resources/users/raw_client.py +++ b/src/merge/resources/ticketing/resources/users/raw_client.py @@ -75,7 +75,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -243,7 +243,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/types/__init__.py b/src/merge/resources/ticketing/types/__init__.py index 53cd5ee8..59da70e3 100644 --- a/src/merge/resources/ticketing/types/__init__.py +++ b/src/merge/resources/ticketing/types/__init__.py @@ -45,6 +45,7 @@ from .comment_user import CommentUser from .common_model_scope_api import CommonModelScopeApi from .common_model_scopes_body_request import CommonModelScopesBodyRequest + from .completed_account_initial_screen_enum import CompletedAccountInitialScreenEnum from .contact import Contact from .contact_account import ContactAccount from .contact_request import ContactRequest @@ -219,6 +220,7 @@ "CommentUser": ".comment_user", "CommonModelScopeApi": ".common_model_scope_api", "CommonModelScopesBodyRequest": ".common_model_scopes_body_request", + "CompletedAccountInitialScreenEnum": ".completed_account_initial_screen_enum", "Contact": ".contact", "ContactAccount": ".contact_account", "ContactRequest": ".contact_request", @@ -413,6 +415,7 @@ def __dir__(): "CommentUser", "CommonModelScopeApi", "CommonModelScopesBodyRequest", + "CompletedAccountInitialScreenEnum", "Contact", "ContactAccount", "ContactRequest", diff --git a/src/merge/resources/ticketing/types/categories_enum.py b/src/merge/resources/ticketing/types/categories_enum.py index 3f2dc5a9..da1e0dc0 100644 --- a/src/merge/resources/ticketing/types/categories_enum.py +++ b/src/merge/resources/ticketing/types/categories_enum.py @@ -15,6 +15,7 @@ class CategoriesEnum(str, enum.Enum): * `crm` - crm * `mktg` - mktg * `filestorage` - filestorage + * `knowledgebase` - knowledgebase """ HRIS = "hris" @@ -24,6 +25,7 @@ class CategoriesEnum(str, enum.Enum): CRM = "crm" MKTG = "mktg" FILESTORAGE = "filestorage" + KNOWLEDGEBASE = "knowledgebase" def visit( self, @@ -34,6 +36,7 @@ def visit( crm: typing.Callable[[], T_Result], mktg: typing.Callable[[], T_Result], filestorage: typing.Callable[[], T_Result], + knowledgebase: typing.Callable[[], T_Result], ) -> T_Result: if self is CategoriesEnum.HRIS: return hris() @@ -49,3 +52,5 @@ def visit( return mktg() if self is CategoriesEnum.FILESTORAGE: return filestorage() + if self is CategoriesEnum.KNOWLEDGEBASE: + return knowledgebase() diff --git a/src/merge/resources/ticketing/types/category_enum.py b/src/merge/resources/ticketing/types/category_enum.py index d37e48f5..1d7cd2c0 100644 --- a/src/merge/resources/ticketing/types/category_enum.py +++ b/src/merge/resources/ticketing/types/category_enum.py @@ -15,6 +15,7 @@ class CategoryEnum(str, enum.Enum): * `crm` - crm * `mktg` - mktg * `filestorage` - filestorage + * `knowledgebase` - knowledgebase """ HRIS = "hris" @@ -24,6 +25,7 @@ class CategoryEnum(str, enum.Enum): CRM = "crm" MKTG = "mktg" FILESTORAGE = "filestorage" + KNOWLEDGEBASE = "knowledgebase" def visit( self, @@ -34,6 +36,7 @@ def visit( crm: typing.Callable[[], T_Result], mktg: typing.Callable[[], T_Result], filestorage: typing.Callable[[], T_Result], + knowledgebase: typing.Callable[[], T_Result], ) -> T_Result: if self is CategoryEnum.HRIS: return hris() @@ -49,3 +52,5 @@ def visit( return mktg() if self is CategoryEnum.FILESTORAGE: return filestorage() + if self is CategoryEnum.KNOWLEDGEBASE: + return knowledgebase() diff --git a/src/merge/resources/ticketing/types/completed_account_initial_screen_enum.py b/src/merge/resources/ticketing/types/completed_account_initial_screen_enum.py new file mode 100644 index 00000000..c112dfd1 --- /dev/null +++ b/src/merge/resources/ticketing/types/completed_account_initial_screen_enum.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CompletedAccountInitialScreenEnum = typing.Literal["SELECTIVE_SYNC"] diff --git a/src/merge/resources/ticketing/types/field_mapping_api_instance.py b/src/merge/resources/ticketing/types/field_mapping_api_instance.py index a5815313..0d257dcb 100644 --- a/src/merge/resources/ticketing/types/field_mapping_api_instance.py +++ b/src/merge/resources/ticketing/types/field_mapping_api_instance.py @@ -14,6 +14,7 @@ class FieldMappingApiInstance(UncheckedBaseModel): is_integration_wide: typing.Optional[bool] = None target_field: typing.Optional[FieldMappingApiInstanceTargetField] = None remote_field: typing.Optional[FieldMappingApiInstanceRemoteField] = None + jmes_path: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/tests/integration/test_knowledgebase.py b/tests/integration/test_knowledgebase.py index 411670da..0b76c980 100644 --- a/tests/integration/test_knowledgebase.py +++ b/tests/integration/test_knowledgebase.py @@ -174,4 +174,4 @@ def test_scopes_default_scopes_retrieve(client): def test_scopes_linked_account_scopes_retrieve(client): response = client.knowledgebase.scopes.linked_account_scopes_retrieve() - assert response is not None \ No newline at end of file + assert response is not None