From cce82ff78fa5152b740b1b2ce4b8baee73740b87 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 11:01:32 -0400 Subject: [PATCH] May 2024 SDK bump (#88) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- poetry.lock | 230 +++++------ pyproject.toml | 2 +- src/merge/client.py | 4 +- src/merge/core/client_wrapper.py | 2 +- src/merge/resources/accounting/__init__.py | 30 +- src/merge/resources/accounting/client.py | 3 - .../accounting/resources/__init__.py | 2 - .../resources/audit_trail/client.py | 4 +- .../resources/field_mapping/client.py | 4 - .../accounting/resources/link_token/client.py | 10 + .../resources/selective_sync/client.py | 382 ------------------ .../resources/accounting/types/__init__.py | 28 +- .../resources/accounting/types/account.py | 6 +- .../accounting/types/accounting_attachment.py | 6 +- .../accounting/types/accounting_period.py | 6 +- .../types/accounting_phone_number.py | 6 +- .../resources/accounting/types/address.py | 6 +- .../accounting/types/audit_log_event.py | 3 + .../accounting/types/balance_sheet.py | 6 +- .../accounting/types/cash_flow_statement.py | 6 +- .../accounting/types/company_info.py | 6 +- .../accounting/types/condition_schema.py | 56 --- .../types/condition_schema_condition_type.py | 7 - .../accounting/types/condition_type_enum.py | 51 --- .../resources/accounting/types/contact.py | 6 +- .../resources/accounting/types/credit_note.py | 6 +- .../accounting/types/credit_note_line_item.py | 7 +- .../accounting/types/currency_enum.py | 4 +- .../accounting/types/event_type_enum.py | 15 + .../resources/accounting/types/expense.py | 6 +- .../accounting/types/expense_line.py | 6 +- .../accounting/types/income_statement.py | 6 +- .../resources/accounting/types/invoice.py | 6 +- .../accounting/types/invoice_line_item.py | 6 +- src/merge/resources/accounting/types/item.py | 6 +- .../accounting/types/journal_entry.py | 6 +- .../accounting/types/journal_line.py | 6 +- .../types/linked_account_condition.py | 35 -- .../types/linked_account_condition_request.py | 33 -- ...nt_selective_sync_configuration_request.py | 31 -- .../accounting/types/operator_schema.py | 31 -- .../types/paginated_condition_schema_list.py | 31 -- .../types/patched_payment_request.py | 9 + .../types/patched_payment_request_type.py | 7 + .../resources/accounting/types/payment.py | 15 +- .../accounting/types/payment_line_item.py | 6 +- .../accounting/types/payment_request.py | 9 + .../accounting/types/payment_request_type.py | 7 + .../accounting/types/payment_type.py | 7 + .../accounting/types/payment_type_enum.py | 24 ++ .../accounting/types/purchase_order.py | 6 +- .../types/purchase_order_line_item.py | 6 +- .../accounting/types/remote_field_api.py | 2 + .../remote_field_api_coverage.py} | 3 + .../resources/accounting/types/report_item.py | 6 +- .../resources/accounting/types/tax_rate.py | 18 +- .../accounting/types/tracking_category.py | 6 +- .../resources/accounting/types/transaction.py | 6 +- .../accounting/types/transaction_line_item.py | 8 +- .../accounting/types/vendor_credit.py | 6 +- .../accounting/types/vendor_credit_line.py | 6 +- src/merge/resources/ats/__init__.py | 22 +- src/merge/resources/ats/client.py | 3 - src/merge/resources/ats/resources/__init__.py | 2 - .../ats/resources/audit_trail/client.py | 4 +- .../ats/resources/candidates/client.py | 2 - .../ats/resources/field_mapping/client.py | 4 - .../ats/resources/job_postings/client.py | 16 + .../ats/resources/link_token/client.py | 10 + .../ats/resources/selective_sync/client.py | 370 ----------------- src/merge/resources/ats/types/__init__.py | 20 +- src/merge/resources/ats/types/activity.py | 6 +- src/merge/resources/ats/types/application.py | 6 +- src/merge/resources/ats/types/attachment.py | 6 +- .../resources/ats/types/audit_log_event.py | 3 + src/merge/resources/ats/types/candidate.py | 6 +- .../resources/ats/types/condition_schema.py | 56 --- .../types/condition_schema_condition_type.py | 7 - .../ats/types/condition_type_enum.py | 51 --- src/merge/resources/ats/types/department.py | 6 +- src/merge/resources/ats/types/eeoc.py | 6 +- .../resources/ats/types/email_address.py | 6 +- .../resources/ats/types/event_type_enum.py | 15 + src/merge/resources/ats/types/job.py | 6 +- .../ats/types/job_interview_stage.py | 6 +- src/merge/resources/ats/types/job_posting.py | 6 +- .../ats/types/linked_account_condition.py | 35 -- .../types/linked_account_condition_request.py | 33 -- ...ed_account_selective_sync_configuration.py | 31 -- ...nt_selective_sync_configuration_request.py | 31 -- src/merge/resources/ats/types/offer.py | 6 +- src/merge/resources/ats/types/office.py | 6 +- .../resources/ats/types/operator_schema.py | 31 -- .../types/paginated_condition_schema_list.py | 31 -- src/merge/resources/ats/types/phone_number.py | 6 +- .../resources/ats/types/reject_reason.py | 6 +- .../resources/ats/types/remote_field_api.py | 2 + .../remote_field_api_coverage.py} | 3 + src/merge/resources/ats/types/remote_user.py | 6 +- .../ats/types/scheduled_interview.py | 6 +- src/merge/resources/ats/types/scorecard.py | 6 +- .../resources/ats/types/screening_question.py | 6 +- .../ats/types/screening_question_option.py | 6 +- src/merge/resources/ats/types/tag.py | 6 +- src/merge/resources/ats/types/url.py | 6 +- src/merge/resources/crm/__init__.py | 22 +- src/merge/resources/crm/client.py | 3 - src/merge/resources/crm/resources/__init__.py | 2 - .../crm/resources/audit_trail/client.py | 4 +- .../crm/resources/contacts/client.py | 2 - .../crm/resources/field_mapping/client.py | 4 - .../crm/resources/link_token/client.py | 10 + .../crm/resources/selective_sync/client.py | 370 ----------------- .../resources/crm/resources/users/client.py | 2 - src/merge/resources/crm/types/__init__.py | 20 +- src/merge/resources/crm/types/account.py | 6 +- .../resources/crm/types/account_request.py | 2 + src/merge/resources/crm/types/address.py | 6 +- src/merge/resources/crm/types/association.py | 10 +- .../crm/types/association_sub_type.py | 6 +- .../resources/crm/types/association_type.py | 10 +- .../resources/crm/types/audit_log_event.py | 3 + .../resources/crm/types/condition_schema.py | 56 --- .../types/condition_schema_condition_type.py | 7 - .../crm/types/condition_type_enum.py | 51 --- src/merge/resources/crm/types/contact.py | 6 +- .../resources/crm/types/custom_object.py | 14 +- .../crm/types/custom_object_class.py | 12 +- .../resources/crm/types/email_address.py | 6 +- src/merge/resources/crm/types/engagement.py | 6 +- .../resources/crm/types/engagement_type.py | 6 +- .../resources/crm/types/event_type_enum.py | 15 + .../resources/crm/types/field_format_enum.py | 8 +- .../resources/crm/types/field_type_enum.py | 8 +- .../resources/crm/types/item_format_enum.py | 8 +- .../resources/crm/types/item_type_enum.py | 8 +- src/merge/resources/crm/types/lead.py | 6 +- .../crm/types/linked_account_condition.py | 35 -- .../types/linked_account_condition_request.py | 33 -- ...ed_account_selective_sync_configuration.py | 31 -- ...nt_selective_sync_configuration_request.py | 31 -- src/merge/resources/crm/types/note.py | 6 +- .../resources/crm/types/operator_schema.py | 31 -- src/merge/resources/crm/types/opportunity.py | 6 +- .../types/paginated_condition_schema_list.py | 31 -- .../crm/types/patched_account_request.py | 2 + src/merge/resources/crm/types/phone_number.py | 6 +- .../resources/crm/types/remote_field_api.py | 2 + .../remote_field_api_coverage.py} | 3 + ...ote_field_class_for_custom_object_class.py | 6 +- src/merge/resources/crm/types/stage.py | 6 +- src/merge/resources/crm/types/task.py | 6 +- src/merge/resources/crm/types/user.py | 6 +- src/merge/resources/filestorage/__init__.py | 22 +- src/merge/resources/filestorage/client.py | 3 - .../filestorage/resources/__init__.py | 2 - .../resources/audit_trail/client.py | 4 +- .../resources/field_mapping/client.py | 4 - .../resources/link_token/client.py | 10 + .../resources/selective_sync/client.py | 382 ------------------ .../resources/filestorage/types/__init__.py | 20 +- .../filestorage/types/audit_log_event.py | 3 + .../filestorage/types/condition_schema.py | 56 --- .../types/condition_schema_condition_type.py | 7 - .../filestorage/types/condition_type_enum.py | 51 --- .../resources/filestorage/types/drive.py | 6 +- .../filestorage/types/event_type_enum.py | 15 + src/merge/resources/filestorage/types/file.py | 6 +- .../resources/filestorage/types/folder.py | 6 +- .../resources/filestorage/types/group.py | 6 +- .../types/linked_account_condition.py | 35 -- .../types/linked_account_condition_request.py | 33 -- ...ed_account_selective_sync_configuration.py | 31 -- ...nt_selective_sync_configuration_request.py | 31 -- .../filestorage/types/operator_schema.py | 31 -- .../types/paginated_condition_schema_list.py | 31 -- .../resources/filestorage/types/permission.py | 6 +- .../filestorage/types/remote_field_api.py | 2 + .../remote_field_api_coverage.py} | 3 + src/merge/resources/filestorage/types/user.py | 6 +- src/merge/resources/hris/__init__.py | 22 +- src/merge/resources/hris/client.py | 3 - .../resources/hris/resources/__init__.py | 2 - .../hris/resources/audit_trail/client.py | 4 +- .../hris/resources/employees/client.py | 2 - .../hris/resources/field_mapping/client.py | 4 - .../resources/hris/resources/groups/client.py | 8 + .../hris/resources/link_token/client.py | 10 + .../hris/resources/selective_sync/__init__.py | 2 - .../hris/resources/selective_sync/client.py | 370 ----------------- src/merge/resources/hris/types/__init__.py | 20 +- .../resources/hris/types/audit_log_event.py | 3 + src/merge/resources/hris/types/bank_info.py | 6 +- src/merge/resources/hris/types/benefit.py | 6 +- src/merge/resources/hris/types/company.py | 6 +- .../resources/hris/types/condition_schema.py | 56 --- .../types/condition_schema_condition_type.py | 7 - .../hris/types/condition_type_enum.py | 51 --- src/merge/resources/hris/types/deduction.py | 6 +- src/merge/resources/hris/types/dependent.py | 6 +- src/merge/resources/hris/types/earning.py | 6 +- src/merge/resources/hris/types/employee.py | 6 +- .../hris/types/employee_payroll_run.py | 6 +- .../resources/hris/types/employer_benefit.py | 6 +- src/merge/resources/hris/types/employment.py | 6 +- .../resources/hris/types/event_type_enum.py | 15 + src/merge/resources/hris/types/group.py | 9 +- .../hris/types/linked_account_condition.py | 35 -- .../types/linked_account_condition_request.py | 33 -- ...ed_account_selective_sync_configuration.py | 31 -- ...nt_selective_sync_configuration_request.py | 31 -- src/merge/resources/hris/types/location.py | 6 +- .../resources/hris/types/operator_schema.py | 31 -- .../types/paginated_condition_schema_list.py | 31 -- .../resources/hris/types/pay_currency_enum.py | 4 +- src/merge/resources/hris/types/pay_group.py | 6 +- src/merge/resources/hris/types/payroll_run.py | 6 +- .../resources/hris/types/remote_field_api.py | 2 + .../hris/types/remote_field_api_coverage.py | 5 + src/merge/resources/hris/types/tax.py | 6 +- src/merge/resources/hris/types/team.py | 6 +- src/merge/resources/hris/types/time_off.py | 6 +- .../resources/hris/types/time_off_balance.py | 6 +- .../resources/hris/types/timesheet_entry.py | 6 +- src/merge/resources/ticketing/__init__.py | 28 +- src/merge/resources/ticketing/client.py | 3 - .../resources/ticketing/resources/__init__.py | 2 - .../ticketing/resources/audit_trail/client.py | 4 +- .../ticketing/resources/contacts/client.py | 234 +++++++++++ .../resources/field_mapping/client.py | 4 - .../ticketing/resources/link_token/client.py | 10 + .../resources/selective_sync/__init__.py | 2 - .../resources/selective_sync/client.py | 382 ------------------ .../resources/ticketing/types/__init__.py | 26 +- .../resources/ticketing/types/account.py | 6 +- .../resources/ticketing/types/attachment.py | 6 +- .../ticketing/types/audit_log_event.py | 3 + .../resources/ticketing/types/collection.py | 6 +- .../ticketing/types/collection_type_enum.py | 4 +- .../resources/ticketing/types/comment.py | 6 +- .../ticketing/types/condition_schema.py | 56 --- .../types/condition_schema_condition_type.py | 7 - .../ticketing/types/condition_type_enum.py | 51 --- .../resources/ticketing/types/contact.py | 6 +- .../ticketing/types/contact_request.py | 47 +++ .../types/contact_request_account.py | 7 + .../ticketing/types/event_type_enum.py | 15 + .../ticketing/types/field_format_enum.py | 8 +- .../ticketing/types/field_type_enum.py | 8 +- .../ticketing/types/item_format_enum.py | 8 +- .../ticketing/types/item_type_enum.py | 8 +- .../types/linked_account_condition.py | 35 -- .../types/linked_account_condition_request.py | 33 -- ...ed_account_selective_sync_configuration.py | 31 -- ...nt_selective_sync_configuration_request.py | 31 -- .../ticketing/types/operator_schema.py | 31 -- .../types/paginated_condition_schema_list.py | 31 -- .../resources/ticketing/types/project.py | 6 +- .../ticketing/types/remote_field_api.py | 2 + .../types/remote_field_api_coverage.py | 5 + src/merge/resources/ticketing/types/role.py | 6 +- src/merge/resources/ticketing/types/tag.py | 6 +- src/merge/resources/ticketing/types/team.py | 6 +- src/merge/resources/ticketing/types/ticket.py | 6 +- .../ticketing/types/ticket_access_enum.py | 4 +- .../types/ticketing_contact_response.py} | 14 +- src/merge/resources/ticketing/types/user.py | 6 +- 267 files changed, 1275 insertions(+), 4754 deletions(-) delete mode 100644 src/merge/resources/accounting/resources/selective_sync/client.py delete mode 100644 src/merge/resources/accounting/types/condition_schema.py delete mode 100644 src/merge/resources/accounting/types/condition_schema_condition_type.py delete mode 100644 src/merge/resources/accounting/types/condition_type_enum.py delete mode 100644 src/merge/resources/accounting/types/linked_account_condition.py delete mode 100644 src/merge/resources/accounting/types/linked_account_condition_request.py delete mode 100644 src/merge/resources/accounting/types/linked_account_selective_sync_configuration_request.py delete mode 100644 src/merge/resources/accounting/types/operator_schema.py delete mode 100644 src/merge/resources/accounting/types/paginated_condition_schema_list.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_type.py create mode 100644 src/merge/resources/accounting/types/payment_request_type.py create mode 100644 src/merge/resources/accounting/types/payment_type.py create mode 100644 src/merge/resources/accounting/types/payment_type_enum.py rename src/merge/resources/accounting/{resources/selective_sync/__init__.py => types/remote_field_api_coverage.py} (50%) delete mode 100644 src/merge/resources/ats/resources/selective_sync/client.py delete mode 100644 src/merge/resources/ats/types/condition_schema.py delete mode 100644 src/merge/resources/ats/types/condition_schema_condition_type.py delete mode 100644 src/merge/resources/ats/types/condition_type_enum.py delete mode 100644 src/merge/resources/ats/types/linked_account_condition.py delete mode 100644 src/merge/resources/ats/types/linked_account_condition_request.py delete mode 100644 src/merge/resources/ats/types/linked_account_selective_sync_configuration.py delete mode 100644 src/merge/resources/ats/types/linked_account_selective_sync_configuration_request.py delete mode 100644 src/merge/resources/ats/types/operator_schema.py delete mode 100644 src/merge/resources/ats/types/paginated_condition_schema_list.py rename src/merge/resources/ats/{resources/selective_sync/__init__.py => types/remote_field_api_coverage.py} (50%) delete mode 100644 src/merge/resources/crm/resources/selective_sync/client.py delete mode 100644 src/merge/resources/crm/types/condition_schema.py delete mode 100644 src/merge/resources/crm/types/condition_schema_condition_type.py delete mode 100644 src/merge/resources/crm/types/condition_type_enum.py delete mode 100644 src/merge/resources/crm/types/linked_account_condition.py delete mode 100644 src/merge/resources/crm/types/linked_account_condition_request.py delete mode 100644 src/merge/resources/crm/types/linked_account_selective_sync_configuration.py delete mode 100644 src/merge/resources/crm/types/linked_account_selective_sync_configuration_request.py delete mode 100644 src/merge/resources/crm/types/operator_schema.py delete mode 100644 src/merge/resources/crm/types/paginated_condition_schema_list.py rename src/merge/resources/crm/{resources/selective_sync/__init__.py => types/remote_field_api_coverage.py} (50%) delete mode 100644 src/merge/resources/filestorage/resources/selective_sync/client.py delete mode 100644 src/merge/resources/filestorage/types/condition_schema.py delete mode 100644 src/merge/resources/filestorage/types/condition_schema_condition_type.py delete mode 100644 src/merge/resources/filestorage/types/condition_type_enum.py delete mode 100644 src/merge/resources/filestorage/types/linked_account_condition.py delete mode 100644 src/merge/resources/filestorage/types/linked_account_condition_request.py delete mode 100644 src/merge/resources/filestorage/types/linked_account_selective_sync_configuration.py delete mode 100644 src/merge/resources/filestorage/types/linked_account_selective_sync_configuration_request.py delete mode 100644 src/merge/resources/filestorage/types/operator_schema.py delete mode 100644 src/merge/resources/filestorage/types/paginated_condition_schema_list.py rename src/merge/resources/filestorage/{resources/selective_sync/__init__.py => types/remote_field_api_coverage.py} (50%) delete mode 100644 src/merge/resources/hris/resources/selective_sync/__init__.py delete mode 100644 src/merge/resources/hris/resources/selective_sync/client.py delete mode 100644 src/merge/resources/hris/types/condition_schema.py delete mode 100644 src/merge/resources/hris/types/condition_schema_condition_type.py delete mode 100644 src/merge/resources/hris/types/condition_type_enum.py delete mode 100644 src/merge/resources/hris/types/linked_account_condition.py delete mode 100644 src/merge/resources/hris/types/linked_account_condition_request.py delete mode 100644 src/merge/resources/hris/types/linked_account_selective_sync_configuration.py delete mode 100644 src/merge/resources/hris/types/linked_account_selective_sync_configuration_request.py delete mode 100644 src/merge/resources/hris/types/operator_schema.py delete mode 100644 src/merge/resources/hris/types/paginated_condition_schema_list.py create mode 100644 src/merge/resources/hris/types/remote_field_api_coverage.py delete mode 100644 src/merge/resources/ticketing/resources/selective_sync/__init__.py delete mode 100644 src/merge/resources/ticketing/resources/selective_sync/client.py delete mode 100644 src/merge/resources/ticketing/types/condition_schema.py delete mode 100644 src/merge/resources/ticketing/types/condition_schema_condition_type.py delete mode 100644 src/merge/resources/ticketing/types/condition_type_enum.py create mode 100644 src/merge/resources/ticketing/types/contact_request.py create mode 100644 src/merge/resources/ticketing/types/contact_request_account.py delete mode 100644 src/merge/resources/ticketing/types/linked_account_condition.py delete mode 100644 src/merge/resources/ticketing/types/linked_account_condition_request.py delete mode 100644 src/merge/resources/ticketing/types/linked_account_selective_sync_configuration.py delete mode 100644 src/merge/resources/ticketing/types/linked_account_selective_sync_configuration_request.py delete mode 100644 src/merge/resources/ticketing/types/operator_schema.py delete mode 100644 src/merge/resources/ticketing/types/paginated_condition_schema_list.py create mode 100644 src/merge/resources/ticketing/types/remote_field_api_coverage.py rename src/merge/resources/{accounting/types/linked_account_selective_sync_configuration.py => ticketing/types/ticketing_contact_response.py} (66%) diff --git a/poetry.lock b/poetry.lock index 73fd2b5b..9acb1d00 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "annotated-types" -version = "0.6.0" +version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] [package.dependencies] @@ -152,38 +152,38 @@ files = [ [[package]] name = "mypy" -version = "1.9.0" +version = "1.10.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f8a67616990062232ee4c3952f41c779afac41405806042a8126fe96e098419f"}, - {file = "mypy-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d357423fa57a489e8c47b7c85dfb96698caba13d66e086b412298a1a0ea3b0ed"}, - {file = "mypy-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49c87c15aed320de9b438ae7b00c1ac91cd393c1b854c2ce538e2a72d55df150"}, - {file = "mypy-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:48533cdd345c3c2e5ef48ba3b0d3880b257b423e7995dada04248725c6f77374"}, - {file = "mypy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:4d3dbd346cfec7cb98e6cbb6e0f3c23618af826316188d587d1c1bc34f0ede03"}, - {file = "mypy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:653265f9a2784db65bfca694d1edd23093ce49740b2244cde583aeb134c008f3"}, - {file = "mypy-1.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3a3c007ff3ee90f69cf0a15cbcdf0995749569b86b6d2f327af01fd1b8aee9dc"}, - {file = "mypy-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2418488264eb41f69cc64a69a745fad4a8f86649af4b1041a4c64ee61fc61129"}, - {file = "mypy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:68edad3dc7d70f2f17ae4c6c1b9471a56138ca22722487eebacfd1eb5321d612"}, - {file = "mypy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:85ca5fcc24f0b4aeedc1d02f93707bccc04733f21d41c88334c5482219b1ccb3"}, - {file = "mypy-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd"}, - {file = "mypy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6"}, - {file = "mypy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185"}, - {file = "mypy-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913"}, - {file = "mypy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6"}, - {file = "mypy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e54396d70be04b34f31d2edf3362c1edd023246c82f1730bbf8768c28db5361b"}, - {file = "mypy-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5e6061f44f2313b94f920e91b204ec600982961e07a17e0f6cd83371cb23f5c2"}, - {file = "mypy-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a10926e5473c5fc3da8abb04119a1f5811a236dc3a38d92015cb1e6ba4cb9e"}, - {file = "mypy-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b685154e22e4e9199fc95f298661deea28aaede5ae16ccc8cbb1045e716b3e04"}, - {file = "mypy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:5d741d3fc7c4da608764073089e5f58ef6352bedc223ff58f2f038c2c4698a89"}, - {file = "mypy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:587ce887f75dd9700252a3abbc9c97bbe165a4a630597845c61279cf32dfbf02"}, - {file = "mypy-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f88566144752999351725ac623471661c9d1cd8caa0134ff98cceeea181789f4"}, - {file = "mypy-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61758fabd58ce4b0720ae1e2fea5cfd4431591d6d590b197775329264f86311d"}, - {file = "mypy-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e49499be624dead83927e70c756970a0bc8240e9f769389cdf5714b0784ca6bf"}, - {file = "mypy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:571741dc4194b4f82d344b15e8837e8c5fcc462d66d076748142327626a1b6e9"}, - {file = "mypy-1.9.0-py3-none-any.whl", hash = "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e"}, - {file = "mypy-1.9.0.tar.gz", hash = "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974"}, + {file = "mypy-1.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:da1cbf08fb3b851ab3b9523a884c232774008267b1f83371ace57f412fe308c2"}, + {file = "mypy-1.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:12b6bfc1b1a66095ab413160a6e520e1dc076a28f3e22f7fb25ba3b000b4ef99"}, + {file = "mypy-1.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e36fb078cce9904c7989b9693e41cb9711e0600139ce3970c6ef814b6ebc2b2"}, + {file = "mypy-1.10.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2b0695d605ddcd3eb2f736cd8b4e388288c21e7de85001e9f85df9187f2b50f9"}, + {file = "mypy-1.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:cd777b780312ddb135bceb9bc8722a73ec95e042f911cc279e2ec3c667076051"}, + {file = "mypy-1.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3be66771aa5c97602f382230165b856c231d1277c511c9a8dd058be4784472e1"}, + {file = "mypy-1.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8b2cbaca148d0754a54d44121b5825ae71868c7592a53b7292eeb0f3fdae95ee"}, + {file = "mypy-1.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ec404a7cbe9fc0e92cb0e67f55ce0c025014e26d33e54d9e506a0f2d07fe5de"}, + {file = "mypy-1.10.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e22e1527dc3d4aa94311d246b59e47f6455b8729f4968765ac1eacf9a4760bc7"}, + {file = "mypy-1.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:a87dbfa85971e8d59c9cc1fcf534efe664d8949e4c0b6b44e8ca548e746a8d53"}, + {file = "mypy-1.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a781f6ad4bab20eef8b65174a57e5203f4be627b46291f4589879bf4e257b97b"}, + {file = "mypy-1.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b808e12113505b97d9023b0b5e0c0705a90571c6feefc6f215c1df9381256e30"}, + {file = "mypy-1.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f55583b12156c399dce2df7d16f8a5095291354f1e839c252ec6c0611e86e2e"}, + {file = "mypy-1.10.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4cf18f9d0efa1b16478c4c129eabec36148032575391095f73cae2e722fcf9d5"}, + {file = "mypy-1.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:bc6ac273b23c6b82da3bb25f4136c4fd42665f17f2cd850771cb600bdd2ebeda"}, + {file = "mypy-1.10.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9fd50226364cd2737351c79807775136b0abe084433b55b2e29181a4c3c878c0"}, + {file = "mypy-1.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f90cff89eea89273727d8783fef5d4a934be2fdca11b47def50cf5d311aff727"}, + {file = "mypy-1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fcfc70599efde5c67862a07a1aaf50e55bce629ace26bb19dc17cece5dd31ca4"}, + {file = "mypy-1.10.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:075cbf81f3e134eadaf247de187bd604748171d6b79736fa9b6c9685b4083061"}, + {file = "mypy-1.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:3f298531bca95ff615b6e9f2fc0333aae27fa48052903a0ac90215021cdcfa4f"}, + {file = "mypy-1.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fa7ef5244615a2523b56c034becde4e9e3f9b034854c93639adb667ec9ec2976"}, + {file = "mypy-1.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3236a4c8f535a0631f85f5fcdffba71c7feeef76a6002fcba7c1a8e57c8be1ec"}, + {file = "mypy-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a2b5cdbb5dd35aa08ea9114436e0d79aceb2f38e32c21684dcf8e24e1e92821"}, + {file = "mypy-1.10.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:92f93b21c0fe73dc00abf91022234c79d793318b8a96faac147cd579c1671746"}, + {file = "mypy-1.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:28d0e038361b45f099cc086d9dd99c15ff14d0188f44ac883010e172ce86c38a"}, + {file = "mypy-1.10.0-py3-none-any.whl", hash = "sha256:f8c083976eb530019175aabadb60921e73b4f45736760826aa1689dda8208aee"}, + {file = "mypy-1.10.0.tar.gz", hash = "sha256:3d087fcbec056c4ee34974da493a826ce316947485cef3901f511848e687c131"}, ] [package.dependencies] @@ -236,18 +236,18 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pydantic" -version = "2.7.0" +version = "2.7.1" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.7.0-py3-none-any.whl", hash = "sha256:9dee74a271705f14f9a1567671d144a851c675b072736f0a7b2608fd9e495352"}, - {file = "pydantic-2.7.0.tar.gz", hash = "sha256:b5ecdd42262ca2462e2624793551e80911a1e989f462910bb81aef974b4bb383"}, + {file = "pydantic-2.7.1-py3-none-any.whl", hash = "sha256:e029badca45266732a9a79898a15ae2e8b14840b1eabbb25844be28f0b33f3d5"}, + {file = "pydantic-2.7.1.tar.gz", hash = "sha256:e9dbb5eada8abe4d9ae5f46b9939aead650cd2b68f249bb3a8139dbe125803cc"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.18.1" +pydantic-core = "2.18.2" typing-extensions = ">=4.6.1" [package.extras] @@ -255,90 +255,90 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.18.1" +version = "2.18.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.18.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:ee9cf33e7fe14243f5ca6977658eb7d1042caaa66847daacbd2117adb258b226"}, - {file = "pydantic_core-2.18.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6b7bbb97d82659ac8b37450c60ff2e9f97e4eb0f8a8a3645a5568b9334b08b50"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df4249b579e75094f7e9bb4bd28231acf55e308bf686b952f43100a5a0be394c"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d0491006a6ad20507aec2be72e7831a42efc93193d2402018007ff827dc62926"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ae80f72bb7a3e397ab37b53a2b49c62cc5496412e71bc4f1277620a7ce3f52b"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:58aca931bef83217fca7a390e0486ae327c4af9c3e941adb75f8772f8eeb03a1"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1be91ad664fc9245404a789d60cba1e91c26b1454ba136d2a1bf0c2ac0c0505a"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:667880321e916a8920ef49f5d50e7983792cf59f3b6079f3c9dac2b88a311d17"}, - {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f7054fdc556f5421f01e39cbb767d5ec5c1139ea98c3e5b350e02e62201740c7"}, - {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:030e4f9516f9947f38179249778709a460a3adb516bf39b5eb9066fcfe43d0e6"}, - {file = "pydantic_core-2.18.1-cp310-none-win32.whl", hash = "sha256:2e91711e36e229978d92642bfc3546333a9127ecebb3f2761372e096395fc649"}, - {file = "pydantic_core-2.18.1-cp310-none-win_amd64.whl", hash = "sha256:9a29726f91c6cb390b3c2338f0df5cd3e216ad7a938762d11c994bb37552edb0"}, - {file = "pydantic_core-2.18.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:9ece8a49696669d483d206b4474c367852c44815fca23ac4e48b72b339807f80"}, - {file = "pydantic_core-2.18.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7a5d83efc109ceddb99abd2c1316298ced2adb4570410defe766851a804fcd5b"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7973c381283783cd1043a8c8f61ea5ce7a3a58b0369f0ee0ee975eaf2f2a1b"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:54c7375c62190a7845091f521add19b0f026bcf6ae674bdb89f296972272e86d"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd63cec4e26e790b70544ae5cc48d11b515b09e05fdd5eff12e3195f54b8a586"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:561cf62c8a3498406495cfc49eee086ed2bb186d08bcc65812b75fda42c38294"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68717c38a68e37af87c4da20e08f3e27d7e4212e99e96c3d875fbf3f4812abfc"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d5728e93d28a3c63ee513d9ffbac9c5989de8c76e049dbcb5bfe4b923a9739d"}, - {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f0f17814c505f07806e22b28856c59ac80cee7dd0fbb152aed273e116378f519"}, - {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d816f44a51ba5175394bc6c7879ca0bd2be560b2c9e9f3411ef3a4cbe644c2e9"}, - {file = "pydantic_core-2.18.1-cp311-none-win32.whl", hash = "sha256:09f03dfc0ef8c22622eaa8608caa4a1e189cfb83ce847045eca34f690895eccb"}, - {file = "pydantic_core-2.18.1-cp311-none-win_amd64.whl", hash = "sha256:27f1009dc292f3b7ca77feb3571c537276b9aad5dd4efb471ac88a8bd09024e9"}, - {file = "pydantic_core-2.18.1-cp311-none-win_arm64.whl", hash = "sha256:48dd883db92e92519201f2b01cafa881e5f7125666141a49ffba8b9facc072b0"}, - {file = "pydantic_core-2.18.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:b6b0e4912030c6f28bcb72b9ebe4989d6dc2eebcd2a9cdc35fefc38052dd4fe8"}, - {file = "pydantic_core-2.18.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3202a429fe825b699c57892d4371c74cc3456d8d71b7f35d6028c96dfecad31"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3982b0a32d0a88b3907e4b0dc36809fda477f0757c59a505d4e9b455f384b8b"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25595ac311f20e5324d1941909b0d12933f1fd2171075fcff763e90f43e92a0d"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:14fe73881cf8e4cbdaded8ca0aa671635b597e42447fec7060d0868b52d074e6"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca976884ce34070799e4dfc6fbd68cb1d181db1eefe4a3a94798ddfb34b8867f"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684d840d2c9ec5de9cb397fcb3f36d5ebb6fa0d94734f9886032dd796c1ead06"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:54764c083bbe0264f0f746cefcded6cb08fbbaaf1ad1d78fb8a4c30cff999a90"}, - {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:201713f2f462e5c015b343e86e68bd8a530a4f76609b33d8f0ec65d2b921712a"}, - {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fd1a9edb9dd9d79fbeac1ea1f9a8dd527a6113b18d2e9bcc0d541d308dae639b"}, - {file = "pydantic_core-2.18.1-cp312-none-win32.whl", hash = "sha256:d5e6b7155b8197b329dc787356cfd2684c9d6a6b1a197f6bbf45f5555a98d411"}, - {file = "pydantic_core-2.18.1-cp312-none-win_amd64.whl", hash = "sha256:9376d83d686ec62e8b19c0ac3bf8d28d8a5981d0df290196fb6ef24d8a26f0d6"}, - {file = "pydantic_core-2.18.1-cp312-none-win_arm64.whl", hash = "sha256:c562b49c96906b4029b5685075fe1ebd3b5cc2601dfa0b9e16c2c09d6cbce048"}, - {file = "pydantic_core-2.18.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:3e352f0191d99fe617371096845070dee295444979efb8f27ad941227de6ad09"}, - {file = "pydantic_core-2.18.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0295d52b012cbe0d3059b1dba99159c3be55e632aae1999ab74ae2bd86a33d7"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56823a92075780582d1ffd4489a2e61d56fd3ebb4b40b713d63f96dd92d28144"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dd3f79e17b56741b5177bcc36307750d50ea0698df6aa82f69c7db32d968c1c2"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38a5024de321d672a132b1834a66eeb7931959c59964b777e8f32dbe9523f6b1"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ce426ee691319d4767748c8e0895cfc56593d725594e415f274059bcf3cb76"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2adaeea59849ec0939af5c5d476935f2bab4b7f0335b0110f0f069a41024278e"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9b6431559676a1079eac0f52d6d0721fb8e3c5ba43c37bc537c8c83724031feb"}, - {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:85233abb44bc18d16e72dc05bf13848a36f363f83757541f1a97db2f8d58cfd9"}, - {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:641a018af4fe48be57a2b3d7a1f0f5dbca07c1d00951d3d7463f0ac9dac66622"}, - {file = "pydantic_core-2.18.1-cp38-none-win32.whl", hash = "sha256:63d7523cd95d2fde0d28dc42968ac731b5bb1e516cc56b93a50ab293f4daeaad"}, - {file = "pydantic_core-2.18.1-cp38-none-win_amd64.whl", hash = "sha256:907a4d7720abfcb1c81619863efd47c8a85d26a257a2dbebdb87c3b847df0278"}, - {file = "pydantic_core-2.18.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:aad17e462f42ddbef5984d70c40bfc4146c322a2da79715932cd8976317054de"}, - {file = "pydantic_core-2.18.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:94b9769ba435b598b547c762184bcfc4783d0d4c7771b04a3b45775c3589ca44"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80e0e57cc704a52fb1b48f16d5b2c8818da087dbee6f98d9bf19546930dc64b5"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:76b86e24039c35280ceee6dce7e62945eb93a5175d43689ba98360ab31eebc4a"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12a05db5013ec0ca4a32cc6433f53faa2a014ec364031408540ba858c2172bb0"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:250ae39445cb5475e483a36b1061af1bc233de3e9ad0f4f76a71b66231b07f88"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a32204489259786a923e02990249c65b0f17235073149d0033efcebe80095570"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6395a4435fa26519fd96fdccb77e9d00ddae9dd6c742309bd0b5610609ad7fb2"}, - {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2533ad2883f001efa72f3d0e733fb846710c3af6dcdd544fe5bf14fa5fe2d7db"}, - {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b560b72ed4816aee52783c66854d96157fd8175631f01ef58e894cc57c84f0f6"}, - {file = "pydantic_core-2.18.1-cp39-none-win32.whl", hash = "sha256:582cf2cead97c9e382a7f4d3b744cf0ef1a6e815e44d3aa81af3ad98762f5a9b"}, - {file = "pydantic_core-2.18.1-cp39-none-win_amd64.whl", hash = "sha256:ca71d501629d1fa50ea7fa3b08ba884fe10cefc559f5c6c8dfe9036c16e8ae89"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e178e5b66a06ec5bf51668ec0d4ac8cfb2bdcb553b2c207d58148340efd00143"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:72722ce529a76a4637a60be18bd789d8fb871e84472490ed7ddff62d5fed620d"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fe0c1ce5b129455e43f941f7a46f61f3d3861e571f2905d55cdbb8b5c6f5e2c"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4284c621f06a72ce2cb55f74ea3150113d926a6eb78ab38340c08f770eb9b4d"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a0c3e718f4e064efde68092d9d974e39572c14e56726ecfaeebbe6544521f47"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2027493cc44c23b598cfaf200936110433d9caa84e2c6cf487a83999638a96ac"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:76909849d1a6bffa5a07742294f3fa1d357dc917cb1fe7b470afbc3a7579d539"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ee7ccc7fb7e921d767f853b47814c3048c7de536663e82fbc37f5eb0d532224b"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ee2794111c188548a4547eccc73a6a8527fe2af6cf25e1a4ebda2fd01cdd2e60"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a139fe9f298dc097349fb4f28c8b81cc7a202dbfba66af0e14be5cfca4ef7ce5"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d074b07a10c391fc5bbdcb37b2f16f20fcd9e51e10d01652ab298c0d07908ee2"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c69567ddbac186e8c0aadc1f324a60a564cfe25e43ef2ce81bcc4b8c3abffbae"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:baf1c7b78cddb5af00971ad5294a4583188bda1495b13760d9f03c9483bb6203"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2684a94fdfd1b146ff10689c6e4e815f6a01141781c493b97342cdc5b06f4d5d"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:73c1bc8a86a5c9e8721a088df234265317692d0b5cd9e86e975ce3bc3db62a59"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e60defc3c15defb70bb38dd605ff7e0fae5f6c9c7cbfe0ad7868582cb7e844a6"}, - {file = "pydantic_core-2.18.1.tar.gz", hash = "sha256:de9d3e8717560eb05e28739d1b35e4eac2e458553a52a301e51352a7ffc86a35"}, + {file = "pydantic_core-2.18.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9e08e867b306f525802df7cd16c44ff5ebbe747ff0ca6cf3fde7f36c05a59a81"}, + {file = "pydantic_core-2.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f0a21cbaa69900cbe1a2e7cad2aa74ac3cf21b10c3efb0fa0b80305274c0e8a2"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0680b1f1f11fda801397de52c36ce38ef1c1dc841a0927a94f226dea29c3ae3d"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95b9d5e72481d3780ba3442eac863eae92ae43a5f3adb5b4d0a1de89d42bb250"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fcf5cd9c4b655ad666ca332b9a081112cd7a58a8b5a6ca7a3104bc950f2038"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b5155ff768083cb1d62f3e143b49a8a3432e6789a3abee8acd005c3c7af1c74"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:553ef617b6836fc7e4df130bb851e32fe357ce36336d897fd6646d6058d980af"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b89ed9eb7d616ef5714e5590e6cf7f23b02d0d539767d33561e3675d6f9e3857"}, + {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:75f7e9488238e920ab6204399ded280dc4c307d034f3924cd7f90a38b1829563"}, + {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ef26c9e94a8c04a1b2924149a9cb081836913818e55681722d7f29af88fe7b38"}, + {file = "pydantic_core-2.18.2-cp310-none-win32.whl", hash = "sha256:182245ff6b0039e82b6bb585ed55a64d7c81c560715d1bad0cbad6dfa07b4027"}, + {file = "pydantic_core-2.18.2-cp310-none-win_amd64.whl", hash = "sha256:e23ec367a948b6d812301afc1b13f8094ab7b2c280af66ef450efc357d2ae543"}, + {file = "pydantic_core-2.18.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:219da3f096d50a157f33645a1cf31c0ad1fe829a92181dd1311022f986e5fbe3"}, + {file = "pydantic_core-2.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cc1cfd88a64e012b74e94cd00bbe0f9c6df57049c97f02bb07d39e9c852e19a4"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b7133a6e6aeb8df37d6f413f7705a37ab4031597f64ab56384c94d98fa0e90"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:224c421235f6102e8737032483f43c1a8cfb1d2f45740c44166219599358c2cd"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b14d82cdb934e99dda6d9d60dc84a24379820176cc4a0d123f88df319ae9c150"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2728b01246a3bba6de144f9e3115b532ee44bd6cf39795194fb75491824a1413"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470b94480bb5ee929f5acba6995251ada5e059a5ef3e0dfc63cca287283ebfa6"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:997abc4df705d1295a42f95b4eec4950a37ad8ae46d913caeee117b6b198811c"}, + {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75250dbc5290e3f1a0f4618db35e51a165186f9034eff158f3d490b3fed9f8a0"}, + {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4456f2dca97c425231d7315737d45239b2b51a50dc2b6f0c2bb181fce6207664"}, + {file = "pydantic_core-2.18.2-cp311-none-win32.whl", hash = "sha256:269322dcc3d8bdb69f054681edff86276b2ff972447863cf34c8b860f5188e2e"}, + {file = "pydantic_core-2.18.2-cp311-none-win_amd64.whl", hash = "sha256:800d60565aec896f25bc3cfa56d2277d52d5182af08162f7954f938c06dc4ee3"}, + {file = "pydantic_core-2.18.2-cp311-none-win_arm64.whl", hash = "sha256:1404c69d6a676245199767ba4f633cce5f4ad4181f9d0ccb0577e1f66cf4c46d"}, + {file = "pydantic_core-2.18.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:fb2bd7be70c0fe4dfd32c951bc813d9fe6ebcbfdd15a07527796c8204bd36242"}, + {file = "pydantic_core-2.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6132dd3bd52838acddca05a72aafb6eab6536aa145e923bb50f45e78b7251043"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d904828195733c183d20a54230c0df0eb46ec746ea1a666730787353e87182"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9bd70772c720142be1020eac55f8143a34ec9f82d75a8e7a07852023e46617f"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b8ed04b3582771764538f7ee7001b02e1170223cf9b75dff0bc698fadb00cf3"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6dac87ddb34aaec85f873d737e9d06a3555a1cc1a8e0c44b7f8d5daeb89d86f"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca4ae5a27ad7a4ee5170aebce1574b375de390bc01284f87b18d43a3984df72"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:886eec03591b7cf058467a70a87733b35f44707bd86cf64a615584fd72488b7c"}, + {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca7b0c1f1c983e064caa85f3792dd2fe3526b3505378874afa84baf662e12241"}, + {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b4356d3538c3649337df4074e81b85f0616b79731fe22dd11b99499b2ebbdf3"}, + {file = "pydantic_core-2.18.2-cp312-none-win32.whl", hash = "sha256:8b172601454f2d7701121bbec3425dd71efcb787a027edf49724c9cefc14c038"}, + {file = "pydantic_core-2.18.2-cp312-none-win_amd64.whl", hash = "sha256:b1bd7e47b1558ea872bd16c8502c414f9e90dcf12f1395129d7bb42a09a95438"}, + {file = "pydantic_core-2.18.2-cp312-none-win_arm64.whl", hash = "sha256:98758d627ff397e752bc339272c14c98199c613f922d4a384ddc07526c86a2ec"}, + {file = "pydantic_core-2.18.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:9fdad8e35f278b2c3eb77cbdc5c0a49dada440657bf738d6905ce106dc1de439"}, + {file = "pydantic_core-2.18.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d90c3265ae107f91a4f279f4d6f6f1d4907ac76c6868b27dc7fb33688cfb347"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:390193c770399861d8df9670fb0d1874f330c79caaca4642332df7c682bf6b91"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82d5d4d78e4448683cb467897fe24e2b74bb7b973a541ea1dcfec1d3cbce39fb"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4774f3184d2ef3e14e8693194f661dea5a4d6ca4e3dc8e39786d33a94865cefd"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4d938ec0adf5167cb335acb25a4ee69a8107e4984f8fbd2e897021d9e4ca21b"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0e8b1be28239fc64a88a8189d1df7fad8be8c1ae47fcc33e43d4be15f99cc70"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:868649da93e5a3d5eacc2b5b3b9235c98ccdbfd443832f31e075f54419e1b96b"}, + {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:78363590ef93d5d226ba21a90a03ea89a20738ee5b7da83d771d283fd8a56761"}, + {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:852e966fbd035a6468fc0a3496589b45e2208ec7ca95c26470a54daed82a0788"}, + {file = "pydantic_core-2.18.2-cp38-none-win32.whl", hash = "sha256:6a46e22a707e7ad4484ac9ee9f290f9d501df45954184e23fc29408dfad61350"}, + {file = "pydantic_core-2.18.2-cp38-none-win_amd64.whl", hash = "sha256:d91cb5ea8b11607cc757675051f61b3d93f15eca3cefb3e6c704a5d6e8440f4e"}, + {file = "pydantic_core-2.18.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:ae0a8a797a5e56c053610fa7be147993fe50960fa43609ff2a9552b0e07013e8"}, + {file = "pydantic_core-2.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:042473b6280246b1dbf530559246f6842b56119c2926d1e52b631bdc46075f2a"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a388a77e629b9ec814c1b1e6b3b595fe521d2cdc625fcca26fbc2d44c816804"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25add29b8f3b233ae90ccef2d902d0ae0432eb0d45370fe315d1a5cf231004b"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f459a5ce8434614dfd39bbebf1041952ae01da6bed9855008cb33b875cb024c0"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eff2de745698eb46eeb51193a9f41d67d834d50e424aef27df2fcdee1b153845"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8309f67285bdfe65c372ea3722b7a5642680f3dba538566340a9d36e920b5f0"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f93a8a2e3938ff656a7c1bc57193b1319960ac015b6e87d76c76bf14fe0244b4"}, + {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22057013c8c1e272eb8d0eebc796701167d8377441ec894a8fed1af64a0bf399"}, + {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfeecd1ac6cc1fb2692c3d5110781c965aabd4ec5d32799773ca7b1456ac636b"}, + {file = "pydantic_core-2.18.2-cp39-none-win32.whl", hash = "sha256:0d69b4c2f6bb3e130dba60d34c0845ba31b69babdd3f78f7c0c8fae5021a253e"}, + {file = "pydantic_core-2.18.2-cp39-none-win_amd64.whl", hash = "sha256:d9319e499827271b09b4e411905b24a426b8fb69464dfa1696258f53a3334641"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a1874c6dd4113308bd0eb568418e6114b252afe44319ead2b4081e9b9521fe75"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:ccdd111c03bfd3666bd2472b674c6899550e09e9f298954cfc896ab92b5b0e6d"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e18609ceaa6eed63753037fc06ebb16041d17d28199ae5aba0052c51449650a9"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e5c584d357c4e2baf0ff7baf44f4994be121e16a2c88918a5817331fc7599d7"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43f0f463cf89ace478de71a318b1b4f05ebc456a9b9300d027b4b57c1a2064fb"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e1b395e58b10b73b07b7cf740d728dd4ff9365ac46c18751bf8b3d8cca8f625a"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0098300eebb1c837271d3d1a2cd2911e7c11b396eac9661655ee524a7f10587b"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:36789b70d613fbac0a25bb07ab3d9dba4d2e38af609c020cf4d888d165ee0bf3"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f9a801e7c8f1ef8718da265bba008fa121243dfe37c1cea17840b0944dfd72c"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3a6515ebc6e69d85502b4951d89131ca4e036078ea35533bb76327f8424531ce"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20aca1e2298c56ececfd8ed159ae4dde2df0781988c97ef77d5c16ff4bd5b400"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:223ee893d77a310a0391dca6df00f70bbc2f36a71a895cecd9a0e762dc37b349"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2334ce8c673ee93a1d6a65bd90327588387ba073c17e61bf19b4fd97d688d63c"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:cbca948f2d14b09d20268cda7b0367723d79063f26c4ffc523af9042cad95592"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b3ef08e20ec49e02d5c6717a91bb5af9b20f1805583cb0adfe9ba2c6b505b5ae"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c6fdc8627910eed0c01aed6a390a252fe3ea6d472ee70fdde56273f198938374"}, + {file = "pydantic_core-2.18.2.tar.gz", hash = "sha256:2e29d20810dfc3043ee13ac7d9e25105799817683348823f305ab3f349b9386e"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index ac74b7f4..552b0714 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "MergePythonClient" -version = "1.0.8" +version = "1.0.9" description = "" readme = "README.md" authors = [] diff --git a/src/merge/client.py b/src/merge/client.py index 85d06bf1..7cc864a5 100644 --- a/src/merge/client.py +++ b/src/merge/client.py @@ -34,8 +34,8 @@ def __init__( self.ats = AtsClient(client_wrapper=self._client_wrapper) self.crm = CrmClient(client_wrapper=self._client_wrapper) self.filestorage = FilestorageClient(client_wrapper=self._client_wrapper) - self.hris = HrisClient(client_wrapper=self._client_wrapper) self.ticketing = TicketingClient(client_wrapper=self._client_wrapper) + self.hris = HrisClient(client_wrapper=self._client_wrapper) self.accounting = AccountingClient(client_wrapper=self._client_wrapper) @@ -59,8 +59,8 @@ def __init__( self.ats = AsyncAtsClient(client_wrapper=self._client_wrapper) self.crm = AsyncCrmClient(client_wrapper=self._client_wrapper) self.filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper) - self.hris = AsyncHrisClient(client_wrapper=self._client_wrapper) self.ticketing = AsyncTicketingClient(client_wrapper=self._client_wrapper) + self.hris = AsyncHrisClient(client_wrapper=self._client_wrapper) self.accounting = AsyncAccountingClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/core/client_wrapper.py b/src/merge/core/client_wrapper.py index 8d476268..f5e68c46 100644 --- a/src/merge/core/client_wrapper.py +++ b/src/merge/core/client_wrapper.py @@ -21,7 +21,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "MergePythonClient", - "X-Fern-SDK-Version": "1.0.8", + "X-Fern-SDK-Version": "1.0.9", } if self._account_token is not None: headers["X-Account-Token"] = self._account_token diff --git a/src/merge/resources/accounting/__init__.py b/src/merge/resources/accounting/__init__.py index 49271a85..a5eaad7c 100644 --- a/src/merge/resources/accounting/__init__.py +++ b/src/merge/resources/accounting/__init__.py @@ -52,9 +52,6 @@ CommonModelScopesBodyRequest, CompanyInfo, CompanyInfoCurrency, - ConditionSchema, - ConditionSchemaConditionType, - ConditionTypeEnum, Contact, ContactAddressesItem, ContactRequest, @@ -197,10 +194,6 @@ JournalLineTrackingCategoriesItem, JournalLineTrackingCategory, LinkToken, - LinkedAccountCondition, - LinkedAccountConditionRequest, - LinkedAccountSelectiveSyncConfiguration, - LinkedAccountSelectiveSyncConfigurationRequest, LinkedAccountStatus, MetaResponse, MethodEnum, @@ -209,7 +202,6 @@ ModelPermissionDeserializerRequest, MultipartFormFieldRequest, MultipartFormFieldRequestEncoding, - OperatorSchema, PaginatedAccountDetailsAndActionsList, PaginatedAccountList, PaginatedAccountingAttachmentList, @@ -218,7 +210,6 @@ PaginatedBalanceSheetList, PaginatedCashFlowStatementList, PaginatedCompanyInfoList, - PaginatedConditionSchemaList, PaginatedContactList, PaginatedCreditNoteList, PaginatedExpenseList, @@ -242,6 +233,7 @@ PatchedPaymentRequestContact, PatchedPaymentRequestCurrency, PatchedPaymentRequestTrackingCategoriesItem, + PatchedPaymentRequestType, Payment, PaymentAccount, PaymentAccountingPeriod, @@ -259,8 +251,11 @@ PaymentRequestContact, PaymentRequestCurrency, PaymentRequestTrackingCategoriesItem, + PaymentRequestType, PaymentResponse, PaymentTrackingCategoriesItem, + PaymentType, + PaymentTypeEnum, PostingStatusEnum, PurchaseOrder, PurchaseOrderAccountingPeriod, @@ -288,6 +283,7 @@ RemoteData, RemoteEndpointInfo, RemoteFieldApi, + RemoteFieldApiCoverage, RemoteFieldApiResponse, RemoteKey, RemoteResponse, @@ -392,7 +388,6 @@ purchase_orders, regenerate_key, scopes, - selective_sync, sync_status, tax_rates, tracking_categories, @@ -459,9 +454,6 @@ "CompanyInfoCurrency", "CompanyInfoListRequestExpand", "CompanyInfoRetrieveRequestExpand", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "Contact", "ContactAddressesItem", "ContactRequest", @@ -622,10 +614,6 @@ "JournalLineTrackingCategoriesItem", "JournalLineTrackingCategory", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "LinkedAccountsListRequestCategory", "MetaResponse", @@ -635,7 +623,6 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAccountList", "PaginatedAccountingAttachmentList", @@ -644,7 +631,6 @@ "PaginatedBalanceSheetList", "PaginatedCashFlowStatementList", "PaginatedCompanyInfoList", - "PaginatedConditionSchemaList", "PaginatedContactList", "PaginatedCreditNoteList", "PaginatedExpenseList", @@ -668,6 +654,7 @@ "PatchedPaymentRequestContact", "PatchedPaymentRequestCurrency", "PatchedPaymentRequestTrackingCategoriesItem", + "PatchedPaymentRequestType", "Payment", "PaymentAccount", "PaymentAccountingPeriod", @@ -685,8 +672,11 @@ "PaymentRequestContact", "PaymentRequestCurrency", "PaymentRequestTrackingCategoriesItem", + "PaymentRequestType", "PaymentResponse", "PaymentTrackingCategoriesItem", + "PaymentType", + "PaymentTypeEnum", "PaymentsListRequestExpand", "PaymentsRetrieveRequestExpand", "PostingStatusEnum", @@ -718,6 +708,7 @@ "RemoteData", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", @@ -791,7 +782,6 @@ "purchase_orders", "regenerate_key", "scopes", - "selective_sync", "sync_status", "tax_rates", "tracking_categories", diff --git a/src/merge/resources/accounting/client.py b/src/merge/resources/accounting/client.py index 19d46f90..8a08a68f 100644 --- a/src/merge/resources/accounting/client.py +++ b/src/merge/resources/accounting/client.py @@ -39,7 +39,6 @@ from .resources.purchase_orders.client import AsyncPurchaseOrdersClient, PurchaseOrdersClient from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient from .resources.scopes.client import AsyncScopesClient, ScopesClient -from .resources.selective_sync.client import AsyncSelectiveSyncClient, SelectiveSyncClient from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient from .resources.tax_rates.client import AsyncTaxRatesClient, TaxRatesClient from .resources.tracking_categories.client import AsyncTrackingCategoriesClient, TrackingCategoriesClient @@ -84,7 +83,6 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.phone_numbers = PhoneNumbersClient(client_wrapper=self._client_wrapper) self.purchase_orders = PurchaseOrdersClient(client_wrapper=self._client_wrapper) self.regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = SelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = SyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = ForceResyncClient(client_wrapper=self._client_wrapper) self.tax_rates = TaxRatesClient(client_wrapper=self._client_wrapper) @@ -130,7 +128,6 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self.phone_numbers = AsyncPhoneNumbersClient(client_wrapper=self._client_wrapper) self.purchase_orders = AsyncPurchaseOrdersClient(client_wrapper=self._client_wrapper) self.regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = AsyncSelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = AsyncSyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = AsyncForceResyncClient(client_wrapper=self._client_wrapper) self.tax_rates = AsyncTaxRatesClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/resources/accounting/resources/__init__.py b/src/merge/resources/accounting/resources/__init__.py index 0d0c342c..d98858ff 100644 --- a/src/merge/resources/accounting/resources/__init__.py +++ b/src/merge/resources/accounting/resources/__init__.py @@ -33,7 +33,6 @@ purchase_orders, regenerate_key, scopes, - selective_sync, sync_status, tax_rates, tracking_categories, @@ -134,7 +133,6 @@ "purchase_orders", "regenerate_key", "scopes", - "selective_sync", "sync_status", "tax_rates", "tracking_categories", diff --git a/src/merge/resources/accounting/resources/audit_trail/client.py b/src/merge/resources/accounting/resources/audit_trail/client.py index 447aebc2..e4a763e0 100644 --- a/src/merge/resources/accounting/resources/audit_trail/client.py +++ b/src/merge/resources/accounting/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. @@ -122,7 +122,7 @@ async def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. diff --git a/src/merge/resources/accounting/resources/field_mapping/client.py b/src/merge/resources/accounting/resources/field_mapping/client.py index d312c845..6d930035 100644 --- a/src/merge/resources/accounting/resources/field_mapping/client.py +++ b/src/merge/resources/accounting/resources/field_mapping/client.py @@ -244,8 +244,6 @@ def field_mappings_partial_update( ) client.accounting.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -615,8 +613,6 @@ async def field_mappings_partial_update( ) await client.accounting.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} diff --git a/src/merge/resources/accounting/resources/link_token/client.py b/src/merge/resources/accounting/resources/link_token/client.py index db392f22..8dd446ec 100644 --- a/src/merge/resources/accounting/resources/link_token/client.py +++ b/src/merge/resources/accounting/resources/link_token/client.py @@ -42,6 +42,7 @@ def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -68,6 +69,8 @@ def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge @@ -102,6 +105,8 @@ def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/link-token"), @@ -154,6 +159,7 @@ async def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -180,6 +186,8 @@ async def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge @@ -214,6 +222,8 @@ async def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/link-token"), diff --git a/src/merge/resources/accounting/resources/selective_sync/client.py b/src/merge/resources/accounting/resources/selective_sync/client.py deleted file mode 100644 index 55a0e3bf..00000000 --- a/src/merge/resources/accounting/resources/selective_sync/client.py +++ /dev/null @@ -1,382 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from .....core.api_error import ApiError -from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .....core.jsonable_encoder import jsonable_encoder -from .....core.remove_none_from_dict import remove_none_from_dict -from .....core.request_options import RequestOptions -from ...types.linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from ...types.linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest -from ...types.paginated_condition_schema_list import PaginatedConditionSchemaList - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class SelectiveSyncClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.accounting.selective_sync.configurations_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - from merge.resources.accounting import ( - LinkedAccountSelectiveSyncConfigurationRequest, - ) - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.accounting.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.accounting.selective_sync.meta_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncSelectiveSyncClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.accounting.selective_sync.configurations_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - from merge.resources.accounting import ( - LinkedAccountSelectiveSyncConfigurationRequest, - ) - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.accounting.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.accounting.selective_sync.meta_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/accounting/types/__init__.py b/src/merge/resources/accounting/types/__init__.py index b0e1da76..d1510af9 100644 --- a/src/merge/resources/accounting/types/__init__.py +++ b/src/merge/resources/accounting/types/__init__.py @@ -51,9 +51,6 @@ from .common_model_scopes_body_request import CommonModelScopesBodyRequest from .company_info import CompanyInfo from .company_info_currency import CompanyInfoCurrency -from .condition_schema import ConditionSchema -from .condition_schema_condition_type import ConditionSchemaConditionType -from .condition_type_enum import ConditionTypeEnum from .contact import Contact from .contact_addresses_item import ContactAddressesItem from .contact_request import ContactRequest @@ -198,10 +195,6 @@ from .journal_line_tracking_categories_item import JournalLineTrackingCategoriesItem from .journal_line_tracking_category import JournalLineTrackingCategory from .link_token import LinkToken -from .linked_account_condition import LinkedAccountCondition -from .linked_account_condition_request import LinkedAccountConditionRequest -from .linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from .linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest from .linked_account_status import LinkedAccountStatus from .meta_response import MetaResponse from .method_enum import MethodEnum @@ -210,7 +203,6 @@ from .model_permission_deserializer_request import ModelPermissionDeserializerRequest from .multipart_form_field_request import MultipartFormFieldRequest from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding -from .operator_schema import OperatorSchema from .paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList from .paginated_account_list import PaginatedAccountList from .paginated_accounting_attachment_list import PaginatedAccountingAttachmentList @@ -219,7 +211,6 @@ from .paginated_balance_sheet_list import PaginatedBalanceSheetList from .paginated_cash_flow_statement_list import PaginatedCashFlowStatementList from .paginated_company_info_list import PaginatedCompanyInfoList -from .paginated_condition_schema_list import PaginatedConditionSchemaList from .paginated_contact_list import PaginatedContactList from .paginated_credit_note_list import PaginatedCreditNoteList from .paginated_expense_list import PaginatedExpenseList @@ -243,6 +234,7 @@ from .patched_payment_request_contact import PatchedPaymentRequestContact from .patched_payment_request_currency import PatchedPaymentRequestCurrency from .patched_payment_request_tracking_categories_item import PatchedPaymentRequestTrackingCategoriesItem +from .patched_payment_request_type import PatchedPaymentRequestType from .payment import Payment from .payment_account import PaymentAccount from .payment_accounting_period import PaymentAccountingPeriod @@ -260,8 +252,11 @@ from .payment_request_contact import PaymentRequestContact from .payment_request_currency import PaymentRequestCurrency from .payment_request_tracking_categories_item import PaymentRequestTrackingCategoriesItem +from .payment_request_type import PaymentRequestType from .payment_response import PaymentResponse from .payment_tracking_categories_item import PaymentTrackingCategoriesItem +from .payment_type import PaymentType +from .payment_type_enum import PaymentTypeEnum from .posting_status_enum import PostingStatusEnum from .purchase_order import PurchaseOrder from .purchase_order_accounting_period import PurchaseOrderAccountingPeriod @@ -289,6 +284,7 @@ from .remote_data import RemoteData from .remote_endpoint_info import RemoteEndpointInfo from .remote_field_api import RemoteFieldApi +from .remote_field_api_coverage import RemoteFieldApiCoverage from .remote_field_api_response import RemoteFieldApiResponse from .remote_key import RemoteKey from .remote_response import RemoteResponse @@ -379,9 +375,6 @@ "CommonModelScopesBodyRequest", "CompanyInfo", "CompanyInfoCurrency", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "Contact", "ContactAddressesItem", "ContactRequest", @@ -524,10 +517,6 @@ "JournalLineTrackingCategoriesItem", "JournalLineTrackingCategory", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "MetaResponse", "MethodEnum", @@ -536,7 +525,6 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAccountList", "PaginatedAccountingAttachmentList", @@ -545,7 +533,6 @@ "PaginatedBalanceSheetList", "PaginatedCashFlowStatementList", "PaginatedCompanyInfoList", - "PaginatedConditionSchemaList", "PaginatedContactList", "PaginatedCreditNoteList", "PaginatedExpenseList", @@ -569,6 +556,7 @@ "PatchedPaymentRequestContact", "PatchedPaymentRequestCurrency", "PatchedPaymentRequestTrackingCategoriesItem", + "PatchedPaymentRequestType", "Payment", "PaymentAccount", "PaymentAccountingPeriod", @@ -586,8 +574,11 @@ "PaymentRequestContact", "PaymentRequestCurrency", "PaymentRequestTrackingCategoriesItem", + "PaymentRequestType", "PaymentResponse", "PaymentTrackingCategoriesItem", + "PaymentType", + "PaymentTypeEnum", "PostingStatusEnum", "PurchaseOrder", "PurchaseOrderAccountingPeriod", @@ -615,6 +606,7 @@ "RemoteData", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", diff --git a/src/merge/resources/accounting/types/account.py b/src/merge/resources/accounting/types/account.py index 0c443ebd..82f5ca2a 100644 --- a/src/merge/resources/accounting/types/account.py +++ b/src/merge/resources/accounting/types/account.py @@ -38,9 +38,11 @@ class Account(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The account's name.") description: typing.Optional[str] = pydantic.Field(description="The account's description.") diff --git a/src/merge/resources/accounting/types/accounting_attachment.py b/src/merge/resources/accounting/types/accounting_attachment.py index 159fd3cb..dcd03ae1 100644 --- a/src/merge/resources/accounting/types/accounting_attachment.py +++ b/src/merge/resources/accounting/types/accounting_attachment.py @@ -27,9 +27,11 @@ class AccountingAttachment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) file_name: typing.Optional[str] = pydantic.Field(description="The attachment's name.") file_url: typing.Optional[str] = pydantic.Field(description="The attachment's url.") diff --git a/src/merge/resources/accounting/types/accounting_period.py b/src/merge/resources/accounting/types/accounting_period.py index ad5b8e15..1b57a094 100644 --- a/src/merge/resources/accounting/types/accounting_period.py +++ b/src/merge/resources/accounting/types/accounting_period.py @@ -26,9 +26,11 @@ class AccountingPeriod(pydantic.BaseModel): """ id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) start_date: typing.Optional[dt.datetime] = pydantic.Field(description="Beginning date of the period") end_date: typing.Optional[dt.datetime] = pydantic.Field(description="End date of the period") diff --git a/src/merge/resources/accounting/types/accounting_phone_number.py b/src/merge/resources/accounting/types/accounting_phone_number.py index 3efa9d8c..c7a9e7fc 100644 --- a/src/merge/resources/accounting/types/accounting_phone_number.py +++ b/src/merge/resources/accounting/types/accounting_phone_number.py @@ -24,9 +24,11 @@ class AccountingPhoneNumber(pydantic.BaseModel): Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) number: typing.Optional[str] = pydantic.Field(description="The phone number.") type: typing.Optional[str] = pydantic.Field(description="The phone number's type.") diff --git a/src/merge/resources/accounting/types/address.py b/src/merge/resources/accounting/types/address.py index e5fc365f..4111f71d 100644 --- a/src/merge/resources/accounting/types/address.py +++ b/src/merge/resources/accounting/types/address.py @@ -26,9 +26,11 @@ class Address(pydantic.BaseModel): Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) type: typing.Optional[AddressType] = pydantic.Field( description=("The address type.\n" "\n" "- `BILLING` - BILLING\n" "- `SHIPPING` - SHIPPING\n") diff --git a/src/merge/resources/accounting/types/audit_log_event.py b/src/merge/resources/accounting/types/audit_log_event.py index 131ad94b..e8bffc42 100644 --- a/src/merge/resources/accounting/types/audit_log_event.py +++ b/src/merge/resources/accounting/types/audit_log_event.py @@ -72,6 +72,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" "- `MUTED_ISSUE` - MUTED_ISSUE\n" "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" + "- `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK\n" + "- `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK\n" + "- `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED\n" ) ) event_description: str diff --git a/src/merge/resources/accounting/types/balance_sheet.py b/src/merge/resources/accounting/types/balance_sheet.py index f11774b8..a5d18f90 100644 --- a/src/merge/resources/accounting/types/balance_sheet.py +++ b/src/merge/resources/accounting/types/balance_sheet.py @@ -30,9 +30,11 @@ class BalanceSheet(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The balance sheet's name.") currency: typing.Optional[BalanceSheetCurrency] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/cash_flow_statement.py b/src/merge/resources/accounting/types/cash_flow_statement.py index 5688723c..be343d69 100644 --- a/src/merge/resources/accounting/types/cash_flow_statement.py +++ b/src/merge/resources/accounting/types/cash_flow_statement.py @@ -30,9 +30,11 @@ class CashFlowStatement(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The cash flow statement's name.") currency: typing.Optional[CashFlowStatementCurrency] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/company_info.py b/src/merge/resources/accounting/types/company_info.py index 60fd050d..59da1fd2 100644 --- a/src/merge/resources/accounting/types/company_info.py +++ b/src/merge/resources/accounting/types/company_info.py @@ -30,9 +30,11 @@ class CompanyInfo(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The company's name.") legal_name: typing.Optional[str] = pydantic.Field(description="The company's legal name.") diff --git a/src/merge/resources/accounting/types/condition_schema.py b/src/merge/resources/accounting/types/condition_schema.py deleted file mode 100644 index c8aebb68..00000000 --- a/src/merge/resources/accounting/types/condition_schema.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema_condition_type import ConditionSchemaConditionType -from .operator_schema import OperatorSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class ConditionSchema(pydantic.BaseModel): - id: str = pydantic.Field( - description="The ID of the condition schema. This ID is used when updating selective syncs for a linked account." - ) - common_model: typing.Optional[str] = pydantic.Field( - description="The common model for which a condition schema is defined." - ) - native_name: typing.Optional[str] - field_name: typing.Optional[str] - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." - ) - condition_type: ConditionSchemaConditionType = pydantic.Field( - description=( - "The type of value(s) that can be set for this condition.\n" - "\n" - "- `BOOLEAN` - BOOLEAN\n" - "- `DATE` - DATE\n" - "- `DATE_TIME` - DATE_TIME\n" - "- `INTEGER` - INTEGER\n" - "- `FLOAT` - FLOAT\n" - "- `STRING` - STRING\n" - "- `LIST_OF_STRINGS` - LIST_OF_STRINGS\n" - ) - ) - operators: typing.List[OperatorSchema] = pydantic.Field( - description="The schemas for the operators that can be used on a condition." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/accounting/types/condition_schema_condition_type.py b/src/merge/resources/accounting/types/condition_schema_condition_type.py deleted file mode 100644 index 40fe5f2e..00000000 --- a/src/merge/resources/accounting/types/condition_schema_condition_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .condition_type_enum import ConditionTypeEnum - -ConditionSchemaConditionType = typing.Union[ConditionTypeEnum, str] diff --git a/src/merge/resources/accounting/types/condition_type_enum.py b/src/merge/resources/accounting/types/condition_type_enum.py deleted file mode 100644 index 2814507a..00000000 --- a/src/merge/resources/accounting/types/condition_type_enum.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class ConditionTypeEnum(str, enum.Enum): - """ - - `BOOLEAN` - BOOLEAN - - `DATE` - DATE - - `DATE_TIME` - DATE_TIME - - `INTEGER` - INTEGER - - `FLOAT` - FLOAT - - `STRING` - STRING - - `LIST_OF_STRINGS` - LIST_OF_STRINGS - """ - - BOOLEAN = "BOOLEAN" - DATE = "DATE" - DATE_TIME = "DATE_TIME" - INTEGER = "INTEGER" - FLOAT = "FLOAT" - STRING = "STRING" - LIST_OF_STRINGS = "LIST_OF_STRINGS" - - def visit( - self, - boolean: typing.Callable[[], T_Result], - date: typing.Callable[[], T_Result], - date_time: typing.Callable[[], T_Result], - integer: typing.Callable[[], T_Result], - float_: typing.Callable[[], T_Result], - string: typing.Callable[[], T_Result], - list_of_strings: typing.Callable[[], T_Result], - ) -> T_Result: - if self is ConditionTypeEnum.BOOLEAN: - return boolean() - if self is ConditionTypeEnum.DATE: - return date() - if self is ConditionTypeEnum.DATE_TIME: - return date_time() - if self is ConditionTypeEnum.INTEGER: - return integer() - if self is ConditionTypeEnum.FLOAT: - return float_() - if self is ConditionTypeEnum.STRING: - return string() - if self is ConditionTypeEnum.LIST_OF_STRINGS: - return list_of_strings() diff --git a/src/merge/resources/accounting/types/contact.py b/src/merge/resources/accounting/types/contact.py index ddda7c31..b7daf796 100644 --- a/src/merge/resources/accounting/types/contact.py +++ b/src/merge/resources/accounting/types/contact.py @@ -33,9 +33,11 @@ class Contact(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The contact's name.") is_supplier: typing.Optional[bool] = pydantic.Field(description="Whether the contact is a supplier.") diff --git a/src/merge/resources/accounting/types/credit_note.py b/src/merge/resources/accounting/types/credit_note.py index 76ca8533..5a67cf26 100644 --- a/src/merge/resources/accounting/types/credit_note.py +++ b/src/merge/resources/accounting/types/credit_note.py @@ -36,9 +36,11 @@ class CreditNote(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The credit note's transaction date.") status: typing.Optional[CreditNoteStatus] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/credit_note_line_item.py b/src/merge/resources/accounting/types/credit_note_line_item.py index c067fe9d..66962ca8 100644 --- a/src/merge/resources/accounting/types/credit_note_line_item.py +++ b/src/merge/resources/accounting/types/credit_note_line_item.py @@ -16,9 +16,11 @@ class CreditNoteLineItem(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) item: typing.Optional[CreditNoteLineItemItem] name: typing.Optional[str] = pydantic.Field(description="The credit note line item's name.") @@ -26,7 +28,6 @@ class CreditNoteLineItem(pydantic.BaseModel): quantity: typing.Optional[str] = pydantic.Field(description="The credit note line item's quantity.") memo: typing.Optional[str] = pydantic.Field(description="The credit note line item's memo.") unit_price: typing.Optional[str] = pydantic.Field(description="The credit note line item's unit price.") - tax_rate: typing.Optional[str] = pydantic.Field(description="The credit note line item's tax rate.") total_line_amount: typing.Optional[str] = pydantic.Field(description="The credit note line item's total.") tracking_category: typing.Optional[str] = pydantic.Field( description="The credit note line item's associated tracking category." diff --git a/src/merge/resources/accounting/types/currency_enum.py b/src/merge/resources/accounting/types/currency_enum.py index d86f18a6..b9cf3426 100644 --- a/src/merge/resources/accounting/types/currency_enum.py +++ b/src/merge/resources/accounting/types/currency_enum.py @@ -628,7 +628,7 @@ def visit( xua: typing.Callable[[], T_Result], afn: typing.Callable[[], T_Result], afa: typing.Callable[[], T_Result], - all: typing.Callable[[], T_Result], + all_: typing.Callable[[], T_Result], alk: typing.Callable[[], T_Result], dzd: typing.Callable[[], T_Result], adp: typing.Callable[[], T_Result], @@ -939,7 +939,7 @@ def visit( if self is CurrencyEnum.AFA: return afa() if self is CurrencyEnum.ALL: - return all() + return all_() if self is CurrencyEnum.ALK: return alk() if self is CurrencyEnum.DZD: diff --git a/src/merge/resources/accounting/types/event_type_enum.py b/src/merge/resources/accounting/types/event_type_enum.py index 434539c7..fcc33f75 100644 --- a/src/merge/resources/accounting/types/event_type_enum.py +++ b/src/merge/resources/accounting/types/event_type_enum.py @@ -42,6 +42,9 @@ class EventTypeEnum(str, enum.Enum): - `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 """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -78,6 +81,9 @@ class EventTypeEnum(str, enum.Enum): 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" def visit( self, @@ -115,6 +121,9 @@ def visit( 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], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -184,3 +193,9 @@ def visit( 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() diff --git a/src/merge/resources/accounting/types/expense.py b/src/merge/resources/accounting/types/expense.py index a1b9d505..5db2fd4b 100644 --- a/src/merge/resources/accounting/types/expense.py +++ b/src/merge/resources/accounting/types/expense.py @@ -36,9 +36,11 @@ class Expense(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="When the transaction occurred.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the expense was created.") diff --git a/src/merge/resources/accounting/types/expense_line.py b/src/merge/resources/accounting/types/expense_line.py index d6c08367..c66bdbeb 100644 --- a/src/merge/resources/accounting/types/expense_line.py +++ b/src/merge/resources/accounting/types/expense_line.py @@ -32,9 +32,11 @@ class ExpenseLine(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) item: typing.Optional[ExpenseLineItem] = pydantic.Field(description="The line's item.") net_amount: typing.Optional[float] = pydantic.Field(description="The line's net amount.") diff --git a/src/merge/resources/accounting/types/income_statement.py b/src/merge/resources/accounting/types/income_statement.py index 62c40600..59c70ac3 100644 --- a/src/merge/resources/accounting/types/income_statement.py +++ b/src/merge/resources/accounting/types/income_statement.py @@ -30,9 +30,11 @@ class IncomeStatement(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The income statement's name.") currency: typing.Optional[IncomeStatementCurrency] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/invoice.py b/src/merge/resources/accounting/types/invoice.py index d4cb808e..49937ede 100644 --- a/src/merge/resources/accounting/types/invoice.py +++ b/src/merge/resources/accounting/types/invoice.py @@ -38,9 +38,11 @@ class Invoice(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) type: typing.Optional[InvoiceType] = pydantic.Field( description=( diff --git a/src/merge/resources/accounting/types/invoice_line_item.py b/src/merge/resources/accounting/types/invoice_line_item.py index e7fe3c08..9cc473db 100644 --- a/src/merge/resources/accounting/types/invoice_line_item.py +++ b/src/merge/resources/accounting/types/invoice_line_item.py @@ -31,9 +31,11 @@ class InvoiceLineItem(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) description: typing.Optional[str] = pydantic.Field(description="The line item's description.") unit_price: typing.Optional[float] = pydantic.Field(description="The line item's unit price.") diff --git a/src/merge/resources/accounting/types/item.py b/src/merge/resources/accounting/types/item.py index 0f18a843..1984e6e1 100644 --- a/src/merge/resources/accounting/types/item.py +++ b/src/merge/resources/accounting/types/item.py @@ -31,9 +31,11 @@ class Item(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The item's name.") status: typing.Optional[ItemStatus] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/journal_entry.py b/src/merge/resources/accounting/types/journal_entry.py index 607f996b..e3938b58 100644 --- a/src/merge/resources/accounting/types/journal_entry.py +++ b/src/merge/resources/accounting/types/journal_entry.py @@ -39,9 +39,11 @@ class JournalEntry(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The journal entry's transaction date.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/journal_line.py b/src/merge/resources/accounting/types/journal_line.py index 4009877c..72762c49 100644 --- a/src/merge/resources/accounting/types/journal_line.py +++ b/src/merge/resources/accounting/types/journal_line.py @@ -30,9 +30,11 @@ class JournalLine(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) account: typing.Optional[JournalLineAccount] net_amount: typing.Optional[float] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/linked_account_condition.py b/src/merge/resources/accounting/types/linked_account_condition.py deleted file mode 100644 index f13ef90d..00000000 --- a/src/merge/resources/accounting/types/linked_account_condition.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountCondition(pydantic.BaseModel): - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Optional[typing.Any] - field_name: typing.Optional[str] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/accounting/types/linked_account_condition_request.py b/src/merge/resources/accounting/types/linked_account_condition_request.py deleted file mode 100644 index ce36a27f..00000000 --- a/src/merge/resources/accounting/types/linked_account_condition_request.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountConditionRequest(pydantic.BaseModel): - id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Any - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/accounting/types/linked_account_selective_sync_configuration_request.py b/src/merge/resources/accounting/types/linked_account_selective_sync_configuration_request.py deleted file mode 100644 index b744ce07..00000000 --- a/src/merge/resources/accounting/types/linked_account_selective_sync_configuration_request.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition_request import LinkedAccountConditionRequest - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfigurationRequest(pydantic.BaseModel): - linked_account_conditions: typing.List[LinkedAccountConditionRequest] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/accounting/types/operator_schema.py b/src/merge/resources/accounting/types/operator_schema.py deleted file mode 100644 index 0a427fe7..00000000 --- a/src/merge/resources/accounting/types/operator_schema.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class OperatorSchema(pydantic.BaseModel): - operator: typing.Optional[str] = pydantic.Field(description="The operator for which an operator schema is defined.") - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether the operator can be repeated multiple times." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/accounting/types/paginated_condition_schema_list.py b/src/merge/resources/accounting/types/paginated_condition_schema_list.py deleted file mode 100644 index 64f4f814..00000000 --- a/src/merge/resources/accounting/types/paginated_condition_schema_list.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema import ConditionSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class PaginatedConditionSchemaList(pydantic.BaseModel): - next: typing.Optional[str] - previous: typing.Optional[str] - results: typing.Optional[typing.List[ConditionSchema]] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/accounting/types/patched_payment_request.py b/src/merge/resources/accounting/types/patched_payment_request.py index 63a54ab5..fdfc909d 100644 --- a/src/merge/resources/accounting/types/patched_payment_request.py +++ b/src/merge/resources/accounting/types/patched_payment_request.py @@ -11,6 +11,7 @@ from .patched_payment_request_contact import PatchedPaymentRequestContact from .patched_payment_request_currency import PatchedPaymentRequestCurrency from .patched_payment_request_tracking_categories_item import PatchedPaymentRequestTrackingCategoriesItem +from .patched_payment_request_type import PatchedPaymentRequestType try: import pydantic.v1 as pydantic # type: ignore @@ -357,6 +358,14 @@ class PatchedPaymentRequest(pydantic.BaseModel): total_amount: typing.Optional[float] = pydantic.Field( description="The total amount of money being paid to the supplier, or customer, after taxes." ) + type: typing.Optional[PatchedPaymentRequestType] = pydantic.Field( + description=( + "The type of the invoice.\n" + "\n" + "- `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE\n" + "- `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE\n" + ) + ) tracking_categories: typing.Optional[typing.List[typing.Optional[PatchedPaymentRequestTrackingCategoriesItem]]] accounting_period: typing.Optional[PatchedPaymentRequestAccountingPeriod] = pydantic.Field( description="The accounting period that the Payment was generated in." diff --git a/src/merge/resources/accounting/types/patched_payment_request_type.py b/src/merge/resources/accounting/types/patched_payment_request_type.py new file mode 100644 index 00000000..13dde772 --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .payment_type_enum import PaymentTypeEnum + +PatchedPaymentRequestType = typing.Union[PaymentTypeEnum, str] diff --git a/src/merge/resources/accounting/types/payment.py b/src/merge/resources/accounting/types/payment.py index 65f2b316..b2feb8b6 100644 --- a/src/merge/resources/accounting/types/payment.py +++ b/src/merge/resources/accounting/types/payment.py @@ -11,6 +11,7 @@ from .payment_contact import PaymentContact from .payment_currency import PaymentCurrency from .payment_tracking_categories_item import PaymentTrackingCategoriesItem +from .payment_type import PaymentType from .remote_data import RemoteData try: @@ -34,9 +35,11 @@ class Payment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The payment's transaction date.") contact: typing.Optional[PaymentContact] = pydantic.Field( @@ -362,6 +365,14 @@ class Payment(pydantic.BaseModel): total_amount: typing.Optional[float] = pydantic.Field( description="The total amount of money being paid to the supplier, or customer, after taxes." ) + type: typing.Optional[PaymentType] = pydantic.Field( + description=( + "The type of the invoice.\n" + "\n" + "- `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE\n" + "- `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE\n" + ) + ) tracking_categories: typing.Optional[typing.List[typing.Optional[PaymentTrackingCategoriesItem]]] remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field( description="When the third party's payment entry was updated." diff --git a/src/merge/resources/accounting/types/payment_line_item.py b/src/merge/resources/accounting/types/payment_line_item.py index 53cb4eca..8b7aa4c4 100644 --- a/src/merge/resources/accounting/types/payment_line_item.py +++ b/src/merge/resources/accounting/types/payment_line_item.py @@ -26,9 +26,11 @@ class PaymentLineItem(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) applied_amount: typing.Optional[str] = pydantic.Field(description="The amount being applied to the transaction.") applied_date: typing.Optional[dt.datetime] = pydantic.Field(description="The date the payment portion is applied.") diff --git a/src/merge/resources/accounting/types/payment_request.py b/src/merge/resources/accounting/types/payment_request.py index ff162128..907d64fd 100644 --- a/src/merge/resources/accounting/types/payment_request.py +++ b/src/merge/resources/accounting/types/payment_request.py @@ -11,6 +11,7 @@ from .payment_request_contact import PaymentRequestContact from .payment_request_currency import PaymentRequestCurrency from .payment_request_tracking_categories_item import PaymentRequestTrackingCategoriesItem +from .payment_request_type import PaymentRequestType try: import pydantic.v1 as pydantic # type: ignore @@ -355,6 +356,14 @@ class PaymentRequest(pydantic.BaseModel): total_amount: typing.Optional[float] = pydantic.Field( description="The total amount of money being paid to the supplier, or customer, after taxes." ) + type: typing.Optional[PaymentRequestType] = pydantic.Field( + description=( + "The type of the invoice.\n" + "\n" + "- `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE\n" + "- `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE\n" + ) + ) tracking_categories: typing.Optional[typing.List[typing.Optional[PaymentRequestTrackingCategoriesItem]]] accounting_period: typing.Optional[PaymentRequestAccountingPeriod] = pydantic.Field( description="The accounting period that the Payment was generated in." diff --git a/src/merge/resources/accounting/types/payment_request_type.py b/src/merge/resources/accounting/types/payment_request_type.py new file mode 100644 index 00000000..cdf01583 --- /dev/null +++ b/src/merge/resources/accounting/types/payment_request_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .payment_type_enum import PaymentTypeEnum + +PaymentRequestType = typing.Union[PaymentTypeEnum, str] diff --git a/src/merge/resources/accounting/types/payment_type.py b/src/merge/resources/accounting/types/payment_type.py new file mode 100644 index 00000000..95c1776f --- /dev/null +++ b/src/merge/resources/accounting/types/payment_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .payment_type_enum import PaymentTypeEnum + +PaymentType = typing.Union[PaymentTypeEnum, str] diff --git a/src/merge/resources/accounting/types/payment_type_enum.py b/src/merge/resources/accounting/types/payment_type_enum.py new file mode 100644 index 00000000..5768cb45 --- /dev/null +++ b/src/merge/resources/accounting/types/payment_type_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 PaymentTypeEnum(str, enum.Enum): + """ + - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + """ + + ACCOUNTS_PAYABLE = "ACCOUNTS_PAYABLE" + ACCOUNTS_RECEIVABLE = "ACCOUNTS_RECEIVABLE" + + def visit( + self, accounts_payable: typing.Callable[[], T_Result], accounts_receivable: typing.Callable[[], T_Result] + ) -> T_Result: + if self is PaymentTypeEnum.ACCOUNTS_PAYABLE: + return accounts_payable() + if self is PaymentTypeEnum.ACCOUNTS_RECEIVABLE: + return accounts_receivable() diff --git a/src/merge/resources/accounting/types/purchase_order.py b/src/merge/resources/accounting/types/purchase_order.py index c66a2164..54f33096 100644 --- a/src/merge/resources/accounting/types/purchase_order.py +++ b/src/merge/resources/accounting/types/purchase_order.py @@ -37,9 +37,11 @@ class PurchaseOrder(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) status: typing.Optional[PurchaseOrderStatus] = pydantic.Field( description=( diff --git a/src/merge/resources/accounting/types/purchase_order_line_item.py b/src/merge/resources/accounting/types/purchase_order_line_item.py index e14b0dc3..63d34fe3 100644 --- a/src/merge/resources/accounting/types/purchase_order_line_item.py +++ b/src/merge/resources/accounting/types/purchase_order_line_item.py @@ -28,9 +28,11 @@ class PurchaseOrderLineItem(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) description: typing.Optional[str] = pydantic.Field(description="A description of the good being purchased.") unit_price: typing.Optional[float] = pydantic.Field(description="The line item's unit price.") diff --git a/src/merge/resources/accounting/types/remote_field_api.py b/src/merge/resources/accounting/types/remote_field_api.py index 30529431..6fa31902 100644 --- a/src/merge/resources/accounting/types/remote_field_api.py +++ b/src/merge/resources/accounting/types/remote_field_api.py @@ -6,6 +6,7 @@ from ....core.datetime_utils import serialize_datetime from .advanced_metadata import AdvancedMetadata from .remote_endpoint_info import RemoteEndpointInfo +from .remote_field_api_coverage import RemoteFieldApiCoverage try: import pydantic.v1 as pydantic # type: ignore @@ -19,6 +20,7 @@ class RemoteFieldApi(pydantic.BaseModel): remote_endpoint_info: RemoteEndpointInfo example_values: typing.List[typing.Any] advanced_metadata: typing.Optional[AdvancedMetadata] + coverage: typing.Optional[RemoteFieldApiCoverage] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/resources/selective_sync/__init__.py b/src/merge/resources/accounting/types/remote_field_api_coverage.py similarity index 50% rename from src/merge/resources/accounting/resources/selective_sync/__init__.py rename to src/merge/resources/accounting/types/remote_field_api_coverage.py index f3ea2659..adcd9be9 100644 --- a/src/merge/resources/accounting/resources/selective_sync/__init__.py +++ b/src/merge/resources/accounting/types/remote_field_api_coverage.py @@ -1,2 +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/accounting/types/report_item.py b/src/merge/resources/accounting/types/report_item.py index 59053762..b447b875 100644 --- a/src/merge/resources/accounting/types/report_item.py +++ b/src/merge/resources/accounting/types/report_item.py @@ -25,9 +25,11 @@ class ReportItem(pydantic.BaseModel): """ remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The report item's name.") value: typing.Optional[float] = pydantic.Field(description="The report item's value.") diff --git a/src/merge/resources/accounting/types/tax_rate.py b/src/merge/resources/accounting/types/tax_rate.py index 4595fed3..016555a7 100644 --- a/src/merge/resources/accounting/types/tax_rate.py +++ b/src/merge/resources/accounting/types/tax_rate.py @@ -28,14 +28,22 @@ class TaxRate(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) description: typing.Optional[str] = pydantic.Field(description="The tax rate's description.") - total_tax_rate: typing.Optional[float] = pydantic.Field(description="The tax rate's total tax rate.") - effective_tax_rate: typing.Optional[float] = pydantic.Field(description="The tax rate's effective tax rate.") - company: typing.Optional[TaxRateCompany] = pydantic.Field(description="The company the tax rate belongs to.") + total_tax_rate: typing.Optional[float] = pydantic.Field( + description="The tax’s total tax rate - sum of the tax components (not compounded)." + ) + effective_tax_rate: typing.Optional[float] = pydantic.Field( + description="The tax rate’s effective tax rate - total amount of tax with compounding." + ) + company: typing.Optional[TaxRateCompany] = pydantic.Field( + description="The subsidiary that the tax rate belongs to (in the case of multi-entity systems)." + ) remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) diff --git a/src/merge/resources/accounting/types/tracking_category.py b/src/merge/resources/accounting/types/tracking_category.py index aabbd4f1..c8415b30 100644 --- a/src/merge/resources/accounting/types/tracking_category.py +++ b/src/merge/resources/accounting/types/tracking_category.py @@ -30,9 +30,11 @@ class TrackingCategory(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The tracking category's name.") status: typing.Optional[TrackingCategoryStatus] = pydantic.Field( diff --git a/src/merge/resources/accounting/types/transaction.py b/src/merge/resources/accounting/types/transaction.py index c373ce6a..6303f675 100644 --- a/src/merge/resources/accounting/types/transaction.py +++ b/src/merge/resources/accounting/types/transaction.py @@ -41,9 +41,11 @@ class Transaction(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) transaction_type: typing.Optional[str] = pydantic.Field( description="The type of transaction, which can by any transaction object not already included in Merge’s common model." diff --git a/src/merge/resources/accounting/types/transaction_line_item.py b/src/merge/resources/accounting/types/transaction_line_item.py index 3dba2597..f7ec3079 100644 --- a/src/merge/resources/accounting/types/transaction_line_item.py +++ b/src/merge/resources/accounting/types/transaction_line_item.py @@ -28,9 +28,11 @@ class TransactionLineItem(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) memo: typing.Optional[str] = pydantic.Field( description="An internal note used by the business to clarify purpose of the transaction." @@ -42,7 +44,7 @@ class TransactionLineItem(pydantic.BaseModel): tracking_category: typing.Optional[str] = pydantic.Field(description="The line's associated tracking category.") tracking_categories: typing.List[str] = pydantic.Field(description="The line's associated tracking categories.") total_line_amount: typing.Optional[str] = pydantic.Field(description="The line item's total.") - tax_rate: typing.Optional[str] = pydantic.Field(description="The line item's tax rate.") + tax_rate: typing.Optional[str] currency: typing.Optional[TransactionLineItemCurrency] = pydantic.Field( description=( "The line item's currency.\n" diff --git a/src/merge/resources/accounting/types/vendor_credit.py b/src/merge/resources/accounting/types/vendor_credit.py index 2a5d79fb..b6406350 100644 --- a/src/merge/resources/accounting/types/vendor_credit.py +++ b/src/merge/resources/accounting/types/vendor_credit.py @@ -33,9 +33,11 @@ class VendorCredit(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) number: typing.Optional[str] = pydantic.Field(description="The vendor credit's number.") transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The vendor credit's transaction date.") diff --git a/src/merge/resources/accounting/types/vendor_credit_line.py b/src/merge/resources/accounting/types/vendor_credit_line.py index b29c6963..73266a57 100644 --- a/src/merge/resources/accounting/types/vendor_credit_line.py +++ b/src/merge/resources/accounting/types/vendor_credit_line.py @@ -27,9 +27,11 @@ class VendorCreditLine(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) net_amount: typing.Optional[float] = pydantic.Field(description="The full value of the credit.") tracking_category: typing.Optional[str] = pydantic.Field(description="The line's associated tracking category.") diff --git a/src/merge/resources/ats/__init__.py b/src/merge/resources/ats/__init__.py index 86efce94..67dcf3a1 100644 --- a/src/merge/resources/ats/__init__.py +++ b/src/merge/resources/ats/__init__.py @@ -56,9 +56,6 @@ CategoryEnum, CommonModelScopeApi, CommonModelScopesBodyRequest, - ConditionSchema, - ConditionSchemaConditionType, - ConditionTypeEnum, DataPassthroughRequest, DebugModeLog, DebugModelLogSummary, @@ -110,10 +107,6 @@ JobStatusEnum, JobTypeEnum, LinkToken, - LinkedAccountCondition, - LinkedAccountConditionRequest, - LinkedAccountSelectiveSyncConfiguration, - LinkedAccountSelectiveSyncConfigurationRequest, LinkedAccountStatus, MetaResponse, MethodEnum, @@ -128,7 +121,6 @@ OfferStatus, OfferStatusEnum, Office, - OperatorSchema, OverallRecommendationEnum, PaginatedAccountDetailsAndActionsList, PaginatedActivityList, @@ -136,7 +128,6 @@ PaginatedAttachmentList, PaginatedAuditLogEventList, PaginatedCandidateList, - PaginatedConditionSchemaList, PaginatedDepartmentList, PaginatedEeocList, PaginatedIssueList, @@ -164,6 +155,7 @@ RemoteData, RemoteEndpointInfo, RemoteFieldApi, + RemoteFieldApiCoverage, RemoteFieldApiResponse, RemoteKey, RemoteResponse, @@ -267,7 +259,6 @@ reject_reasons, scopes, scorecards, - selective_sync, sync_status, tags, users, @@ -338,9 +329,6 @@ "CategoryEnum", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", @@ -404,10 +392,6 @@ "JobsRetrieveRequestExpand", "JobsScreeningQuestionsListRequestExpand", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "LinkedAccountsListRequestCategory", "MetaResponse", @@ -425,7 +409,6 @@ "OffersListRequestExpand", "OffersRetrieveRequestExpand", "Office", - "OperatorSchema", "OverallRecommendationEnum", "PaginatedAccountDetailsAndActionsList", "PaginatedActivityList", @@ -433,7 +416,6 @@ "PaginatedAttachmentList", "PaginatedAuditLogEventList", "PaginatedCandidateList", - "PaginatedConditionSchemaList", "PaginatedDepartmentList", "PaginatedEeocList", "PaginatedIssueList", @@ -461,6 +443,7 @@ "RemoteData", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", @@ -539,7 +522,6 @@ "reject_reasons", "scopes", "scorecards", - "selective_sync", "sync_status", "tags", "users", diff --git a/src/merge/resources/ats/client.py b/src/merge/resources/ats/client.py index 01e2b2b9..280e6eff 100644 --- a/src/merge/resources/ats/client.py +++ b/src/merge/resources/ats/client.py @@ -36,7 +36,6 @@ from .resources.reject_reasons.client import AsyncRejectReasonsClient, RejectReasonsClient from .resources.scopes.client import AsyncScopesClient, ScopesClient from .resources.scorecards.client import AsyncScorecardsClient, ScorecardsClient -from .resources.selective_sync.client import AsyncSelectiveSyncClient, SelectiveSyncClient from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient from .resources.tags.client import AsyncTagsClient, TagsClient from .resources.users.client import AsyncUsersClient, UsersClient @@ -76,7 +75,6 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper) self.reject_reasons = RejectReasonsClient(client_wrapper=self._client_wrapper) self.scorecards = ScorecardsClient(client_wrapper=self._client_wrapper) - self.selective_sync = SelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = SyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = ForceResyncClient(client_wrapper=self._client_wrapper) self.tags = TagsClient(client_wrapper=self._client_wrapper) @@ -117,7 +115,6 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self.regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper) self.reject_reasons = AsyncRejectReasonsClient(client_wrapper=self._client_wrapper) self.scorecards = AsyncScorecardsClient(client_wrapper=self._client_wrapper) - self.selective_sync = AsyncSelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = AsyncSyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = AsyncForceResyncClient(client_wrapper=self._client_wrapper) self.tags = AsyncTagsClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/resources/ats/resources/__init__.py b/src/merge/resources/ats/resources/__init__.py index 28de2300..c8309aa9 100644 --- a/src/merge/resources/ats/resources/__init__.py +++ b/src/merge/resources/ats/resources/__init__.py @@ -30,7 +30,6 @@ reject_reasons, scopes, scorecards, - selective_sync, sync_status, tags, users, @@ -118,7 +117,6 @@ "reject_reasons", "scopes", "scorecards", - "selective_sync", "sync_status", "tags", "users", diff --git a/src/merge/resources/ats/resources/audit_trail/client.py b/src/merge/resources/ats/resources/audit_trail/client.py index c2bf0f61..19470c1c 100644 --- a/src/merge/resources/ats/resources/audit_trail/client.py +++ b/src/merge/resources/ats/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. @@ -122,7 +122,7 @@ async def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. diff --git a/src/merge/resources/ats/resources/candidates/client.py b/src/merge/resources/ats/resources/candidates/client.py index 34ea9e15..785fc487 100644 --- a/src/merge/resources/ats/resources/candidates/client.py +++ b/src/merge/resources/ats/resources/candidates/client.py @@ -397,7 +397,6 @@ def ignore_create( client.ats.candidates.ignore_create( model_id="model_id", reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) """ _request: typing.Dict[str, typing.Any] = {"reason": reason.value} @@ -889,7 +888,6 @@ async def ignore_create( await client.ats.candidates.ignore_create( model_id="model_id", reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) """ _request: typing.Dict[str, typing.Any] = {"reason": reason.value} diff --git a/src/merge/resources/ats/resources/field_mapping/client.py b/src/merge/resources/ats/resources/field_mapping/client.py index 2b07d548..6bd6848e 100644 --- a/src/merge/resources/ats/resources/field_mapping/client.py +++ b/src/merge/resources/ats/resources/field_mapping/client.py @@ -244,8 +244,6 @@ def field_mappings_partial_update( ) client.ats.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -615,8 +613,6 @@ async def field_mappings_partial_update( ) await client.ats.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} diff --git a/src/merge/resources/ats/resources/job_postings/client.py b/src/merge/resources/ats/resources/job_postings/client.py index 26c77ec7..8b82b7fc 100644 --- a/src/merge/resources/ats/resources/job_postings/client.py +++ b/src/merge/resources/ats/resources/job_postings/client.py @@ -31,6 +31,7 @@ def list( created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["job"]] = None, include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, @@ -50,6 +51,8 @@ def list( - cursor: typing.Optional[str]. The pagination cursor value. + - expand: typing.Optional[typing.Literal["job"]]. Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + - include_deleted_data: typing.Optional[bool]. Whether to include data that was marked as deleted by third party webhooks. - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. @@ -88,6 +91,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, "cursor": cursor, + "expand": expand, "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, @@ -127,6 +131,7 @@ def retrieve( self, id: str, *, + expand: typing.Optional[typing.Literal["job"]] = None, include_remote_data: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> JobPosting: @@ -136,6 +141,8 @@ def retrieve( Parameters: - id: str. + - expand: typing.Optional[typing.Literal["job"]]. 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. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -156,6 +163,7 @@ def retrieve( params=jsonable_encoder( remove_none_from_dict( { + "expand": expand, "include_remote_data": include_remote_data, **( request_options.get("additional_query_parameters", {}) @@ -196,6 +204,7 @@ async def list( created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, + expand: typing.Optional[typing.Literal["job"]] = None, include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, @@ -215,6 +224,8 @@ async def list( - cursor: typing.Optional[str]. The pagination cursor value. + - expand: typing.Optional[typing.Literal["job"]]. Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + - include_deleted_data: typing.Optional[bool]. Whether to include data that was marked as deleted by third party webhooks. - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. @@ -253,6 +264,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, "cursor": cursor, + "expand": expand, "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, @@ -292,6 +304,7 @@ async def retrieve( self, id: str, *, + expand: typing.Optional[typing.Literal["job"]] = None, include_remote_data: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> JobPosting: @@ -301,6 +314,8 @@ async def retrieve( Parameters: - id: str. + - expand: typing.Optional[typing.Literal["job"]]. 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. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -321,6 +336,7 @@ async def retrieve( params=jsonable_encoder( remove_none_from_dict( { + "expand": expand, "include_remote_data": include_remote_data, **( request_options.get("additional_query_parameters", {}) diff --git a/src/merge/resources/ats/resources/link_token/client.py b/src/merge/resources/ats/resources/link_token/client.py index 7aac697e..3ac12a5b 100644 --- a/src/merge/resources/ats/resources/link_token/client.py +++ b/src/merge/resources/ats/resources/link_token/client.py @@ -42,6 +42,7 @@ def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -68,6 +69,8 @@ def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge @@ -102,6 +105,8 @@ def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/link-token"), @@ -154,6 +159,7 @@ async def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -180,6 +186,8 @@ async def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge @@ -214,6 +222,8 @@ async def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/link-token"), diff --git a/src/merge/resources/ats/resources/selective_sync/client.py b/src/merge/resources/ats/resources/selective_sync/client.py deleted file mode 100644 index cbfa8b82..00000000 --- a/src/merge/resources/ats/resources/selective_sync/client.py +++ /dev/null @@ -1,370 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from .....core.api_error import ApiError -from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .....core.jsonable_encoder import jsonable_encoder -from .....core.remove_none_from_dict import remove_none_from_dict -from .....core.request_options import RequestOptions -from ...types.linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from ...types.linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest -from ...types.paginated_condition_schema_list import PaginatedConditionSchemaList - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class SelectiveSyncClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.ats.selective_sync.configurations_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - from merge.resources.ats import LinkedAccountSelectiveSyncConfigurationRequest - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.ats.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.ats.selective_sync.meta_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncSelectiveSyncClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.ats.selective_sync.configurations_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - from merge.resources.ats import LinkedAccountSelectiveSyncConfigurationRequest - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.ats.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.ats.selective_sync.meta_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/ats/types/__init__.py b/src/merge/resources/ats/types/__init__.py index fbfb4b8f..05fdd618 100644 --- a/src/merge/resources/ats/types/__init__.py +++ b/src/merge/resources/ats/types/__init__.py @@ -55,9 +55,6 @@ from .category_enum import CategoryEnum from .common_model_scope_api import CommonModelScopeApi from .common_model_scopes_body_request import CommonModelScopesBodyRequest -from .condition_schema import ConditionSchema -from .condition_schema_condition_type import ConditionSchemaConditionType -from .condition_type_enum import ConditionTypeEnum from .data_passthrough_request import DataPassthroughRequest from .debug_mode_log import DebugModeLog from .debug_model_log_summary import DebugModelLogSummary @@ -111,10 +108,6 @@ from .job_status_enum import JobStatusEnum from .job_type_enum import JobTypeEnum from .link_token import LinkToken -from .linked_account_condition import LinkedAccountCondition -from .linked_account_condition_request import LinkedAccountConditionRequest -from .linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from .linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest from .linked_account_status import LinkedAccountStatus from .meta_response import MetaResponse from .method_enum import MethodEnum @@ -129,7 +122,6 @@ from .offer_status import OfferStatus from .offer_status_enum import OfferStatusEnum from .office import Office -from .operator_schema import OperatorSchema from .overall_recommendation_enum import OverallRecommendationEnum from .paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList from .paginated_activity_list import PaginatedActivityList @@ -137,7 +129,6 @@ from .paginated_attachment_list import PaginatedAttachmentList from .paginated_audit_log_event_list import PaginatedAuditLogEventList from .paginated_candidate_list import PaginatedCandidateList -from .paginated_condition_schema_list import PaginatedConditionSchemaList from .paginated_department_list import PaginatedDepartmentList from .paginated_eeoc_list import PaginatedEeocList from .paginated_issue_list import PaginatedIssueList @@ -165,6 +156,7 @@ from .remote_data import RemoteData from .remote_endpoint_info import RemoteEndpointInfo from .remote_field_api import RemoteFieldApi +from .remote_field_api_coverage import RemoteFieldApiCoverage from .remote_field_api_response import RemoteFieldApiResponse from .remote_key import RemoteKey from .remote_response import RemoteResponse @@ -269,9 +261,6 @@ "CategoryEnum", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", @@ -323,10 +312,6 @@ "JobStatusEnum", "JobTypeEnum", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "MetaResponse", "MethodEnum", @@ -341,7 +326,6 @@ "OfferStatus", "OfferStatusEnum", "Office", - "OperatorSchema", "OverallRecommendationEnum", "PaginatedAccountDetailsAndActionsList", "PaginatedActivityList", @@ -349,7 +333,6 @@ "PaginatedAttachmentList", "PaginatedAuditLogEventList", "PaginatedCandidateList", - "PaginatedConditionSchemaList", "PaginatedDepartmentList", "PaginatedEeocList", "PaginatedIssueList", @@ -377,6 +360,7 @@ "RemoteData", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", diff --git a/src/merge/resources/ats/types/activity.py b/src/merge/resources/ats/types/activity.py index 4d68016a..1fa39ebb 100644 --- a/src/merge/resources/ats/types/activity.py +++ b/src/merge/resources/ats/types/activity.py @@ -30,9 +30,11 @@ class Activity(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) user: typing.Optional[ActivityUser] = pydantic.Field(description="The user that performed the action.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( diff --git a/src/merge/resources/ats/types/application.py b/src/merge/resources/ats/types/application.py index 81dd7026..0a199f82 100644 --- a/src/merge/resources/ats/types/application.py +++ b/src/merge/resources/ats/types/application.py @@ -33,9 +33,11 @@ class Application(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) candidate: typing.Optional[ApplicationCandidate] = pydantic.Field(description="The candidate applying.") job: typing.Optional[ApplicationJob] = pydantic.Field(description="The job being applied for.") diff --git a/src/merge/resources/ats/types/attachment.py b/src/merge/resources/ats/types/attachment.py index 525e36e8..07b9aa9c 100644 --- a/src/merge/resources/ats/types/attachment.py +++ b/src/merge/resources/ats/types/attachment.py @@ -28,9 +28,11 @@ class Attachment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) file_name: typing.Optional[str] = pydantic.Field(description="The attachment's name.") file_url: typing.Optional[str] = pydantic.Field(description="The attachment's url.") diff --git a/src/merge/resources/ats/types/audit_log_event.py b/src/merge/resources/ats/types/audit_log_event.py index 131ad94b..e8bffc42 100644 --- a/src/merge/resources/ats/types/audit_log_event.py +++ b/src/merge/resources/ats/types/audit_log_event.py @@ -72,6 +72,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" "- `MUTED_ISSUE` - MUTED_ISSUE\n" "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" + "- `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK\n" + "- `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK\n" + "- `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED\n" ) ) event_description: str diff --git a/src/merge/resources/ats/types/candidate.py b/src/merge/resources/ats/types/candidate.py index 5202d2b2..4c004012 100644 --- a/src/merge/resources/ats/types/candidate.py +++ b/src/merge/resources/ats/types/candidate.py @@ -33,9 +33,11 @@ class Candidate(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) first_name: typing.Optional[str] = pydantic.Field(description="The candidate's first name.") last_name: typing.Optional[str] = pydantic.Field(description="The candidate's last name.") diff --git a/src/merge/resources/ats/types/condition_schema.py b/src/merge/resources/ats/types/condition_schema.py deleted file mode 100644 index c8aebb68..00000000 --- a/src/merge/resources/ats/types/condition_schema.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema_condition_type import ConditionSchemaConditionType -from .operator_schema import OperatorSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class ConditionSchema(pydantic.BaseModel): - id: str = pydantic.Field( - description="The ID of the condition schema. This ID is used when updating selective syncs for a linked account." - ) - common_model: typing.Optional[str] = pydantic.Field( - description="The common model for which a condition schema is defined." - ) - native_name: typing.Optional[str] - field_name: typing.Optional[str] - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." - ) - condition_type: ConditionSchemaConditionType = pydantic.Field( - description=( - "The type of value(s) that can be set for this condition.\n" - "\n" - "- `BOOLEAN` - BOOLEAN\n" - "- `DATE` - DATE\n" - "- `DATE_TIME` - DATE_TIME\n" - "- `INTEGER` - INTEGER\n" - "- `FLOAT` - FLOAT\n" - "- `STRING` - STRING\n" - "- `LIST_OF_STRINGS` - LIST_OF_STRINGS\n" - ) - ) - operators: typing.List[OperatorSchema] = pydantic.Field( - description="The schemas for the operators that can be used on a condition." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/condition_schema_condition_type.py b/src/merge/resources/ats/types/condition_schema_condition_type.py deleted file mode 100644 index 40fe5f2e..00000000 --- a/src/merge/resources/ats/types/condition_schema_condition_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .condition_type_enum import ConditionTypeEnum - -ConditionSchemaConditionType = typing.Union[ConditionTypeEnum, str] diff --git a/src/merge/resources/ats/types/condition_type_enum.py b/src/merge/resources/ats/types/condition_type_enum.py deleted file mode 100644 index 2814507a..00000000 --- a/src/merge/resources/ats/types/condition_type_enum.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class ConditionTypeEnum(str, enum.Enum): - """ - - `BOOLEAN` - BOOLEAN - - `DATE` - DATE - - `DATE_TIME` - DATE_TIME - - `INTEGER` - INTEGER - - `FLOAT` - FLOAT - - `STRING` - STRING - - `LIST_OF_STRINGS` - LIST_OF_STRINGS - """ - - BOOLEAN = "BOOLEAN" - DATE = "DATE" - DATE_TIME = "DATE_TIME" - INTEGER = "INTEGER" - FLOAT = "FLOAT" - STRING = "STRING" - LIST_OF_STRINGS = "LIST_OF_STRINGS" - - def visit( - self, - boolean: typing.Callable[[], T_Result], - date: typing.Callable[[], T_Result], - date_time: typing.Callable[[], T_Result], - integer: typing.Callable[[], T_Result], - float_: typing.Callable[[], T_Result], - string: typing.Callable[[], T_Result], - list_of_strings: typing.Callable[[], T_Result], - ) -> T_Result: - if self is ConditionTypeEnum.BOOLEAN: - return boolean() - if self is ConditionTypeEnum.DATE: - return date() - if self is ConditionTypeEnum.DATE_TIME: - return date_time() - if self is ConditionTypeEnum.INTEGER: - return integer() - if self is ConditionTypeEnum.FLOAT: - return float_() - if self is ConditionTypeEnum.STRING: - return string() - if self is ConditionTypeEnum.LIST_OF_STRINGS: - return list_of_strings() diff --git a/src/merge/resources/ats/types/department.py b/src/merge/resources/ats/types/department.py index 1d03cc63..453164f4 100644 --- a/src/merge/resources/ats/types/department.py +++ b/src/merge/resources/ats/types/department.py @@ -27,9 +27,11 @@ class Department(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The department's name.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( diff --git a/src/merge/resources/ats/types/eeoc.py b/src/merge/resources/ats/types/eeoc.py index 7110bbd2..2fb87df6 100644 --- a/src/merge/resources/ats/types/eeoc.py +++ b/src/merge/resources/ats/types/eeoc.py @@ -32,9 +32,11 @@ class Eeoc(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) candidate: typing.Optional[EeocCandidate] = pydantic.Field(description="The candidate being represented.") submitted_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the information was submitted.") diff --git a/src/merge/resources/ats/types/email_address.py b/src/merge/resources/ats/types/email_address.py index 1cdda6e7..ea0e06c0 100644 --- a/src/merge/resources/ats/types/email_address.py +++ b/src/merge/resources/ats/types/email_address.py @@ -25,9 +25,11 @@ class EmailAddress(pydantic.BaseModel): Fetch from the `GET Candidate` endpoint and view their email addresses. """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) value: typing.Optional[str] = pydantic.Field(description="The email address.") email_address_type: typing.Optional[EmailAddressEmailAddressType] = pydantic.Field( diff --git a/src/merge/resources/ats/types/event_type_enum.py b/src/merge/resources/ats/types/event_type_enum.py index 434539c7..fcc33f75 100644 --- a/src/merge/resources/ats/types/event_type_enum.py +++ b/src/merge/resources/ats/types/event_type_enum.py @@ -42,6 +42,9 @@ class EventTypeEnum(str, enum.Enum): - `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 """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -78,6 +81,9 @@ class EventTypeEnum(str, enum.Enum): 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" def visit( self, @@ -115,6 +121,9 @@ def visit( 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], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -184,3 +193,9 @@ def visit( 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() diff --git a/src/merge/resources/ats/types/job.py b/src/merge/resources/ats/types/job.py index 85766a5d..08091eb5 100644 --- a/src/merge/resources/ats/types/job.py +++ b/src/merge/resources/ats/types/job.py @@ -34,9 +34,11 @@ class Job(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The job's name.") description: typing.Optional[str] = pydantic.Field(description="The job's description.") diff --git a/src/merge/resources/ats/types/job_interview_stage.py b/src/merge/resources/ats/types/job_interview_stage.py index e3d27e51..2f4526c7 100644 --- a/src/merge/resources/ats/types/job_interview_stage.py +++ b/src/merge/resources/ats/types/job_interview_stage.py @@ -28,9 +28,11 @@ class JobInterviewStage(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field( description="Standard stage names are offered by ATS systems but can be modified by users." diff --git a/src/merge/resources/ats/types/job_posting.py b/src/merge/resources/ats/types/job_posting.py index 34fe2170..b1c42e3e 100644 --- a/src/merge/resources/ats/types/job_posting.py +++ b/src/merge/resources/ats/types/job_posting.py @@ -30,9 +30,11 @@ class JobPosting(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) title: typing.Optional[str] = pydantic.Field(description="The job posting’s title.") job_posting_urls: typing.Optional[typing.List[JobPostingJobPostingUrlsItem]] = pydantic.Field( diff --git a/src/merge/resources/ats/types/linked_account_condition.py b/src/merge/resources/ats/types/linked_account_condition.py deleted file mode 100644 index f13ef90d..00000000 --- a/src/merge/resources/ats/types/linked_account_condition.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountCondition(pydantic.BaseModel): - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Optional[typing.Any] - field_name: typing.Optional[str] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/linked_account_condition_request.py b/src/merge/resources/ats/types/linked_account_condition_request.py deleted file mode 100644 index ce36a27f..00000000 --- a/src/merge/resources/ats/types/linked_account_condition_request.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountConditionRequest(pydantic.BaseModel): - id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Any - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/linked_account_selective_sync_configuration.py b/src/merge/resources/ats/types/linked_account_selective_sync_configuration.py deleted file mode 100644 index 2727cdd9..00000000 --- a/src/merge/resources/ats/types/linked_account_selective_sync_configuration.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition import LinkedAccountCondition - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfiguration(pydantic.BaseModel): - linked_account_conditions: typing.Optional[typing.List[LinkedAccountCondition]] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/linked_account_selective_sync_configuration_request.py b/src/merge/resources/ats/types/linked_account_selective_sync_configuration_request.py deleted file mode 100644 index b744ce07..00000000 --- a/src/merge/resources/ats/types/linked_account_selective_sync_configuration_request.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition_request import LinkedAccountConditionRequest - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfigurationRequest(pydantic.BaseModel): - linked_account_conditions: typing.List[LinkedAccountConditionRequest] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/offer.py b/src/merge/resources/ats/types/offer.py index 2cc07d81..c817decf 100644 --- a/src/merge/resources/ats/types/offer.py +++ b/src/merge/resources/ats/types/offer.py @@ -31,9 +31,11 @@ class Offer(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) application: typing.Optional[OfferApplication] = pydantic.Field( description="The application who is receiving the offer." diff --git a/src/merge/resources/ats/types/office.py b/src/merge/resources/ats/types/office.py index a8749361..ca6a1384 100644 --- a/src/merge/resources/ats/types/office.py +++ b/src/merge/resources/ats/types/office.py @@ -27,9 +27,11 @@ class Office(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The office's name.") location: typing.Optional[str] = pydantic.Field(description="The office's location.") diff --git a/src/merge/resources/ats/types/operator_schema.py b/src/merge/resources/ats/types/operator_schema.py deleted file mode 100644 index 0a427fe7..00000000 --- a/src/merge/resources/ats/types/operator_schema.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class OperatorSchema(pydantic.BaseModel): - operator: typing.Optional[str] = pydantic.Field(description="The operator for which an operator schema is defined.") - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether the operator can be repeated multiple times." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/paginated_condition_schema_list.py b/src/merge/resources/ats/types/paginated_condition_schema_list.py deleted file mode 100644 index 64f4f814..00000000 --- a/src/merge/resources/ats/types/paginated_condition_schema_list.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema import ConditionSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class PaginatedConditionSchemaList(pydantic.BaseModel): - next: typing.Optional[str] - previous: typing.Optional[str] - results: typing.Optional[typing.List[ConditionSchema]] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/phone_number.py b/src/merge/resources/ats/types/phone_number.py index d401c076..4fac46f5 100644 --- a/src/merge/resources/ats/types/phone_number.py +++ b/src/merge/resources/ats/types/phone_number.py @@ -25,9 +25,11 @@ class PhoneNumber(pydantic.BaseModel): Fetch from the `GET Candidate` endpoint and view their phone numbers. """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) value: typing.Optional[str] = pydantic.Field(description="The phone number.") phone_number_type: typing.Optional[PhoneNumberPhoneNumberType] = pydantic.Field( diff --git a/src/merge/resources/ats/types/reject_reason.py b/src/merge/resources/ats/types/reject_reason.py index 7a32d83c..e8a913b8 100644 --- a/src/merge/resources/ats/types/reject_reason.py +++ b/src/merge/resources/ats/types/reject_reason.py @@ -27,9 +27,11 @@ class RejectReason(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The rejection reason’s name.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( diff --git a/src/merge/resources/ats/types/remote_field_api.py b/src/merge/resources/ats/types/remote_field_api.py index 30529431..6fa31902 100644 --- a/src/merge/resources/ats/types/remote_field_api.py +++ b/src/merge/resources/ats/types/remote_field_api.py @@ -6,6 +6,7 @@ from ....core.datetime_utils import serialize_datetime from .advanced_metadata import AdvancedMetadata from .remote_endpoint_info import RemoteEndpointInfo +from .remote_field_api_coverage import RemoteFieldApiCoverage try: import pydantic.v1 as pydantic # type: ignore @@ -19,6 +20,7 @@ class RemoteFieldApi(pydantic.BaseModel): remote_endpoint_info: RemoteEndpointInfo example_values: typing.List[typing.Any] advanced_metadata: typing.Optional[AdvancedMetadata] + coverage: typing.Optional[RemoteFieldApiCoverage] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ats/resources/selective_sync/__init__.py b/src/merge/resources/ats/types/remote_field_api_coverage.py similarity index 50% rename from src/merge/resources/ats/resources/selective_sync/__init__.py rename to src/merge/resources/ats/types/remote_field_api_coverage.py index f3ea2659..adcd9be9 100644 --- a/src/merge/resources/ats/resources/selective_sync/__init__.py +++ b/src/merge/resources/ats/types/remote_field_api_coverage.py @@ -1,2 +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/ats/types/remote_user.py b/src/merge/resources/ats/types/remote_user.py index 91a85ddb..c7cf0484 100644 --- a/src/merge/resources/ats/types/remote_user.py +++ b/src/merge/resources/ats/types/remote_user.py @@ -28,9 +28,11 @@ class RemoteUser(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) first_name: typing.Optional[str] = pydantic.Field(description="The user's first name.") last_name: typing.Optional[str] = pydantic.Field(description="The user's last name.") diff --git a/src/merge/resources/ats/types/scheduled_interview.py b/src/merge/resources/ats/types/scheduled_interview.py index 7f2645c9..4cda4e6e 100644 --- a/src/merge/resources/ats/types/scheduled_interview.py +++ b/src/merge/resources/ats/types/scheduled_interview.py @@ -32,9 +32,11 @@ class ScheduledInterview(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) application: typing.Optional[ScheduledInterviewApplication] = pydantic.Field( description="The application being interviewed." diff --git a/src/merge/resources/ats/types/scorecard.py b/src/merge/resources/ats/types/scorecard.py index e75946c9..b8c716f8 100644 --- a/src/merge/resources/ats/types/scorecard.py +++ b/src/merge/resources/ats/types/scorecard.py @@ -31,9 +31,11 @@ class Scorecard(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) application: typing.Optional[ScorecardApplication] = pydantic.Field(description="The application being scored.") interview: typing.Optional[ScorecardInterview] = pydantic.Field(description="The interview being scored.") diff --git a/src/merge/resources/ats/types/screening_question.py b/src/merge/resources/ats/types/screening_question.py index 0b3e6579..69a7972b 100644 --- a/src/merge/resources/ats/types/screening_question.py +++ b/src/merge/resources/ats/types/screening_question.py @@ -28,9 +28,11 @@ class ScreeningQuestion(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) job: typing.Optional[ScreeningQuestionJob] = pydantic.Field( description="The job associated with the screening question." diff --git a/src/merge/resources/ats/types/screening_question_option.py b/src/merge/resources/ats/types/screening_question_option.py index e38e8434..5a4b9b6e 100644 --- a/src/merge/resources/ats/types/screening_question_option.py +++ b/src/merge/resources/ats/types/screening_question_option.py @@ -26,9 +26,11 @@ class ScreeningQuestionOption(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) label: typing.Optional[str] = pydantic.Field(description="Available response options") diff --git a/src/merge/resources/ats/types/tag.py b/src/merge/resources/ats/types/tag.py index f4891028..80bca4a0 100644 --- a/src/merge/resources/ats/types/tag.py +++ b/src/merge/resources/ats/types/tag.py @@ -25,9 +25,11 @@ class Tag(pydantic.BaseModel): """ remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The tag's name.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( diff --git a/src/merge/resources/ats/types/url.py b/src/merge/resources/ats/types/url.py index c5c0ec01..a287c59f 100644 --- a/src/merge/resources/ats/types/url.py +++ b/src/merge/resources/ats/types/url.py @@ -25,9 +25,11 @@ class Url(pydantic.BaseModel): Fetch from the `GET Candidate` endpoint and view their website urls. """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) value: typing.Optional[str] = pydantic.Field(description="The site's url.") url_type: typing.Optional[UrlUrlType] = pydantic.Field( diff --git a/src/merge/resources/crm/__init__.py b/src/merge/resources/crm/__init__.py index d6388684..ee12d073 100644 --- a/src/merge/resources/crm/__init__.py +++ b/src/merge/resources/crm/__init__.py @@ -36,9 +36,6 @@ CategoryEnum, CommonModelScopeApi, CommonModelScopesBodyRequest, - ConditionSchema, - ConditionSchemaConditionType, - ConditionTypeEnum, Contact, ContactAccount, ContactOwner, @@ -109,10 +106,6 @@ LeadRequestOwner, LeadResponse, LinkToken, - LinkedAccountCondition, - LinkedAccountConditionRequest, - LinkedAccountSelectiveSyncConfiguration, - LinkedAccountSelectiveSyncConfigurationRequest, LinkedAccountStatus, MetaResponse, MethodEnum, @@ -133,7 +126,6 @@ NoteRequestOwner, NoteResponse, ObjectClassDescriptionRequest, - OperatorSchema, Opportunity, OpportunityAccount, OpportunityOwner, @@ -152,7 +144,6 @@ PaginatedAssociationList, PaginatedAssociationTypeList, PaginatedAuditLogEventList, - PaginatedConditionSchemaList, PaginatedContactList, PaginatedCustomObjectClassList, PaginatedCustomObjectList, @@ -183,6 +174,7 @@ RemoteEndpointInfo, RemoteField, RemoteFieldApi, + RemoteFieldApiCoverage, RemoteFieldApiResponse, RemoteFieldClass, RemoteFieldClassFieldChoicesItem, @@ -264,7 +256,6 @@ passthrough, regenerate_key, scopes, - selective_sync, stages, sync_status, tasks, @@ -308,9 +299,6 @@ "CategoryEnum", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "Contact", "ContactAccount", "ContactOwner", @@ -388,10 +376,6 @@ "LeadsListRequestExpand", "LeadsRetrieveRequestExpand", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "LinkedAccountsListRequestCategory", "MetaResponse", @@ -415,7 +399,6 @@ "NotesListRequestExpand", "NotesRetrieveRequestExpand", "ObjectClassDescriptionRequest", - "OperatorSchema", "OpportunitiesListRequestExpand", "OpportunitiesListRequestStatus", "OpportunitiesRetrieveRequestExpand", @@ -437,7 +420,6 @@ "PaginatedAssociationList", "PaginatedAssociationTypeList", "PaginatedAuditLogEventList", - "PaginatedConditionSchemaList", "PaginatedContactList", "PaginatedCustomObjectClassList", "PaginatedCustomObjectList", @@ -468,6 +450,7 @@ "RemoteEndpointInfo", "RemoteField", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteFieldClass", "RemoteFieldClassFieldChoicesItem", @@ -534,7 +517,6 @@ "passthrough", "regenerate_key", "scopes", - "selective_sync", "stages", "sync_status", "tasks", diff --git a/src/merge/resources/crm/client.py b/src/merge/resources/crm/client.py index 783aef78..87941414 100644 --- a/src/merge/resources/crm/client.py +++ b/src/merge/resources/crm/client.py @@ -33,7 +33,6 @@ from .resources.passthrough.client import PassthroughClient from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient from .resources.scopes.client import AsyncScopesClient, ScopesClient -from .resources.selective_sync.client import AsyncSelectiveSyncClient, SelectiveSyncClient from .resources.stages.client import AsyncStagesClient, StagesClient from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient from .resources.tasks.client import AsyncTasksClient, TasksClient @@ -71,7 +70,6 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.opportunities = OpportunitiesClient(client_wrapper=self._client_wrapper) self.passthrough = PassthroughClient(client_wrapper=self._client_wrapper) self.regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = SelectiveSyncClient(client_wrapper=self._client_wrapper) self.stages = StagesClient(client_wrapper=self._client_wrapper) self.sync_status = SyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = ForceResyncClient(client_wrapper=self._client_wrapper) @@ -110,7 +108,6 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): client_wrapper=self._client_wrapper ) self.regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = AsyncSelectiveSyncClient(client_wrapper=self._client_wrapper) self.stages = AsyncStagesClient(client_wrapper=self._client_wrapper) self.sync_status = AsyncSyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = AsyncForceResyncClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/resources/crm/resources/__init__.py b/src/merge/resources/crm/resources/__init__.py index 446052fc..07dbd7a8 100644 --- a/src/merge/resources/crm/resources/__init__.py +++ b/src/merge/resources/crm/resources/__init__.py @@ -27,7 +27,6 @@ passthrough, regenerate_key, scopes, - selective_sync, stages, sync_status, tasks, @@ -89,7 +88,6 @@ "passthrough", "regenerate_key", "scopes", - "selective_sync", "stages", "sync_status", "tasks", diff --git a/src/merge/resources/crm/resources/audit_trail/client.py b/src/merge/resources/crm/resources/audit_trail/client.py index b9de0178..f2f0c0dd 100644 --- a/src/merge/resources/crm/resources/audit_trail/client.py +++ b/src/merge/resources/crm/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. @@ -122,7 +122,7 @@ async def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. diff --git a/src/merge/resources/crm/resources/contacts/client.py b/src/merge/resources/crm/resources/contacts/client.py index b9e4132f..8a6c06ab 100644 --- a/src/merge/resources/crm/resources/contacts/client.py +++ b/src/merge/resources/crm/resources/contacts/client.py @@ -392,7 +392,6 @@ def ignore_create( model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ), ) """ @@ -949,7 +948,6 @@ async def ignore_create( model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ), ) """ diff --git a/src/merge/resources/crm/resources/field_mapping/client.py b/src/merge/resources/crm/resources/field_mapping/client.py index 7155e917..de461d25 100644 --- a/src/merge/resources/crm/resources/field_mapping/client.py +++ b/src/merge/resources/crm/resources/field_mapping/client.py @@ -244,8 +244,6 @@ def field_mappings_partial_update( ) client.crm.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -615,8 +613,6 @@ async def field_mappings_partial_update( ) await client.crm.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} diff --git a/src/merge/resources/crm/resources/link_token/client.py b/src/merge/resources/crm/resources/link_token/client.py index 24427c27..724198fa 100644 --- a/src/merge/resources/crm/resources/link_token/client.py +++ b/src/merge/resources/crm/resources/link_token/client.py @@ -42,6 +42,7 @@ def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -68,6 +69,8 @@ def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge @@ -102,6 +105,8 @@ def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/link-token"), @@ -154,6 +159,7 @@ async def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -180,6 +186,8 @@ async def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge @@ -214,6 +222,8 @@ async def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/link-token"), diff --git a/src/merge/resources/crm/resources/selective_sync/client.py b/src/merge/resources/crm/resources/selective_sync/client.py deleted file mode 100644 index f294c71a..00000000 --- a/src/merge/resources/crm/resources/selective_sync/client.py +++ /dev/null @@ -1,370 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from .....core.api_error import ApiError -from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .....core.jsonable_encoder import jsonable_encoder -from .....core.remove_none_from_dict import remove_none_from_dict -from .....core.request_options import RequestOptions -from ...types.linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from ...types.linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest -from ...types.paginated_condition_schema_list import PaginatedConditionSchemaList - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class SelectiveSyncClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.crm.selective_sync.configurations_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - from merge.resources.crm import LinkedAccountSelectiveSyncConfigurationRequest - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.crm.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.crm.selective_sync.meta_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncSelectiveSyncClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.crm.selective_sync.configurations_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - from merge.resources.crm import LinkedAccountSelectiveSyncConfigurationRequest - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.crm.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.crm.selective_sync.meta_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/crm/resources/users/client.py b/src/merge/resources/crm/resources/users/client.py index b0d9892b..7b658896 100644 --- a/src/merge/resources/crm/resources/users/client.py +++ b/src/merge/resources/crm/resources/users/client.py @@ -216,7 +216,6 @@ def ignore_create( model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ), ) """ @@ -517,7 +516,6 @@ async def ignore_create( model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ), ) """ diff --git a/src/merge/resources/crm/types/__init__.py b/src/merge/resources/crm/types/__init__.py index b2d9e9d2..eabc218c 100644 --- a/src/merge/resources/crm/types/__init__.py +++ b/src/merge/resources/crm/types/__init__.py @@ -35,9 +35,6 @@ from .category_enum import CategoryEnum from .common_model_scope_api import CommonModelScopeApi from .common_model_scopes_body_request import CommonModelScopesBodyRequest -from .condition_schema import ConditionSchema -from .condition_schema_condition_type import ConditionSchemaConditionType -from .condition_type_enum import ConditionTypeEnum from .contact import Contact from .contact_account import ContactAccount from .contact_owner import ContactOwner @@ -110,10 +107,6 @@ from .lead_request_owner import LeadRequestOwner from .lead_response import LeadResponse from .link_token import LinkToken -from .linked_account_condition import LinkedAccountCondition -from .linked_account_condition_request import LinkedAccountConditionRequest -from .linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from .linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest from .linked_account_status import LinkedAccountStatus from .meta_response import MetaResponse from .method_enum import MethodEnum @@ -134,7 +127,6 @@ from .note_request_owner import NoteRequestOwner from .note_response import NoteResponse from .object_class_description_request import ObjectClassDescriptionRequest -from .operator_schema import OperatorSchema from .opportunity import Opportunity from .opportunity_account import OpportunityAccount from .opportunity_owner import OpportunityOwner @@ -153,7 +145,6 @@ from .paginated_association_list import PaginatedAssociationList from .paginated_association_type_list import PaginatedAssociationTypeList from .paginated_audit_log_event_list import PaginatedAuditLogEventList -from .paginated_condition_schema_list import PaginatedConditionSchemaList from .paginated_contact_list import PaginatedContactList from .paginated_custom_object_class_list import PaginatedCustomObjectClassList from .paginated_custom_object_list import PaginatedCustomObjectList @@ -184,6 +175,7 @@ from .remote_endpoint_info import RemoteEndpointInfo from .remote_field import RemoteField from .remote_field_api import RemoteFieldApi +from .remote_field_api_coverage import RemoteFieldApiCoverage from .remote_field_api_response import RemoteFieldApiResponse from .remote_field_class import RemoteFieldClass from .remote_field_class_field_choices_item import RemoteFieldClassFieldChoicesItem @@ -261,9 +253,6 @@ "CategoryEnum", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "Contact", "ContactAccount", "ContactOwner", @@ -334,10 +323,6 @@ "LeadRequestOwner", "LeadResponse", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "MetaResponse", "MethodEnum", @@ -358,7 +343,6 @@ "NoteRequestOwner", "NoteResponse", "ObjectClassDescriptionRequest", - "OperatorSchema", "Opportunity", "OpportunityAccount", "OpportunityOwner", @@ -377,7 +361,6 @@ "PaginatedAssociationList", "PaginatedAssociationTypeList", "PaginatedAuditLogEventList", - "PaginatedConditionSchemaList", "PaginatedContactList", "PaginatedCustomObjectClassList", "PaginatedCustomObjectList", @@ -408,6 +391,7 @@ "RemoteEndpointInfo", "RemoteField", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteFieldClass", "RemoteFieldClassFieldChoicesItem", diff --git a/src/merge/resources/crm/types/account.py b/src/merge/resources/crm/types/account.py index 7901dcce..cd1cad95 100644 --- a/src/merge/resources/crm/types/account.py +++ b/src/merge/resources/crm/types/account.py @@ -31,9 +31,11 @@ class Account(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) owner: typing.Optional[AccountOwner] = pydantic.Field(description="The account's owner.") name: typing.Optional[str] = pydantic.Field(description="The account's name.") diff --git a/src/merge/resources/crm/types/account_request.py b/src/merge/resources/crm/types/account_request.py index 53c8c90f..3e502000 100644 --- a/src/merge/resources/crm/types/account_request.py +++ b/src/merge/resources/crm/types/account_request.py @@ -5,6 +5,7 @@ from ....core.datetime_utils import serialize_datetime from .account_request_owner import AccountRequestOwner +from .address_request import AddressRequest from .remote_field_request import RemoteFieldRequest try: @@ -32,6 +33,7 @@ class AccountRequest(pydantic.BaseModel): industry: typing.Optional[str] = pydantic.Field(description="The account's industry.") website: typing.Optional[str] = pydantic.Field(description="The account's website.") number_of_employees: typing.Optional[int] = pydantic.Field(description="The account's number of employees.") + addresses: typing.Optional[typing.List[AddressRequest]] last_activity_at: typing.Optional[dt.datetime] = pydantic.Field( description="The last date (either most recent or furthest in the future) of when an activity occurs in an account." ) diff --git a/src/merge/resources/crm/types/address.py b/src/merge/resources/crm/types/address.py index 172f3897..ac38b699 100644 --- a/src/merge/resources/crm/types/address.py +++ b/src/merge/resources/crm/types/address.py @@ -26,9 +26,11 @@ class Address(pydantic.BaseModel): TODO """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) street_1: typing.Optional[str] = pydantic.Field(description="Line 1 of the address's street.") street_2: typing.Optional[str] = pydantic.Field(description="Line 2 of the address's street.") diff --git a/src/merge/resources/crm/types/association.py b/src/merge/resources/crm/types/association.py index 215b4a7c..bff30e08 100644 --- a/src/merge/resources/crm/types/association.py +++ b/src/merge/resources/crm/types/association.py @@ -25,13 +25,17 @@ class Association(pydantic.BaseModel): TODO """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) source_object: typing.Optional[typing.Dict[str, typing.Any]] target_object: typing.Optional[typing.Dict[str, typing.Any]] - association_type: typing.Optional[AssociationAssociationType] + association_type: typing.Optional[AssociationAssociationType] = pydantic.Field( + description="The association type the association belongs to." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/association_sub_type.py b/src/merge/resources/crm/types/association_sub_type.py index c098ffae..bbdfbc22 100644 --- a/src/merge/resources/crm/types/association_sub_type.py +++ b/src/merge/resources/crm/types/association_sub_type.py @@ -13,9 +13,11 @@ class AssociationSubType(pydantic.BaseModel): id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) origin_type: typing.Optional[str] diff --git a/src/merge/resources/crm/types/association_type.py b/src/merge/resources/crm/types/association_type.py index 555123b2..2ac302d9 100644 --- a/src/merge/resources/crm/types/association_type.py +++ b/src/merge/resources/crm/types/association_type.py @@ -28,11 +28,15 @@ class AssociationType(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." + ) + source_object_class: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field( + description="The class of the source object (Custom Object or Common Model) for the association type." ) - source_object_class: typing.Optional[typing.Dict[str, typing.Any]] target_object_classes: typing.Optional[typing.List[AssociationSubType]] remote_key_name: typing.Optional[str] display_name: typing.Optional[str] diff --git a/src/merge/resources/crm/types/audit_log_event.py b/src/merge/resources/crm/types/audit_log_event.py index 131ad94b..e8bffc42 100644 --- a/src/merge/resources/crm/types/audit_log_event.py +++ b/src/merge/resources/crm/types/audit_log_event.py @@ -72,6 +72,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" "- `MUTED_ISSUE` - MUTED_ISSUE\n" "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" + "- `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK\n" + "- `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK\n" + "- `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED\n" ) ) event_description: str diff --git a/src/merge/resources/crm/types/condition_schema.py b/src/merge/resources/crm/types/condition_schema.py deleted file mode 100644 index c8aebb68..00000000 --- a/src/merge/resources/crm/types/condition_schema.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema_condition_type import ConditionSchemaConditionType -from .operator_schema import OperatorSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class ConditionSchema(pydantic.BaseModel): - id: str = pydantic.Field( - description="The ID of the condition schema. This ID is used when updating selective syncs for a linked account." - ) - common_model: typing.Optional[str] = pydantic.Field( - description="The common model for which a condition schema is defined." - ) - native_name: typing.Optional[str] - field_name: typing.Optional[str] - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." - ) - condition_type: ConditionSchemaConditionType = pydantic.Field( - description=( - "The type of value(s) that can be set for this condition.\n" - "\n" - "- `BOOLEAN` - BOOLEAN\n" - "- `DATE` - DATE\n" - "- `DATE_TIME` - DATE_TIME\n" - "- `INTEGER` - INTEGER\n" - "- `FLOAT` - FLOAT\n" - "- `STRING` - STRING\n" - "- `LIST_OF_STRINGS` - LIST_OF_STRINGS\n" - ) - ) - operators: typing.List[OperatorSchema] = pydantic.Field( - description="The schemas for the operators that can be used on a condition." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/crm/types/condition_schema_condition_type.py b/src/merge/resources/crm/types/condition_schema_condition_type.py deleted file mode 100644 index 40fe5f2e..00000000 --- a/src/merge/resources/crm/types/condition_schema_condition_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .condition_type_enum import ConditionTypeEnum - -ConditionSchemaConditionType = typing.Union[ConditionTypeEnum, str] diff --git a/src/merge/resources/crm/types/condition_type_enum.py b/src/merge/resources/crm/types/condition_type_enum.py deleted file mode 100644 index 2814507a..00000000 --- a/src/merge/resources/crm/types/condition_type_enum.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class ConditionTypeEnum(str, enum.Enum): - """ - - `BOOLEAN` - BOOLEAN - - `DATE` - DATE - - `DATE_TIME` - DATE_TIME - - `INTEGER` - INTEGER - - `FLOAT` - FLOAT - - `STRING` - STRING - - `LIST_OF_STRINGS` - LIST_OF_STRINGS - """ - - BOOLEAN = "BOOLEAN" - DATE = "DATE" - DATE_TIME = "DATE_TIME" - INTEGER = "INTEGER" - FLOAT = "FLOAT" - STRING = "STRING" - LIST_OF_STRINGS = "LIST_OF_STRINGS" - - def visit( - self, - boolean: typing.Callable[[], T_Result], - date: typing.Callable[[], T_Result], - date_time: typing.Callable[[], T_Result], - integer: typing.Callable[[], T_Result], - float_: typing.Callable[[], T_Result], - string: typing.Callable[[], T_Result], - list_of_strings: typing.Callable[[], T_Result], - ) -> T_Result: - if self is ConditionTypeEnum.BOOLEAN: - return boolean() - if self is ConditionTypeEnum.DATE: - return date() - if self is ConditionTypeEnum.DATE_TIME: - return date_time() - if self is ConditionTypeEnum.INTEGER: - return integer() - if self is ConditionTypeEnum.FLOAT: - return float_() - if self is ConditionTypeEnum.STRING: - return string() - if self is ConditionTypeEnum.LIST_OF_STRINGS: - return list_of_strings() diff --git a/src/merge/resources/crm/types/contact.py b/src/merge/resources/crm/types/contact.py index ec2df5c7..3033e9f1 100644 --- a/src/merge/resources/crm/types/contact.py +++ b/src/merge/resources/crm/types/contact.py @@ -33,9 +33,11 @@ class Contact(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) first_name: typing.Optional[str] = pydantic.Field(description="The contact's first name.") last_name: typing.Optional[str] = pydantic.Field(description="The contact's last name.") diff --git a/src/merge/resources/crm/types/custom_object.py b/src/merge/resources/crm/types/custom_object.py index fca67478..5774e45a 100644 --- a/src/merge/resources/crm/types/custom_object.py +++ b/src/merge/resources/crm/types/custom_object.py @@ -27,12 +27,18 @@ class CustomObject(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." + ) + object_class: typing.Optional[str] = pydantic.Field( + description="The custom object class the custom object record belongs to." + ) + fields: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field( + description="The fields and values contained within the custom object record." ) - object_class: typing.Optional[str] - fields: typing.Optional[typing.Dict[str, typing.Any]] remote_fields: typing.Optional[typing.List[RemoteField]] def json(self, **kwargs: typing.Any) -> str: diff --git a/src/merge/resources/crm/types/custom_object_class.py b/src/merge/resources/crm/types/custom_object_class.py index 053f16a2..1df216eb 100644 --- a/src/merge/resources/crm/types/custom_object_class.py +++ b/src/merge/resources/crm/types/custom_object_class.py @@ -29,11 +29,15 @@ class CustomObjectClass(pydantic.BaseModel): remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] - name: typing.Optional[str] - description: typing.Optional[str] - labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] + name: typing.Optional[str] = pydantic.Field(description="The custom object class's name.") + description: typing.Optional[str] = pydantic.Field(description="The custom object class's description.") + labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field( + description="The custom object class's singular and plural labels." + ) fields: typing.Optional[typing.List[RemoteFieldClassForCustomObjectClass]] - association_types: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] + association_types: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field( + description="The types of associations with other models that the custom object class can have." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/email_address.py b/src/merge/resources/crm/types/email_address.py index 233bdc09..96b6ea2b 100644 --- a/src/merge/resources/crm/types/email_address.py +++ b/src/merge/resources/crm/types/email_address.py @@ -24,9 +24,11 @@ class EmailAddress(pydantic.BaseModel): Fetch from the `GET Contact` endpoint and view their email addresses. """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) email_address: typing.Optional[str] = pydantic.Field(description="The email address.") email_address_type: typing.Optional[str] = pydantic.Field(description="The email address's type.") diff --git a/src/merge/resources/crm/types/engagement.py b/src/merge/resources/crm/types/engagement.py index 45846fb5..21ffbd3d 100644 --- a/src/merge/resources/crm/types/engagement.py +++ b/src/merge/resources/crm/types/engagement.py @@ -33,9 +33,11 @@ class Engagement(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) owner: typing.Optional[EngagementOwner] = pydantic.Field(description="The engagement's owner.") content: typing.Optional[str] = pydantic.Field(description="The engagement's content.") diff --git a/src/merge/resources/crm/types/engagement_type.py b/src/merge/resources/crm/types/engagement_type.py index 2fb10520..d27f2cb0 100644 --- a/src/merge/resources/crm/types/engagement_type.py +++ b/src/merge/resources/crm/types/engagement_type.py @@ -28,9 +28,11 @@ class EngagementType(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) activity_type: typing.Optional[EngagementTypeActivityType] = pydantic.Field( description=( diff --git a/src/merge/resources/crm/types/event_type_enum.py b/src/merge/resources/crm/types/event_type_enum.py index 434539c7..fcc33f75 100644 --- a/src/merge/resources/crm/types/event_type_enum.py +++ b/src/merge/resources/crm/types/event_type_enum.py @@ -42,6 +42,9 @@ class EventTypeEnum(str, enum.Enum): - `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 """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -78,6 +81,9 @@ class EventTypeEnum(str, enum.Enum): 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" def visit( self, @@ -115,6 +121,9 @@ def visit( 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], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -184,3 +193,9 @@ def visit( 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() diff --git a/src/merge/resources/crm/types/field_format_enum.py b/src/merge/resources/crm/types/field_format_enum.py index 303f80a5..9d80b73d 100644 --- a/src/merge/resources/crm/types/field_format_enum.py +++ b/src/merge/resources/crm/types/field_format_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is FieldFormatEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is FieldFormatEnum.DATETIME: return datetime() if self is FieldFormatEnum.BOOL: - return bool() + return bool_() if self is FieldFormatEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/crm/types/field_type_enum.py b/src/merge/resources/crm/types/field_type_enum.py index e5471a1c..d05a1ae4 100644 --- a/src/merge/resources/crm/types/field_type_enum.py +++ b/src/merge/resources/crm/types/field_type_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is FieldTypeEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is FieldTypeEnum.DATETIME: return datetime() if self is FieldTypeEnum.BOOL: - return bool() + return bool_() if self is FieldTypeEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/crm/types/item_format_enum.py b/src/merge/resources/crm/types/item_format_enum.py index 8c56e792..2e4854df 100644 --- a/src/merge/resources/crm/types/item_format_enum.py +++ b/src/merge/resources/crm/types/item_format_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is ItemFormatEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is ItemFormatEnum.DATETIME: return datetime() if self is ItemFormatEnum.BOOL: - return bool() + return bool_() if self is ItemFormatEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/crm/types/item_type_enum.py b/src/merge/resources/crm/types/item_type_enum.py index 8e5fb67a..d9b50e3f 100644 --- a/src/merge/resources/crm/types/item_type_enum.py +++ b/src/merge/resources/crm/types/item_type_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is ItemTypeEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is ItemTypeEnum.DATETIME: return datetime() if self is ItemTypeEnum.BOOL: - return bool() + return bool_() if self is ItemTypeEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/crm/types/lead.py b/src/merge/resources/crm/types/lead.py index cf208277..ff23fba1 100644 --- a/src/merge/resources/crm/types/lead.py +++ b/src/merge/resources/crm/types/lead.py @@ -34,9 +34,11 @@ class Lead(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) owner: typing.Optional[LeadOwner] = pydantic.Field(description="The lead's owner.") lead_source: typing.Optional[str] = pydantic.Field(description="The lead's source.") diff --git a/src/merge/resources/crm/types/linked_account_condition.py b/src/merge/resources/crm/types/linked_account_condition.py deleted file mode 100644 index f13ef90d..00000000 --- a/src/merge/resources/crm/types/linked_account_condition.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountCondition(pydantic.BaseModel): - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Optional[typing.Any] - field_name: typing.Optional[str] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/crm/types/linked_account_condition_request.py b/src/merge/resources/crm/types/linked_account_condition_request.py deleted file mode 100644 index ce36a27f..00000000 --- a/src/merge/resources/crm/types/linked_account_condition_request.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountConditionRequest(pydantic.BaseModel): - id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Any - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/crm/types/linked_account_selective_sync_configuration.py b/src/merge/resources/crm/types/linked_account_selective_sync_configuration.py deleted file mode 100644 index 2727cdd9..00000000 --- a/src/merge/resources/crm/types/linked_account_selective_sync_configuration.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition import LinkedAccountCondition - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfiguration(pydantic.BaseModel): - linked_account_conditions: typing.Optional[typing.List[LinkedAccountCondition]] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/crm/types/linked_account_selective_sync_configuration_request.py b/src/merge/resources/crm/types/linked_account_selective_sync_configuration_request.py deleted file mode 100644 index b744ce07..00000000 --- a/src/merge/resources/crm/types/linked_account_selective_sync_configuration_request.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition_request import LinkedAccountConditionRequest - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfigurationRequest(pydantic.BaseModel): - linked_account_conditions: typing.List[LinkedAccountConditionRequest] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/crm/types/note.py b/src/merge/resources/crm/types/note.py index 8cd97d4d..fd6fccb6 100644 --- a/src/merge/resources/crm/types/note.py +++ b/src/merge/resources/crm/types/note.py @@ -32,9 +32,11 @@ class Note(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) owner: typing.Optional[NoteOwner] = pydantic.Field(description="The note's owner.") content: typing.Optional[str] = pydantic.Field(description="The note's content.") diff --git a/src/merge/resources/crm/types/operator_schema.py b/src/merge/resources/crm/types/operator_schema.py deleted file mode 100644 index 0a427fe7..00000000 --- a/src/merge/resources/crm/types/operator_schema.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class OperatorSchema(pydantic.BaseModel): - operator: typing.Optional[str] = pydantic.Field(description="The operator for which an operator schema is defined.") - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether the operator can be repeated multiple times." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/crm/types/opportunity.py b/src/merge/resources/crm/types/opportunity.py index 2e258d65..bd336b63 100644 --- a/src/merge/resources/crm/types/opportunity.py +++ b/src/merge/resources/crm/types/opportunity.py @@ -32,9 +32,11 @@ class Opportunity(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The opportunity's name.") description: typing.Optional[str] = pydantic.Field(description="The opportunity's description.") diff --git a/src/merge/resources/crm/types/paginated_condition_schema_list.py b/src/merge/resources/crm/types/paginated_condition_schema_list.py deleted file mode 100644 index 64f4f814..00000000 --- a/src/merge/resources/crm/types/paginated_condition_schema_list.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema import ConditionSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class PaginatedConditionSchemaList(pydantic.BaseModel): - next: typing.Optional[str] - previous: typing.Optional[str] - results: typing.Optional[typing.List[ConditionSchema]] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/crm/types/patched_account_request.py b/src/merge/resources/crm/types/patched_account_request.py index 7b38bb68..fc1f2af7 100644 --- a/src/merge/resources/crm/types/patched_account_request.py +++ b/src/merge/resources/crm/types/patched_account_request.py @@ -4,6 +4,7 @@ import typing from ....core.datetime_utils import serialize_datetime +from .address_request import AddressRequest from .remote_field_request import RemoteFieldRequest try: @@ -31,6 +32,7 @@ class PatchedAccountRequest(pydantic.BaseModel): industry: typing.Optional[str] = pydantic.Field(description="The account's industry.") website: typing.Optional[str] = pydantic.Field(description="The account's website.") number_of_employees: typing.Optional[int] = pydantic.Field(description="The account's number of employees.") + addresses: typing.Optional[typing.List[AddressRequest]] last_activity_at: typing.Optional[dt.datetime] = pydantic.Field( description="The last date (either most recent or furthest in the future) of when an activity occurs in an account." ) diff --git a/src/merge/resources/crm/types/phone_number.py b/src/merge/resources/crm/types/phone_number.py index 3bdf4f0f..a7351436 100644 --- a/src/merge/resources/crm/types/phone_number.py +++ b/src/merge/resources/crm/types/phone_number.py @@ -24,9 +24,11 @@ class PhoneNumber(pydantic.BaseModel): Fetch from the `GET Contact` endpoint and view their phone numbers. """ - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) phone_number: typing.Optional[str] = pydantic.Field(description="The phone number.") phone_number_type: typing.Optional[str] = pydantic.Field(description="The phone number's type.") diff --git a/src/merge/resources/crm/types/remote_field_api.py b/src/merge/resources/crm/types/remote_field_api.py index 30529431..6fa31902 100644 --- a/src/merge/resources/crm/types/remote_field_api.py +++ b/src/merge/resources/crm/types/remote_field_api.py @@ -6,6 +6,7 @@ from ....core.datetime_utils import serialize_datetime from .advanced_metadata import AdvancedMetadata from .remote_endpoint_info import RemoteEndpointInfo +from .remote_field_api_coverage import RemoteFieldApiCoverage try: import pydantic.v1 as pydantic # type: ignore @@ -19,6 +20,7 @@ class RemoteFieldApi(pydantic.BaseModel): remote_endpoint_info: RemoteEndpointInfo example_values: typing.List[typing.Any] advanced_metadata: typing.Optional[AdvancedMetadata] + coverage: typing.Optional[RemoteFieldApiCoverage] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/resources/selective_sync/__init__.py b/src/merge/resources/crm/types/remote_field_api_coverage.py similarity index 50% rename from src/merge/resources/crm/resources/selective_sync/__init__.py rename to src/merge/resources/crm/types/remote_field_api_coverage.py index f3ea2659..adcd9be9 100644 --- a/src/merge/resources/crm/resources/selective_sync/__init__.py +++ b/src/merge/resources/crm/types/remote_field_api_coverage.py @@ -1,2 +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/crm/types/remote_field_class_for_custom_object_class.py b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py index c5de6cd7..8042dc15 100644 --- a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py +++ b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py @@ -18,9 +18,11 @@ class RemoteFieldClassForCustomObjectClass(pydantic.BaseModel): - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) display_name: typing.Optional[str] remote_key_name: typing.Optional[str] diff --git a/src/merge/resources/crm/types/stage.py b/src/merge/resources/crm/types/stage.py index c38782cd..c828da20 100644 --- a/src/merge/resources/crm/types/stage.py +++ b/src/merge/resources/crm/types/stage.py @@ -28,9 +28,11 @@ class Stage(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The stage's name.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( diff --git a/src/merge/resources/crm/types/task.py b/src/merge/resources/crm/types/task.py index 306a9b8d..4a748074 100644 --- a/src/merge/resources/crm/types/task.py +++ b/src/merge/resources/crm/types/task.py @@ -32,9 +32,11 @@ class Task(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) subject: typing.Optional[str] = pydantic.Field(description="The task's subject.") content: typing.Optional[str] = pydantic.Field(description="The task's content.") diff --git a/src/merge/resources/crm/types/user.py b/src/merge/resources/crm/types/user.py index e2f63b08..226d66a5 100644 --- a/src/merge/resources/crm/types/user.py +++ b/src/merge/resources/crm/types/user.py @@ -28,9 +28,11 @@ class User(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The user's name.") email: typing.Optional[str] = pydantic.Field(description="The user's email address.") diff --git a/src/merge/resources/filestorage/__init__.py b/src/merge/resources/filestorage/__init__.py index bcd57989..e4345236 100644 --- a/src/merge/resources/filestorage/__init__.py +++ b/src/merge/resources/filestorage/__init__.py @@ -17,9 +17,6 @@ CategoryEnum, CommonModelScopeApi, CommonModelScopesBodyRequest, - ConditionSchema, - ConditionSchemaConditionType, - ConditionTypeEnum, DataPassthroughRequest, DebugModeLog, DebugModelLogSummary, @@ -67,10 +64,6 @@ IssueStatus, IssueStatusEnum, LinkToken, - LinkedAccountCondition, - LinkedAccountConditionRequest, - LinkedAccountSelectiveSyncConfiguration, - LinkedAccountSelectiveSyncConfigurationRequest, LinkedAccountStatus, MetaResponse, MethodEnum, @@ -79,10 +72,8 @@ ModelPermissionDeserializerRequest, MultipartFormFieldRequest, MultipartFormFieldRequestEncoding, - OperatorSchema, PaginatedAccountDetailsAndActionsList, PaginatedAuditLogEventList, - PaginatedConditionSchemaList, PaginatedDriveList, PaginatedFileList, PaginatedFolderList, @@ -102,6 +93,7 @@ PermissionUser, RemoteEndpointInfo, RemoteFieldApi, + RemoteFieldApiCoverage, RemoteFieldApiResponse, RemoteKey, RemoteResponse, @@ -144,7 +136,6 @@ passthrough, regenerate_key, scopes, - selective_sync, sync_status, users, webhook_receivers, @@ -167,9 +158,6 @@ "CategoryEnum", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", @@ -222,10 +210,6 @@ "IssueStatusEnum", "IssuesListRequestStatus", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "LinkedAccountsListRequestCategory", "MetaResponse", @@ -235,10 +219,8 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAuditLogEventList", - "PaginatedConditionSchemaList", "PaginatedDriveList", "PaginatedFileList", "PaginatedFolderList", @@ -258,6 +240,7 @@ "PermissionUser", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", @@ -292,7 +275,6 @@ "passthrough", "regenerate_key", "scopes", - "selective_sync", "sync_status", "users", "webhook_receivers", diff --git a/src/merge/resources/filestorage/client.py b/src/merge/resources/filestorage/client.py index 331560f1..5d8d0af7 100644 --- a/src/merge/resources/filestorage/client.py +++ b/src/merge/resources/filestorage/client.py @@ -26,7 +26,6 @@ from .resources.passthrough.client import PassthroughClient from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient from .resources.scopes.client import AsyncScopesClient, ScopesClient -from .resources.selective_sync.client import AsyncSelectiveSyncClient, SelectiveSyncClient from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient from .resources.users.client import AsyncUsersClient, UsersClient from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient @@ -55,7 +54,6 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.linked_accounts = LinkedAccountsClient(client_wrapper=self._client_wrapper) self.passthrough = PassthroughClient(client_wrapper=self._client_wrapper) self.regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = SelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = SyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = ForceResyncClient(client_wrapper=self._client_wrapper) self.users = UsersClient(client_wrapper=self._client_wrapper) @@ -85,7 +83,6 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): client_wrapper=self._client_wrapper ) self.regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = AsyncSelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = AsyncSyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = AsyncForceResyncClient(client_wrapper=self._client_wrapper) self.users = AsyncUsersClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/resources/filestorage/resources/__init__.py b/src/merge/resources/filestorage/resources/__init__.py index 85c03749..528bf8e5 100644 --- a/src/merge/resources/filestorage/resources/__init__.py +++ b/src/merge/resources/filestorage/resources/__init__.py @@ -20,7 +20,6 @@ passthrough, regenerate_key, scopes, - selective_sync, sync_status, users, webhook_receivers, @@ -56,7 +55,6 @@ "passthrough", "regenerate_key", "scopes", - "selective_sync", "sync_status", "users", "webhook_receivers", diff --git a/src/merge/resources/filestorage/resources/audit_trail/client.py b/src/merge/resources/filestorage/resources/audit_trail/client.py index 23658590..f10b9c5e 100644 --- a/src/merge/resources/filestorage/resources/audit_trail/client.py +++ b/src/merge/resources/filestorage/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. @@ -122,7 +122,7 @@ async def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. diff --git a/src/merge/resources/filestorage/resources/field_mapping/client.py b/src/merge/resources/filestorage/resources/field_mapping/client.py index db066821..f3d8f558 100644 --- a/src/merge/resources/filestorage/resources/field_mapping/client.py +++ b/src/merge/resources/filestorage/resources/field_mapping/client.py @@ -244,8 +244,6 @@ def field_mappings_partial_update( ) client.filestorage.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -615,8 +613,6 @@ async def field_mappings_partial_update( ) await client.filestorage.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} diff --git a/src/merge/resources/filestorage/resources/link_token/client.py b/src/merge/resources/filestorage/resources/link_token/client.py index 41e0210c..10b5f331 100644 --- a/src/merge/resources/filestorage/resources/link_token/client.py +++ b/src/merge/resources/filestorage/resources/link_token/client.py @@ -42,6 +42,7 @@ def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -68,6 +69,8 @@ def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge @@ -102,6 +105,8 @@ def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/link-token"), @@ -154,6 +159,7 @@ async def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -180,6 +186,8 @@ async def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge @@ -214,6 +222,8 @@ async def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/link-token"), diff --git a/src/merge/resources/filestorage/resources/selective_sync/client.py b/src/merge/resources/filestorage/resources/selective_sync/client.py deleted file mode 100644 index 985a37a9..00000000 --- a/src/merge/resources/filestorage/resources/selective_sync/client.py +++ /dev/null @@ -1,382 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from .....core.api_error import ApiError -from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .....core.jsonable_encoder import jsonable_encoder -from .....core.remove_none_from_dict import remove_none_from_dict -from .....core.request_options import RequestOptions -from ...types.linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from ...types.linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest -from ...types.paginated_condition_schema_list import PaginatedConditionSchemaList - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class SelectiveSyncClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.filestorage.selective_sync.configurations_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - from merge.resources.filestorage import ( - LinkedAccountSelectiveSyncConfigurationRequest, - ) - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.filestorage.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.filestorage.selective_sync.meta_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncSelectiveSyncClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.filestorage.selective_sync.configurations_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - from merge.resources.filestorage import ( - LinkedAccountSelectiveSyncConfigurationRequest, - ) - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.filestorage.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.filestorage.selective_sync.meta_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/filestorage/types/__init__.py b/src/merge/resources/filestorage/types/__init__.py index b923d348..1f1695be 100644 --- a/src/merge/resources/filestorage/types/__init__.py +++ b/src/merge/resources/filestorage/types/__init__.py @@ -16,9 +16,6 @@ from .category_enum import CategoryEnum from .common_model_scope_api import CommonModelScopeApi from .common_model_scopes_body_request import CommonModelScopesBodyRequest -from .condition_schema import ConditionSchema -from .condition_schema_condition_type import ConditionSchemaConditionType -from .condition_type_enum import ConditionTypeEnum from .data_passthrough_request import DataPassthroughRequest from .debug_mode_log import DebugModeLog from .debug_model_log_summary import DebugModelLogSummary @@ -68,10 +65,6 @@ from .issue_status import IssueStatus from .issue_status_enum import IssueStatusEnum from .link_token import LinkToken -from .linked_account_condition import LinkedAccountCondition -from .linked_account_condition_request import LinkedAccountConditionRequest -from .linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from .linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest from .linked_account_status import LinkedAccountStatus from .meta_response import MetaResponse from .method_enum import MethodEnum @@ -80,10 +73,8 @@ from .model_permission_deserializer_request import ModelPermissionDeserializerRequest from .multipart_form_field_request import MultipartFormFieldRequest from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding -from .operator_schema import OperatorSchema from .paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList from .paginated_audit_log_event_list import PaginatedAuditLogEventList -from .paginated_condition_schema_list import PaginatedConditionSchemaList from .paginated_drive_list import PaginatedDriveList from .paginated_file_list import PaginatedFileList from .paginated_folder_list import PaginatedFolderList @@ -103,6 +94,7 @@ from .permission_user import PermissionUser from .remote_endpoint_info import RemoteEndpointInfo from .remote_field_api import RemoteFieldApi +from .remote_field_api_coverage import RemoteFieldApiCoverage from .remote_field_api_response import RemoteFieldApiResponse from .remote_key import RemoteKey from .remote_response import RemoteResponse @@ -136,9 +128,6 @@ "CategoryEnum", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", @@ -186,10 +175,6 @@ "IssueStatus", "IssueStatusEnum", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "MetaResponse", "MethodEnum", @@ -198,10 +183,8 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAuditLogEventList", - "PaginatedConditionSchemaList", "PaginatedDriveList", "PaginatedFileList", "PaginatedFolderList", @@ -221,6 +204,7 @@ "PermissionUser", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", diff --git a/src/merge/resources/filestorage/types/audit_log_event.py b/src/merge/resources/filestorage/types/audit_log_event.py index 131ad94b..e8bffc42 100644 --- a/src/merge/resources/filestorage/types/audit_log_event.py +++ b/src/merge/resources/filestorage/types/audit_log_event.py @@ -72,6 +72,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" "- `MUTED_ISSUE` - MUTED_ISSUE\n" "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" + "- `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK\n" + "- `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK\n" + "- `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED\n" ) ) event_description: str diff --git a/src/merge/resources/filestorage/types/condition_schema.py b/src/merge/resources/filestorage/types/condition_schema.py deleted file mode 100644 index c8aebb68..00000000 --- a/src/merge/resources/filestorage/types/condition_schema.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema_condition_type import ConditionSchemaConditionType -from .operator_schema import OperatorSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class ConditionSchema(pydantic.BaseModel): - id: str = pydantic.Field( - description="The ID of the condition schema. This ID is used when updating selective syncs for a linked account." - ) - common_model: typing.Optional[str] = pydantic.Field( - description="The common model for which a condition schema is defined." - ) - native_name: typing.Optional[str] - field_name: typing.Optional[str] - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." - ) - condition_type: ConditionSchemaConditionType = pydantic.Field( - description=( - "The type of value(s) that can be set for this condition.\n" - "\n" - "- `BOOLEAN` - BOOLEAN\n" - "- `DATE` - DATE\n" - "- `DATE_TIME` - DATE_TIME\n" - "- `INTEGER` - INTEGER\n" - "- `FLOAT` - FLOAT\n" - "- `STRING` - STRING\n" - "- `LIST_OF_STRINGS` - LIST_OF_STRINGS\n" - ) - ) - operators: typing.List[OperatorSchema] = pydantic.Field( - description="The schemas for the operators that can be used on a condition." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/filestorage/types/condition_schema_condition_type.py b/src/merge/resources/filestorage/types/condition_schema_condition_type.py deleted file mode 100644 index 40fe5f2e..00000000 --- a/src/merge/resources/filestorage/types/condition_schema_condition_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .condition_type_enum import ConditionTypeEnum - -ConditionSchemaConditionType = typing.Union[ConditionTypeEnum, str] diff --git a/src/merge/resources/filestorage/types/condition_type_enum.py b/src/merge/resources/filestorage/types/condition_type_enum.py deleted file mode 100644 index 2814507a..00000000 --- a/src/merge/resources/filestorage/types/condition_type_enum.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class ConditionTypeEnum(str, enum.Enum): - """ - - `BOOLEAN` - BOOLEAN - - `DATE` - DATE - - `DATE_TIME` - DATE_TIME - - `INTEGER` - INTEGER - - `FLOAT` - FLOAT - - `STRING` - STRING - - `LIST_OF_STRINGS` - LIST_OF_STRINGS - """ - - BOOLEAN = "BOOLEAN" - DATE = "DATE" - DATE_TIME = "DATE_TIME" - INTEGER = "INTEGER" - FLOAT = "FLOAT" - STRING = "STRING" - LIST_OF_STRINGS = "LIST_OF_STRINGS" - - def visit( - self, - boolean: typing.Callable[[], T_Result], - date: typing.Callable[[], T_Result], - date_time: typing.Callable[[], T_Result], - integer: typing.Callable[[], T_Result], - float_: typing.Callable[[], T_Result], - string: typing.Callable[[], T_Result], - list_of_strings: typing.Callable[[], T_Result], - ) -> T_Result: - if self is ConditionTypeEnum.BOOLEAN: - return boolean() - if self is ConditionTypeEnum.DATE: - return date() - if self is ConditionTypeEnum.DATE_TIME: - return date_time() - if self is ConditionTypeEnum.INTEGER: - return integer() - if self is ConditionTypeEnum.FLOAT: - return float_() - if self is ConditionTypeEnum.STRING: - return string() - if self is ConditionTypeEnum.LIST_OF_STRINGS: - return list_of_strings() diff --git a/src/merge/resources/filestorage/types/drive.py b/src/merge/resources/filestorage/types/drive.py index 4f33eadb..25adc0d2 100644 --- a/src/merge/resources/filestorage/types/drive.py +++ b/src/merge/resources/filestorage/types/drive.py @@ -26,9 +26,11 @@ class Drive(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The drive's name.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( diff --git a/src/merge/resources/filestorage/types/event_type_enum.py b/src/merge/resources/filestorage/types/event_type_enum.py index 434539c7..fcc33f75 100644 --- a/src/merge/resources/filestorage/types/event_type_enum.py +++ b/src/merge/resources/filestorage/types/event_type_enum.py @@ -42,6 +42,9 @@ class EventTypeEnum(str, enum.Enum): - `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 """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -78,6 +81,9 @@ class EventTypeEnum(str, enum.Enum): 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" def visit( self, @@ -115,6 +121,9 @@ def visit( 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], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -184,3 +193,9 @@ def visit( 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() diff --git a/src/merge/resources/filestorage/types/file.py b/src/merge/resources/filestorage/types/file.py index 9be5d11d..5fbfaf99 100644 --- a/src/merge/resources/filestorage/types/file.py +++ b/src/merge/resources/filestorage/types/file.py @@ -29,9 +29,11 @@ class File(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The file's name.") file_url: typing.Optional[str] = pydantic.Field(description="The URL to access the file.") diff --git a/src/merge/resources/filestorage/types/folder.py b/src/merge/resources/filestorage/types/folder.py index 4f89d155..76edbee4 100644 --- a/src/merge/resources/filestorage/types/folder.py +++ b/src/merge/resources/filestorage/types/folder.py @@ -30,9 +30,11 @@ class Folder(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The folder's name.") folder_url: typing.Optional[str] = pydantic.Field(description="The URL to access the folder.") diff --git a/src/merge/resources/filestorage/types/group.py b/src/merge/resources/filestorage/types/group.py index 6e1fc9da..d63216af 100644 --- a/src/merge/resources/filestorage/types/group.py +++ b/src/merge/resources/filestorage/types/group.py @@ -26,9 +26,11 @@ class Group(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The group's name.") users: typing.List[str] = pydantic.Field( diff --git a/src/merge/resources/filestorage/types/linked_account_condition.py b/src/merge/resources/filestorage/types/linked_account_condition.py deleted file mode 100644 index f13ef90d..00000000 --- a/src/merge/resources/filestorage/types/linked_account_condition.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountCondition(pydantic.BaseModel): - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Optional[typing.Any] - field_name: typing.Optional[str] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/filestorage/types/linked_account_condition_request.py b/src/merge/resources/filestorage/types/linked_account_condition_request.py deleted file mode 100644 index ce36a27f..00000000 --- a/src/merge/resources/filestorage/types/linked_account_condition_request.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountConditionRequest(pydantic.BaseModel): - id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Any - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/filestorage/types/linked_account_selective_sync_configuration.py b/src/merge/resources/filestorage/types/linked_account_selective_sync_configuration.py deleted file mode 100644 index 2727cdd9..00000000 --- a/src/merge/resources/filestorage/types/linked_account_selective_sync_configuration.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition import LinkedAccountCondition - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfiguration(pydantic.BaseModel): - linked_account_conditions: typing.Optional[typing.List[LinkedAccountCondition]] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/filestorage/types/linked_account_selective_sync_configuration_request.py b/src/merge/resources/filestorage/types/linked_account_selective_sync_configuration_request.py deleted file mode 100644 index b744ce07..00000000 --- a/src/merge/resources/filestorage/types/linked_account_selective_sync_configuration_request.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition_request import LinkedAccountConditionRequest - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfigurationRequest(pydantic.BaseModel): - linked_account_conditions: typing.List[LinkedAccountConditionRequest] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/filestorage/types/operator_schema.py b/src/merge/resources/filestorage/types/operator_schema.py deleted file mode 100644 index 0a427fe7..00000000 --- a/src/merge/resources/filestorage/types/operator_schema.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class OperatorSchema(pydantic.BaseModel): - operator: typing.Optional[str] = pydantic.Field(description="The operator for which an operator schema is defined.") - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether the operator can be repeated multiple times." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/filestorage/types/paginated_condition_schema_list.py b/src/merge/resources/filestorage/types/paginated_condition_schema_list.py deleted file mode 100644 index 64f4f814..00000000 --- a/src/merge/resources/filestorage/types/paginated_condition_schema_list.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema import ConditionSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class PaginatedConditionSchemaList(pydantic.BaseModel): - next: typing.Optional[str] - previous: typing.Optional[str] - results: typing.Optional[typing.List[ConditionSchema]] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/filestorage/types/permission.py b/src/merge/resources/filestorage/types/permission.py index 02b41fe7..31f5bea9 100644 --- a/src/merge/resources/filestorage/types/permission.py +++ b/src/merge/resources/filestorage/types/permission.py @@ -30,9 +30,11 @@ class Permission(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) user: typing.Optional[PermissionUser] = pydantic.Field(description="The user that is granted this permission.") group: typing.Optional[PermissionGroup] = pydantic.Field(description="The group that is granted this permission.") diff --git a/src/merge/resources/filestorage/types/remote_field_api.py b/src/merge/resources/filestorage/types/remote_field_api.py index 30529431..6fa31902 100644 --- a/src/merge/resources/filestorage/types/remote_field_api.py +++ b/src/merge/resources/filestorage/types/remote_field_api.py @@ -6,6 +6,7 @@ from ....core.datetime_utils import serialize_datetime from .advanced_metadata import AdvancedMetadata from .remote_endpoint_info import RemoteEndpointInfo +from .remote_field_api_coverage import RemoteFieldApiCoverage try: import pydantic.v1 as pydantic # type: ignore @@ -19,6 +20,7 @@ class RemoteFieldApi(pydantic.BaseModel): remote_endpoint_info: RemoteEndpointInfo example_values: typing.List[typing.Any] advanced_metadata: typing.Optional[AdvancedMetadata] + coverage: typing.Optional[RemoteFieldApiCoverage] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/filestorage/resources/selective_sync/__init__.py b/src/merge/resources/filestorage/types/remote_field_api_coverage.py similarity index 50% rename from src/merge/resources/filestorage/resources/selective_sync/__init__.py rename to src/merge/resources/filestorage/types/remote_field_api_coverage.py index f3ea2659..adcd9be9 100644 --- a/src/merge/resources/filestorage/resources/selective_sync/__init__.py +++ b/src/merge/resources/filestorage/types/remote_field_api_coverage.py @@ -1,2 +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/filestorage/types/user.py b/src/merge/resources/filestorage/types/user.py index 0147f0fd..a4ab8e02 100644 --- a/src/merge/resources/filestorage/types/user.py +++ b/src/merge/resources/filestorage/types/user.py @@ -26,9 +26,11 @@ class User(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The user's name.") email_address: typing.Optional[str] = pydantic.Field( diff --git a/src/merge/resources/hris/__init__.py b/src/merge/resources/hris/__init__.py index 3341df47..f83639f5 100644 --- a/src/merge/resources/hris/__init__.py +++ b/src/merge/resources/hris/__init__.py @@ -25,9 +25,6 @@ CommonModelScopeApi, CommonModelScopesBodyRequest, Company, - ConditionSchema, - ConditionSchemaConditionType, - ConditionTypeEnum, CountryEnum, DataPassthroughRequest, DebugModeLog, @@ -107,10 +104,6 @@ IssueStatus, IssueStatusEnum, LinkToken, - LinkedAccountCondition, - LinkedAccountConditionRequest, - LinkedAccountSelectiveSyncConfiguration, - LinkedAccountSelectiveSyncConfigurationRequest, LinkedAccountStatus, Location, LocationCountry, @@ -124,13 +117,11 @@ ModelPermissionDeserializerRequest, MultipartFormFieldRequest, MultipartFormFieldRequestEncoding, - OperatorSchema, PaginatedAccountDetailsAndActionsList, PaginatedAuditLogEventList, PaginatedBankInfoList, PaginatedBenefitList, PaginatedCompanyList, - PaginatedConditionSchemaList, PaginatedDependentList, PaginatedEmployeeList, PaginatedEmployeePayrollRunList, @@ -159,6 +150,7 @@ RemoteData, RemoteEndpointInfo, RemoteFieldApi, + RemoteFieldApiCoverage, RemoteFieldApiResponse, RemoteKey, RemoteResponse, @@ -265,7 +257,6 @@ payroll_runs, regenerate_key, scopes, - selective_sync, sync_status, teams, time_off, @@ -301,9 +292,6 @@ "CommonModelScopeApi", "CommonModelScopesBodyRequest", "Company", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "CountryEnum", "DataPassthroughRequest", "DebugModeLog", @@ -401,10 +389,6 @@ "IssueStatusEnum", "IssuesListRequestStatus", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "LinkedAccountsListRequestCategory", "Location", @@ -420,13 +404,11 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAuditLogEventList", "PaginatedBankInfoList", "PaginatedBenefitList", "PaginatedCompanyList", - "PaginatedConditionSchemaList", "PaginatedDependentList", "PaginatedEmployeeList", "PaginatedEmployeePayrollRunList", @@ -460,6 +442,7 @@ "RemoteData", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", @@ -537,7 +520,6 @@ "payroll_runs", "regenerate_key", "scopes", - "selective_sync", "sync_status", "teams", "time_off", diff --git a/src/merge/resources/hris/client.py b/src/merge/resources/hris/client.py index fc54ff1a..d74965f8 100644 --- a/src/merge/resources/hris/client.py +++ b/src/merge/resources/hris/client.py @@ -34,7 +34,6 @@ from .resources.payroll_runs.client import AsyncPayrollRunsClient, PayrollRunsClient from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient from .resources.scopes.client import AsyncScopesClient, ScopesClient -from .resources.selective_sync.client import AsyncSelectiveSyncClient, SelectiveSyncClient from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient from .resources.teams.client import AsyncTeamsClient, TeamsClient from .resources.time_off.client import AsyncTimeOffClient, TimeOffClient @@ -74,7 +73,6 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.pay_groups = PayGroupsClient(client_wrapper=self._client_wrapper) self.payroll_runs = PayrollRunsClient(client_wrapper=self._client_wrapper) self.regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = SelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = SyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = ForceResyncClient(client_wrapper=self._client_wrapper) self.teams = TeamsClient(client_wrapper=self._client_wrapper) @@ -115,7 +113,6 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self.pay_groups = AsyncPayGroupsClient(client_wrapper=self._client_wrapper) self.payroll_runs = AsyncPayrollRunsClient(client_wrapper=self._client_wrapper) self.regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper) - self.selective_sync = AsyncSelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = AsyncSyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = AsyncForceResyncClient(client_wrapper=self._client_wrapper) self.teams = AsyncTeamsClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/resources/hris/resources/__init__.py b/src/merge/resources/hris/resources/__init__.py index e77874b9..941b740c 100644 --- a/src/merge/resources/hris/resources/__init__.py +++ b/src/merge/resources/hris/resources/__init__.py @@ -28,7 +28,6 @@ payroll_runs, regenerate_key, scopes, - selective_sync, sync_status, teams, time_off, @@ -145,7 +144,6 @@ "payroll_runs", "regenerate_key", "scopes", - "selective_sync", "sync_status", "teams", "time_off", diff --git a/src/merge/resources/hris/resources/audit_trail/client.py b/src/merge/resources/hris/resources/audit_trail/client.py index e7cefade..da93ab47 100644 --- a/src/merge/resources/hris/resources/audit_trail/client.py +++ b/src/merge/resources/hris/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. @@ -122,7 +122,7 @@ async def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. diff --git a/src/merge/resources/hris/resources/employees/client.py b/src/merge/resources/hris/resources/employees/client.py index 41ee85ce..56bab563 100644 --- a/src/merge/resources/hris/resources/employees/client.py +++ b/src/merge/resources/hris/resources/employees/client.py @@ -405,7 +405,6 @@ def ignore_create( ) client.hris.employees.ignore_create( model_id="model_id", - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) """ _request: typing.Dict[str, typing.Any] = {"reason": reason} @@ -856,7 +855,6 @@ async def ignore_create( ) await client.hris.employees.ignore_create( model_id="model_id", - message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) """ _request: typing.Dict[str, typing.Any] = {"reason": reason} diff --git a/src/merge/resources/hris/resources/field_mapping/client.py b/src/merge/resources/hris/resources/field_mapping/client.py index 44e4d51b..fab8b31f 100644 --- a/src/merge/resources/hris/resources/field_mapping/client.py +++ b/src/merge/resources/hris/resources/field_mapping/client.py @@ -244,8 +244,6 @@ def field_mappings_partial_update( ) client.hris.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -615,8 +613,6 @@ async def field_mappings_partial_update( ) await client.hris.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} diff --git a/src/merge/resources/hris/resources/groups/client.py b/src/merge/resources/hris/resources/groups/client.py index fee04bd2..11ded781 100644 --- a/src/merge/resources/hris/resources/groups/client.py +++ b/src/merge/resources/hris/resources/groups/client.py @@ -32,6 +32,7 @@ def list( cursor: typing.Optional[str] = None, include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, + is_commonly_used_as_team: typing.Optional[str] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, names: typing.Optional[str] = None, @@ -56,6 +57,8 @@ def list( - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + - 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. - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. @@ -93,6 +96,7 @@ def list( "cursor": cursor, "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, + "is_commonly_used_as_team": is_commonly_used_as_team, "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, "names": names, @@ -212,6 +216,7 @@ async def list( cursor: typing.Optional[str] = None, include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, + is_commonly_used_as_team: typing.Optional[str] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, names: typing.Optional[str] = None, @@ -236,6 +241,8 @@ async def list( - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + - 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. - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. @@ -273,6 +280,7 @@ async def list( "cursor": cursor, "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, + "is_commonly_used_as_team": is_commonly_used_as_team, "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, "names": names, diff --git a/src/merge/resources/hris/resources/link_token/client.py b/src/merge/resources/hris/resources/link_token/client.py index 53917632..8a911aa9 100644 --- a/src/merge/resources/hris/resources/link_token/client.py +++ b/src/merge/resources/hris/resources/link_token/client.py @@ -42,6 +42,7 @@ def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -68,6 +69,8 @@ def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge @@ -102,6 +105,8 @@ def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/link-token"), @@ -154,6 +159,7 @@ async def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -180,6 +186,8 @@ async def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge @@ -214,6 +222,8 @@ async def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/link-token"), diff --git a/src/merge/resources/hris/resources/selective_sync/__init__.py b/src/merge/resources/hris/resources/selective_sync/__init__.py deleted file mode 100644 index f3ea2659..00000000 --- a/src/merge/resources/hris/resources/selective_sync/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/src/merge/resources/hris/resources/selective_sync/client.py b/src/merge/resources/hris/resources/selective_sync/client.py deleted file mode 100644 index 44ef4f7b..00000000 --- a/src/merge/resources/hris/resources/selective_sync/client.py +++ /dev/null @@ -1,370 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from .....core.api_error import ApiError -from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .....core.jsonable_encoder import jsonable_encoder -from .....core.remove_none_from_dict import remove_none_from_dict -from .....core.request_options import RequestOptions -from ...types.linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from ...types.linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest -from ...types.paginated_condition_schema_list import PaginatedConditionSchemaList - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class SelectiveSyncClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.hris.selective_sync.configurations_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - from merge.resources.hris import LinkedAccountSelectiveSyncConfigurationRequest - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.hris.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.hris.selective_sync.meta_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncSelectiveSyncClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.hris.selective_sync.configurations_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - from merge.resources.hris import LinkedAccountSelectiveSyncConfigurationRequest - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.hris.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.hris.selective_sync.meta_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/hris/types/__init__.py b/src/merge/resources/hris/types/__init__.py index 5368db92..00cd605e 100644 --- a/src/merge/resources/hris/types/__init__.py +++ b/src/merge/resources/hris/types/__init__.py @@ -24,9 +24,6 @@ from .common_model_scope_api import CommonModelScopeApi from .common_model_scopes_body_request import CommonModelScopesBodyRequest from .company import Company -from .condition_schema import ConditionSchema -from .condition_schema_condition_type import ConditionSchemaConditionType -from .condition_type_enum import ConditionTypeEnum from .country_enum import CountryEnum from .data_passthrough_request import DataPassthroughRequest from .debug_mode_log import DebugModeLog @@ -108,10 +105,6 @@ from .issue_status import IssueStatus from .issue_status_enum import IssueStatusEnum from .link_token import LinkToken -from .linked_account_condition import LinkedAccountCondition -from .linked_account_condition_request import LinkedAccountConditionRequest -from .linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from .linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest from .linked_account_status import LinkedAccountStatus from .location import Location from .location_country import LocationCountry @@ -125,13 +118,11 @@ from .model_permission_deserializer_request import ModelPermissionDeserializerRequest from .multipart_form_field_request import MultipartFormFieldRequest from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding -from .operator_schema import OperatorSchema from .paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList from .paginated_audit_log_event_list import PaginatedAuditLogEventList from .paginated_bank_info_list import PaginatedBankInfoList from .paginated_benefit_list import PaginatedBenefitList from .paginated_company_list import PaginatedCompanyList -from .paginated_condition_schema_list import PaginatedConditionSchemaList from .paginated_dependent_list import PaginatedDependentList from .paginated_employee_list import PaginatedEmployeeList from .paginated_employee_payroll_run_list import PaginatedEmployeePayrollRunList @@ -160,6 +151,7 @@ from .remote_data import RemoteData from .remote_endpoint_info import RemoteEndpointInfo from .remote_field_api import RemoteFieldApi +from .remote_field_api_coverage import RemoteFieldApiCoverage from .remote_field_api_response import RemoteFieldApiResponse from .remote_key import RemoteKey from .remote_response import RemoteResponse @@ -226,9 +218,6 @@ "CommonModelScopeApi", "CommonModelScopesBodyRequest", "Company", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "CountryEnum", "DataPassthroughRequest", "DebugModeLog", @@ -308,10 +297,6 @@ "IssueStatus", "IssueStatusEnum", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "Location", "LocationCountry", @@ -325,13 +310,11 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAuditLogEventList", "PaginatedBankInfoList", "PaginatedBenefitList", "PaginatedCompanyList", - "PaginatedConditionSchemaList", "PaginatedDependentList", "PaginatedEmployeeList", "PaginatedEmployeePayrollRunList", @@ -360,6 +343,7 @@ "RemoteData", "RemoteEndpointInfo", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteKey", "RemoteResponse", diff --git a/src/merge/resources/hris/types/audit_log_event.py b/src/merge/resources/hris/types/audit_log_event.py index 131ad94b..e8bffc42 100644 --- a/src/merge/resources/hris/types/audit_log_event.py +++ b/src/merge/resources/hris/types/audit_log_event.py @@ -72,6 +72,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" "- `MUTED_ISSUE` - MUTED_ISSUE\n" "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" + "- `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK\n" + "- `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK\n" + "- `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED\n" ) ) event_description: str diff --git a/src/merge/resources/hris/types/bank_info.py b/src/merge/resources/hris/types/bank_info.py index 331d9d36..6e1c3dc7 100644 --- a/src/merge/resources/hris/types/bank_info.py +++ b/src/merge/resources/hris/types/bank_info.py @@ -29,9 +29,11 @@ class BankInfo(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee: typing.Optional[BankInfoEmployee] = pydantic.Field(description="The employee with this bank account.") account_number: typing.Optional[str] = pydantic.Field(description="The account number.") diff --git a/src/merge/resources/hris/types/benefit.py b/src/merge/resources/hris/types/benefit.py index 18d2d031..315f8fd4 100644 --- a/src/merge/resources/hris/types/benefit.py +++ b/src/merge/resources/hris/types/benefit.py @@ -28,9 +28,11 @@ class Benefit(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee: typing.Optional[BenefitEmployee] = pydantic.Field(description="The employee on the plan.") provider_name: typing.Optional[str] = pydantic.Field(description="The name of the benefit provider.") diff --git a/src/merge/resources/hris/types/company.py b/src/merge/resources/hris/types/company.py index c12455ff..ca6d9e94 100644 --- a/src/merge/resources/hris/types/company.py +++ b/src/merge/resources/hris/types/company.py @@ -27,9 +27,11 @@ class Company(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) legal_name: typing.Optional[str] = pydantic.Field(description="The company's legal name.") display_name: typing.Optional[str] = pydantic.Field(description="The company's display name.") diff --git a/src/merge/resources/hris/types/condition_schema.py b/src/merge/resources/hris/types/condition_schema.py deleted file mode 100644 index c8aebb68..00000000 --- a/src/merge/resources/hris/types/condition_schema.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema_condition_type import ConditionSchemaConditionType -from .operator_schema import OperatorSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class ConditionSchema(pydantic.BaseModel): - id: str = pydantic.Field( - description="The ID of the condition schema. This ID is used when updating selective syncs for a linked account." - ) - common_model: typing.Optional[str] = pydantic.Field( - description="The common model for which a condition schema is defined." - ) - native_name: typing.Optional[str] - field_name: typing.Optional[str] - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." - ) - condition_type: ConditionSchemaConditionType = pydantic.Field( - description=( - "The type of value(s) that can be set for this condition.\n" - "\n" - "- `BOOLEAN` - BOOLEAN\n" - "- `DATE` - DATE\n" - "- `DATE_TIME` - DATE_TIME\n" - "- `INTEGER` - INTEGER\n" - "- `FLOAT` - FLOAT\n" - "- `STRING` - STRING\n" - "- `LIST_OF_STRINGS` - LIST_OF_STRINGS\n" - ) - ) - operators: typing.List[OperatorSchema] = pydantic.Field( - description="The schemas for the operators that can be used on a condition." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/hris/types/condition_schema_condition_type.py b/src/merge/resources/hris/types/condition_schema_condition_type.py deleted file mode 100644 index 40fe5f2e..00000000 --- a/src/merge/resources/hris/types/condition_schema_condition_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .condition_type_enum import ConditionTypeEnum - -ConditionSchemaConditionType = typing.Union[ConditionTypeEnum, str] diff --git a/src/merge/resources/hris/types/condition_type_enum.py b/src/merge/resources/hris/types/condition_type_enum.py deleted file mode 100644 index 2814507a..00000000 --- a/src/merge/resources/hris/types/condition_type_enum.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class ConditionTypeEnum(str, enum.Enum): - """ - - `BOOLEAN` - BOOLEAN - - `DATE` - DATE - - `DATE_TIME` - DATE_TIME - - `INTEGER` - INTEGER - - `FLOAT` - FLOAT - - `STRING` - STRING - - `LIST_OF_STRINGS` - LIST_OF_STRINGS - """ - - BOOLEAN = "BOOLEAN" - DATE = "DATE" - DATE_TIME = "DATE_TIME" - INTEGER = "INTEGER" - FLOAT = "FLOAT" - STRING = "STRING" - LIST_OF_STRINGS = "LIST_OF_STRINGS" - - def visit( - self, - boolean: typing.Callable[[], T_Result], - date: typing.Callable[[], T_Result], - date_time: typing.Callable[[], T_Result], - integer: typing.Callable[[], T_Result], - float_: typing.Callable[[], T_Result], - string: typing.Callable[[], T_Result], - list_of_strings: typing.Callable[[], T_Result], - ) -> T_Result: - if self is ConditionTypeEnum.BOOLEAN: - return boolean() - if self is ConditionTypeEnum.DATE: - return date() - if self is ConditionTypeEnum.DATE_TIME: - return date_time() - if self is ConditionTypeEnum.INTEGER: - return integer() - if self is ConditionTypeEnum.FLOAT: - return float_() - if self is ConditionTypeEnum.STRING: - return string() - if self is ConditionTypeEnum.LIST_OF_STRINGS: - return list_of_strings() diff --git a/src/merge/resources/hris/types/deduction.py b/src/merge/resources/hris/types/deduction.py index cfb7700e..e03b4c8f 100644 --- a/src/merge/resources/hris/types/deduction.py +++ b/src/merge/resources/hris/types/deduction.py @@ -27,9 +27,11 @@ class Deduction(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee_payroll_run: typing.Optional[str] name: typing.Optional[str] = pydantic.Field(description="The deduction's name.") diff --git a/src/merge/resources/hris/types/dependent.py b/src/merge/resources/hris/types/dependent.py index 78b7ce65..32ae685e 100644 --- a/src/merge/resources/hris/types/dependent.py +++ b/src/merge/resources/hris/types/dependent.py @@ -29,9 +29,11 @@ class Dependent(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) first_name: typing.Optional[str] = pydantic.Field(description="The dependents's first name.") middle_name: typing.Optional[str] = pydantic.Field(description="The dependents's middle name.") diff --git a/src/merge/resources/hris/types/earning.py b/src/merge/resources/hris/types/earning.py index de0c4f33..0c054062 100644 --- a/src/merge/resources/hris/types/earning.py +++ b/src/merge/resources/hris/types/earning.py @@ -28,9 +28,11 @@ class Earning(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee_payroll_run: typing.Optional[str] amount: typing.Optional[float] = pydantic.Field(description="The amount earned.") diff --git a/src/merge/resources/hris/types/employee.py b/src/merge/resources/hris/types/employee.py index 43559cf3..871947d9 100644 --- a/src/merge/resources/hris/types/employee.py +++ b/src/merge/resources/hris/types/employee.py @@ -39,9 +39,11 @@ class Employee(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee_number: typing.Optional[str] = pydantic.Field( description="The employee's number that appears in the third-party integration's UI." diff --git a/src/merge/resources/hris/types/employee_payroll_run.py b/src/merge/resources/hris/types/employee_payroll_run.py index af88e707..b45dda57 100644 --- a/src/merge/resources/hris/types/employee_payroll_run.py +++ b/src/merge/resources/hris/types/employee_payroll_run.py @@ -32,9 +32,11 @@ class EmployeePayrollRun(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee: typing.Optional[EmployeePayrollRunEmployee] = pydantic.Field( description="The employee whose payroll is being run." diff --git a/src/merge/resources/hris/types/employer_benefit.py b/src/merge/resources/hris/types/employer_benefit.py index e82bac4f..693ce5be 100644 --- a/src/merge/resources/hris/types/employer_benefit.py +++ b/src/merge/resources/hris/types/employer_benefit.py @@ -27,9 +27,11 @@ class EmployerBenefit(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) benefit_plan_type: typing.Optional[EmployerBenefitBenefitPlanType] = pydantic.Field( description=( diff --git a/src/merge/resources/hris/types/employment.py b/src/merge/resources/hris/types/employment.py index cd92fe9f..1d7a3c87 100644 --- a/src/merge/resources/hris/types/employment.py +++ b/src/merge/resources/hris/types/employment.py @@ -37,9 +37,11 @@ class Employment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee: typing.Optional[EmploymentEmployee] = pydantic.Field(description="The employee holding this position.") job_title: typing.Optional[str] = pydantic.Field(description="The position's title.") diff --git a/src/merge/resources/hris/types/event_type_enum.py b/src/merge/resources/hris/types/event_type_enum.py index 434539c7..fcc33f75 100644 --- a/src/merge/resources/hris/types/event_type_enum.py +++ b/src/merge/resources/hris/types/event_type_enum.py @@ -42,6 +42,9 @@ class EventTypeEnum(str, enum.Enum): - `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 """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -78,6 +81,9 @@ class EventTypeEnum(str, enum.Enum): 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" def visit( self, @@ -115,6 +121,9 @@ def visit( 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], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -184,3 +193,9 @@ def visit( 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() diff --git a/src/merge/resources/hris/types/group.py b/src/merge/resources/hris/types/group.py index aaeecad5..8450f2b0 100644 --- a/src/merge/resources/hris/types/group.py +++ b/src/merge/resources/hris/types/group.py @@ -28,9 +28,11 @@ class Group(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) parent_group: typing.Optional[str] = pydantic.Field(description="The parent group for this group.") name: typing.Optional[str] = pydantic.Field(description="The group name.") @@ -48,6 +50,9 @@ class Group(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) + is_commonly_used_as_team: typing.Optional[bool] = pydantic.Field( + description="Indicates whether the Group refers to a team in the third party platform. Note that this is an opinionated view based on how Merge observes most organizations representing teams in each third party platform. If your customer uses a platform different from most, there is a chance this will not be correct." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/linked_account_condition.py b/src/merge/resources/hris/types/linked_account_condition.py deleted file mode 100644 index f13ef90d..00000000 --- a/src/merge/resources/hris/types/linked_account_condition.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountCondition(pydantic.BaseModel): - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Optional[typing.Any] - field_name: typing.Optional[str] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/hris/types/linked_account_condition_request.py b/src/merge/resources/hris/types/linked_account_condition_request.py deleted file mode 100644 index ce36a27f..00000000 --- a/src/merge/resources/hris/types/linked_account_condition_request.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountConditionRequest(pydantic.BaseModel): - id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Any - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/hris/types/linked_account_selective_sync_configuration.py b/src/merge/resources/hris/types/linked_account_selective_sync_configuration.py deleted file mode 100644 index 2727cdd9..00000000 --- a/src/merge/resources/hris/types/linked_account_selective_sync_configuration.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition import LinkedAccountCondition - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfiguration(pydantic.BaseModel): - linked_account_conditions: typing.Optional[typing.List[LinkedAccountCondition]] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/hris/types/linked_account_selective_sync_configuration_request.py b/src/merge/resources/hris/types/linked_account_selective_sync_configuration_request.py deleted file mode 100644 index b744ce07..00000000 --- a/src/merge/resources/hris/types/linked_account_selective_sync_configuration_request.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition_request import LinkedAccountConditionRequest - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfigurationRequest(pydantic.BaseModel): - linked_account_conditions: typing.List[LinkedAccountConditionRequest] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/hris/types/location.py b/src/merge/resources/hris/types/location.py index e0137dc6..c2d36f1f 100644 --- a/src/merge/resources/hris/types/location.py +++ b/src/merge/resources/hris/types/location.py @@ -29,9 +29,11 @@ class Location(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The location's name.") phone_number: typing.Optional[str] = pydantic.Field(description="The location's phone number.") diff --git a/src/merge/resources/hris/types/operator_schema.py b/src/merge/resources/hris/types/operator_schema.py deleted file mode 100644 index 0a427fe7..00000000 --- a/src/merge/resources/hris/types/operator_schema.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class OperatorSchema(pydantic.BaseModel): - operator: typing.Optional[str] = pydantic.Field(description="The operator for which an operator schema is defined.") - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether the operator can be repeated multiple times." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/hris/types/paginated_condition_schema_list.py b/src/merge/resources/hris/types/paginated_condition_schema_list.py deleted file mode 100644 index 64f4f814..00000000 --- a/src/merge/resources/hris/types/paginated_condition_schema_list.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema import ConditionSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class PaginatedConditionSchemaList(pydantic.BaseModel): - next: typing.Optional[str] - previous: typing.Optional[str] - results: typing.Optional[typing.List[ConditionSchema]] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/hris/types/pay_currency_enum.py b/src/merge/resources/hris/types/pay_currency_enum.py index 0ecc6995..e52cd2f0 100644 --- a/src/merge/resources/hris/types/pay_currency_enum.py +++ b/src/merge/resources/hris/types/pay_currency_enum.py @@ -628,7 +628,7 @@ def visit( xua: typing.Callable[[], T_Result], afn: typing.Callable[[], T_Result], afa: typing.Callable[[], T_Result], - all: typing.Callable[[], T_Result], + all_: typing.Callable[[], T_Result], alk: typing.Callable[[], T_Result], dzd: typing.Callable[[], T_Result], adp: typing.Callable[[], T_Result], @@ -939,7 +939,7 @@ def visit( if self is PayCurrencyEnum.AFA: return afa() if self is PayCurrencyEnum.ALL: - return all() + return all_() if self is PayCurrencyEnum.ALK: return alk() if self is PayCurrencyEnum.DZD: diff --git a/src/merge/resources/hris/types/pay_group.py b/src/merge/resources/hris/types/pay_group.py index 17e591d6..e78524e5 100644 --- a/src/merge/resources/hris/types/pay_group.py +++ b/src/merge/resources/hris/types/pay_group.py @@ -27,9 +27,11 @@ class PayGroup(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) pay_group_name: typing.Optional[str] = pydantic.Field(description="The pay group name.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( diff --git a/src/merge/resources/hris/types/payroll_run.py b/src/merge/resources/hris/types/payroll_run.py index 9034186a..5fe34e94 100644 --- a/src/merge/resources/hris/types/payroll_run.py +++ b/src/merge/resources/hris/types/payroll_run.py @@ -29,9 +29,11 @@ class PayrollRun(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) run_state: typing.Optional[PayrollRunRunState] = pydantic.Field( description=( diff --git a/src/merge/resources/hris/types/remote_field_api.py b/src/merge/resources/hris/types/remote_field_api.py index 30529431..6fa31902 100644 --- a/src/merge/resources/hris/types/remote_field_api.py +++ b/src/merge/resources/hris/types/remote_field_api.py @@ -6,6 +6,7 @@ from ....core.datetime_utils import serialize_datetime from .advanced_metadata import AdvancedMetadata from .remote_endpoint_info import RemoteEndpointInfo +from .remote_field_api_coverage import RemoteFieldApiCoverage try: import pydantic.v1 as pydantic # type: ignore @@ -19,6 +20,7 @@ class RemoteFieldApi(pydantic.BaseModel): remote_endpoint_info: RemoteEndpointInfo example_values: typing.List[typing.Any] advanced_metadata: typing.Optional[AdvancedMetadata] + coverage: typing.Optional[RemoteFieldApiCoverage] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/hris/types/remote_field_api_coverage.py b/src/merge/resources/hris/types/remote_field_api_coverage.py new file mode 100644 index 00000000..adcd9be9 --- /dev/null +++ b/src/merge/resources/hris/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/hris/types/tax.py b/src/merge/resources/hris/types/tax.py index 3757a289..1245e240 100644 --- a/src/merge/resources/hris/types/tax.py +++ b/src/merge/resources/hris/types/tax.py @@ -27,9 +27,11 @@ class Tax(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee_payroll_run: typing.Optional[str] name: typing.Optional[str] = pydantic.Field(description="The tax's name.") diff --git a/src/merge/resources/hris/types/team.py b/src/merge/resources/hris/types/team.py index f22c34ee..3a861b97 100644 --- a/src/merge/resources/hris/types/team.py +++ b/src/merge/resources/hris/types/team.py @@ -29,9 +29,11 @@ class Team(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The team's name.") parent_team: typing.Optional[TeamParentTeam] = pydantic.Field(description="The team's parent team.") diff --git a/src/merge/resources/hris/types/time_off.py b/src/merge/resources/hris/types/time_off.py index 6c7d2bb6..ddfb6c28 100644 --- a/src/merge/resources/hris/types/time_off.py +++ b/src/merge/resources/hris/types/time_off.py @@ -32,9 +32,11 @@ class TimeOff(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee: typing.Optional[TimeOffEmployee] = pydantic.Field(description="The employee requesting time off.") approver: typing.Optional[TimeOffApprover] = pydantic.Field( diff --git a/src/merge/resources/hris/types/time_off_balance.py b/src/merge/resources/hris/types/time_off_balance.py index a3ed0b46..e3cb4e77 100644 --- a/src/merge/resources/hris/types/time_off_balance.py +++ b/src/merge/resources/hris/types/time_off_balance.py @@ -29,9 +29,11 @@ class TimeOffBalance(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee: typing.Optional[TimeOffBalanceEmployee] = pydantic.Field( description="The employee the balance belongs to." diff --git a/src/merge/resources/hris/types/timesheet_entry.py b/src/merge/resources/hris/types/timesheet_entry.py index 231353d2..7437c3eb 100644 --- a/src/merge/resources/hris/types/timesheet_entry.py +++ b/src/merge/resources/hris/types/timesheet_entry.py @@ -26,9 +26,11 @@ class TimesheetEntry(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) employee: typing.Optional[str] = pydantic.Field(description="The employee the timesheet entry is for.") hours_worked: typing.Optional[float] = pydantic.Field(description="The number of hours logged by the employee.") diff --git a/src/merge/resources/ticketing/__init__.py b/src/merge/resources/ticketing/__init__.py index fbed43d8..2525502f 100644 --- a/src/merge/resources/ticketing/__init__.py +++ b/src/merge/resources/ticketing/__init__.py @@ -37,11 +37,10 @@ CommentUser, CommonModelScopeApi, CommonModelScopesBodyRequest, - ConditionSchema, - ConditionSchemaConditionType, - ConditionTypeEnum, Contact, ContactAccount, + ContactRequest, + ContactRequestAccount, DataPassthroughRequest, DebugModeLog, DebugModelLogSummary, @@ -70,10 +69,6 @@ ItemSchema, ItemTypeEnum, LinkToken, - LinkedAccountCondition, - LinkedAccountConditionRequest, - LinkedAccountSelectiveSyncConfiguration, - LinkedAccountSelectiveSyncConfigurationRequest, LinkedAccountStatus, MetaResponse, MethodEnum, @@ -82,14 +77,12 @@ ModelPermissionDeserializerRequest, MultipartFormFieldRequest, MultipartFormFieldRequestEncoding, - OperatorSchema, PaginatedAccountDetailsAndActionsList, PaginatedAccountList, PaginatedAttachmentList, PaginatedAuditLogEventList, PaginatedCollectionList, PaginatedCommentList, - PaginatedConditionSchemaList, PaginatedContactList, PaginatedIssueList, PaginatedProjectList, @@ -109,6 +102,7 @@ RemoteEndpointInfo, RemoteField, RemoteFieldApi, + RemoteFieldApiCoverage, RemoteFieldApiResponse, RemoteFieldClass, RemoteFieldClassFieldChoicesItem, @@ -155,6 +149,7 @@ TicketStatus, TicketStatusEnum, TicketingAttachmentResponse, + TicketingContactResponse, User, UserRolesItem, UserTeamsItem, @@ -202,7 +197,6 @@ regenerate_key, roles, scopes, - selective_sync, sync_status, tags, teams, @@ -251,11 +245,10 @@ "CommentsRetrieveRequestExpand", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "Contact", "ContactAccount", + "ContactRequest", + "ContactRequestAccount", "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", @@ -285,10 +278,6 @@ "ItemSchema", "ItemTypeEnum", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "LinkedAccountsListRequestCategory", "MetaResponse", @@ -298,14 +287,12 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAccountList", "PaginatedAttachmentList", "PaginatedAuditLogEventList", "PaginatedCollectionList", "PaginatedCommentList", - "PaginatedConditionSchemaList", "PaginatedContactList", "PaginatedIssueList", "PaginatedProjectList", @@ -326,6 +313,7 @@ "RemoteEndpointInfo", "RemoteField", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteFieldClass", "RemoteFieldClassFieldChoicesItem", @@ -372,6 +360,7 @@ "TicketStatus", "TicketStatusEnum", "TicketingAttachmentResponse", + "TicketingContactResponse", "TicketsCollaboratorsListRequestExpand", "TicketsListRequestExpand", "TicketsListRequestPriority", @@ -411,7 +400,6 @@ "regenerate_key", "roles", "scopes", - "selective_sync", "sync_status", "tags", "teams", diff --git a/src/merge/resources/ticketing/client.py b/src/merge/resources/ticketing/client.py index 41ad6f61..9fb7044c 100644 --- a/src/merge/resources/ticketing/client.py +++ b/src/merge/resources/ticketing/client.py @@ -29,7 +29,6 @@ from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient from .resources.roles.client import AsyncRolesClient, RolesClient from .resources.scopes.client import AsyncScopesClient, ScopesClient -from .resources.selective_sync.client import AsyncSelectiveSyncClient, SelectiveSyncClient from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient from .resources.tags.client import AsyncTagsClient, TagsClient from .resources.teams.client import AsyncTeamsClient, TeamsClient @@ -64,7 +63,6 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.projects = ProjectsClient(client_wrapper=self._client_wrapper) self.regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper) self.roles = RolesClient(client_wrapper=self._client_wrapper) - self.selective_sync = SelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = SyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = ForceResyncClient(client_wrapper=self._client_wrapper) self.tags = TagsClient(client_wrapper=self._client_wrapper) @@ -100,7 +98,6 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self.projects = AsyncProjectsClient(client_wrapper=self._client_wrapper) self.regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper) self.roles = AsyncRolesClient(client_wrapper=self._client_wrapper) - self.selective_sync = AsyncSelectiveSyncClient(client_wrapper=self._client_wrapper) self.sync_status = AsyncSyncStatusClient(client_wrapper=self._client_wrapper) self.force_resync = AsyncForceResyncClient(client_wrapper=self._client_wrapper) self.tags = AsyncTagsClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/resources/ticketing/resources/__init__.py b/src/merge/resources/ticketing/resources/__init__.py index b7e27461..a123456f 100644 --- a/src/merge/resources/ticketing/resources/__init__.py +++ b/src/merge/resources/ticketing/resources/__init__.py @@ -23,7 +23,6 @@ regenerate_key, roles, scopes, - selective_sync, sync_status, tags, teams, @@ -89,7 +88,6 @@ "regenerate_key", "roles", "scopes", - "selective_sync", "sync_status", "tags", "teams", diff --git a/src/merge/resources/ticketing/resources/audit_trail/client.py b/src/merge/resources/ticketing/resources/audit_trail/client.py index c3853cb8..1e5a8708 100644 --- a/src/merge/resources/ticketing/resources/audit_trail/client.py +++ b/src/merge/resources/ticketing/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. @@ -122,7 +122,7 @@ async def list( - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` + - 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`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_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`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED` - page_size: typing.Optional[int]. Number of results to return per page. diff --git a/src/merge/resources/ticketing/resources/contacts/client.py b/src/merge/resources/ticketing/resources/contacts/client.py index e36d2be9..964b2c49 100644 --- a/src/merge/resources/ticketing/resources/contacts/client.py +++ b/src/merge/resources/ticketing/resources/contacts/client.py @@ -12,13 +12,19 @@ from .....core.remove_none_from_dict import remove_none_from_dict from .....core.request_options import RequestOptions from ...types.contact import Contact +from ...types.contact_request import ContactRequest +from ...types.meta_response import MetaResponse from ...types.paginated_contact_list import PaginatedContactList +from ...types.ticketing_contact_response import TicketingContactResponse try: import pydantic.v1 as pydantic # type: ignore except ImportError: import pydantic # type: ignore +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + class ContactsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): @@ -117,6 +123,79 @@ def list( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def create( + self, + *, + is_debug_mode: typing.Optional[bool] = None, + run_async: typing.Optional[bool] = None, + model: ContactRequest, + request_options: typing.Optional[RequestOptions] = None, + ) -> TicketingContactResponse: + """ + Creates a `Contact` object with the given values. + + Parameters: + - 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. + + - model: ContactRequest. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + from merge.resources.ticketing import ContactRequest + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.ticketing.contacts.create( + model=ContactRequest(), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "POST", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/contacts"), + params=jsonable_encoder( + remove_none_from_dict( + { + "is_debug_mode": is_debug_mode, + "run_async": run_async, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder({"model": model}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"model": model}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(TicketingContactResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def retrieve( self, id: str, @@ -183,6 +262,47 @@ def retrieve( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: + """ + Returns metadata for `TicketingContact` POSTs. + + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.ticketing.contacts.meta_post_retrieve() + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/contacts/meta/post"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + class AsyncContactsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -281,6 +401,79 @@ async def list( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def create( + self, + *, + is_debug_mode: typing.Optional[bool] = None, + run_async: typing.Optional[bool] = None, + model: ContactRequest, + request_options: typing.Optional[RequestOptions] = None, + ) -> TicketingContactResponse: + """ + Creates a `Contact` object with the given values. + + Parameters: + - 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. + + - model: ContactRequest. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + from merge.resources.ticketing import ContactRequest + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.ticketing.contacts.create( + model=ContactRequest(), + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "POST", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/contacts"), + params=jsonable_encoder( + remove_none_from_dict( + { + "is_debug_mode": is_debug_mode, + "run_async": run_async, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder({"model": model}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"model": model}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(TicketingContactResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def retrieve( self, id: str, @@ -346,3 +539,44 @@ async def retrieve( except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + + async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: + """ + Returns metadata for `TicketingContact` POSTs. + + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.ticketing.contacts.meta_post_retrieve() + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/contacts/meta/post"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/ticketing/resources/field_mapping/client.py b/src/merge/resources/ticketing/resources/field_mapping/client.py index de743172..10396320 100644 --- a/src/merge/resources/ticketing/resources/field_mapping/client.py +++ b/src/merge/resources/ticketing/resources/field_mapping/client.py @@ -244,8 +244,6 @@ def field_mappings_partial_update( ) client.ticketing.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -615,8 +613,6 @@ async def field_mappings_partial_update( ) await client.ticketing.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", - remote_method="GET", - remote_url_path="/example-url-path", ) """ _request: typing.Dict[str, typing.Any] = {} diff --git a/src/merge/resources/ticketing/resources/link_token/client.py b/src/merge/resources/ticketing/resources/link_token/client.py index c63caa20..6ac2e213 100644 --- a/src/merge/resources/ticketing/resources/link_token/client.py +++ b/src/merge/resources/ticketing/resources/link_token/client.py @@ -42,6 +42,7 @@ def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -68,6 +69,8 @@ def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge @@ -102,6 +105,8 @@ def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/link-token"), @@ -154,6 +159,7 @@ async def create( typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, language: typing.Optional[str] = OMIT, + integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -180,6 +186,8 @@ async def create( - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]]. A JSON object containing integration-specific configuration options. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge @@ -214,6 +222,8 @@ async def create( _request["category_common_model_scopes"] = category_common_model_scopes if language is not OMIT: _request["language"] = language + if integration_specific_config is not OMIT: + _request["integration_specific_config"] = integration_specific_config _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/link-token"), diff --git a/src/merge/resources/ticketing/resources/selective_sync/__init__.py b/src/merge/resources/ticketing/resources/selective_sync/__init__.py deleted file mode 100644 index f3ea2659..00000000 --- a/src/merge/resources/ticketing/resources/selective_sync/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/src/merge/resources/ticketing/resources/selective_sync/client.py b/src/merge/resources/ticketing/resources/selective_sync/client.py deleted file mode 100644 index 8d23bf55..00000000 --- a/src/merge/resources/ticketing/resources/selective_sync/client.py +++ /dev/null @@ -1,382 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from .....core.api_error import ApiError -from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .....core.jsonable_encoder import jsonable_encoder -from .....core.remove_none_from_dict import remove_none_from_dict -from .....core.request_options import RequestOptions -from ...types.linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from ...types.linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest -from ...types.paginated_condition_schema_list import PaginatedConditionSchemaList - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class SelectiveSyncClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.ticketing.selective_sync.configurations_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - from merge.resources.ticketing import ( - LinkedAccountSelectiveSyncConfigurationRequest, - ) - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.ticketing.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.ticketing.selective_sync.meta_list() - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncSelectiveSyncClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def configurations_list( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Get a linked account's selective syncs. - - Parameters: - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.ticketing.selective_sync.configurations_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def configurations_update( - self, - *, - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LinkedAccountSelectiveSyncConfiguration]: - """ - Replace a linked account's selective syncs. - - Parameters: - - sync_configurations: typing.List[LinkedAccountSelectiveSyncConfigurationRequest]. The selective syncs associated with a linked account. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - from merge.resources.ticketing import ( - LinkedAccountSelectiveSyncConfigurationRequest, - ) - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.ticketing.selective_sync.configurations_update( - sync_configurations=[ - LinkedAccountSelectiveSyncConfigurationRequest( - linked_account_conditions=[], - ) - ], - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - json=jsonable_encoder({"sync_configurations": sync_configurations}) - if request_options is None or request_options.get("additional_body_parameters") is None - else { - **jsonable_encoder({"sync_configurations": sync_configurations}), - **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), - }, - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(typing.List[LinkedAccountSelectiveSyncConfiguration], _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def meta_list( - self, - *, - common_model: typing.Optional[str] = None, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedConditionSchemaList: - """ - Get metadata for the conditions available to a linked account. - - Parameters: - - common_model: typing.Optional[str]. - - - 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. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.ticketing.selective_sync.meta_list() - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/meta"), - params=jsonable_encoder( - remove_none_from_dict( - { - "common_model": common_model, - "cursor": cursor, - "page_size": page_size, - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - } - ) - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(PaginatedConditionSchemaList, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/ticketing/types/__init__.py b/src/merge/resources/ticketing/types/__init__.py index c45970f9..c8e1a86a 100644 --- a/src/merge/resources/ticketing/types/__init__.py +++ b/src/merge/resources/ticketing/types/__init__.py @@ -36,11 +36,10 @@ from .comment_user import CommentUser from .common_model_scope_api import CommonModelScopeApi from .common_model_scopes_body_request import CommonModelScopesBodyRequest -from .condition_schema import ConditionSchema -from .condition_schema_condition_type import ConditionSchemaConditionType -from .condition_type_enum import ConditionTypeEnum from .contact import Contact from .contact_account import ContactAccount +from .contact_request import ContactRequest +from .contact_request_account import ContactRequestAccount from .data_passthrough_request import DataPassthroughRequest from .debug_mode_log import DebugModeLog from .debug_model_log_summary import DebugModelLogSummary @@ -71,10 +70,6 @@ from .item_schema import ItemSchema from .item_type_enum import ItemTypeEnum from .link_token import LinkToken -from .linked_account_condition import LinkedAccountCondition -from .linked_account_condition_request import LinkedAccountConditionRequest -from .linked_account_selective_sync_configuration import LinkedAccountSelectiveSyncConfiguration -from .linked_account_selective_sync_configuration_request import LinkedAccountSelectiveSyncConfigurationRequest from .linked_account_status import LinkedAccountStatus from .meta_response import MetaResponse from .method_enum import MethodEnum @@ -83,14 +78,12 @@ from .model_permission_deserializer_request import ModelPermissionDeserializerRequest from .multipart_form_field_request import MultipartFormFieldRequest from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding -from .operator_schema import OperatorSchema from .paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList from .paginated_account_list import PaginatedAccountList from .paginated_attachment_list import PaginatedAttachmentList from .paginated_audit_log_event_list import PaginatedAuditLogEventList from .paginated_collection_list import PaginatedCollectionList from .paginated_comment_list import PaginatedCommentList -from .paginated_condition_schema_list import PaginatedConditionSchemaList from .paginated_contact_list import PaginatedContactList from .paginated_issue_list import PaginatedIssueList from .paginated_project_list import PaginatedProjectList @@ -110,6 +103,7 @@ from .remote_endpoint_info import RemoteEndpointInfo from .remote_field import RemoteField from .remote_field_api import RemoteFieldApi +from .remote_field_api_coverage import RemoteFieldApiCoverage from .remote_field_api_response import RemoteFieldApiResponse from .remote_field_class import RemoteFieldClass from .remote_field_class_field_choices_item import RemoteFieldClassFieldChoicesItem @@ -156,6 +150,7 @@ from .ticket_status import TicketStatus from .ticket_status_enum import TicketStatusEnum from .ticketing_attachment_response import TicketingAttachmentResponse +from .ticketing_contact_response import TicketingContactResponse from .user import User from .user_roles_item import UserRolesItem from .user_teams_item import UserTeamsItem @@ -200,11 +195,10 @@ "CommentUser", "CommonModelScopeApi", "CommonModelScopesBodyRequest", - "ConditionSchema", - "ConditionSchemaConditionType", - "ConditionTypeEnum", "Contact", "ContactAccount", + "ContactRequest", + "ContactRequestAccount", "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", @@ -233,10 +227,6 @@ "ItemSchema", "ItemTypeEnum", "LinkToken", - "LinkedAccountCondition", - "LinkedAccountConditionRequest", - "LinkedAccountSelectiveSyncConfiguration", - "LinkedAccountSelectiveSyncConfigurationRequest", "LinkedAccountStatus", "MetaResponse", "MethodEnum", @@ -245,14 +235,12 @@ "ModelPermissionDeserializerRequest", "MultipartFormFieldRequest", "MultipartFormFieldRequestEncoding", - "OperatorSchema", "PaginatedAccountDetailsAndActionsList", "PaginatedAccountList", "PaginatedAttachmentList", "PaginatedAuditLogEventList", "PaginatedCollectionList", "PaginatedCommentList", - "PaginatedConditionSchemaList", "PaginatedContactList", "PaginatedIssueList", "PaginatedProjectList", @@ -272,6 +260,7 @@ "RemoteEndpointInfo", "RemoteField", "RemoteFieldApi", + "RemoteFieldApiCoverage", "RemoteFieldApiResponse", "RemoteFieldClass", "RemoteFieldClassFieldChoicesItem", @@ -318,6 +307,7 @@ "TicketStatus", "TicketStatusEnum", "TicketingAttachmentResponse", + "TicketingContactResponse", "User", "UserRolesItem", "UserTeamsItem", diff --git a/src/merge/resources/ticketing/types/account.py b/src/merge/resources/ticketing/types/account.py index c5fc0fdb..ab5f5aa1 100644 --- a/src/merge/resources/ticketing/types/account.py +++ b/src/merge/resources/ticketing/types/account.py @@ -29,9 +29,11 @@ class Account(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The account's name.") domains: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field( diff --git a/src/merge/resources/ticketing/types/attachment.py b/src/merge/resources/ticketing/types/attachment.py index 4d6db302..4b8daea0 100644 --- a/src/merge/resources/ticketing/types/attachment.py +++ b/src/merge/resources/ticketing/types/attachment.py @@ -29,9 +29,11 @@ class Attachment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) file_name: typing.Optional[str] = pydantic.Field( description="The attachment's name. It is required to include the file extension in the attachment's name." diff --git a/src/merge/resources/ticketing/types/audit_log_event.py b/src/merge/resources/ticketing/types/audit_log_event.py index 131ad94b..e8bffc42 100644 --- a/src/merge/resources/ticketing/types/audit_log_event.py +++ b/src/merge/resources/ticketing/types/audit_log_event.py @@ -72,6 +72,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" "- `MUTED_ISSUE` - MUTED_ISSUE\n" "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" + "- `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK\n" + "- `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK\n" + "- `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED\n" ) ) event_description: str diff --git a/src/merge/resources/ticketing/types/collection.py b/src/merge/resources/ticketing/types/collection.py index 2ec1531a..bfe10c94 100644 --- a/src/merge/resources/ticketing/types/collection.py +++ b/src/merge/resources/ticketing/types/collection.py @@ -32,9 +32,11 @@ class Collection(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The collection's name.") description: typing.Optional[str] = pydantic.Field(description="The collection's description.") diff --git a/src/merge/resources/ticketing/types/collection_type_enum.py b/src/merge/resources/ticketing/types/collection_type_enum.py index 17cc6d83..fe4b83b0 100644 --- a/src/merge/resources/ticketing/types/collection_type_enum.py +++ b/src/merge/resources/ticketing/types/collection_type_enum.py @@ -15,8 +15,8 @@ class CollectionTypeEnum(str, enum.Enum): LIST = "LIST" PROJECT = "PROJECT" - def visit(self, list: typing.Callable[[], T_Result], project: typing.Callable[[], T_Result]) -> T_Result: + def visit(self, list_: typing.Callable[[], T_Result], project: typing.Callable[[], T_Result]) -> T_Result: if self is CollectionTypeEnum.LIST: - return list() + return list_() if self is CollectionTypeEnum.PROJECT: return project() diff --git a/src/merge/resources/ticketing/types/comment.py b/src/merge/resources/ticketing/types/comment.py index e061ab9c..66a20d68 100644 --- a/src/merge/resources/ticketing/types/comment.py +++ b/src/merge/resources/ticketing/types/comment.py @@ -30,9 +30,11 @@ class Comment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) user: typing.Optional[CommentUser] = pydantic.Field( description="The author of the Comment, if the author is a User." diff --git a/src/merge/resources/ticketing/types/condition_schema.py b/src/merge/resources/ticketing/types/condition_schema.py deleted file mode 100644 index c8aebb68..00000000 --- a/src/merge/resources/ticketing/types/condition_schema.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema_condition_type import ConditionSchemaConditionType -from .operator_schema import OperatorSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class ConditionSchema(pydantic.BaseModel): - id: str = pydantic.Field( - description="The ID of the condition schema. This ID is used when updating selective syncs for a linked account." - ) - common_model: typing.Optional[str] = pydantic.Field( - description="The common model for which a condition schema is defined." - ) - native_name: typing.Optional[str] - field_name: typing.Optional[str] - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." - ) - condition_type: ConditionSchemaConditionType = pydantic.Field( - description=( - "The type of value(s) that can be set for this condition.\n" - "\n" - "- `BOOLEAN` - BOOLEAN\n" - "- `DATE` - DATE\n" - "- `DATE_TIME` - DATE_TIME\n" - "- `INTEGER` - INTEGER\n" - "- `FLOAT` - FLOAT\n" - "- `STRING` - STRING\n" - "- `LIST_OF_STRINGS` - LIST_OF_STRINGS\n" - ) - ) - operators: typing.List[OperatorSchema] = pydantic.Field( - description="The schemas for the operators that can be used on a condition." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/condition_schema_condition_type.py b/src/merge/resources/ticketing/types/condition_schema_condition_type.py deleted file mode 100644 index 40fe5f2e..00000000 --- a/src/merge/resources/ticketing/types/condition_schema_condition_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .condition_type_enum import ConditionTypeEnum - -ConditionSchemaConditionType = typing.Union[ConditionTypeEnum, str] diff --git a/src/merge/resources/ticketing/types/condition_type_enum.py b/src/merge/resources/ticketing/types/condition_type_enum.py deleted file mode 100644 index 2814507a..00000000 --- a/src/merge/resources/ticketing/types/condition_type_enum.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class ConditionTypeEnum(str, enum.Enum): - """ - - `BOOLEAN` - BOOLEAN - - `DATE` - DATE - - `DATE_TIME` - DATE_TIME - - `INTEGER` - INTEGER - - `FLOAT` - FLOAT - - `STRING` - STRING - - `LIST_OF_STRINGS` - LIST_OF_STRINGS - """ - - BOOLEAN = "BOOLEAN" - DATE = "DATE" - DATE_TIME = "DATE_TIME" - INTEGER = "INTEGER" - FLOAT = "FLOAT" - STRING = "STRING" - LIST_OF_STRINGS = "LIST_OF_STRINGS" - - def visit( - self, - boolean: typing.Callable[[], T_Result], - date: typing.Callable[[], T_Result], - date_time: typing.Callable[[], T_Result], - integer: typing.Callable[[], T_Result], - float_: typing.Callable[[], T_Result], - string: typing.Callable[[], T_Result], - list_of_strings: typing.Callable[[], T_Result], - ) -> T_Result: - if self is ConditionTypeEnum.BOOLEAN: - return boolean() - if self is ConditionTypeEnum.DATE: - return date() - if self is ConditionTypeEnum.DATE_TIME: - return date_time() - if self is ConditionTypeEnum.INTEGER: - return integer() - if self is ConditionTypeEnum.FLOAT: - return float_() - if self is ConditionTypeEnum.STRING: - return string() - if self is ConditionTypeEnum.LIST_OF_STRINGS: - return list_of_strings() diff --git a/src/merge/resources/ticketing/types/contact.py b/src/merge/resources/ticketing/types/contact.py index 694c3028..f46738fb 100644 --- a/src/merge/resources/ticketing/types/contact.py +++ b/src/merge/resources/ticketing/types/contact.py @@ -28,9 +28,11 @@ class Contact(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The contact's name.") email_address: typing.Optional[str] = pydantic.Field(description="The contact's email address.") diff --git a/src/merge/resources/ticketing/types/contact_request.py b/src/merge/resources/ticketing/types/contact_request.py new file mode 100644 index 00000000..d0df0413 --- /dev/null +++ b/src/merge/resources/ticketing/types/contact_request.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ....core.datetime_utils import serialize_datetime +from .contact_request_account import ContactRequestAccount + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class ContactRequest(pydantic.BaseModel): + """ + # The Contact Object + + ### Description + + The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. + + ### Usage Example + + TODO + """ + + name: typing.Optional[str] = pydantic.Field(description="The contact's name.") + email_address: typing.Optional[str] = pydantic.Field(description="The contact's email address.") + phone_number: typing.Optional[str] = pydantic.Field(description="The contact's phone number.") + details: typing.Optional[str] = pydantic.Field(description="The contact's details.") + account: typing.Optional[ContactRequestAccount] = pydantic.Field(description="The contact's account.") + integration_params: typing.Optional[typing.Dict[str, typing.Any]] + linked_account_params: typing.Optional[typing.Dict[str, typing.Any]] + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().dict(**kwargs_with_defaults) + + class Config: + frozen = True + smart_union = True + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/contact_request_account.py b/src/merge/resources/ticketing/types/contact_request_account.py new file mode 100644 index 00000000..449187af --- /dev/null +++ b/src/merge/resources/ticketing/types/contact_request_account.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .account import Account + +ContactRequestAccount = typing.Union[str, Account] diff --git a/src/merge/resources/ticketing/types/event_type_enum.py b/src/merge/resources/ticketing/types/event_type_enum.py index 434539c7..fcc33f75 100644 --- a/src/merge/resources/ticketing/types/event_type_enum.py +++ b/src/merge/resources/ticketing/types/event_type_enum.py @@ -42,6 +42,9 @@ class EventTypeEnum(str, enum.Enum): - `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 """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -78,6 +81,9 @@ class EventTypeEnum(str, enum.Enum): 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" def visit( self, @@ -115,6 +121,9 @@ def visit( 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], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -184,3 +193,9 @@ def visit( 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() diff --git a/src/merge/resources/ticketing/types/field_format_enum.py b/src/merge/resources/ticketing/types/field_format_enum.py index 303f80a5..9d80b73d 100644 --- a/src/merge/resources/ticketing/types/field_format_enum.py +++ b/src/merge/resources/ticketing/types/field_format_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is FieldFormatEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is FieldFormatEnum.DATETIME: return datetime() if self is FieldFormatEnum.BOOL: - return bool() + return bool_() if self is FieldFormatEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/ticketing/types/field_type_enum.py b/src/merge/resources/ticketing/types/field_type_enum.py index e5471a1c..d05a1ae4 100644 --- a/src/merge/resources/ticketing/types/field_type_enum.py +++ b/src/merge/resources/ticketing/types/field_type_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is FieldTypeEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is FieldTypeEnum.DATETIME: return datetime() if self is FieldTypeEnum.BOOL: - return bool() + return bool_() if self is FieldTypeEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/ticketing/types/item_format_enum.py b/src/merge/resources/ticketing/types/item_format_enum.py index 8c56e792..2e4854df 100644 --- a/src/merge/resources/ticketing/types/item_format_enum.py +++ b/src/merge/resources/ticketing/types/item_format_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is ItemFormatEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is ItemFormatEnum.DATETIME: return datetime() if self is ItemFormatEnum.BOOL: - return bool() + return bool_() if self is ItemFormatEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/ticketing/types/item_type_enum.py b/src/merge/resources/ticketing/types/item_type_enum.py index 8e5fb67a..d9b50e3f 100644 --- a/src/merge/resources/ticketing/types/item_type_enum.py +++ b/src/merge/resources/ticketing/types/item_type_enum.py @@ -29,8 +29,8 @@ def visit( number: typing.Callable[[], T_Result], date: typing.Callable[[], T_Result], datetime: typing.Callable[[], T_Result], - bool: typing.Callable[[], T_Result], - list: typing.Callable[[], T_Result], + bool_: typing.Callable[[], T_Result], + list_: typing.Callable[[], T_Result], ) -> T_Result: if self is ItemTypeEnum.STRING: return string() @@ -41,6 +41,6 @@ def visit( if self is ItemTypeEnum.DATETIME: return datetime() if self is ItemTypeEnum.BOOL: - return bool() + return bool_() if self is ItemTypeEnum.LIST: - return list() + return list_() diff --git a/src/merge/resources/ticketing/types/linked_account_condition.py b/src/merge/resources/ticketing/types/linked_account_condition.py deleted file mode 100644 index f13ef90d..00000000 --- a/src/merge/resources/ticketing/types/linked_account_condition.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountCondition(pydantic.BaseModel): - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Optional[typing.Any] - field_name: typing.Optional[str] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/linked_account_condition_request.py b/src/merge/resources/ticketing/types/linked_account_condition_request.py deleted file mode 100644 index ce36a27f..00000000 --- a/src/merge/resources/ticketing/types/linked_account_condition_request.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountConditionRequest(pydantic.BaseModel): - id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") - condition_schema_id: str = pydantic.Field( - description="The ID indicating which condition schema to use for a specific condition." - ) - operator: str = pydantic.Field(description="The operator for a specific condition.") - value: typing.Any - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/linked_account_selective_sync_configuration.py b/src/merge/resources/ticketing/types/linked_account_selective_sync_configuration.py deleted file mode 100644 index 2727cdd9..00000000 --- a/src/merge/resources/ticketing/types/linked_account_selective_sync_configuration.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition import LinkedAccountCondition - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfiguration(pydantic.BaseModel): - linked_account_conditions: typing.Optional[typing.List[LinkedAccountCondition]] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/linked_account_selective_sync_configuration_request.py b/src/merge/resources/ticketing/types/linked_account_selective_sync_configuration_request.py deleted file mode 100644 index b744ce07..00000000 --- a/src/merge/resources/ticketing/types/linked_account_selective_sync_configuration_request.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .linked_account_condition_request import LinkedAccountConditionRequest - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class LinkedAccountSelectiveSyncConfigurationRequest(pydantic.BaseModel): - linked_account_conditions: typing.List[LinkedAccountConditionRequest] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/operator_schema.py b/src/merge/resources/ticketing/types/operator_schema.py deleted file mode 100644 index 0a427fe7..00000000 --- a/src/merge/resources/ticketing/types/operator_schema.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class OperatorSchema(pydantic.BaseModel): - operator: typing.Optional[str] = pydantic.Field(description="The operator for which an operator schema is defined.") - is_unique: typing.Optional[bool] = pydantic.Field( - description="Whether the operator can be repeated multiple times." - ) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/paginated_condition_schema_list.py b/src/merge/resources/ticketing/types/paginated_condition_schema_list.py deleted file mode 100644 index 64f4f814..00000000 --- a/src/merge/resources/ticketing/types/paginated_condition_schema_list.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ....core.datetime_utils import serialize_datetime -from .condition_schema import ConditionSchema - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - - -class PaginatedConditionSchemaList(pydantic.BaseModel): - next: typing.Optional[str] - previous: typing.Optional[str] - results: typing.Optional[typing.List[ConditionSchema]] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ticketing/types/project.py b/src/merge/resources/ticketing/types/project.py index 09e97c40..684a8550 100644 --- a/src/merge/resources/ticketing/types/project.py +++ b/src/merge/resources/ticketing/types/project.py @@ -27,9 +27,11 @@ class Project(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The project's name.") description: typing.Optional[str] = pydantic.Field(description="The project's description.") diff --git a/src/merge/resources/ticketing/types/remote_field_api.py b/src/merge/resources/ticketing/types/remote_field_api.py index 30529431..6fa31902 100644 --- a/src/merge/resources/ticketing/types/remote_field_api.py +++ b/src/merge/resources/ticketing/types/remote_field_api.py @@ -6,6 +6,7 @@ from ....core.datetime_utils import serialize_datetime from .advanced_metadata import AdvancedMetadata from .remote_endpoint_info import RemoteEndpointInfo +from .remote_field_api_coverage import RemoteFieldApiCoverage try: import pydantic.v1 as pydantic # type: ignore @@ -19,6 +20,7 @@ class RemoteFieldApi(pydantic.BaseModel): remote_endpoint_info: RemoteEndpointInfo example_values: typing.List[typing.Any] advanced_metadata: typing.Optional[AdvancedMetadata] + coverage: typing.Optional[RemoteFieldApiCoverage] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ticketing/types/remote_field_api_coverage.py b/src/merge/resources/ticketing/types/remote_field_api_coverage.py new file mode 100644 index 00000000..adcd9be9 --- /dev/null +++ b/src/merge/resources/ticketing/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/ticketing/types/role.py b/src/merge/resources/ticketing/types/role.py index 18ce52c5..47e1736b 100644 --- a/src/merge/resources/ticketing/types/role.py +++ b/src/merge/resources/ticketing/types/role.py @@ -29,9 +29,11 @@ class Role(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The name of the Role.") ticket_actions: typing.Optional[typing.List[typing.Optional[RoleTicketActionsItem]]] = pydantic.Field( diff --git a/src/merge/resources/ticketing/types/tag.py b/src/merge/resources/ticketing/types/tag.py index 6c2b8d7f..9719f695 100644 --- a/src/merge/resources/ticketing/types/tag.py +++ b/src/merge/resources/ticketing/types/tag.py @@ -26,9 +26,11 @@ class Tag(pydantic.BaseModel): """ remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The tag's name.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( diff --git a/src/merge/resources/ticketing/types/team.py b/src/merge/resources/ticketing/types/team.py index dab5ab04..313ba7d4 100644 --- a/src/merge/resources/ticketing/types/team.py +++ b/src/merge/resources/ticketing/types/team.py @@ -27,9 +27,11 @@ class Team(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The team's name.") description: typing.Optional[str] = pydantic.Field(description="The team's description.") diff --git a/src/merge/resources/ticketing/types/ticket.py b/src/merge/resources/ticketing/types/ticket.py index 94f84926..f03ced26 100644 --- a/src/merge/resources/ticketing/types/ticket.py +++ b/src/merge/resources/ticketing/types/ticket.py @@ -37,9 +37,11 @@ class Ticket(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The ticket's name.") assignees: typing.Optional[typing.List[typing.Optional[TicketAssigneesItem]]] diff --git a/src/merge/resources/ticketing/types/ticket_access_enum.py b/src/merge/resources/ticketing/types/ticket_access_enum.py index 210fad1e..76fadc7f 100644 --- a/src/merge/resources/ticketing/types/ticket_access_enum.py +++ b/src/merge/resources/ticketing/types/ticket_access_enum.py @@ -19,12 +19,12 @@ class TicketAccessEnum(str, enum.Enum): def visit( self, - all: typing.Callable[[], T_Result], + all_: typing.Callable[[], T_Result], assigned_only: typing.Callable[[], T_Result], team_only: typing.Callable[[], T_Result], ) -> T_Result: if self is TicketAccessEnum.ALL: - return all() + return all_() if self is TicketAccessEnum.ASSIGNED_ONLY: return assigned_only() if self is TicketAccessEnum.TEAM_ONLY: diff --git a/src/merge/resources/accounting/types/linked_account_selective_sync_configuration.py b/src/merge/resources/ticketing/types/ticketing_contact_response.py similarity index 66% rename from src/merge/resources/accounting/types/linked_account_selective_sync_configuration.py rename to src/merge/resources/ticketing/types/ticketing_contact_response.py index 2727cdd9..b1760637 100644 --- a/src/merge/resources/accounting/types/linked_account_selective_sync_configuration.py +++ b/src/merge/resources/ticketing/types/ticketing_contact_response.py @@ -4,7 +4,10 @@ import typing from ....core.datetime_utils import serialize_datetime -from .linked_account_condition import LinkedAccountCondition +from .contact import Contact +from .debug_mode_log import DebugModeLog +from .error_validation_problem import ErrorValidationProblem +from .warning_validation_problem import WarningValidationProblem try: import pydantic.v1 as pydantic # type: ignore @@ -12,10 +15,11 @@ import pydantic # type: ignore -class LinkedAccountSelectiveSyncConfiguration(pydantic.BaseModel): - linked_account_conditions: typing.Optional[typing.List[LinkedAccountCondition]] = pydantic.Field( - description="The conditions belonging to a selective sync." - ) +class TicketingContactResponse(pydantic.BaseModel): + model: Contact + warnings: typing.List[WarningValidationProblem] + errors: typing.List[ErrorValidationProblem] + logs: typing.Optional[typing.List[DebugModeLog]] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ticketing/types/user.py b/src/merge/resources/ticketing/types/user.py index bef3b895..28cd3a1e 100644 --- a/src/merge/resources/ticketing/types/user.py +++ b/src/merge/resources/ticketing/types/user.py @@ -29,9 +29,11 @@ class User(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] + created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="The datetime that this object was created by Merge." + ) modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + description="The datetime that this object was modified by Merge." ) name: typing.Optional[str] = pydantic.Field(description="The user's name.") email_address: typing.Optional[str] = pydantic.Field(description="The user's email address.")