diff --git a/.mock/definition/ticketing/__package__.yml b/.mock/definition/ticketing/__package__.yml index e988754d..244b3ae9 100644 --- a/.mock/definition/ticketing/__package__.yml +++ b/.mock/definition/ticketing/__package__.yml @@ -256,6 +256,19 @@ types: id: string source: openapi: openapi/openapi.yml + ActionsEnum: + enum: + - VIEW + - CREATE + - EDIT + - DELETE + docs: |- + * `VIEW` - VIEW + * `CREATE` - CREATE + * `EDIT` - EDIT + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml AdvancedMetadata: properties: id: @@ -791,6 +804,16 @@ types: source: openapi: openapi/openapi.yml inline: true + CollectionPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: openapi/openapi.yml + inline: true Collection: docs: >- # The Collection Object @@ -847,6 +870,9 @@ types: parent_collection: type: optional docs: The parent collection for this collection. + permissions: + type: optional> + access: read-only collection_url: type: optional docs: The 3rd party url of the Collection. @@ -1302,6 +1328,17 @@ types: status_code: integer source: openapi: openapi/openapi.yml + EffectEnum: + enum: + - ALLOWED + - DENIED + - INHERITED + docs: |- + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + source: + openapi: openapi/openapi.yml EnabledActionsEnum: enum: - READ @@ -2168,6 +2205,139 @@ types: access: write-only source: openapi: openapi/openapi.yml + PermissionEffect: + discriminated: false + docs: |- + Outcome of this permission rule for matching users. + + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + union: + - EffectEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + Permission: + docs: >- + # The Permission Object + + ### Description + + The `Permission` object is used to represent permissions that can be + applied to users, roles, teams, collections, and tickets. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + effect: + type: optional + docs: |- + Outcome of this permission rule for matching users. + + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + actions: + type: optional>> + docs: >- + Operations that this permission applies to. If the entity inherits + permission from a parent entity, then this should be an empty array. + In that case, the entity would inherit the parent entity’s actions. + applied_to_users: optional>> + applied_to_roles: optional>> + applied_to_teams: optional>> + applied_to_collections: optional>> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PermissionRequestEffect: + discriminated: false + docs: |- + Outcome of this permission rule for matching users. + + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + union: + - EffectEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + PermissionRequest: + docs: >- + # The Permission Object + + ### Description + + The `Permission` object is used to represent permissions that can be + applied to users, roles, teams, collections, and tickets. + + + ### Usage Example + + TODO + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + effect: + type: optional + docs: |- + Outcome of this permission rule for matching users. + + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + actions: + type: optional>> + docs: >- + Operations that this permission applies to. If the entity inherits + permission from a parent entity, then this should be an empty array. + In that case, the entity would inherit the parent entity’s actions. + applied_to_users: optional>> + applied_to_roles: optional>> + applied_to_teams: optional>> + applied_to_collections: optional>> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml PriorityEnum: enum: - URGENT @@ -2233,6 +2403,24 @@ types: access: read-only source: openapi: openapi/openapi.yml + RegenerateAccountToken: + docs: >- + # The RegenerateAccountToken Object + + ### Description + + The `RegenerateAccountToken` object is used to exchange an old account + token for a new one. + + + ### Usage Example + + Post to receive a new `RegenerateAccountToken`. + properties: + linked_account_id: string + account_token: string + source: + openapi: openapi/openapi.yml RemoteData: docs: >- # The RemoteData Object @@ -2524,6 +2712,7 @@ types: - API - SYSTEM - MERGE_TEAM + - SUPPORT docs: |- * `ADMIN` - ADMIN * `DEVELOPER` - DEVELOPER @@ -2531,6 +2720,7 @@ types: * `API` - API * `SYSTEM` - SYSTEM * `MERGE_TEAM` - MERGE_TEAM + * `SUPPORT` - SUPPORT source: openapi: openapi/openapi.yml SelectiveSyncConfigurationsUsageEnum: @@ -2567,6 +2757,14 @@ types: source: openapi: openapi/openapi.yml inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: openapi/openapi.yml + inline: true SyncStatus: docs: >- # The SyncStatus Object @@ -2588,7 +2786,7 @@ types: next_sync_start: optional last_sync_result: optional last_sync_finished: optional - status: StatusFd5Enum + status: SyncStatusStatus is_initial_sync: boolean selective_sync_configurations_usage: optional source: @@ -2808,6 +3006,16 @@ types: source: openapi: openapi/openapi.yml inline: true + TicketPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: openapi/openapi.yml + inline: true TicketPriority: discriminated: false docs: |- @@ -2918,6 +3126,9 @@ types: * `PRIVATE` - PRIVATE * `COLLECTION` - COLLECTION + permissions: + type: optional> + access: read-only tags: optional>> roles: optional>> remote_created_at: diff --git a/.mock/definition/ticketing/accountToken.yml b/.mock/definition/ticketing/accountToken.yml index b8f0a14c..498357be 100644 --- a/.mock/definition/ticketing/accountToken.yml +++ b/.mock/definition/ticketing/accountToken.yml @@ -43,5 +43,24 @@ service: category_beta_status: key: value id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + regenerateCreate: + path: /ticketing/v1/account-token/regenerate + method: POST + auth: + - tokenAuth: [] + docs: Exchange Linked Account account tokens. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.RegenerateAccountToken + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + linked_account_id: e59b1821-f85c-4e28-a6b3-1804156f3563 + account_token: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA source: openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/accounts.yml b/.mock/definition/ticketing/accounts.yml index 21e288e0..63b64234 100644 --- a/.mock/definition/ticketing/accounts.yml +++ b/.mock/definition/ticketing/accounts.yml @@ -56,7 +56,7 @@ service: will be returned. page_size: type: optional - docs: Number of results to return per page. + docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. diff --git a/.mock/definition/ticketing/collections.yml b/.mock/definition/ticketing/collections.yml index 7ba0ce3d..851f4963 100644 --- a/.mock/definition/ticketing/collections.yml +++ b/.mock/definition/ticketing/collections.yml @@ -141,6 +141,8 @@ service: access_level: PRIVATE collection_type: LIST parent_collection: parent_collection + permissions: + - 17a54124-287f-494d-965e-3c5b330c9a68 collection_url: https://example.com remote_created_at: '2022-01-01T00:00:00Z' remote_updated_at: '2022-01-01T00:00:00Z' @@ -291,6 +293,8 @@ service: access_level: PRIVATE collection_type: LIST parent_collection: parent_collection + permissions: + - 17a54124-287f-494d-965e-3c5b330c9a68 collection_url: https://example.com remote_created_at: '2022-01-01T00:00:00Z' remote_updated_at: '2022-01-01T00:00:00Z' diff --git a/.mock/definition/ticketing/fieldMapping.yml b/.mock/definition/ticketing/fieldMapping.yml index 915bd847..5de529bc 100644 --- a/.mock/definition/ticketing/fieldMapping.yml +++ b/.mock/definition/ticketing/fieldMapping.yml @@ -245,6 +245,11 @@ service: mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + remote_data_iteration_count: + type: optional + docs: >- + Number of common model instances to iterate through when fetching + remote data for field mappings. Defaults to 250 if not provided. body: properties: target_field_name: @@ -302,6 +307,7 @@ service: examples: - query-parameters: exclude_remote_field_metadata: true + remote_data_iteration_count: 1 headers: X-Account-Token: X-Account-Token request: @@ -428,6 +434,12 @@ service: field_mapping_id: string request: name: PatchedEditFieldMappingRequest + query-parameters: + remote_data_iteration_count: + type: optional + docs: >- + Number of common model instances to iterate through when fetching + remote data for field mappings. Defaults to 250 if not provided. body: properties: remote_field_traversal_path: @@ -464,6 +476,8 @@ service: examples: - path-parameters: field_mapping_id: field_mapping_id + query-parameters: + remote_data_iteration_count: 1 headers: X-Account-Token: X-Account-Token request: {} diff --git a/.mock/definition/ticketing/linkToken.yml b/.mock/definition/ticketing/linkToken.yml index bcc870f7..ab08fe83 100644 --- a/.mock/definition/ticketing/linkToken.yml +++ b/.mock/definition/ticketing/linkToken.yml @@ -40,7 +40,9 @@ service: method: POST auth: - tokenAuth: [] - docs: Creates a link token to be used when linking a new end user. + docs: >- + Creates a link token to be used when linking a new end user. The link + token expires after single use. source: openapi: openapi/openapi.yml request: diff --git a/.mock/definition/ticketing/tickets.yml b/.mock/definition/ticketing/tickets.yml index 36676bf2..629c5d60 100644 --- a/.mock/definition/ticketing/tickets.yml +++ b/.mock/definition/ticketing/tickets.yml @@ -553,16 +553,6 @@ types: - ticket_type source: openapi: openapi/openapi.yml - TicketsListRequestStatus: - enum: - - value: '' - name: EMPTY - - CLOSED - - IN_PROGRESS - - ON_HOLD - - OPEN - source: - openapi: openapi/openapi.yml TicketsRetrieveRequestExpand: enum: - account @@ -1117,6 +1107,36 @@ types: name: UserTeam source: openapi: openapi/openapi.yml + TicketsLiveSearchRetrieveRequestRemoteFields: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: openapi/openapi.yml + TicketsLiveSearchRetrieveRequestShowEnumOrigins: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: openapi/openapi.yml imports: root: __package__.yml service: @@ -1258,6 +1278,11 @@ service: remote_id: type: optional docs: The API provider's ID for the given object. + remote_ids: + type: optional + docs: >- + If provided, will only return tickets with these remote IDs + (comma-separated). remote_updated_after: type: optional docs: >- @@ -1276,7 +1301,7 @@ service: enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) status: - type: optional + type: optional docs: If provided, will only return tickets of this status. tags: type: optional @@ -1327,10 +1352,11 @@ service: remote_created_before: '2024-01-15T09:30:00Z' remote_fields: priority remote_id: remote_id + remote_ids: remote_ids remote_updated_after: '2024-01-15T09:30:00Z' remote_updated_before: '2024-01-15T09:30:00Z' show_enum_origins: priority - status: '' + status: status tags: tags ticket_type: ticket_type ticket_url: ticket_url @@ -1366,6 +1392,8 @@ service: - 42747df1-95e7-46e2-93cc-66f1191edca5 - 92f972d0-2526-434b-9409-4c3b468e08f0 access_level: COMPANY + permissions: + - 17a54124-287f-494d-965e-3c5b330c9a68 tags: - enterprise - other-tag @@ -1453,6 +1481,8 @@ service: - 42747df1-95e7-46e2-93cc-66f1191edca5 - 92f972d0-2526-434b-9409-4c3b468e08f0 access_level: COMPANY + permissions: + - 17a54124-287f-494d-965e-3c5b330c9a68 tags: - enterprise - other-tag @@ -1583,6 +1613,8 @@ service: - 42747df1-95e7-46e2-93cc-66f1191edca5 - 92f972d0-2526-434b-9409-4c3b468e08f0 access_level: COMPANY + permissions: + - 17a54124-287f-494d-965e-3c5b330c9a68 tags: - enterprise - other-tag @@ -1674,6 +1706,8 @@ service: - 42747df1-95e7-46e2-93cc-66f1191edca5 - 92f972d0-2526-434b-9409-4c3b468e08f0 access_level: COMPANY + permissions: + - 17a54124-287f-494d-965e-3c5b330c9a68 tags: - enterprise - other-tag @@ -1791,6 +1825,73 @@ service: modified_at: '2021-10-16T00:00:00Z' team: team user: user + liveSearchRetrieve: + path: /ticketing/v1/tickets/live-search + method: GET + auth: + - tokenAuth: [] + docs: Returns a list of `Ticket` objects. + source: + openapi: openapi/openapi.yml + request: + name: TicketsLiveSearchRetrieveRequest + query-parameters: + assignee_ids: + type: optional + docs: Filter tickets by assignee IDs (comma-separated) + assignees: + type: optional + docs: Filter tickets by assignee names (comma-separated) + collection_ids: + type: optional + docs: Filter tickets by collection IDs (comma-separated) + collections: + type: optional + docs: Filter tickets by collection names (comma-separated) + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + name: + type: optional + docs: Filter tickets by name/title + remote_cursor: + type: optional + docs: Pagination cursor for remote data + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + status: + type: optional + docs: Filter tickets by status + ticket_url: + type: optional + docs: Filter tickets by URL + response: + docs: '' + type: file + status-code: 200 metaPatchRetrieve: path: /ticketing/v1/tickets/meta/patch/{id} method: GET diff --git a/.mock/definition/ticketing/users.yml b/.mock/definition/ticketing/users.yml index 41965674..9102cf02 100644 --- a/.mock/definition/ticketing/users.yml +++ b/.mock/definition/ticketing/users.yml @@ -32,6 +32,11 @@ service: request: name: UsersListRequest query-parameters: + collections: + type: optional + docs: >- + If provided, will only return users involved with at least one of + these collections. created_after: type: optional docs: If provided, will only return objects created after this datetime. @@ -87,15 +92,26 @@ service: remote_id: type: optional docs: The API provider's ID for the given object. + roles: + type: optional + docs: >- + If provided, will only return users with at least one of these + roles. team: type: optional docs: If provided, will only return users matching in this team. + teams: + type: optional + docs: >- + If provided, will only return users with at least one of these + teams. response: docs: '' type: root.PaginatedUserList status-code: 200 examples: - query-parameters: + collections: collections created_after: '2024-01-15T09:30:00Z' created_before: '2024-01-15T09:30:00Z' cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -108,7 +124,9 @@ service: modified_before: '2024-01-15T09:30:00Z' page_size: 1 remote_id: remote_id + roles: roles team: team + teams: teams headers: X-Account-Token: X-Account-Token response: diff --git a/README.md b/README.md index 3fee8310..290a4f5c 100644 --- a/README.md +++ b/README.md @@ -261,3 +261,4 @@ while response.next is not None: + diff --git a/poetry.lock b/poetry.lock index a19d7e2f..c5e091a4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2025.11.12" +version = "2026.1.4" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b"}, - {file = "certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316"}, + {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"}, + {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 6e9177d0..62139c69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "MergePythonClient" [tool.poetry] name = "MergePythonClient" -version = "2.6.1" +version = "2.6.2" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 72c3f6b5..b63c3020 100644 --- a/reference.md +++ b/reference.md @@ -8435,8 +8435,8 @@ client.ats.webhook_receivers.create( -## Chat AccountDetails -
client.chat.account_details.retrieve() +## Crm AccountDetails +
client.crm.account_details.retrieve()
@@ -8469,7 +8469,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.account_details.retrieve() +client.crm.account_details.retrieve() ```
@@ -8497,8 +8497,8 @@ client.chat.account_details.retrieve()
-## Chat AccountToken -
client.chat.account_token.retrieve(...) +## Crm AccountToken +
client.crm.account_token.retrieve(...)
@@ -8531,7 +8531,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.account_token.retrieve( +client.crm.account_token.retrieve( public_token="public_token", ) @@ -8569,8 +8569,8 @@ client.chat.account_token.retrieve(
-## Chat AsyncPassthrough -
client.chat.async_passthrough.create(...) +## Crm Accounts +
client.crm.accounts.list(...)
@@ -8582,7 +8582,7 @@ client.chat.account_token.retrieve(
-Asynchronously pull data from an endpoint not currently supported by Merge. +Returns a list of `Account` objects.
@@ -8597,18 +8597,36 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```python +import datetime + from merge import Merge -from merge.resources.chat import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.async_passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", +client.crm.accounts.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", ), + name="name", + owner_id="owner_id", + page_size=1, + remote_id="remote_id", ) ``` @@ -8625,7 +8643,7 @@ client.chat.async_passthrough.create(
-**request:** `DataPassthroughRequest` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -8633,70 +8651,31 @@ client.chat.async_passthrough.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
-
-
- - - - -
- -
client.chat.async_passthrough.retrieve(...) -
-
- -#### 📝 Description - -
-
-Retrieves data from earlier async-passthrough POST request -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.chat.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", -) - -``` -
-
+**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
-#### ⚙️ Parameters -
-
-
- -**async_passthrough_receipt_id:** `str` +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -8704,76 +8683,31 @@ client.chat.async_passthrough.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
-
-
- - -
-
-
- -## Chat AuditTrail -
client.chat.audit_trail.list(...) -
-
- -#### 📝 Description - -
-
-Gets a list of audit trail events. -
-
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.chat.audit_trail.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - event_type="event_type", - page_size=1, - start_date="start_date", - user_email="user_email", -) - -``` -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### ⚙️ Parameters - -
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -8781,7 +8715,7 @@ client.chat.audit_trail.list(
-**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -8789,7 +8723,7 @@ client.chat.audit_trail.list(
-**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` +**name:** `typing.Optional[str]` — If provided, will only return accounts with this name.
@@ -8797,7 +8731,7 @@ client.chat.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**owner_id:** `typing.Optional[str]` — If provided, will only return accounts with this owner.
@@ -8805,7 +8739,7 @@ client.chat.audit_trail.list(
-**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -8813,7 +8747,7 @@ client.chat.audit_trail.list(
-**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -8833,8 +8767,7 @@ client.chat.audit_trail.list(
-## Chat AvailableActions -
client.chat.available_actions.retrieve() +
client.crm.accounts.create(...)
@@ -8846,7 +8779,7 @@ client.chat.audit_trail.list(
-Returns a list of models and actions available for an account. +Creates an `Account` object with the given values.
@@ -8862,12 +8795,17 @@ Returns a list of models and actions available for an account. ```python from merge import Merge +from merge.resources.crm import AccountRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.available_actions.retrieve() +client.crm.accounts.create( + is_debug_mode=True, + run_async=True, + model=AccountRequest(), +) ``` @@ -8883,6 +8821,30 @@ client.chat.available_actions.retrieve()
+**model:** `AccountRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -8895,8 +8857,7 @@ client.chat.available_actions.retrieve()
-## Chat Conversations -
client.chat.conversations.list(...) +
client.crm.accounts.retrieve(...)
@@ -8908,7 +8869,7 @@ client.chat.available_actions.retrieve()
-Returns a list of `Conversation` objects. +Returns an `Account` object with the given `id`.
@@ -8923,33 +8884,17 @@ Returns a list of `Conversation` objects.
```python -import datetime - from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.conversations.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, +client.crm.accounts.retrieve( + id="id", include_remote_data=True, + include_remote_fields=True, include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", ) ``` @@ -8966,31 +8911,7 @@ client.chat.conversations.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["members"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**id:** `str`
@@ -8998,7 +8919,7 @@ client.chat.conversations.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -9014,31 +8935,7 @@ client.chat.conversations.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -9046,7 +8943,7 @@ client.chat.conversations.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -9066,7 +8963,7 @@ client.chat.conversations.list(
-
client.chat.conversations.members_list(...) +
client.crm.accounts.partial_update(...)
@@ -9078,7 +8975,7 @@ client.chat.conversations.list(
-Returns a list of `Member` objects. +Updates an `Account` object with the given `id`.
@@ -9094,22 +8991,17 @@ Returns a list of `Member` objects. ```python from merge import Merge -from merge.resources.chat.resources.conversations import ( - ConversationsMembersListRequestExpand, -) +from merge.resources.crm import PatchedAccountRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.conversations.members_list( - conversation_id="conversation_id", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=ConversationsMembersListRequestExpand.GROUP, - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - page_size=1, +client.crm.accounts.partial_update( + id="id", + is_debug_mode=True, + run_async=True, + model=PatchedAccountRequest(), ) ``` @@ -9126,31 +9018,7 @@ client.chat.conversations.members_list(
-**conversation_id:** `str` - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**expand:** `typing.Optional[ConversationsMembersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**id:** `str`
@@ -9158,7 +9026,7 @@ client.chat.conversations.members_list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**model:** `PatchedAccountRequest`
@@ -9166,7 +9034,7 @@ client.chat.conversations.members_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -9174,7 +9042,7 @@ client.chat.conversations.members_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -9194,7 +9062,7 @@ client.chat.conversations.members_list(
-
client.chat.conversations.retrieve(...) +
client.crm.accounts.meta_patch_retrieve(...)
@@ -9206,7 +9074,7 @@ client.chat.conversations.members_list(
-Returns a `Conversation` object with the given `id`. +Returns metadata for `CRMAccount` PATCHs.
@@ -9227,10 +9095,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.conversations.retrieve( +client.crm.accounts.meta_patch_retrieve( id="id", - include_remote_data=True, - include_shell_data=True, ) ``` @@ -9255,30 +9121,6 @@ client.chat.conversations.retrieve(
-**expand:** `typing.Optional[typing.Literal["members"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -9291,8 +9133,7 @@ client.chat.conversations.retrieve(
-## Chat Scopes -
client.chat.scopes.default_scopes_retrieve() +
client.crm.accounts.meta_post_retrieve()
@@ -9304,7 +9145,7 @@ client.chat.conversations.retrieve(
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns metadata for `CRMAccount` POSTs.
@@ -9325,7 +9166,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.scopes.default_scopes_retrieve() +client.crm.accounts.meta_post_retrieve() ``` @@ -9353,7 +9194,7 @@ client.chat.scopes.default_scopes_retrieve()
-
client.chat.scopes.linked_account_scopes_retrieve() +
client.crm.accounts.remote_field_classes_list(...)
@@ -9365,7 +9206,7 @@ client.chat.scopes.default_scopes_retrieve()
-Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns a list of `RemoteFieldClass` objects.
@@ -9386,7 +9227,16 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.scopes.linked_account_scopes_retrieve() +client.crm.accounts.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, +) ``` @@ -9402,99 +9252,63 @@ client.chat.scopes.linked_account_scopes_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
- -
+
+
+**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +
-
-
client.chat.scopes.linked_account_scopes_create(...)
-#### 📝 Description - -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
-Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) -
-
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +
-#### 🔌 Usage -
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+
-```python -from merge import Merge -from merge.resources.chat import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, -) - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.chat.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], -) - -``` -
-
+**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value + -#### ⚙️ Parameters -
+**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value + +
+
+
-**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -9514,8 +9328,8 @@ client.chat.scopes.linked_account_scopes_create(
-## Chat DeleteAccount -
client.chat.delete_account.delete() +## Crm AsyncPassthrough +
client.crm.async_passthrough.create(...)
@@ -9527,7 +9341,7 @@ client.chat.scopes.linked_account_scopes_create(
-Delete a linked account. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -9543,12 +9357,18 @@ Delete a linked account. ```python from merge import Merge +from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.delete_account.delete() +client.crm.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) ``` @@ -9564,6 +9384,14 @@ client.chat.delete_account.delete()
+**request:** `DataPassthroughRequest` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -9576,8 +9404,7 @@ client.chat.delete_account.delete()
-## Chat FieldMapping -
client.chat.field_mapping.field_mappings_retrieve(...) +
client.crm.async_passthrough.retrieve(...)
@@ -9589,7 +9416,7 @@ client.chat.delete_account.delete()
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Retrieves data from earlier async-passthrough POST request
@@ -9610,8 +9437,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.field_mapping.field_mappings_retrieve( - exclude_remote_field_metadata=True, +client.crm.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", ) ``` @@ -9628,7 +9455,7 @@ client.chat.field_mapping.field_mappings_retrieve(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**async_passthrough_receipt_id:** `str`
@@ -9648,7 +9475,8 @@ client.chat.field_mapping.field_mappings_retrieve(
-
client.chat.field_mapping.field_mappings_create(...) +## Crm AuditTrail +
client.crm.audit_trail.list(...)
@@ -9660,7 +9488,7 @@ client.chat.field_mapping.field_mappings_retrieve(
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Gets a list of audit trail events.
@@ -9681,14 +9509,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.field_mapping.field_mappings_create( - exclude_remote_field_metadata=True, - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", +client.crm.audit_trail.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -9705,23 +9532,7 @@ client.chat.field_mapping.field_mappings_create(
-**target_field_name:** `str` — The name of the target field you want this remote field to map to. - -
-
- -
-
- -**target_field_description:** `str` — The description of the target field you want this remote field to map to. - -
-
- -
-
- -**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -9729,7 +9540,7 @@ client.chat.field_mapping.field_mappings_create(
-**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time
@@ -9737,7 +9548,7 @@ client.chat.field_mapping.field_mappings_create(
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. +**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
@@ -9745,7 +9556,7 @@ client.chat.field_mapping.field_mappings_create(
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -9753,7 +9564,7 @@ client.chat.field_mapping.field_mappings_create(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time
@@ -9761,7 +9572,7 @@ client.chat.field_mapping.field_mappings_create(
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
@@ -9781,7 +9592,8 @@ client.chat.field_mapping.field_mappings_create(
-
client.chat.field_mapping.field_mappings_destroy(...) +## Crm AvailableActions +
client.crm.available_actions.retrieve()
@@ -9793,7 +9605,7 @@ client.chat.field_mapping.field_mappings_create(
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of models and actions available for an account.
@@ -9814,9 +9626,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", -) +client.crm.available_actions.retrieve() ``` @@ -9832,14 +9642,6 @@ client.chat.field_mapping.field_mappings_destroy(
-**field_mapping_id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -9852,7 +9654,8 @@ client.chat.field_mapping.field_mappings_destroy(
-
client.chat.field_mapping.field_mappings_partial_update(...) +## Crm Contacts +
client.crm.contacts.list(...)
@@ -9864,7 +9667,7 @@ client.chat.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of `Contact` objects.
@@ -9879,14 +9682,39 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```python +import datetime + from merge import Merge +from merge.resources.crm.resources.contacts import ContactsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", +client.crm.contacts.list( + account_id="account_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=ContactsListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + phone_numbers="phone_numbers", + remote_id="remote_id", ) ``` @@ -9903,7 +9731,7 @@ client.chat.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` +**account_id:** `typing.Optional[str]` — If provided, will only return contacts with this account.
@@ -9911,7 +9739,7 @@ client.chat.field_mapping.field_mappings_partial_update(
-**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -9919,7 +9747,7 @@ client.chat.field_mapping.field_mappings_partial_update(
-**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -9927,7 +9755,7 @@ client.chat.field_mapping.field_mappings_partial_update(
-**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -9935,7 +9763,7 @@ client.chat.field_mapping.field_mappings_partial_update(
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas.
@@ -9943,71 +9771,71 @@ client.chat.field_mapping.field_mappings_partial_update(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**expand:** `typing.Optional[ContactsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
-
-
+
+
+**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +
-
-
client.chat.field_mapping.remote_fields_retrieve(...)
-#### 📝 Description +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + -#### 🔌 Usage -
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.chat.field_mapping.remote_fields_retrieve( - common_models="common_models", - include_example_values="include_example_values", -) - -``` -
-
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + -#### ⚙️ Parameters -
+**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. +**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas.
@@ -10015,7 +9843,7 @@ client.chat.field_mapping.remote_fields_retrieve(
-**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -10035,7 +9863,7 @@ client.chat.field_mapping.remote_fields_retrieve(
-
client.chat.field_mapping.target_fields_retrieve() +
client.crm.contacts.create(...)
@@ -10047,7 +9875,7 @@ client.chat.field_mapping.remote_fields_retrieve(
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). +Creates a `Contact` object with the given values.
@@ -10063,12 +9891,17 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun ```python from merge import Merge +from merge.resources.crm import ContactRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.field_mapping.target_fields_retrieve() +client.crm.contacts.create( + is_debug_mode=True, + run_async=True, + model=ContactRequest(), +) ``` @@ -10084,6 +9917,30 @@ client.chat.field_mapping.target_fields_retrieve()
+**model:** `ContactRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -10096,8 +9953,7 @@ client.chat.field_mapping.target_fields_retrieve()
-## Chat GenerateKey -
client.chat.generate_key.create(...) +
client.crm.contacts.retrieve(...)
@@ -10109,7 +9965,7 @@ client.chat.field_mapping.target_fields_retrieve()
-Create a remote key. +Returns a `Contact` object with the given `id`.
@@ -10125,13 +9981,18 @@ Create a remote key. ```python from merge import Merge +from merge.resources.crm.resources.contacts import ContactsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.generate_key.create( - name="Remote Deployment Key 1", +client.crm.contacts.retrieve( + id="id", + expand=ContactsRetrieveRequestExpand.ACCOUNT, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -10148,7 +10009,39 @@ client.chat.generate_key.create(
-**name:** `str` — The name of the remote key +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[ContactsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -10168,8 +10061,7 @@ client.chat.generate_key.create(
-## Chat Groups -
client.chat.groups.list(...) +
client.crm.contacts.partial_update(...)
@@ -10181,7 +10073,7 @@ client.chat.generate_key.create(
-Returns a list of `Group` objects. +Updates a `Contact` object with the given `id`.
@@ -10196,33 +10088,18 @@ Returns a list of `Group` objects.
```python -import datetime - from merge import Merge +from merge.resources.crm import PatchedContactRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.groups.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", +client.crm.contacts.partial_update( + id="id", + is_debug_mode=True, + run_async=True, + model=PatchedContactRequest(), ) ``` @@ -10239,7 +10116,7 @@ client.chat.groups.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**id:** `str`
@@ -10247,7 +10124,7 @@ client.chat.groups.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**model:** `PatchedContactRequest`
@@ -10255,7 +10132,7 @@ client.chat.groups.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -10263,7 +10140,7 @@ client.chat.groups.list(
-**expand:** `typing.Optional[typing.Literal["users"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -10271,47 +10148,74 @@ client.chat.groups.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
+
+
client.crm.contacts.ignore_create(...)
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
+#### 📝 Description
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +
+
+ +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +
+
+#### 🔌 Usage +
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +
+
+ +```python +from merge import Merge +from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.contacts.ignore_create( + model_id="model_id", + request=IgnoreCommonModelRequest( + reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, + ), +) + +```
+
+
+ +#### ⚙️ Parameters
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +
+
+ +**model_id:** `str`
@@ -10319,7 +10223,7 @@ client.chat.groups.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**request:** `IgnoreCommonModelRequest`
@@ -10339,7 +10243,7 @@ client.chat.groups.list(
-
client.chat.groups.retrieve(...) +
client.crm.contacts.meta_patch_retrieve(...)
@@ -10351,7 +10255,7 @@ client.chat.groups.list(
-Returns a `Group` object with the given `id`. +Returns metadata for `CRMContact` PATCHs.
@@ -10372,10 +10276,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.groups.retrieve( +client.crm.contacts.meta_patch_retrieve( id="id", - include_remote_data=True, - include_shell_data=True, ) ``` @@ -10400,30 +10302,6 @@ client.chat.groups.retrieve(
-**expand:** `typing.Optional[typing.Literal["users"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -10436,8 +10314,7 @@ client.chat.groups.retrieve(
-## Chat Issues -
client.chat.issues.list(...) +
client.crm.contacts.meta_post_retrieve()
@@ -10449,7 +10326,7 @@ client.chat.groups.retrieve(
-Gets all issues for Organization. +Returns metadata for `CRMContact` POSTs.
@@ -10464,39 +10341,13 @@ Gets all issues for Organization.
```python -import datetime - from merge import Merge -from merge.resources.chat.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.issues.list( - account_token="account_token", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - end_user_organization_name="end_user_organization_name", - first_incident_time_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - first_incident_time_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - include_muted="include_muted", - integration_name="integration_name", - last_incident_time_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - last_incident_time_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - linked_account_id="linked_account_id", - page_size=1, - start_date="start_date", - status=IssuesListRequestStatus.ONGOING, -) +client.crm.contacts.meta_post_retrieve() ```
@@ -10512,87 +10363,77 @@ client.chat.issues.list(
-**account_token:** `typing.Optional[str]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. -
-
-
-**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time -
+
+
client.crm.contacts.remote_field_classes_list(...)
-**end_user_organization_name:** `typing.Optional[str]` - -
-
+#### 📝 Description
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. - -
-
-
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. - +Returns a list of `RemoteFieldClass` objects.
- -
-
- -**include_muted:** `typing.Optional[str]` — If true, will include muted issues -
+#### 🔌 Usage +
-**integration_name:** `typing.Optional[str]` - -
-
-
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.contacts.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, +) + +``` +
+
+#### ⚙️ Parameters +
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. - -
-
-
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -10600,7 +10441,7 @@ client.chat.issues.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -10608,7 +10449,7 @@ client.chat.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -10616,12 +10457,7 @@ client.chat.issues.list(
-**status:** `typing.Optional[IssuesListRequestStatus]` - -Status of the issue. Options: ('ONGOING', 'RESOLVED') - -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -10629,70 +10465,31 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
- - - - - - -
- -
client.chat.issues.retrieve(...) -
-
- -#### 📝 Description - -
-
-Get a specific issue. -
-
+**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.chat.issues.retrieve( - id="id", -) - -``` -
-
+**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -10712,8 +10509,8 @@ client.chat.issues.retrieve(
-## Chat LinkToken -
client.chat.link_token.create(...) +## Crm CustomObjectClasses +
client.crm.custom_object_classes.list(...)
@@ -10725,7 +10522,7 @@ client.chat.issues.retrieve(
-Creates a link token to be used when linking a new end user. The link token expires after single use. +Returns a list of `CustomObjectClass` objects.
@@ -10740,18 +10537,33 @@ Creates a link token to be used when linking a new end user. The link token expi
```python +import datetime + from merge import Merge -from merge.resources.chat import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +client.crm.custom_object_classes.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -10768,31 +10580,7 @@ client.chat.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - -
-
- -
-
- -**end_user_organization_name:** `str` — Your end user's organization. - -
-
- -
-
- -**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - -
-
- -
-
- -**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -10800,7 +10588,7 @@ client.chat.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -10808,7 +10596,7 @@ client.chat.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -10816,7 +10604,7 @@ client.chat.link_token.create(
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**expand:** `typing.Optional[typing.Literal["fields"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -10824,7 +10612,7 @@ client.chat.link_token.create(
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -10832,7 +10620,7 @@ client.chat.link_token.create(
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -10840,14 +10628,7 @@ client.chat.link_token.create(
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -10855,12 +10636,7 @@ client.chat.link_token.create(
-**language:** `typing.Optional[EndUserDetailsRequestLanguage]` - -The following subset of IETF language tags can be used to configure localization. - -* `en` - en -* `de` - de +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -10868,7 +10644,7 @@ The following subset of IETF language tags can be used to configure localization
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -10876,7 +10652,7 @@ The following subset of IETF language tags can be used to configure localization
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -10884,11 +10660,7 @@ The following subset of IETF language tags can be used to configure localization
-**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` - -When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. - -* `SELECTIVE_SYNC` - SELECTIVE_SYNC +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -10908,8 +10680,7 @@ When creating a Link token, you can specifiy the initial screen of Linking Flow
-## Chat LinkedAccounts -
client.chat.linked_accounts.list(...) +
client.crm.custom_object_classes.retrieve(...)
@@ -10921,7 +10692,7 @@ When creating a Link token, you can specifiy the initial screen of Linking Flow
-List linked accounts for your organization. +Returns a `CustomObjectClass` object with the given `id`.
@@ -10937,28 +10708,15 @@ List linked accounts for your organization. ```python from merge import Merge -from merge.resources.chat.resources.linked_accounts import ( - LinkedAccountsListRequestCategory, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_user_email_address="end_user_email_address", - end_user_organization_name="end_user_organization_name", - end_user_origin_id="end_user_origin_id", - end_user_origin_ids="end_user_origin_ids", +client.crm.custom_object_classes.retrieve( id="id", - ids="ids", - include_duplicates=True, - integration_name="integration_name", - is_test_account="is_test_account", - page_size=1, - status="status", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -10975,91 +10733,7 @@ client.chat.linked_accounts.list(
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` - -Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` - -* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage -* `knowledgebase` - knowledgebase -* `chat` - chat - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. - -
-
- -
-
- -**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. - -
-
- -
-
- -**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. - -
-
- -
-
- -**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - -
-
- -
-
- -**id:** `typing.Optional[str]` - -
-
- -
-
- -**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - -
-
- -
-
- -**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - -
-
- -
-
- -**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. +**id:** `str`
@@ -11067,7 +10741,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. +**expand:** `typing.Optional[typing.Literal["fields"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -11075,7 +10749,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -11083,7 +10757,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -11103,8 +10777,8 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-## Chat Messages -
client.chat.messages.list(...) +## Crm AssociationTypes +
client.crm.association_types.custom_object_classes_association_types_list(...)
@@ -11116,7 +10790,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-Returns a list of `Message` objects. +Returns a list of `AssociationType` objects.
@@ -11134,14 +10808,13 @@ Returns a list of `Message` objects. import datetime from merge import Merge -from merge.resources.chat.resources.messages import MessagesListRequestOrderBy client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.messages.list( - conversation_id="conversation_id", +client.crm.association_types.custom_object_classes_association_types_list( + custom_object_class_id="custom_object_class_id", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -11158,10 +10831,8 @@ client.chat.messages.list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - order_by=MessagesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, remote_id="remote_id", - root_message="root_message", ) ``` @@ -11178,7 +10849,7 @@ client.chat.messages.list(
-**conversation_id:** `typing.Optional[str]` — Filter messages by conversation ID. +**custom_object_class_id:** `str`
@@ -11210,7 +10881,7 @@ client.chat.messages.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -11218,7 +10889,7 @@ client.chat.messages.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -11226,7 +10897,7 @@ client.chat.messages.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -11234,7 +10905,7 @@ client.chat.messages.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -11242,7 +10913,7 @@ client.chat.messages.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -11250,7 +10921,7 @@ client.chat.messages.list(
-**order_by:** `typing.Optional[MessagesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -11258,7 +10929,7 @@ client.chat.messages.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -11274,14 +10945,6 @@ client.chat.messages.list(
-**root_message:** `typing.Optional[str]` — If provided as 'true', will only return root messages (messages without a parent message). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11294,7 +10957,7 @@ client.chat.messages.list(
-
client.chat.messages.retrieve(...) +
client.crm.association_types.custom_object_classes_association_types_create(...)
@@ -11306,7 +10969,7 @@ client.chat.messages.list(
-Returns a `Message` object with the given `id`. +Creates an `AssociationType` object with the given values.
@@ -11322,15 +10985,33 @@ Returns a `Message` object with the given `id`. ```python from merge import Merge +from merge.resources.crm import ( + AssociationTypeRequestRequest, + ObjectClassDescriptionRequest, + OriginTypeEnum, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.messages.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, +client.crm.association_types.custom_object_classes_association_types_create( + custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, + model=AssociationTypeRequestRequest( + source_object_class=ObjectClassDescriptionRequest( + id="id", + origin_type=OriginTypeEnum.CUSTOM_OBJECT, + ), + target_object_classes=[ + ObjectClassDescriptionRequest( + id="id", + origin_type=OriginTypeEnum.CUSTOM_OBJECT, + ) + ], + remote_key_name="remote_key_name", + ), ) ``` @@ -11347,7 +11028,7 @@ client.chat.messages.retrieve(
-**id:** `str` +**custom_object_class_id:** `str`
@@ -11355,7 +11036,7 @@ client.chat.messages.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**model:** `AssociationTypeRequestRequest`
@@ -11363,7 +11044,15 @@ client.chat.messages.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**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.
@@ -11383,7 +11072,7 @@ client.chat.messages.retrieve(
-
client.chat.messages.replies_list(...) +
client.crm.association_types.custom_object_classes_association_types_retrieve(...)
@@ -11395,7 +11084,7 @@ client.chat.messages.retrieve(
-Returns a list of `Message` objects. +Returns an `AssociationType` object with the given `id`.
@@ -11411,22 +11100,16 @@ Returns a list of `Message` objects. ```python from merge import Merge -from merge.resources.chat.resources.messages import ( - MessagesRepliesListRequestOrderBy, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.messages.replies_list( - message_id="message_id", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, +client.crm.association_types.custom_object_classes_association_types_retrieve( + custom_object_class_id="custom_object_class_id", + id="id", include_remote_data=True, include_shell_data=True, - order_by=MessagesRepliesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, - page_size=1, ) ``` @@ -11443,7 +11126,7 @@ client.chat.messages.replies_list(
-**message_id:** `str` +**custom_object_class_id:** `str`
@@ -11451,7 +11134,7 @@ client.chat.messages.replies_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -11459,7 +11142,7 @@ client.chat.messages.replies_list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -11483,23 +11166,7 @@ client.chat.messages.replies_list(
-**order_by:** `typing.Optional[MessagesRepliesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11511,8 +11178,7 @@ client.chat.messages.replies_list(
-## Chat Passthrough -
client.chat.passthrough.create(...) +
client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(...)
@@ -11524,7 +11190,7 @@ client.chat.messages.replies_list(
-Pull data from an endpoint not currently supported by Merge. +Returns metadata for `CRMAssociationType` POSTs.
@@ -11540,17 +11206,13 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.chat import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve( + custom_object_class_id="custom_object_class_id", ) ``` @@ -11567,7 +11229,7 @@ client.chat.passthrough.create(
-**request:** `DataPassthroughRequest` +**custom_object_class_id:** `str`
@@ -11587,8 +11249,8 @@ client.chat.passthrough.create(
-## Chat RegenerateKey -
client.chat.regenerate_key.create(...) +## Crm CustomObjects +
client.crm.custom_objects.custom_object_classes_custom_objects_list(...)
@@ -11600,7 +11262,7 @@ client.chat.passthrough.create(
-Exchange remote keys. +Returns a list of `CustomObject` objects.
@@ -11615,14 +11277,35 @@ Exchange remote keys.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.regenerate_key.create( - name="Remote Deployment Key 1", +client.crm.custom_objects.custom_object_classes_custom_objects_list( + custom_object_class_id="custom_object_class_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -11639,7 +11322,7 @@ client.chat.regenerate_key.create(
-**name:** `str` — The name of the remote key +**custom_object_class_id:** `str`
@@ -11647,72 +11330,39 @@ client.chat.regenerate_key.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
-
-
- - - - -
-## Chat SyncStatus -
client.chat.sync_status.list(...)
-#### 📝 Description - -
-
+**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.chat.sync_status.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - page_size=1, -) - -``` -
-
+**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +
-#### ⚙️ Parameters - -
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -11720,7 +11370,7 @@ client.chat.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -11728,65 +11378,43 @@ client.chat.sync_status.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
-
-
+
+
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
-
-## Chat ForceResync -
client.chat.force_resync.sync_status_resync_create()
-#### 📝 Description - -
-
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
-Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.chat.force_resync.sync_status_resync_create() - -``` -
-
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +
-#### ⚙️ Parameters - -
-
-
@@ -11802,8 +11430,7 @@ client.chat.force_resync.sync_status_resync_create()
-## Chat Users -
client.chat.users.list(...) +
client.crm.custom_objects.custom_object_classes_custom_objects_create(...)
@@ -11815,7 +11442,7 @@ client.chat.force_resync.sync_status_resync_create()
-Returns a list of `User` objects. +Creates a `CustomObject` object with the given values.
@@ -11830,33 +11457,20 @@ Returns a list of `User` objects.
```python -import datetime - from merge import Merge +from merge.resources.crm import CustomObjectRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.users.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", +client.crm.custom_objects.custom_object_classes_custom_objects_create( + custom_object_class_id="custom_object_class_id", + is_debug_mode=True, + run_async=True, + model=CustomObjectRequest( + fields={"test_field": "hello"}, ), - page_size=1, - remote_id="remote_id", ) ``` @@ -11873,63 +11487,7 @@ client.chat.users.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**custom_object_class_id:** `str`
@@ -11937,7 +11495,7 @@ client.chat.users.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**model:** `CustomObjectRequest`
@@ -11945,7 +11503,7 @@ client.chat.users.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -11953,7 +11511,7 @@ client.chat.users.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -11973,7 +11531,7 @@ client.chat.users.list(
-
client.chat.users.retrieve(...) +
client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(...)
@@ -11985,7 +11543,7 @@ client.chat.users.list(
-Returns a `User` object with the given `id`. +Returns a `CustomObject` object with the given `id`.
@@ -12006,9 +11564,11 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.users.retrieve( +client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( + custom_object_class_id="custom_object_class_id", id="id", include_remote_data=True, + include_remote_fields=True, include_shell_data=True, ) @@ -12026,7 +11586,7 @@ client.chat.users.retrieve(
-**id:** `str` +**custom_object_class_id:** `str`
@@ -12034,7 +11594,7 @@ client.chat.users.retrieve(
-**expand:** `typing.Optional[typing.Literal["groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**id:** `str`
@@ -12050,6 +11610,14 @@ client.chat.users.retrieve(
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ **include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -12070,8 +11638,7 @@ client.chat.users.retrieve(
-## Chat WebhookReceivers -
client.chat.webhook_receivers.list() +
client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(...)
@@ -12083,7 +11650,7 @@ client.chat.users.retrieve(
-Returns a list of `WebhookReceiver` objects. +Returns metadata for `CRMCustomObject` POSTs.
@@ -12104,7 +11671,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.webhook_receivers.list() +client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve( + custom_object_class_id="custom_object_class_id", +) ``` @@ -12120,6 +11689,14 @@ client.chat.webhook_receivers.list()
+**custom_object_class_id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -12132,7 +11709,7 @@ client.chat.webhook_receivers.list()
-
client.chat.webhook_receivers.create(...) +
client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list(...)
@@ -12144,7 +11721,7 @@ client.chat.webhook_receivers.list()
-Creates a `WebhookReceiver` object with the given values. +Returns a list of `RemoteFieldClass` objects.
@@ -12165,9 +11742,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.chat.webhook_receivers.create( - event="event", - is_active=True, +client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -12184,7 +11767,7 @@ client.chat.webhook_receivers.create(
-**event:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -12192,7 +11775,7 @@ client.chat.webhook_receivers.create(
-**is_active:** `bool` +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -12200,7 +11783,7 @@ client.chat.webhook_receivers.create(
-**key:** `typing.Optional[str]` +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -12208,133 +11791,39 @@ client.chat.webhook_receivers.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
- -
- - - - -
- -## Crm AccountDetails -
client.crm.account_details.retrieve() -
-
- -#### 📝 Description - -
-
- -
-
- -Get details for a linked account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.account_details.retrieve() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
-
-
- - -
-
-
- -## Crm AccountToken -
client.crm.account_token.retrieve(...) -
-
- -#### 📝 Description - -
-
-Returns the account token for the end user with the provided public token. -
-
+**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.account_token.retrieve( - public_token="public_token", -) - -``` -
-
+**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +
-#### ⚙️ Parameters -
-
-
- -**public_token:** `str` +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -12354,8 +11843,8 @@ client.crm.account_token.retrieve(
-## Crm Accounts -
client.crm.accounts.list(...) +## Crm Associations +
client.crm.associations.custom_object_classes_custom_objects_associations_list(...)
@@ -12367,7 +11856,7 @@ client.crm.account_token.retrieve(
-Returns a list of `Account` objects. +Returns a list of `Association` objects.
@@ -12390,7 +11879,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.list( +client.crm.associations.custom_object_classes_custom_objects_associations_list( + custom_object_class_id="custom_object_class_id", + object_id="object_id", + association_type_id="association_type_id", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -12400,7 +11892,6 @@ client.crm.accounts.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", include_deleted_data=True, include_remote_data=True, - include_remote_fields=True, include_shell_data=True, modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", @@ -12408,8 +11899,6 @@ client.crm.accounts.list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - name="name", - owner_id="owner_id", page_size=1, remote_id="remote_id", ) @@ -12428,7 +11917,7 @@ client.crm.accounts.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**custom_object_class_id:** `str`
@@ -12436,7 +11925,7 @@ client.crm.accounts.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**object_id:** `str`
@@ -12444,7 +11933,7 @@ client.crm.accounts.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**association_type_id:** `typing.Optional[str]` — If provided, will only return opportunities with this association_type.
@@ -12452,7 +11941,7 @@ client.crm.accounts.list(
-**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -12460,7 +11949,7 @@ client.crm.accounts.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -12468,7 +11957,7 @@ client.crm.accounts.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -12476,7 +11965,7 @@ client.crm.accounts.list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**expand:** `typing.Optional[typing.Literal["association_type"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -12484,7 +11973,7 @@ client.crm.accounts.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -12492,7 +11981,7 @@ client.crm.accounts.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -12500,7 +11989,7 @@ client.crm.accounts.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -12508,7 +11997,7 @@ client.crm.accounts.list(
-**name:** `typing.Optional[str]` — If provided, will only return accounts with this name. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -12516,7 +12005,7 @@ client.crm.accounts.list(
-**owner_id:** `typing.Optional[str]` — If provided, will only return accounts with this owner. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -12552,7 +12041,7 @@ client.crm.accounts.list(
-
client.crm.accounts.create(...) +
client.crm.associations.custom_object_classes_custom_objects_associations_update(...)
@@ -12564,7 +12053,7 @@ client.crm.accounts.list(
-Creates an `Account` object with the given values. +Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`.
@@ -12580,16 +12069,19 @@ Creates an `Account` object with the given values. ```python from merge import Merge -from merge.resources.crm import AccountRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.create( +client.crm.associations.custom_object_classes_custom_objects_associations_update( + source_class_id="source_class_id", + source_object_id="source_object_id", + target_class_id="target_class_id", + target_object_id="target_object_id", + association_type_id="association_type_id", is_debug_mode=True, run_async=True, - model=AccountRequest(), ) ``` @@ -12606,7 +12098,7 @@ client.crm.accounts.create(
-**model:** `AccountRequest` +**source_class_id:** `str`
@@ -12614,7 +12106,7 @@ client.crm.accounts.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**source_object_id:** `str`
@@ -12622,7 +12114,7 @@ client.crm.accounts.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**target_class_id:** `str`
@@ -12630,65 +12122,70 @@ client.crm.accounts.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**target_object_id:** `str`
- -
+
+
+**association_type_id:** `str` +
-
-
client.crm.accounts.retrieve(...)
-#### 📝 Description +**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. + +
+
+
-Returns an `Account` object with the given `id`. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +
-#### 🔌 Usage -
-
+
+
+
+## Crm Scopes +
client.crm.scopes.default_scopes_retrieve()
-```python -from merge import Merge +#### 📝 Description -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.accounts.retrieve( - id="id", - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, -) +
+
-``` +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
-#### ⚙️ Parameters +#### 🔌 Usage
@@ -12696,43 +12193,26 @@ client.crm.accounts.retrieve(
-**id:** `str` - -
-
+```python +from merge import Merge -
-
+client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.scopes.default_scopes_retrieve() -**expand:** `typing.Optional[typing.Literal["owner"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - +```
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
-
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
+#### ⚙️ Parameters
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
@@ -12748,7 +12228,7 @@ client.crm.accounts.retrieve(
-
client.crm.accounts.partial_update(...) +
client.crm.scopes.linked_account_scopes_retrieve()
@@ -12760,7 +12240,7 @@ client.crm.accounts.retrieve(
-Updates an `Account` object with the given `id`. +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -12776,18 +12256,12 @@ Updates an `Account` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedAccountRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.partial_update( - id="id", - is_debug_mode=True, - run_async=True, - model=PatchedAccountRequest(), -) +client.crm.scopes.linked_account_scopes_retrieve() ``` @@ -12803,38 +12277,6 @@ client.crm.accounts.partial_update(
-**id:** `str` - -
-
- -
-
- -**model:** `PatchedAccountRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - -
-
- -
-
- -**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -12847,7 +12289,7 @@ client.crm.accounts.partial_update(
-
client.crm.accounts.meta_patch_retrieve(...) +
client.crm.scopes.linked_account_scopes_create(...)
@@ -12859,7 +12301,7 @@ client.crm.accounts.partial_update(
-Returns metadata for `CRMAccount` PATCHs. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -12875,13 +12317,42 @@ Returns metadata for `CRMAccount` PATCHs. ```python from merge import Merge +from merge.resources.crm import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.meta_patch_retrieve( - id="id", +client.crm.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], ) ``` @@ -12898,7 +12369,7 @@ client.crm.accounts.meta_patch_retrieve(
-**id:** `str` +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for
@@ -12918,7 +12389,8 @@ client.crm.accounts.meta_patch_retrieve(
-
client.crm.accounts.meta_post_retrieve() +## Crm DeleteAccount +
client.crm.delete_account.delete()
@@ -12930,7 +12402,7 @@ client.crm.accounts.meta_patch_retrieve(
-Returns metadata for `CRMAccount` POSTs. +Delete a linked account.
@@ -12951,7 +12423,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.meta_post_retrieve() +client.crm.delete_account.delete() ``` @@ -12979,7 +12451,8 @@ client.crm.accounts.meta_post_retrieve()
-
client.crm.accounts.remote_field_classes_list(...) +## Crm EngagementTypes +
client.crm.engagement_types.list(...)
@@ -12991,7 +12464,7 @@ client.crm.accounts.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `EngagementType` objects.
@@ -13006,21 +12479,34 @@ Returns a list of `RemoteFieldClass` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.accounts.remote_field_classes_list( +client.crm.engagement_types.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", include_deleted_data=True, include_remote_data=True, include_remote_fields=True, include_shell_data=True, - is_common_model_field=True, - is_custom=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), page_size=1, + remote_id="remote_id", ) ``` @@ -13037,6 +12523,22 @@ client.crm.accounts.remote_field_classes_list(
+**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ **cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -13077,7 +12579,7 @@ client.crm.accounts.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -13085,7 +12587,7 @@ client.crm.accounts.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -13101,6 +12603,14 @@ client.crm.accounts.remote_field_classes_list(
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -13113,8 +12623,7 @@ client.crm.accounts.remote_field_classes_list(
-## Crm AsyncPassthrough -
client.crm.async_passthrough.create(...) +
client.crm.engagement_types.retrieve(...)
@@ -13126,7 +12635,7 @@ client.crm.accounts.remote_field_classes_list(
-Asynchronously pull data from an endpoint not currently supported by Merge. +Returns an `EngagementType` object with the given `id`.
@@ -13142,17 +12651,16 @@ Asynchronously pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.async_passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.crm.engagement_types.retrieve( + id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -13169,7 +12677,7 @@ client.crm.async_passthrough.create(
-**request:** `DataPassthroughRequest` +**id:** `str`
@@ -13177,70 +12685,23 @@ client.crm.async_passthrough.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
- -
- - - - -
- -
client.crm.async_passthrough.retrieve(...) -
-
- -#### 📝 Description - -
-
-Retrieves data from earlier async-passthrough POST request -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", -) - -``` -
-
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +
-#### ⚙️ Parameters -
-
-
- -**async_passthrough_receipt_id:** `str` +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -13260,8 +12721,7 @@ client.crm.async_passthrough.retrieve(
-## Crm AuditTrail -
client.crm.audit_trail.list(...) +
client.crm.engagement_types.remote_field_classes_list(...)
@@ -13273,7 +12733,7 @@ client.crm.async_passthrough.retrieve(
-Gets a list of audit trail events. +Returns a list of `RemoteFieldClass` objects.
@@ -13294,13 +12754,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.audit_trail.list( +client.crm.engagement_types.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - event_type="event_type", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, page_size=1, - start_date="start_date", - user_email="user_email", ) ``` @@ -13325,7 +12787,7 @@ client.crm.audit_trail.list(
-**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -13333,7 +12795,7 @@ client.crm.audit_trail.list(
-**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -13341,7 +12803,7 @@ client.crm.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -13349,7 +12811,7 @@ client.crm.audit_trail.list(
-**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -13357,7 +12819,7 @@ client.crm.audit_trail.list(
-**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value
@@ -13365,65 +12827,19 @@ client.crm.audit_trail.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value
- -
- - - - -
- -## Crm AvailableActions -
client.crm.available_actions.retrieve() -
-
- -#### 📝 Description - -
-
-Returns a list of models and actions available for an account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.available_actions.retrieve() - -``` -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. +
-#### ⚙️ Parameters - -
-
-
@@ -13439,8 +12855,8 @@ client.crm.available_actions.retrieve()
-## Crm Contacts -
client.crm.contacts.list(...) +## Crm Engagements +
client.crm.engagements.list(...)
@@ -13452,7 +12868,7 @@ client.crm.available_actions.retrieve()
-Returns a list of `Contact` objects. +Returns a list of `Engagement` objects.
@@ -13470,14 +12886,15 @@ Returns a list of `Contact` objects. import datetime from merge import Merge -from merge.resources.crm.resources.contacts import ContactsListRequestExpand +from merge.resources.crm.resources.engagements import ( + EngagementsListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.list( - account_id="account_id", +client.crm.engagements.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -13485,8 +12902,7 @@ client.crm.contacts.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - email_addresses="email_addresses", - expand=ContactsListRequestExpand.ACCOUNT, + expand=EngagementsListRequestExpand.ACCOUNT, include_deleted_data=True, include_remote_data=True, include_remote_fields=True, @@ -13498,8 +12914,13 @@ client.crm.contacts.list( "2024-01-15 09:30:00+00:00", ), page_size=1, - phone_numbers="phone_numbers", remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -13516,14 +12937,6 @@ client.crm.contacts.list(
-**account_id:** `typing.Optional[str]` — If provided, will only return contacts with this account. - -
-
- -
-
- **created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -13548,15 +12961,7 @@ client.crm.contacts.list(
-**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. - -
-
- -
-
- -**expand:** `typing.Optional[ContactsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[EngagementsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -13620,7 +13025,7 @@ client.crm.contacts.list(
-**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -13628,7 +13033,15 @@ client.crm.contacts.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started after this datetime. + +
+
+ +
+
+ +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started before this datetime.
@@ -13648,7 +13061,7 @@ client.crm.contacts.list(
-
client.crm.contacts.create(...) +
client.crm.engagements.create(...)
@@ -13660,7 +13073,7 @@ client.crm.contacts.list(
-Creates a `Contact` object with the given values. +Creates an `Engagement` object with the given values.
@@ -13676,16 +13089,16 @@ Creates a `Contact` object with the given values. ```python from merge import Merge -from merge.resources.crm import ContactRequest +from merge.resources.crm import EngagementRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.create( +client.crm.engagements.create( is_debug_mode=True, run_async=True, - model=ContactRequest(), + model=EngagementRequest(), ) ``` @@ -13702,7 +13115,7 @@ client.crm.contacts.create(
-**model:** `ContactRequest` +**model:** `EngagementRequest`
@@ -13738,7 +13151,7 @@ client.crm.contacts.create(
-
client.crm.contacts.retrieve(...) +
client.crm.engagements.retrieve(...)
@@ -13750,7 +13163,7 @@ client.crm.contacts.create(
-Returns a `Contact` object with the given `id`. +Returns an `Engagement` object with the given `id`.
@@ -13766,15 +13179,17 @@ Returns a `Contact` object with the given `id`. ```python from merge import Merge -from merge.resources.crm.resources.contacts import ContactsRetrieveRequestExpand +from merge.resources.crm.resources.engagements import ( + EngagementsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.retrieve( +client.crm.engagements.retrieve( id="id", - expand=ContactsRetrieveRequestExpand.ACCOUNT, + expand=EngagementsRetrieveRequestExpand.ACCOUNT, include_remote_data=True, include_remote_fields=True, include_shell_data=True, @@ -13802,7 +13217,7 @@ client.crm.contacts.retrieve(
-**expand:** `typing.Optional[ContactsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[EngagementsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -13846,7 +13261,7 @@ client.crm.contacts.retrieve(
-
client.crm.contacts.partial_update(...) +
client.crm.engagements.partial_update(...)
@@ -13858,7 +13273,7 @@ client.crm.contacts.retrieve(
-Updates a `Contact` object with the given `id`. +Updates an `Engagement` object with the given `id`.
@@ -13874,17 +13289,17 @@ Updates a `Contact` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedContactRequest +from merge.resources.crm import PatchedEngagementRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.partial_update( +client.crm.engagements.partial_update( id="id", is_debug_mode=True, run_async=True, - model=PatchedContactRequest(), + model=PatchedEngagementRequest(), ) ``` @@ -13909,7 +13324,7 @@ client.crm.contacts.partial_update(
-**model:** `PatchedContactRequest` +**model:** `PatchedEngagementRequest`
@@ -13945,7 +13360,7 @@ client.crm.contacts.partial_update(
-
client.crm.contacts.ignore_create(...) +
client.crm.engagements.meta_patch_retrieve(...)
@@ -13957,7 +13372,7 @@ client.crm.contacts.partial_update(
-Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +Returns metadata for `Engagement` PATCHs.
@@ -13973,17 +13388,13 @@ Ignores a specific row based on the `model_id` in the url. These records will ha ```python from merge import Merge -from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.ignore_create( - model_id="model_id", - request=IgnoreCommonModelRequest( - reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, - ), +client.crm.engagements.meta_patch_retrieve( + id="id", ) ``` @@ -14000,7 +13411,7 @@ client.crm.contacts.ignore_create(
-**model_id:** `str` +**id:** `str`
@@ -14008,10 +13419,63 @@ client.crm.contacts.ignore_create(
-**request:** `IgnoreCommonModelRequest` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+ +
client.crm.engagements.meta_post_retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Engagement` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.engagements.meta_post_retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
@@ -14028,7 +13492,7 @@ client.crm.contacts.ignore_create(
-
client.crm.contacts.meta_patch_retrieve(...) +
client.crm.engagements.remote_field_classes_list(...)
@@ -14040,7 +13504,7 @@ client.crm.contacts.ignore_create(
-Returns metadata for `CRMContact` PATCHs. +Returns a list of `RemoteFieldClass` objects.
@@ -14061,8 +13525,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.meta_patch_retrieve( - id="id", +client.crm.engagements.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -14079,7 +13550,63 @@ client.crm.contacts.meta_patch_retrieve(
-**id:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value + +
+
+ +
+
+ +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -14099,7 +13626,8 @@ client.crm.contacts.meta_patch_retrieve(
-
client.crm.contacts.meta_post_retrieve() +## Crm FieldMapping +
client.crm.field_mapping.field_mappings_retrieve(...)
@@ -14111,7 +13639,7 @@ client.crm.contacts.meta_patch_retrieve(
-Returns metadata for `CRMContact` POSTs. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -14132,7 +13660,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.meta_post_retrieve() +client.crm.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, +) ``` @@ -14148,6 +13678,14 @@ client.crm.contacts.meta_post_retrieve()
+**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -14160,7 +13698,7 @@ client.crm.contacts.meta_post_retrieve()
-
client.crm.contacts.remote_field_classes_list(...) +
client.crm.field_mapping.field_mappings_create(...)
@@ -14172,7 +13710,7 @@ client.crm.contacts.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -14193,15 +13731,14 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.contacts.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - is_common_model_field=True, - is_custom=True, - page_size=1, +client.crm.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", ) ``` @@ -14218,15 +13755,7 @@ client.crm.contacts.remote_field_classes_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -14234,7 +13763,7 @@ client.crm.contacts.remote_field_classes_list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
@@ -14242,7 +13771,7 @@ client.crm.contacts.remote_field_classes_list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -14250,7 +13779,7 @@ client.crm.contacts.remote_field_classes_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from.
@@ -14258,7 +13787,7 @@ client.crm.contacts.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from.
@@ -14266,7 +13795,7 @@ client.crm.contacts.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category.
@@ -14274,7 +13803,7 @@ client.crm.contacts.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations.
@@ -14294,8 +13823,7 @@ client.crm.contacts.remote_field_classes_list(
-## Crm CustomObjectClasses -
client.crm.custom_object_classes.list(...) +
client.crm.field_mapping.field_mappings_destroy(...)
@@ -14307,7 +13835,7 @@ client.crm.contacts.remote_field_classes_list(
-Returns a list of `CustomObjectClass` objects. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -14322,33 +13850,14 @@ Returns a list of `CustomObjectClass` objects.
```python -import datetime - from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_object_classes.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", +client.crm.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", ) ``` @@ -14365,7 +13874,7 @@ client.crm.custom_object_classes.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**field_mapping_id:** `str`
@@ -14373,55 +13882,70 @@ client.crm.custom_object_classes.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. -
+
+
client.crm.field_mapping.field_mappings_partial_update(...)
-**expand:** `typing.Optional[typing.Literal["fields"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
+#### 📝 Description
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +
+
+#### 🔌 Usage +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", +) + +``` +
+
+#### ⚙️ Parameters +
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
+
+ +**field_mapping_id:** `str`
@@ -14429,7 +13953,7 @@ client.crm.custom_object_classes.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -14437,7 +13961,7 @@ client.crm.custom_object_classes.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from.
@@ -14445,7 +13969,7 @@ client.crm.custom_object_classes.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -14465,7 +13989,7 @@ client.crm.custom_object_classes.list(
-
client.crm.custom_object_classes.retrieve(...) +
client.crm.field_mapping.remote_fields_retrieve(...)
@@ -14477,7 +14001,7 @@ client.crm.custom_object_classes.list(
-Returns a `CustomObjectClass` object with the given `id`. +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -14498,10 +14022,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_object_classes.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, +client.crm.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", ) ``` @@ -14518,23 +14041,7 @@ client.crm.custom_object_classes.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["fields"]]` — 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. +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
@@ -14542,7 +14049,7 @@ client.crm.custom_object_classes.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
@@ -14562,8 +14069,7 @@ client.crm.custom_object_classes.retrieve(
-## Crm AssociationTypes -
client.crm.association_types.custom_object_classes_association_types_list(...) +
client.crm.field_mapping.target_fields_retrieve()
@@ -14575,7 +14081,7 @@ client.crm.custom_object_classes.retrieve(
-Returns a list of `AssociationType` objects. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -14590,35 +14096,13 @@ Returns a list of `AssociationType` objects.
```python -import datetime - from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.association_types.custom_object_classes_association_types_list( - custom_object_class_id="custom_object_class_id", - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", -) +client.crm.field_mapping.target_fields_retrieve() ```
@@ -14634,95 +14118,71 @@ client.crm.association_types.custom_object_classes_association_types_list(
-**custom_object_class_id:** `str` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. -
-
-
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. -
+
+## Crm GenerateKey +
client.crm.generate_key.create(...)
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
+#### 📝 Description
-**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
-
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - +Create a remote key.
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
+#### 🔌 Usage +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
+```python +from merge import Merge -
-
+client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.generate_key.create( + name="Remote Deployment Key 1", +) -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +```
+ + + +#### ⚙️ Parameters
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
-
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**name:** `str` — The name of the remote key
@@ -14742,7 +14202,8 @@ client.crm.association_types.custom_object_classes_association_types_list(
-
client.crm.association_types.custom_object_classes_association_types_create(...) +## Crm Issues +
client.crm.issues.list(...)
@@ -14754,7 +14215,7 @@ client.crm.association_types.custom_object_classes_association_types_list(
-Creates an `AssociationType` object with the given values. +Gets all issues for Organization.
@@ -14769,34 +14230,38 @@ Creates an `AssociationType` object with the given values.
```python +import datetime + from merge import Merge -from merge.resources.crm import ( - AssociationTypeRequestRequest, - ObjectClassDescriptionRequest, - OriginTypeEnum, -) +from merge.resources.crm.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.association_types.custom_object_classes_association_types_create( - custom_object_class_id="custom_object_class_id", - is_debug_mode=True, - run_async=True, - model=AssociationTypeRequestRequest( - source_object_class=ObjectClassDescriptionRequest( - id="id", - origin_type=OriginTypeEnum.CUSTOM_OBJECT, - ), - target_object_classes=[ - ObjectClassDescriptionRequest( - id="id", - origin_type=OriginTypeEnum.CUSTOM_OBJECT, - ) - ], - remote_key_name="remote_key_name", +client.crm.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -14813,7 +14278,7 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**custom_object_class_id:** `str` +**account_token:** `typing.Optional[str]`
@@ -14821,7 +14286,7 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**model:** `AssociationTypeRequestRequest` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -14829,7 +14294,7 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time
@@ -14837,7 +14302,7 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**end_user_organization_name:** `typing.Optional[str]`
@@ -14845,73 +14310,47 @@ client.crm.association_types.custom_object_classes_association_types_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime.
-
-
+
+
+**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +
-
-
client.crm.association_types.custom_object_classes_association_types_retrieve(...)
-#### 📝 Description - -
-
+**include_muted:** `typing.Optional[str]` — If true, will include muted issues + +
+
-Returns an `AssociationType` object with the given `id`. -
-
+**integration_name:** `typing.Optional[str]` +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.association_types.custom_object_classes_association_types_retrieve( - custom_object_class_id="custom_object_class_id", - id="id", - include_remote_data=True, - include_shell_data=True, -) - -``` -
-
+**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +
-#### ⚙️ Parameters -
-
-
- -**custom_object_class_id:** `str` +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime.
@@ -14919,7 +14358,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**id:** `str` +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in.
@@ -14927,7 +14366,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -14935,7 +14374,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time
@@ -14943,7 +14382,12 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -14963,7 +14407,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-
client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(...) +
client.crm.issues.retrieve(...)
@@ -14975,7 +14419,7 @@ client.crm.association_types.custom_object_classes_association_types_retrieve(
-Returns metadata for `CRMAssociationType` POSTs. +Get a specific issue.
@@ -14996,8 +14440,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve( - custom_object_class_id="custom_object_class_id", +client.crm.issues.retrieve( + id="id", ) ``` @@ -15014,7 +14458,7 @@ client.crm.association_types.custom_object_classes_association_types_meta_post_r
-**custom_object_class_id:** `str` +**id:** `str`
@@ -15034,8 +14478,8 @@ client.crm.association_types.custom_object_classes_association_types_meta_post_r
-## Crm CustomObjects -
client.crm.custom_objects.custom_object_classes_custom_objects_list(...) +## Crm Leads +
client.crm.leads.list(...)
@@ -15047,7 +14491,7 @@ client.crm.association_types.custom_object_classes_association_types_meta_post_r
-Returns a list of `CustomObject` objects. +Returns a list of `Lead` objects.
@@ -15065,13 +14509,15 @@ Returns a list of `CustomObject` objects. import datetime from merge import Merge +from merge.resources.crm.resources.leads import LeadsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_list( - custom_object_class_id="custom_object_class_id", +client.crm.leads.list( + converted_account_id="converted_account_id", + converted_contact_id="converted_contact_id", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -15079,6 +14525,8 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email_addresses="email_addresses", + expand=LeadsListRequestExpand.CONVERTED_ACCOUNT, include_deleted_data=True, include_remote_data=True, include_remote_fields=True, @@ -15089,7 +14537,9 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + owner_id="owner_id", page_size=1, + phone_numbers="phone_numbers", remote_id="remote_id", ) @@ -15107,7 +14557,15 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
-**custom_object_class_id:** `str` +**converted_account_id:** `typing.Optional[str]` — If provided, will only return leads with this account. + +
+
+ +
+
+ +**converted_contact_id:** `typing.Optional[str]` — If provided, will only return leads with this contact.
@@ -15139,6 +14597,22 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
+**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. + +
+
+ +
+
+ +**expand:** `typing.Optional[LeadsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -15187,6 +14661,14 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
+**owner_id:** `typing.Optional[str]` — If provided, will only return leads with this owner. + +
+
+ +
+
+ **page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -15195,6 +14677,14 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
+**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. + +
+
+ +
+
+ **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -15215,7 +14705,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
-
client.crm.custom_objects.custom_object_classes_custom_objects_create(...) +
client.crm.leads.create(...)
@@ -15227,7 +14717,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_list(
-Creates a `CustomObject` object with the given values. +Creates a `Lead` object with the given values.
@@ -15243,19 +14733,16 @@ Creates a `CustomObject` object with the given values. ```python from merge import Merge -from merge.resources.crm import CustomObjectRequest +from merge.resources.crm import LeadRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_create( - custom_object_class_id="custom_object_class_id", +client.crm.leads.create( is_debug_mode=True, run_async=True, - model=CustomObjectRequest( - fields={"test_field": "hello"}, - ), + model=LeadRequest(), ) ``` @@ -15272,15 +14759,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_create(
-**custom_object_class_id:** `str` - -
-
- -
-
- -**model:** `CustomObjectRequest` +**model:** `LeadRequest`
@@ -15316,7 +14795,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_create(
-
client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(...) +
client.crm.leads.retrieve(...)
@@ -15328,7 +14807,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_create(
-Returns a `CustomObject` object with the given `id`. +Returns a `Lead` object with the given `id`.
@@ -15344,14 +14823,15 @@ Returns a `CustomObject` object with the given `id`. ```python from merge import Merge +from merge.resources.crm.resources.leads import LeadsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( - custom_object_class_id="custom_object_class_id", +client.crm.leads.retrieve( id="id", + expand=LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT, include_remote_data=True, include_remote_fields=True, include_shell_data=True, @@ -15371,7 +14851,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-**custom_object_class_id:** `str` +**id:** `str`
@@ -15379,7 +14859,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-**id:** `str` +**expand:** `typing.Optional[LeadsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -15423,7 +14903,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-
client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(...) +
client.crm.leads.meta_post_retrieve()
@@ -15435,7 +14915,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
-Returns metadata for `CRMCustomObject` POSTs. +Returns metadata for `Lead` POSTs.
@@ -15456,9 +14936,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve( - custom_object_class_id="custom_object_class_id", -) +client.crm.leads.meta_post_retrieve() ``` @@ -15474,14 +14952,6 @@ client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retriev
-**custom_object_class_id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -15494,7 +14964,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retriev
-
client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list(...) +
client.crm.leads.remote_field_classes_list(...)
@@ -15527,7 +14997,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list( +client.crm.leads.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", include_deleted_data=True, include_remote_data=True, @@ -15628,8 +15098,8 @@ client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_clas
-## Crm Associations -
client.crm.associations.custom_object_classes_custom_objects_associations_list(...) +## Crm LinkToken +
client.crm.link_token.create(...)
@@ -15641,7 +15111,7 @@ client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_clas
-Returns a list of `Association` objects. +Creates a link token to be used when linking a new end user.
@@ -15656,36 +15126,18 @@ Returns a list of `Association` objects.
```python -import datetime - from merge import Merge +from merge.resources.crm import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.associations.custom_object_classes_custom_objects_associations_list( - custom_object_class_id="custom_object_class_id", - object_id="object_id", - association_type_id="association_type_id", - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", +client.crm.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -15702,7 +15154,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**custom_object_class_id:** `str` +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -15710,7 +15162,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**object_id:** `str` +**end_user_organization_name:** `str` — Your end user's organization.
@@ -15718,7 +15170,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**association_type_id:** `typing.Optional[str]` — If provided, will only return opportunities with this association_type. +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -15726,7 +15178,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
@@ -15734,7 +15186,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
@@ -15742,7 +15194,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
@@ -15750,7 +15202,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**expand:** `typing.Optional[typing.Literal["association_type"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -15758,7 +15210,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -15766,7 +15218,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -15774,7 +15226,14 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
@@ -15782,15 +15241,12 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
+**language:** `typing.Optional[EndUserDetailsRequestLanguage]` -
-
+The following subset of IETF language tags can be used to configure localization. -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +* `en` - en +* `de` - de
@@ -15798,7 +15254,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled.
@@ -15806,7 +15262,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -15826,7 +15282,8 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-
client.crm.associations.custom_object_classes_custom_objects_associations_update(...) +## Crm LinkedAccounts +
client.crm.linked_accounts.list(...)
@@ -15838,7 +15295,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_list(
-Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. +List linked accounts for your organization.
@@ -15854,19 +15311,28 @@ Creates an Association between `source_object_id` and `target_object_id` of type ```python from merge import Merge +from merge.resources.crm.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.associations.custom_object_classes_custom_objects_associations_update( - source_class_id="source_class_id", - source_object_id="source_object_id", - target_class_id="target_class_id", - target_object_id="target_object_id", - association_type_id="association_type_id", - is_debug_mode=True, - run_async=True, +client.crm.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -15883,15 +15349,17 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**source_class_id:** `str` - -
-
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]` -
-
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` -**source_object_id:** `str` +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage
@@ -15899,7 +15367,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**target_class_id:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -15907,7 +15375,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**target_object_id:** `str` +**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address.
@@ -15915,7 +15383,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**association_type_id:** `str` +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name.
@@ -15923,7 +15391,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID.
@@ -15931,7 +15399,7 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
@@ -15939,222 +15407,31 @@ client.crm.associations.custom_object_classes_custom_objects_associations_update
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**id:** `typing.Optional[str]`
- -
- - - - -
- -## Crm Scopes -
client.crm.scopes.default_scopes_retrieve() -
-
- -#### 📝 Description
-
-
- -Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.scopes.default_scopes_retrieve() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
-
-
- - -
-
-
- -
client.crm.scopes.linked_account_scopes_retrieve() -
-
- -#### 📝 Description - -
-
- -
-
- -Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -
-
-
-
- -#### 🔌 Usage - -
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.scopes.linked_account_scopes_retrieve() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
-
-
- - -
-
-
- -
client.crm.scopes.linked_account_scopes_create(...) -
-
- -#### 📝 Description
-
-
- -Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge -from merge.resources.crm import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, -) - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name.
@@ -16162,65 +15439,27 @@ client.crm.scopes.linked_account_scopes_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
-
-
- - -
-
-
- -## Crm DeleteAccount -
client.crm.delete_account.delete() -
-
- -#### 📝 Description
-
-
- -Delete a linked account. -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.delete_account.delete() - -``` -
-
+**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` +
-#### ⚙️ Parameters - -
-
-
@@ -16236,8 +15475,8 @@ client.crm.delete_account.delete()
-## Crm EngagementTypes -
client.crm.engagement_types.list(...) +## Crm Notes +
client.crm.notes.list(...)
@@ -16249,7 +15488,7 @@ client.crm.delete_account.delete()
-Returns a list of `EngagementType` objects. +Returns a list of `Note` objects.
@@ -16267,12 +15506,15 @@ Returns a list of `EngagementType` objects. import datetime from merge import Merge +from merge.resources.crm.resources.notes import NotesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagement_types.list( +client.crm.notes.list( + account_id="account_id", + contact_id="contact_id", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -16280,6 +15522,7 @@ client.crm.engagement_types.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=NotesListRequestExpand.ACCOUNT, include_deleted_data=True, include_remote_data=True, include_remote_fields=True, @@ -16290,6 +15533,8 @@ client.crm.engagement_types.list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + opportunity_id="opportunity_id", + owner_id="owner_id", page_size=1, remote_id="remote_id", ) @@ -16308,6 +15553,22 @@ client.crm.engagement_types.list(
+**account_id:** `typing.Optional[str]` — If provided, will only return notes with this account. + +
+
+ +
+
+ +**contact_id:** `typing.Optional[str]` — If provided, will only return notes with this contact. + +
+
+ +
+
+ **created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -16332,6 +15593,14 @@ client.crm.engagement_types.list(
+**expand:** `typing.Optional[NotesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -16380,6 +15649,22 @@ client.crm.engagement_types.list(
+**opportunity_id:** `typing.Optional[str]` — If provided, will only return notes with this opportunity. + +
+
+ +
+
+ +**owner_id:** `typing.Optional[str]` — If provided, will only return notes with this owner. + +
+
+ +
+
+ **page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -16408,7 +15693,7 @@ client.crm.engagement_types.list(
-
client.crm.engagement_types.retrieve(...) +
client.crm.notes.create(...)
@@ -16420,7 +15705,7 @@ client.crm.engagement_types.list(
-Returns an `EngagementType` object with the given `id`. +Creates a `Note` object with the given values.
@@ -16436,13 +15721,105 @@ Returns an `EngagementType` object with the given `id`. ```python from merge import Merge +from merge.resources.crm import NoteRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagement_types.retrieve( +client.crm.notes.create( + is_debug_mode=True, + run_async=True, + model=NoteRequest(), +) + +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**model:** `NoteRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.crm.notes.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Note` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge +from merge.resources.crm.resources.notes import NotesRetrieveRequestExpand + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.notes.retrieve( id="id", + expand=NotesRetrieveRequestExpand.ACCOUNT, include_remote_data=True, include_remote_fields=True, include_shell_data=True, @@ -16470,6 +15847,14 @@ client.crm.engagement_types.retrieve(
+**expand:** `typing.Optional[NotesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -16506,7 +15891,68 @@ client.crm.engagement_types.retrieve(
-
client.crm.engagement_types.remote_field_classes_list(...) +
client.crm.notes.meta_post_retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Note` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.notes.meta_post_retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.crm.notes.remote_field_classes_list(...)
@@ -16539,7 +15985,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagement_types.remote_field_classes_list( +client.crm.notes.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", include_deleted_data=True, include_remote_data=True, @@ -16640,8 +16086,8 @@ client.crm.engagement_types.remote_field_classes_list(
-## Crm Engagements -
client.crm.engagements.list(...) +## Crm Opportunities +
client.crm.opportunities.list(...)
@@ -16653,7 +16099,7 @@ client.crm.engagement_types.remote_field_classes_list(
-Returns a list of `Engagement` objects. +Returns a list of `Opportunity` objects.
@@ -16671,15 +16117,17 @@ Returns a list of `Engagement` objects. import datetime from merge import Merge -from merge.resources.crm.resources.engagements import ( - EngagementsListRequestExpand, +from merge.resources.crm.resources.opportunities import ( + OpportunitiesListRequestExpand, + OpportunitiesListRequestStatus, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.list( +client.crm.opportunities.list( + account_id="account_id", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -16687,7 +16135,7 @@ client.crm.engagements.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=EngagementsListRequestExpand.ACCOUNT, + expand=OpportunitiesListRequestExpand.ACCOUNT, include_deleted_data=True, include_remote_data=True, include_remote_fields=True, @@ -16698,14 +16146,14 @@ client.crm.engagements.list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + owner_id="owner_id", page_size=1, - remote_id="remote_id", - started_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - started_before=datetime.datetime.fromisoformat( + remote_created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + remote_id="remote_id", + stage_id="stage_id", + status=OpportunitiesListRequestStatus.LOST, ) ``` @@ -16722,6 +16170,14 @@ client.crm.engagements.list(
+**account_id:** `typing.Optional[str]` — If provided, will only return opportunities with this account. + +
+
+ +
+
+ **created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -16746,7 +16202,7 @@ client.crm.engagements.list(
-**expand:** `typing.Optional[EngagementsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[OpportunitiesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -16802,6 +16258,14 @@ client.crm.engagements.list(
+**owner_id:** `typing.Optional[str]` — If provided, will only return opportunities with this owner. + +
+
+ +
+
+ **page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -16810,6 +16274,22 @@ client.crm.engagements.list(
+**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return opportunities created in the third party platform after this datetime. + +
+
+ +
+
+ +**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -16818,7 +16298,7 @@ client.crm.engagements.list(
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started after this datetime. +**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -16826,7 +16306,21 @@ client.crm.engagements.list(
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return engagements started before this datetime. +**stage_id:** `typing.Optional[str]` — If provided, will only return opportunities with this stage. + +
+
+ +
+
+ +**status:** `typing.Optional[OpportunitiesListRequestStatus]` + +If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') + +* `OPEN` - OPEN +* `WON` - WON +* `LOST` - LOST
@@ -16846,7 +16340,7 @@ client.crm.engagements.list(
-
client.crm.engagements.create(...) +
client.crm.opportunities.create(...)
@@ -16858,7 +16352,7 @@ client.crm.engagements.list(
-Creates an `Engagement` object with the given values. +Creates an `Opportunity` object with the given values.
@@ -16874,16 +16368,16 @@ Creates an `Engagement` object with the given values. ```python from merge import Merge -from merge.resources.crm import EngagementRequest +from merge.resources.crm import OpportunityRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.create( +client.crm.opportunities.create( is_debug_mode=True, run_async=True, - model=EngagementRequest(), + model=OpportunityRequest(), ) ``` @@ -16900,7 +16394,7 @@ client.crm.engagements.create(
-**model:** `EngagementRequest` +**model:** `OpportunityRequest`
@@ -16936,7 +16430,7 @@ client.crm.engagements.create(
-
client.crm.engagements.retrieve(...) +
client.crm.opportunities.retrieve(...)
@@ -16948,7 +16442,7 @@ client.crm.engagements.create(
-Returns an `Engagement` object with the given `id`. +Returns an `Opportunity` object with the given `id`.
@@ -16964,17 +16458,17 @@ Returns an `Engagement` object with the given `id`. ```python from merge import Merge -from merge.resources.crm.resources.engagements import ( - EngagementsRetrieveRequestExpand, +from merge.resources.crm.resources.opportunities import ( + OpportunitiesRetrieveRequestExpand, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.retrieve( +client.crm.opportunities.retrieve( id="id", - expand=EngagementsRetrieveRequestExpand.ACCOUNT, + expand=OpportunitiesRetrieveRequestExpand.ACCOUNT, include_remote_data=True, include_remote_fields=True, include_shell_data=True, @@ -17002,7 +16496,7 @@ client.crm.engagements.retrieve(
-**expand:** `typing.Optional[EngagementsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[OpportunitiesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -17034,6 +16528,22 @@ client.crm.engagements.retrieve(
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -17046,7 +16556,7 @@ client.crm.engagements.retrieve(
-
client.crm.engagements.partial_update(...) +
client.crm.opportunities.partial_update(...)
@@ -17058,7 +16568,7 @@ client.crm.engagements.retrieve(
-Updates an `Engagement` object with the given `id`. +Updates an `Opportunity` object with the given `id`.
@@ -17074,17 +16584,17 @@ Updates an `Engagement` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedEngagementRequest +from merge.resources.crm import PatchedOpportunityRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.partial_update( +client.crm.opportunities.partial_update( id="id", is_debug_mode=True, run_async=True, - model=PatchedEngagementRequest(), + model=PatchedOpportunityRequest(), ) ``` @@ -17109,7 +16619,7 @@ client.crm.engagements.partial_update(
-**model:** `PatchedEngagementRequest` +**model:** `PatchedOpportunityRequest`
@@ -17145,7 +16655,7 @@ client.crm.engagements.partial_update(
-
client.crm.engagements.meta_patch_retrieve(...) +
client.crm.opportunities.meta_patch_retrieve(...)
@@ -17157,7 +16667,7 @@ client.crm.engagements.partial_update(
-Returns metadata for `Engagement` PATCHs. +Returns metadata for `Opportunity` PATCHs.
@@ -17178,7 +16688,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.meta_patch_retrieve( +client.crm.opportunities.meta_patch_retrieve( id="id", ) @@ -17216,7 +16726,7 @@ client.crm.engagements.meta_patch_retrieve(
-
client.crm.engagements.meta_post_retrieve() +
client.crm.opportunities.meta_post_retrieve()
@@ -17228,7 +16738,7 @@ client.crm.engagements.meta_patch_retrieve(
-Returns metadata for `Engagement` POSTs. +Returns metadata for `Opportunity` POSTs.
@@ -17249,7 +16759,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.meta_post_retrieve() +client.crm.opportunities.meta_post_retrieve() ``` @@ -17277,7 +16787,7 @@ client.crm.engagements.meta_post_retrieve()
-
client.crm.engagements.remote_field_classes_list(...) +
client.crm.opportunities.remote_field_classes_list(...)
@@ -17310,7 +16820,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.engagements.remote_field_classes_list( +client.crm.opportunities.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", include_deleted_data=True, include_remote_data=True, @@ -17411,8 +16921,8 @@ client.crm.engagements.remote_field_classes_list(
-## Crm FieldMapping -
client.crm.field_mapping.field_mappings_retrieve(...) +## Crm Passthrough +
client.crm.passthrough.create(...)
@@ -17424,7 +16934,7 @@ client.crm.engagements.remote_field_classes_list(
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Pull data from an endpoint not currently supported by Merge.
@@ -17440,13 +16950,17 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw ```python from merge import Merge +from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.field_mappings_retrieve( - exclude_remote_field_metadata=True, +client.crm.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -17463,7 +16977,7 @@ client.crm.field_mapping.field_mappings_retrieve(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**request:** `DataPassthroughRequest`
@@ -17483,7 +16997,8 @@ client.crm.field_mapping.field_mappings_retrieve(
-
client.crm.field_mapping.field_mappings_create(...) +## Crm RegenerateKey +
client.crm.regenerate_key.create(...)
@@ -17495,7 +17010,7 @@ client.crm.field_mapping.field_mappings_retrieve(
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Exchange remote keys.
@@ -17516,14 +17031,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.field_mappings_create( - exclude_remote_field_metadata=True, - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", +client.crm.regenerate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -17540,7 +17049,7 @@ client.crm.field_mapping.field_mappings_create(
-**target_field_name:** `str` — The name of the target field you want this remote field to map to. +**name:** `str` — The name of the remote key
@@ -17548,39 +17057,91 @@ client.crm.field_mapping.field_mappings_create(
-**target_field_description:** `str` — The description of the target field you want this remote field to map to. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. -
+
+## Crm Stages +
client.crm.stages.list(...)
-**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. - +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Stage` objects.
+
+
+ +#### 🔌 Usage
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. - +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.stages.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+#### ⚙️ Parameters +
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -17588,7 +17149,7 @@ client.crm.field_mapping.field_mappings_create(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -17596,70 +17157,71 @@ client.crm.field_mapping.field_mappings_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
-
-
+
+
+**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +
-
-
client.crm.field_mapping.field_mappings_destroy(...)
-#### 📝 Description +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + -#### 🔌 Usage -
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", -) - -``` -
-
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + -#### ⚙️ Parameters -
+**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+
-**field_mapping_id:** `str` +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -17679,7 +17241,7 @@ client.crm.field_mapping.field_mappings_destroy(
-
client.crm.field_mapping.field_mappings_partial_update(...) +
client.crm.stages.retrieve(...)
@@ -17691,7 +17253,7 @@ client.crm.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a `Stage` object with the given `id`.
@@ -17712,8 +17274,11 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", +client.crm.stages.retrieve( + id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -17730,7 +17295,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` +**id:** `str`
@@ -17738,7 +17303,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -17746,7 +17311,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -17754,7 +17319,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -17774,7 +17339,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-
client.crm.field_mapping.remote_fields_retrieve(...) +
client.crm.stages.remote_field_classes_list(...)
@@ -17786,7 +17351,7 @@ client.crm.field_mapping.field_mappings_partial_update(
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns a list of `RemoteFieldClass` objects.
@@ -17807,9 +17372,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.remote_fields_retrieve( - common_models="common_models", - include_example_values="include_example_values", +client.crm.stages.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -17826,7 +17397,7 @@ client.crm.field_mapping.remote_fields_retrieve(
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -17834,7 +17405,55 @@ client.crm.field_mapping.remote_fields_retrieve(
-**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value + +
+
+ +
+
+ +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -17854,7 +17473,8 @@ client.crm.field_mapping.remote_fields_retrieve(
-
client.crm.field_mapping.target_fields_retrieve() +## Crm SyncStatus +
client.crm.sync_status.list(...)
@@ -17866,7 +17486,7 @@ client.crm.field_mapping.remote_fields_retrieve(
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -17887,7 +17507,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.field_mapping.target_fields_retrieve() +client.crm.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, +) ``` @@ -17903,6 +17526,22 @@ client.crm.field_mapping.target_fields_retrieve()
+**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.
@@ -17915,8 +17554,8 @@ client.crm.field_mapping.target_fields_retrieve()
-## Crm GenerateKey -
client.crm.generate_key.create(...) +## Crm ForceResync +
client.crm.force_resync.sync_status_resync_create()
@@ -17928,7 +17567,7 @@ client.crm.field_mapping.target_fields_retrieve()
-Create a remote key. +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -17949,9 +17588,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.generate_key.create( - name="Remote Deployment Key 1", -) +client.crm.force_resync.sync_status_resync_create() ``` @@ -17967,14 +17604,6 @@ client.crm.generate_key.create(
-**name:** `str` — The name of the remote key - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -17987,8 +17616,8 @@ client.crm.generate_key.create(
-## Crm Issues -
client.crm.issues.list(...) +## Crm Tasks +
client.crm.tasks.list(...)
@@ -18000,7 +17629,7 @@ client.crm.generate_key.create(
-Gets all issues for Organization. +Returns a list of `Task` objects.
@@ -18018,35 +17647,33 @@ Gets all issues for Organization. import datetime from merge import Merge -from merge.resources.crm.resources.issues import IssuesListRequestStatus +from merge.resources.crm.resources.tasks import TasksListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.issues.list( - account_token="account_token", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - end_user_organization_name="end_user_organization_name", - first_incident_time_after=datetime.datetime.fromisoformat( +client.crm.tasks.list( + created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - first_incident_time_before=datetime.datetime.fromisoformat( + created_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - include_muted="include_muted", - integration_name="integration_name", - last_incident_time_after=datetime.datetime.fromisoformat( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=TasksListRequestExpand.ACCOUNT, + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - last_incident_time_before=datetime.datetime.fromisoformat( + modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - linked_account_id="linked_account_id", page_size=1, - start_date="start_date", - status=IssuesListRequestStatus.ONGOING, + remote_id="remote_id", ) ``` @@ -18063,15 +17690,7 @@ client.crm.issues.list(
-**account_token:** `typing.Optional[str]` - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -18079,7 +17698,7 @@ client.crm.issues.list(
-**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -18087,7 +17706,7 @@ client.crm.issues.list(
-**end_user_organization_name:** `typing.Optional[str]` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -18095,7 +17714,7 @@ client.crm.issues.list(
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +**expand:** `typing.Optional[TasksListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -18103,7 +17722,7 @@ client.crm.issues.list(
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -18111,7 +17730,7 @@ client.crm.issues.list(
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -18119,7 +17738,7 @@ client.crm.issues.list(
-**integration_name:** `typing.Optional[str]` +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -18127,7 +17746,7 @@ client.crm.issues.list(
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -18135,7 +17754,7 @@ client.crm.issues.list(
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -18143,7 +17762,7 @@ client.crm.issues.list(
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -18159,20 +17778,7 @@ client.crm.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time - -
-
- -
-
- -**status:** `typing.Optional[IssuesListRequestStatus]` - -Status of the issue. Options: ('ONGOING', 'RESOLVED') - -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -18192,7 +17798,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.crm.issues.retrieve(...) +
client.crm.tasks.create(...)
@@ -18204,7 +17810,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +Creates a `Task` object with the given values.
@@ -18220,13 +17826,16 @@ Get a specific issue. ```python from merge import Merge +from merge.resources.crm import TaskRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.issues.retrieve( - id="id", +client.crm.tasks.create( + is_debug_mode=True, + run_async=True, + model=TaskRequest(), ) ``` @@ -18243,7 +17852,23 @@ client.crm.issues.retrieve(
-**id:** `str` +**model:** `TaskRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -18263,8 +17888,7 @@ client.crm.issues.retrieve(
-## Crm Leads -
client.crm.leads.list(...) +
client.crm.tasks.retrieve(...)
@@ -18276,7 +17900,7 @@ client.crm.issues.retrieve(
-Returns a list of `Lead` objects. +Returns a `Task` object with the given `id`.
@@ -18291,41 +17915,19 @@ Returns a list of `Lead` objects.
```python -import datetime - from merge import Merge -from merge.resources.crm.resources.leads import LeadsListRequestExpand +from merge.resources.crm.resources.tasks import TasksRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.list( - converted_account_id="converted_account_id", - converted_contact_id="converted_contact_id", - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - email_addresses="email_addresses", - expand=LeadsListRequestExpand.CONVERTED_ACCOUNT, - include_deleted_data=True, +client.crm.tasks.retrieve( + id="id", + expand=TasksRetrieveRequestExpand.ACCOUNT, include_remote_data=True, include_remote_fields=True, include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - owner_id="owner_id", - page_size=1, - phone_numbers="phone_numbers", - remote_id="remote_id", ) ``` @@ -18342,7 +17944,7 @@ client.crm.leads.list(
-**converted_account_id:** `typing.Optional[str]` — If provided, will only return leads with this account. +**id:** `str`
@@ -18350,7 +17952,7 @@ client.crm.leads.list(
-**converted_contact_id:** `typing.Optional[str]` — If provided, will only return leads with this contact. +**expand:** `typing.Optional[TasksRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -18358,7 +17960,7 @@ client.crm.leads.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -18366,7 +17968,7 @@ client.crm.leads.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -18374,7 +17976,7 @@ client.crm.leads.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -18382,71 +17984,74 @@ client.crm.leads.list(
-**email_addresses:** `typing.Optional[str]` — If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**expand:** `typing.Optional[LeadsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. -
+
+
client.crm.tasks.partial_update(...)
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
+#### 📝 Description
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
-
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - +Updates a `Task` object with the given `id`. +
+
+#### 🔌 Usage +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +```python +from merge import Merge +from merge.resources.crm import PatchedTaskRequest + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.tasks.partial_update( + id="id", + is_debug_mode=True, + run_async=True, + model=PatchedTaskRequest(), +) + +``` +
+
+#### ⚙️ Parameters +
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
-
-**owner_id:** `typing.Optional[str]` — If provided, will only return leads with this owner. +**id:** `str`
@@ -18454,7 +18059,7 @@ client.crm.leads.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**model:** `PatchedTaskRequest`
@@ -18462,7 +18067,7 @@ client.crm.leads.list(
-**phone_numbers:** `typing.Optional[str]` — If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -18470,7 +18075,7 @@ client.crm.leads.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -18490,7 +18095,7 @@ client.crm.leads.list(
-
client.crm.leads.create(...) +
client.crm.tasks.meta_patch_retrieve(...)
@@ -18502,7 +18107,7 @@ client.crm.leads.list(
-Creates a `Lead` object with the given values. +Returns metadata for `Task` PATCHs.
@@ -18518,16 +18123,13 @@ Creates a `Lead` object with the given values. ```python from merge import Merge -from merge.resources.crm import LeadRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.create( - is_debug_mode=True, - run_async=True, - model=LeadRequest(), +client.crm.tasks.meta_patch_retrieve( + id="id", ) ``` @@ -18544,7 +18146,7 @@ client.crm.leads.create(
-**model:** `LeadRequest` +**id:** `str`
@@ -18552,19 +18154,64 @@ client.crm.leads.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.crm.tasks.meta_post_retrieve()
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. - +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Task` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.tasks.meta_post_retrieve() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -18580,7 +18227,7 @@ client.crm.leads.create(
-
client.crm.leads.retrieve(...) +
client.crm.tasks.remote_field_classes_list(...)
@@ -18592,7 +18239,7 @@ client.crm.leads.create(
-Returns a `Lead` object with the given `id`. +Returns a list of `RemoteFieldClass` objects.
@@ -18608,18 +18255,20 @@ Returns a `Lead` object with the given `id`. ```python from merge import Merge -from merge.resources.crm.resources.leads import LeadsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.retrieve( - id="id", - expand=LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT, +client.crm.tasks.remote_field_classes_list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, include_remote_data=True, include_remote_fields=True, include_shell_data=True, + is_common_model_field=True, + is_custom=True, + page_size=1, ) ``` @@ -18636,7 +18285,7 @@ client.crm.leads.retrieve(
-**id:** `str` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -18644,7 +18293,7 @@ client.crm.leads.retrieve(
-**expand:** `typing.Optional[LeadsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -18676,64 +18325,27 @@ client.crm.leads.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value
- -
- - - - -
- -
client.crm.leads.meta_post_retrieve() -
-
- -#### 📝 Description - -
-
-Returns metadata for `Lead` POSTs. -
-
+**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.leads.meta_post_retrieve() - -``` -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. +
-#### ⚙️ Parameters - -
-
-
@@ -18749,7 +18361,8 @@ client.crm.leads.meta_post_retrieve()
-
client.crm.leads.remote_field_classes_list(...) +## Crm Users +
client.crm.users.list(...)
@@ -18761,7 +18374,7 @@ client.crm.leads.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `User` objects.
@@ -18776,21 +18389,35 @@ Returns a list of `RemoteFieldClass` objects.
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.leads.remote_field_classes_list( +client.crm.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + email="email", include_deleted_data=True, include_remote_data=True, include_remote_fields=True, include_shell_data=True, - is_common_model_field=True, - is_custom=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), page_size=1, + remote_id="remote_id", ) ``` @@ -18807,6 +18434,22 @@ client.crm.leads.remote_field_classes_list(
+**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ **cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -18815,6 +18458,14 @@ client.crm.leads.remote_field_classes_list(
+**email:** `typing.Optional[str]` — If provided, will only return users with this email. + +
+
+ +
+
+ **include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -18847,7 +18498,7 @@ client.crm.leads.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -18855,7 +18506,7 @@ client.crm.leads.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -18871,6 +18522,14 @@ client.crm.leads.remote_field_classes_list(
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -18883,8 +18542,7 @@ client.crm.leads.remote_field_classes_list(
-## Crm LinkToken -
client.crm.link_token.create(...) +
client.crm.users.retrieve(...)
@@ -18896,7 +18554,7 @@ client.crm.leads.remote_field_classes_list(
-Creates a link token to be used when linking a new end user. +Returns a `User` object with the given `id`.
@@ -18912,17 +18570,16 @@ Creates a link token to be used when linking a new end user. ```python from merge import Merge -from merge.resources.crm import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +client.crm.users.retrieve( + id="id", + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, ) ``` @@ -18939,7 +18596,7 @@ client.crm.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. +**id:** `str`
@@ -18947,7 +18604,7 @@ client.crm.link_token.create(
-**end_user_organization_name:** `str` — Your end user's organization. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -18955,7 +18612,7 @@ client.crm.link_token.create(
-**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -18963,7 +18620,7 @@ client.crm.link_token.create(
-**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -18971,75 +18628,74 @@ client.crm.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. -
+
+
client.crm.users.ignore_create(...)
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - -
-
+#### 📝 Description
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - -
-
-
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +
+
+#### 🔌 Usage +
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. - -
-
-
-**language:** `typing.Optional[EndUserDetailsRequestLanguage]` +```python +from merge import Merge +from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum -The following subset of IETF language tags can be used to configure localization. +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.users.ignore_create( + model_id="model_id", + request=IgnoreCommonModelRequest( + reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, + ), +) -* `en` - en -* `de` - de - +``` +
+
+#### ⚙️ Parameters +
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. +
+
+ +**model_id:** `str`
@@ -19047,7 +18703,7 @@ The following subset of IETF language tags can be used to configure localization
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +**request:** `IgnoreCommonModelRequest`
@@ -19067,8 +18723,7 @@ The following subset of IETF language tags can be used to configure localization
-## Crm LinkedAccounts -
client.crm.linked_accounts.list(...) +
client.crm.users.remote_field_classes_list(...)
@@ -19080,7 +18735,7 @@ The following subset of IETF language tags can be used to configure localization
-List linked accounts for your organization. +Returns a list of `RemoteFieldClass` objects.
@@ -19096,28 +18751,20 @@ List linked accounts for your organization. ```python from merge import Merge -from merge.resources.crm.resources.linked_accounts import ( - LinkedAccountsListRequestCategory, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, +client.crm.users.remote_field_classes_list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_user_email_address="end_user_email_address", - end_user_organization_name="end_user_organization_name", - end_user_origin_id="end_user_origin_id", - end_user_origin_ids="end_user_origin_ids", - id="id", - ids="ids", - include_duplicates=True, - integration_name="integration_name", - is_test_account="is_test_account", + include_deleted_data=True, + include_remote_data=True, + include_remote_fields=True, + include_shell_data=True, + is_common_model_field=True, + is_custom=True, page_size=1, - status="status", ) ``` @@ -19134,17 +18781,7 @@ client.crm.linked_accounts.list(
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` - -Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - -* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -19152,7 +18789,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -19160,7 +18797,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -19168,7 +18805,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. +**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
@@ -19176,7 +18813,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -19184,7 +18821,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. +**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value
@@ -19192,7 +18829,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**id:** `typing.Optional[str]` +**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value
@@ -19200,7 +18837,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -19208,43 +18845,65 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. -
+
+## Crm WebhookReceivers +
client.crm.webhook_receivers.list()
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - -
-
+#### 📝 Description
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - +
+
+ +Returns a list of `WebhookReceiver` objects.
+
+
+ +#### 🔌 Usage
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.crm.webhook_receivers.list() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -19260,8 +18919,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-## Crm Notes -
client.crm.notes.list(...) +
client.crm.webhook_receivers.create(...)
@@ -19273,7 +18931,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-Returns a list of `Note` objects. +Creates a `WebhookReceiver` object with the given values.
@@ -19288,40 +18946,15 @@ Returns a list of `Note` objects.
```python -import datetime - from merge import Merge -from merge.resources.crm.resources.notes import NotesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.list( - account_id="account_id", - contact_id="contact_id", - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=NotesListRequestExpand.ACCOUNT, - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - opportunity_id="opportunity_id", - owner_id="owner_id", - page_size=1, - remote_id="remote_id", +client.crm.webhook_receivers.create( + event="event", + is_active=True, ) ``` @@ -19338,7 +18971,7 @@ client.crm.notes.list(
-**account_id:** `typing.Optional[str]` — If provided, will only return notes with this account. +**event:** `str`
@@ -19346,7 +18979,7 @@ client.crm.notes.list(
-**contact_id:** `typing.Optional[str]` — If provided, will only return notes with this contact. +**is_active:** `bool`
@@ -19354,7 +18987,7 @@ client.crm.notes.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**key:** `typing.Optional[str]`
@@ -19362,107 +18995,65 @@ client.crm.notes.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. -
-
-
-**expand:** `typing.Optional[NotesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. -
+
+## Filestorage AccountDetails +
client.filestorage.account_details.retrieve()
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
+#### 📝 Description
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
-
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - +Get details for a linked account.
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). -
-
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
+#### 🔌 Usage
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
-
-**opportunity_id:** `typing.Optional[str]` — If provided, will only return notes with this opportunity. - -
-
+```python +from merge import Merge -
-
+client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.account_details.retrieve() -**owner_id:** `typing.Optional[str]` — If provided, will only return notes with this owner. - +```
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. -
+#### ⚙️ Parameters +
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
-
@@ -19478,7 +19069,8 @@ client.crm.notes.list(
-
client.crm.notes.create(...) +## Filestorage AccountToken +
client.filestorage.account_token.retrieve(...)
@@ -19490,7 +19082,7 @@ client.crm.notes.list(
-Creates a `Note` object with the given values. +Returns the account token for the end user with the provided public token.
@@ -19506,16 +19098,13 @@ Creates a `Note` object with the given values. ```python from merge import Merge -from merge.resources.crm import NoteRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.create( - is_debug_mode=True, - run_async=True, - model=NoteRequest(), +client.filestorage.account_token.retrieve( + public_token="public_token", ) ``` @@ -19532,23 +19121,7 @@ client.crm.notes.create(
-**model:** `NoteRequest` - -
-
- -
-
- -**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. +**public_token:** `str`
@@ -19568,7 +19141,8 @@ client.crm.notes.create(
-
client.crm.notes.retrieve(...) +## Filestorage AsyncPassthrough +
client.filestorage.async_passthrough.create(...)
@@ -19580,7 +19154,7 @@ client.crm.notes.create(
-Returns a `Note` object with the given `id`. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -19596,18 +19170,17 @@ Returns a `Note` object with the given `id`. ```python from merge import Merge -from merge.resources.crm.resources.notes import NotesRetrieveRequestExpand +from merge.resources.filestorage import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.retrieve( - id="id", - expand=NotesRetrieveRequestExpand.ACCOUNT, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, +client.filestorage.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -19624,39 +19197,7 @@ client.crm.notes.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[NotesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request:** `DataPassthroughRequest`
@@ -19676,7 +19217,7 @@ client.crm.notes.retrieve(
-
client.crm.notes.meta_post_retrieve() +
client.filestorage.async_passthrough.retrieve(...)
@@ -19688,7 +19229,7 @@ client.crm.notes.retrieve(
-Returns metadata for `Note` POSTs. +Retrieves data from earlier async-passthrough POST request
@@ -19709,7 +19250,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.meta_post_retrieve() +client.filestorage.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", +) ``` @@ -19725,7 +19268,15 @@ client.crm.notes.meta_post_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**async_passthrough_receipt_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -19737,7 +19288,8 @@ client.crm.notes.meta_post_retrieve()
-
client.crm.notes.remote_field_classes_list(...) +## Filestorage AuditTrail +
client.filestorage.audit_trail.list(...)
@@ -19749,7 +19301,7 @@ client.crm.notes.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Gets a list of audit trail events.
@@ -19770,15 +19322,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.notes.remote_field_classes_list( +client.filestorage.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - is_common_model_field=True, - is_custom=True, + end_date="end_date", + event_type="event_type", page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -19803,23 +19353,7 @@ client.crm.notes.remote_field_classes_list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time
@@ -19827,7 +19361,7 @@ client.crm.notes.remote_field_classes_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
@@ -19835,7 +19369,7 @@ client.crm.notes.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -19843,7 +19377,7 @@ client.crm.notes.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time
@@ -19851,7 +19385,7 @@ client.crm.notes.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
@@ -19871,8 +19405,8 @@ client.crm.notes.remote_field_classes_list(
-## Crm Opportunities -
client.crm.opportunities.list(...) +## Filestorage AvailableActions +
client.filestorage.available_actions.retrieve()
@@ -19884,7 +19418,7 @@ client.crm.notes.remote_field_classes_list(
-Returns a list of `Opportunity` objects. +Returns a list of models and actions available for an account.
@@ -19899,47 +19433,13 @@ Returns a list of `Opportunity` objects.
```python -import datetime - from merge import Merge -from merge.resources.crm.resources.opportunities import ( - OpportunitiesListRequestExpand, - OpportunitiesListRequestStatus, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.list( - account_id="account_id", - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=OpportunitiesListRequestExpand.ACCOUNT, - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - owner_id="owner_id", - page_size=1, - remote_created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - remote_id="remote_id", - stage_id="stage_id", - status=OpportunitiesListRequestStatus.LOST, -) +client.filestorage.available_actions.retrieve() ```
@@ -19955,161 +19455,126 @@ client.crm.opportunities.list(
-**account_id:** `typing.Optional[str]` — If provided, will only return opportunities with this account. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. -
-
-
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. -
+
+## Filestorage Scopes +
client.filestorage.scopes.default_scopes_retrieve()
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
+#### 📝 Description
-**expand:** `typing.Optional[OpportunitiesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
-
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
+#### 🔌 Usage +
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
-
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
+```python +from merge import Merge -
-
+client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.scopes.default_scopes_retrieve() -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +```
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. -
+#### ⚙️ Parameters +
-**owner_id:** `typing.Optional[str]` — If provided, will only return opportunities with this owner. - -
-
-
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ + -
-
-**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return opportunities created in the third party platform after this datetime. -
+
+
client.filestorage.scopes.linked_account_scopes_retrieve()
-**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins. - -
-
+#### 📝 Description
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
-
-**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+#### 🔌 Usage +
-**stage_id:** `typing.Optional[str]` — If provided, will only return opportunities with this stage. - -
-
-
-**status:** `typing.Optional[OpportunitiesListRequestStatus]` +```python +from merge import Merge -If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.scopes.linked_account_scopes_retrieve() -* `OPEN` - OPEN -* `WON` - WON -* `LOST` - LOST - +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -20125,7 +19590,7 @@ If provided, will only return opportunities with this status. Options: ('OPEN',
-
client.crm.opportunities.create(...) +
client.filestorage.scopes.linked_account_scopes_create(...)
@@ -20137,7 +19602,7 @@ If provided, will only return opportunities with this status. Options: ('OPEN',
-Creates an `Opportunity` object with the given values. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -20153,16 +19618,42 @@ Creates an `Opportunity` object with the given values. ```python from merge import Merge -from merge.resources.crm import OpportunityRequest +from merge.resources.filestorage import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.create( - is_debug_mode=True, - run_async=True, - model=OpportunityRequest(), +client.filestorage.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], ) ``` @@ -20179,7 +19670,7 @@ client.crm.opportunities.create(
-**model:** `OpportunityRequest` +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for
@@ -20187,18 +19678,64 @@ client.crm.opportunities.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + +
+ +## Filestorage DeleteAccount +
client.filestorage.delete_account.delete()
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. - +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.delete_account.delete() + +```
+
+
+ +#### ⚙️ Parameters + +
+
@@ -20215,7 +19752,8 @@ client.crm.opportunities.create(
-
client.crm.opportunities.retrieve(...) +## Filestorage Drives +
client.filestorage.drives.list(...)
@@ -20227,7 +19765,7 @@ client.crm.opportunities.create(
-Returns an `Opportunity` object with the given `id`. +Returns a list of `Drive` objects.
@@ -20242,21 +19780,34 @@ Returns an `Opportunity` object with the given `id`.
```python +import datetime + from merge import Merge -from merge.resources.crm.resources.opportunities import ( - OpportunitiesRetrieveRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.retrieve( - id="id", - expand=OpportunitiesRetrieveRequestExpand.ACCOUNT, +client.filestorage.drives.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, include_remote_data=True, - include_remote_fields=True, include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + remote_id="remote_id", ) ``` @@ -20273,7 +19824,7 @@ client.crm.opportunities.retrieve(
-**id:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -20281,7 +19832,7 @@ client.crm.opportunities.retrieve(
-**expand:** `typing.Optional[OpportunitiesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -20289,7 +19840,7 @@ client.crm.opportunities.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -20297,7 +19848,15 @@ client.crm.opportunities.retrieve(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -20313,7 +19872,7 @@ client.crm.opportunities.retrieve(
-**remote_fields:** `typing.Optional[typing.Literal["status"]]` — Deprecated. Use show_enum_origins. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -20321,7 +19880,31 @@ client.crm.opportunities.retrieve(
-**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — If provided, will only return drives with this name. This performs an exact match. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -20341,7 +19924,7 @@ client.crm.opportunities.retrieve(
-
client.crm.opportunities.partial_update(...) +
client.filestorage.drives.retrieve(...)
@@ -20353,7 +19936,7 @@ client.crm.opportunities.retrieve(
-Updates an `Opportunity` object with the given `id`. +Returns a `Drive` object with the given `id`.
@@ -20369,17 +19952,15 @@ Updates an `Opportunity` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedOpportunityRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.partial_update( +client.filestorage.drives.retrieve( id="id", - is_debug_mode=True, - run_async=True, - model=PatchedOpportunityRequest(), + include_remote_data=True, + include_shell_data=True, ) ``` @@ -20404,15 +19985,7 @@ client.crm.opportunities.partial_update(
-**model:** `PatchedOpportunityRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -20420,7 +19993,7 @@ client.crm.opportunities.partial_update(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -20440,7 +20013,8 @@ client.crm.opportunities.partial_update(
-
client.crm.opportunities.meta_patch_retrieve(...) +## Filestorage FieldMapping +
client.filestorage.field_mapping.field_mappings_retrieve(...)
@@ -20452,7 +20026,7 @@ client.crm.opportunities.partial_update(
-Returns metadata for `Opportunity` PATCHs. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -20473,8 +20047,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.meta_patch_retrieve( - id="id", +client.filestorage.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -20491,7 +20065,7 @@ client.crm.opportunities.meta_patch_retrieve(
-**id:** `str` +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations.
@@ -20511,7 +20085,7 @@ client.crm.opportunities.meta_patch_retrieve(
-
client.crm.opportunities.meta_post_retrieve() +
client.filestorage.field_mapping.field_mappings_create(...)
@@ -20523,7 +20097,7 @@ client.crm.opportunities.meta_patch_retrieve(
-Returns metadata for `Opportunity` POSTs. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -20544,7 +20118,15 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.meta_post_retrieve() +client.filestorage.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", +) ``` @@ -20560,6 +20142,62 @@ client.crm.opportunities.meta_post_retrieve()
+**target_field_name:** `str` — The name of the target field you want this remote field to map to. + +
+
+ +
+
+ +**target_field_description:** `str` — The description of the target field you want this remote field to map to. + +
+
+ +
+
+ +**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + +
+
+ +
+
+ +**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. + +
+
+ +
+
+ +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. + +
+
+ +
+
+ +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. + +
+
+ +
+
+ +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -20572,7 +20210,7 @@ client.crm.opportunities.meta_post_retrieve()
-
client.crm.opportunities.remote_field_classes_list(...) +
client.filestorage.field_mapping.field_mappings_destroy(...)
@@ -20584,7 +20222,7 @@ client.crm.opportunities.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -20605,15 +20243,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.opportunities.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - is_common_model_field=True, - is_custom=True, - page_size=1, +client.filestorage.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", ) ``` @@ -20630,7 +20261,7 @@ client.crm.opportunities.remote_field_classes_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**field_mapping_id:** `str`
@@ -20638,31 +20269,70 @@ client.crm.opportunities.remote_field_classes_list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.filestorage.field_mapping.field_mappings_partial_update(...)
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +
+
+#### 🔌 Usage +
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", +) + +``` +
+
+#### ⚙️ Parameters +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
+
+ +**field_mapping_id:** `str`
@@ -20670,7 +20340,7 @@ client.crm.opportunities.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -20678,7 +20348,7 @@ client.crm.opportunities.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from.
@@ -20686,7 +20356,7 @@ client.crm.opportunities.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -20706,8 +20376,7 @@ client.crm.opportunities.remote_field_classes_list(
-## Crm Passthrough -
client.crm.passthrough.create(...) +
client.filestorage.field_mapping.remote_fields_retrieve(...)
@@ -20719,7 +20388,7 @@ client.crm.opportunities.remote_field_classes_list(
-Pull data from an endpoint not currently supported by Merge. +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -20735,17 +20404,14 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.filestorage.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", ) ``` @@ -20762,7 +20428,15 @@ client.crm.passthrough.create(
-**request:** `DataPassthroughRequest` +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. + +
+
+ +
+
+ +**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
@@ -20782,8 +20456,7 @@ client.crm.passthrough.create(
-## Crm RegenerateKey -
client.crm.regenerate_key.create(...) +
client.filestorage.field_mapping.target_fields_retrieve()
@@ -20795,7 +20468,7 @@ client.crm.passthrough.create(
-Exchange remote keys. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -20816,9 +20489,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.regenerate_key.create( - name="Remote Deployment Key 1", -) +client.filestorage.field_mapping.target_fields_retrieve() ``` @@ -20834,14 +20505,6 @@ client.crm.regenerate_key.create(
-**name:** `str` — The name of the remote key - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -20854,8 +20517,8 @@ client.crm.regenerate_key.create(
-## Crm Stages -
client.crm.stages.list(...) +## Filestorage Files +
client.filestorage.files.list(...)
@@ -20867,7 +20530,7 @@ client.crm.regenerate_key.create(
-Returns a list of `Stage` objects. +Returns a list of `File` objects.
@@ -20885,12 +20548,16 @@ Returns a list of `Stage` objects. import datetime from merge import Merge +from merge.resources.filestorage.resources.files import ( + FilesListRequestExpand, + FilesListRequestOrderBy, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.stages.list( +client.filestorage.files.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -20898,17 +20565,28 @@ client.crm.stages.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FilesListRequestExpand.DRIVE, + folder_id="folder_id", include_deleted_data=True, include_remote_data=True, - include_remote_fields=True, include_shell_data=True, + mime_type="mime_type", modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + name="name", + order_by=FilesListRequestOrderBy.CREATED_AT_DESCENDING, page_size=1, + remote_created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + remote_created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), remote_id="remote_id", ) @@ -20950,6 +20628,30 @@ client.crm.stages.list(
+**drive_id:** `typing.Optional[str]` — Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive. + +
+
+ +
+
+ +**expand:** `typing.Optional[FilesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**folder_id:** `typing.Optional[str]` — Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory. + +
+
+ +
+
+ **include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -20966,7 +20668,7 @@ client.crm.stages.list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -20974,7 +20676,7 @@ client.crm.stages.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**mime_type:** `typing.Optional[str]` — If provided, will only return files with these mime_types. Multiple values can be separated by commas.
@@ -20998,6 +20700,22 @@ client.crm.stages.list(
+**name:** `typing.Optional[str]` — If provided, will only return files with this name. This performs an exact match. + +
+
+ +
+
+ +**order_by:** `typing.Optional[FilesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. + +
+
+ +
+
+ **page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -21006,6 +20724,22 @@ client.crm.stages.list(
+**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform after this datetime. + +
+
+ +
+
+ +**remote_created_before:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform before this datetime. + +
+
+ +
+
+ **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -21026,7 +20760,7 @@ client.crm.stages.list(
-
client.crm.stages.retrieve(...) +
client.filestorage.files.create(...)
@@ -21038,7 +20772,7 @@ client.crm.stages.list(
-Returns a `Stage` object with the given `id`. +Creates a `File` object with the given values.
@@ -21054,16 +20788,16 @@ Returns a `Stage` object with the given `id`. ```python from merge import Merge +from merge.resources.filestorage import FileRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.stages.retrieve( - id="id", - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, +client.filestorage.files.create( + is_debug_mode=True, + run_async=True, + model=FileRequest(), ) ``` @@ -21080,15 +20814,7 @@ client.crm.stages.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**model:** `FileRequest`
@@ -21096,7 +20822,7 @@ client.crm.stages.retrieve(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -21104,7 +20830,7 @@ client.crm.stages.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -21124,7 +20850,7 @@ client.crm.stages.retrieve(
-
client.crm.stages.remote_field_classes_list(...) +
client.filestorage.files.retrieve(...)
@@ -21136,7 +20862,7 @@ client.crm.stages.retrieve(
-Returns a list of `RemoteFieldClass` objects. +Returns a `File` object with the given `id`.
@@ -21152,20 +20878,19 @@ Returns a list of `RemoteFieldClass` objects. ```python from merge import Merge +from merge.resources.filestorage.resources.files import ( + FilesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.stages.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, +client.filestorage.files.retrieve( + id="id", + expand=FilesRetrieveRequestExpand.DRIVE, include_remote_data=True, - include_remote_fields=True, include_shell_data=True, - is_common_model_field=True, - is_custom=True, - page_size=1, ) ``` @@ -21182,7 +20907,7 @@ client.crm.stages.remote_field_classes_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -21190,7 +20915,7 @@ client.crm.stages.remote_field_classes_list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**expand:** `typing.Optional[FilesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -21206,14 +20931,6 @@ client.crm.stages.remote_field_classes_list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- **include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -21222,30 +20939,6 @@ client.crm.stages.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value - -
-
- -
-
- -**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -21258,8 +20951,7 @@ client.crm.stages.remote_field_classes_list(
-## Crm SyncStatus -
client.crm.sync_status.list(...) +
client.filestorage.files.download_request_meta_retrieve(...)
@@ -21271,7 +20963,7 @@ client.crm.stages.remote_field_classes_list(
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party.
@@ -21292,9 +20984,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.sync_status.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - page_size=1, +client.filestorage.files.download_request_meta_retrieve( + id="id", + mime_type="mime_type", ) ``` @@ -21311,7 +21003,7 @@ client.crm.sync_status.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -21319,7 +21011,7 @@ client.crm.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**mime_type:** `typing.Optional[str]` — If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article.
@@ -21339,8 +21031,7 @@ client.crm.sync_status.list(
-## Crm ForceResync -
client.crm.force_resync.sync_status_resync_create() +
client.filestorage.files.download_request_meta_list(...)
@@ -21352,7 +21043,7 @@ client.crm.sync_status.list(
-Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party.
@@ -21368,12 +21059,25 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly, ```python from merge import Merge +from merge.resources.filestorage.resources.files import ( + FilesDownloadRequestMetaListRequestOrderBy, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.force_resync.sync_status_resync_create() +client.filestorage.files.download_request_meta_list( + created_after="created_after", + created_before="created_before", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + mime_types="mime_types", + modified_after="modified_after", + modified_before="modified_before", + order_by=FilesDownloadRequestMetaListRequestOrderBy.CREATED_AT_DESCENDING, + page_size=1, +) ``` @@ -21389,93 +21093,31 @@ client.crm.force_resync.sync_status_resync_create()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[str]` — If provided, will only return objects created after this datetime.
- -
- - - -
- -## Crm Tasks -
client.crm.tasks.list(...)
-#### 📝 Description - -
-
- -
-
- -Returns a list of `Task` objects. -
-
+**created_before:** `typing.Optional[str]` — If provided, will only return objects created before this datetime. +
-#### 🔌 Usage - -
-
-
-```python -import datetime - -from merge import Merge -from merge.resources.crm.resources.tasks import TasksListRequestExpand - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.tasks.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=TasksListRequestExpand.ACCOUNT, - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", -) - -``` -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-#### ⚙️ Parameters -
-
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — If provided, will only return objects with the given IDs. Comma-separated list of strings.
@@ -21483,7 +21125,7 @@ client.crm.tasks.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -21491,7 +21133,7 @@ client.crm.tasks.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**mime_types:** `typing.Optional[str]` — A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our export format help center article.
@@ -21499,7 +21141,7 @@ client.crm.tasks.list(
-**expand:** `typing.Optional[TasksListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**modified_after:** `typing.Optional[str]` — If provided, will only return objects modified after this datetime.
@@ -21507,7 +21149,7 @@ client.crm.tasks.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**modified_before:** `typing.Optional[str]` — If provided, will only return objects modified before this datetime.
@@ -21515,7 +21157,7 @@ client.crm.tasks.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**order_by:** `typing.Optional[FilesDownloadRequestMetaListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at.
@@ -21523,7 +21165,7 @@ client.crm.tasks.list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -21531,42 +21173,63 @@ client.crm.tasks.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. -
+
+
client.filestorage.files.meta_post_retrieve()
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
+#### 📝 Description
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - +
+
+ +Returns metadata for `FileStorageFile` POSTs. +
+
+#### 🔌 Usage +
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.filestorage.files.meta_post_retrieve() + +```
+
+
+ +#### ⚙️ Parameters + +
+
@@ -21583,7 +21246,8 @@ client.crm.tasks.list(
-
client.crm.tasks.create(...) +## Filestorage Folders +
client.filestorage.folders.list(...)
@@ -21595,7 +21259,7 @@ client.crm.tasks.list(
-Creates a `Task` object with the given values. +Returns a list of `Folder` objects.
@@ -21610,17 +21274,40 @@ Creates a `Task` object with the given values.
```python +import datetime + from merge import Merge -from merge.resources.crm import TaskRequest +from merge.resources.filestorage.resources.folders import ( + FoldersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.create( - is_debug_mode=True, - run_async=True, - model=TaskRequest(), +client.filestorage.folders.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + drive_id="drive_id", + expand=FoldersListRequestExpand.DRIVE, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + name="name", + page_size=1, + parent_folder_id="parent_folder_id", + remote_id="remote_id", ) ``` @@ -21637,7 +21324,7 @@ client.crm.tasks.create(
-**model:** `TaskRequest` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -21645,7 +21332,7 @@ client.crm.tasks.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -21653,7 +21340,7 @@ client.crm.tasks.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -21661,75 +21348,55 @@ client.crm.tasks.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**drive_id:** `typing.Optional[str]` — If provided, will only return folders in this drive.
-
-
+
+
+**expand:** `typing.Optional[FoldersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
-
-
client.crm.tasks.retrieve(...)
-#### 📝 Description - -
-
+**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + +
+
-Returns a `Task` object with the given `id`. -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge -from merge.resources.crm.resources.tasks import TasksRetrieveRequestExpand - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.tasks.retrieve( - id="id", - expand=TasksRetrieveRequestExpand.ACCOUNT, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, -) - -``` -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### ⚙️ Parameters -
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+
-**id:** `str` +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -21737,7 +21404,7 @@ client.crm.tasks.retrieve(
-**expand:** `typing.Optional[TasksRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**name:** `typing.Optional[str]` — If provided, will only return folders with this name. This performs an exact match.
@@ -21745,7 +21412,7 @@ client.crm.tasks.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -21753,7 +21420,7 @@ client.crm.tasks.retrieve(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**parent_folder_id:** `typing.Optional[str]` — If provided, will only return folders in this parent folder. If null, will return folders in root directory.
@@ -21761,7 +21428,7 @@ client.crm.tasks.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -21781,7 +21448,7 @@ client.crm.tasks.retrieve(
-
client.crm.tasks.partial_update(...) +
client.filestorage.folders.create(...)
@@ -21793,7 +21460,7 @@ client.crm.tasks.retrieve(
-Updates a `Task` object with the given `id`. +Creates a `Folder` object with the given values.
@@ -21809,17 +21476,16 @@ Updates a `Task` object with the given `id`. ```python from merge import Merge -from merge.resources.crm import PatchedTaskRequest +from merge.resources.filestorage import FolderRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.partial_update( - id="id", +client.filestorage.folders.create( is_debug_mode=True, run_async=True, - model=PatchedTaskRequest(), + model=FolderRequest(), ) ``` @@ -21836,15 +21502,7 @@ client.crm.tasks.partial_update(
-**id:** `str` - -
-
- -
-
- -**model:** `PatchedTaskRequest` +**model:** `FolderRequest`
@@ -21880,7 +21538,7 @@ client.crm.tasks.partial_update(
-
client.crm.tasks.meta_patch_retrieve(...) +
client.filestorage.folders.retrieve(...)
@@ -21892,7 +21550,7 @@ client.crm.tasks.partial_update(
-Returns metadata for `Task` PATCHs. +Returns a `Folder` object with the given `id`.
@@ -21908,13 +21566,19 @@ Returns metadata for `Task` PATCHs. ```python from merge import Merge +from merge.resources.filestorage.resources.folders import ( + FoldersRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.meta_patch_retrieve( +client.filestorage.folders.retrieve( id="id", + expand=FoldersRetrieveRequestExpand.DRIVE, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -21939,6 +21603,30 @@ client.crm.tasks.meta_patch_retrieve(
+**expand:** `typing.Optional[FoldersRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -21951,7 +21639,7 @@ client.crm.tasks.meta_patch_retrieve(
-
client.crm.tasks.meta_post_retrieve() +
client.filestorage.folders.meta_post_retrieve()
@@ -21963,7 +21651,7 @@ client.crm.tasks.meta_patch_retrieve(
-Returns metadata for `Task` POSTs. +Returns metadata for `FileStorageFolder` POSTs.
@@ -21984,7 +21672,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.meta_post_retrieve() +client.filestorage.folders.meta_post_retrieve() ``` @@ -22012,7 +21700,8 @@ client.crm.tasks.meta_post_retrieve()
-
client.crm.tasks.remote_field_classes_list(...) +## Filestorage GenerateKey +
client.filestorage.generate_key.create(...)
@@ -22024,7 +21713,7 @@ client.crm.tasks.meta_post_retrieve()
-Returns a list of `RemoteFieldClass` objects. +Create a remote key.
@@ -22045,15 +21734,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.tasks.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - is_common_model_field=True, - is_custom=True, - page_size=1, +client.filestorage.generate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -22070,63 +21752,7 @@ client.crm.tasks.remote_field_classes_list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value - -
-
- -
-
- -**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. +**name:** `str` — The name of the remote key
@@ -22146,8 +21772,8 @@ client.crm.tasks.remote_field_classes_list(
-## Crm Users -
client.crm.users.list(...) +## Filestorage Groups +
client.filestorage.groups.list(...)
@@ -22159,7 +21785,7 @@ client.crm.tasks.remote_field_classes_list(
-Returns a list of `User` objects. +Returns a list of `Group` objects.
@@ -22182,7 +21808,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.users.list( +client.filestorage.groups.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -22190,10 +21816,8 @@ client.crm.users.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - email="email", include_deleted_data=True, include_remote_data=True, - include_remote_fields=True, include_shell_data=True, modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", @@ -22243,7 +21867,7 @@ client.crm.users.list(
-**email:** `typing.Optional[str]` — If provided, will only return users with this email. +**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -22267,14 +21891,6 @@ client.crm.users.list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - -
-
- -
-
- **include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -22327,7 +21943,7 @@ client.crm.users.list(
-
client.crm.users.retrieve(...) +
client.filestorage.groups.retrieve(...)
@@ -22339,7 +21955,7 @@ client.crm.users.list(
-Returns a `User` object with the given `id`. +Returns a `Group` object with the given `id`.
@@ -22360,10 +21976,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.users.retrieve( +client.filestorage.groups.retrieve( id="id", include_remote_data=True, - include_remote_fields=True, include_shell_data=True, ) @@ -22389,7 +22004,7 @@ client.crm.users.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -22397,7 +22012,7 @@ client.crm.users.retrieve(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -22425,7 +22040,8 @@ client.crm.users.retrieve(
-
client.crm.users.ignore_create(...) +## Filestorage Issues +
client.filestorage.issues.list(...)
@@ -22437,7 +22053,7 @@ client.crm.users.retrieve(
-Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +Gets all issues for Organization.
@@ -22452,18 +22068,38 @@ Ignores a specific row based on the `model_id` in the url. These records will ha
```python +import datetime + from merge import Merge -from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum +from merge.resources.filestorage.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.users.ignore_create( - model_id="model_id", - request=IgnoreCommonModelRequest( - reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, +client.filestorage.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -22480,7 +22116,7 @@ client.crm.users.ignore_create(
-**model_id:** `str` +**account_token:** `typing.Optional[str]`
@@ -22488,7 +22124,7 @@ client.crm.users.ignore_create(
-**request:** `IgnoreCommonModelRequest` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -22496,77 +22132,39 @@ client.crm.users.ignore_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time
-
-
- - - - -
-
client.crm.users.remote_field_classes_list(...)
-#### 📝 Description - -
-
+**end_user_organization_name:** `typing.Optional[str]` + +
+
-Returns a list of `RemoteFieldClass` objects. -
-
+**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.crm.users.remote_field_classes_list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_remote_fields=True, - include_shell_data=True, - is_common_model_field=True, - is_custom=True, - page_size=1, -) - -``` -
-
+**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +
-#### ⚙️ Parameters - -
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_muted:** `typing.Optional[str]` — If true, will include muted issues
@@ -22574,7 +22172,7 @@ client.crm.users.remote_field_classes_list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**integration_name:** `typing.Optional[str]`
@@ -22582,7 +22180,7 @@ client.crm.users.remote_field_classes_list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime.
@@ -22590,7 +22188,7 @@ client.crm.users.remote_field_classes_list(
-**include_remote_fields:** `typing.Optional[bool]` — Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime.
@@ -22598,7 +22196,7 @@ client.crm.users.remote_field_classes_list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in.
@@ -22606,7 +22204,7 @@ client.crm.users.remote_field_classes_list(
-**is_common_model_field:** `typing.Optional[bool]` — If provided, will only return remote field classes with this is_common_model_field value +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -22614,7 +22212,7 @@ client.crm.users.remote_field_classes_list(
-**is_custom:** `typing.Optional[bool]` — If provided, will only return remote fields classes with this is_custom value +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time
@@ -22622,7 +22220,12 @@ client.crm.users.remote_field_classes_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -22642,8 +22245,7 @@ client.crm.users.remote_field_classes_list(
-## Crm WebhookReceivers -
client.crm.webhook_receivers.list() +
client.filestorage.issues.retrieve(...)
@@ -22655,7 +22257,7 @@ client.crm.users.remote_field_classes_list(
-Returns a list of `WebhookReceiver` objects. +Get a specific issue.
@@ -22676,7 +22278,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.webhook_receivers.list() +client.filestorage.issues.retrieve( + id="id", +) ``` @@ -22692,6 +22296,14 @@ client.crm.webhook_receivers.list()
+**id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -22704,7 +22316,8 @@ client.crm.webhook_receivers.list()
-
client.crm.webhook_receivers.create(...) +## Filestorage LinkToken +
client.filestorage.link_token.create(...)
@@ -22716,7 +22329,7 @@ client.crm.webhook_receivers.list()
-Creates a `WebhookReceiver` object with the given values. +Creates a link token to be used when linking a new end user.
@@ -22732,14 +22345,17 @@ Creates a `WebhookReceiver` object with the given values. ```python from merge import Merge +from merge.resources.filestorage import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.crm.webhook_receivers.create( - event="event", - is_active=True, +client.filestorage.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -22756,7 +22372,7 @@ client.crm.webhook_receivers.create(
-**event:** `str` +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -22764,7 +22380,7 @@ client.crm.webhook_receivers.create(
-**is_active:** `bool` +**end_user_organization_name:** `str` — Your end user's organization.
@@ -22772,7 +22388,99 @@ client.crm.webhook_receivers.create(
-**key:** `typing.Optional[str]` +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. + +
+
+ +
+
+ +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. + +
+
+ +
+
+ +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. + +
+
+ +
+
+ +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. + +
+
+ +
+
+ +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + +
+
+ +
+
+ +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + +
+
+ +
+
+ +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. + +
+
+ +
+
+ +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + +
+
+ +
+
+ +**language:** `typing.Optional[LanguageEnum]` + +The following subset of IETF language tags can be used to configure localization. + +* `en` - en +* `de` - de + +
+
+ +
+
+ +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. + +
+
+ +
+
+ +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -22792,8 +22500,8 @@ client.crm.webhook_receivers.create(
-## Filestorage AccountDetails -
client.filestorage.account_details.retrieve() +## Filestorage LinkedAccounts +
client.filestorage.linked_accounts.list(...)
@@ -22805,7 +22513,7 @@ client.crm.webhook_receivers.create(
-Get details for a linked account. +List linked accounts for your organization.
@@ -22821,12 +22529,29 @@ Get details for a linked account. ```python from merge import Merge +from merge.resources.filestorage.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.account_details.retrieve() +client.filestorage.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", +) ``` @@ -22842,71 +22567,113 @@ client.filestorage.account_details.retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**category:** `typing.Optional[LinkedAccountsListRequestCategory]` + +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. +
+
+
+**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +
-
-## Filestorage AccountToken -
client.filestorage.account_token.retrieve(...)
-#### 📝 Description +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. + +
+
+**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. + +
+
+
-Returns the account token for the end user with the provided public token. +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. +
+ +
+
+ +**id:** `typing.Optional[str]` +
-#### 🔌 Usage -
+**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + +
+
+
-```python -from merge import Merge +**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. + +
+
-client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.account_token.retrieve( - public_token="public_token", -) +
+
-``` +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. +
+ +
+
+ +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. +
-#### ⚙️ Parameters -
+**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+
-**public_token:** `str` +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
@@ -22926,8 +22693,8 @@ client.filestorage.account_token.retrieve(
-## Filestorage AsyncPassthrough -
client.filestorage.async_passthrough.create(...) +## Filestorage Passthrough +
client.filestorage.passthrough.create(...)
@@ -22939,7 +22706,7 @@ client.filestorage.account_token.retrieve(
-Asynchronously pull data from an endpoint not currently supported by Merge. +Pull data from an endpoint not currently supported by Merge.
@@ -22961,7 +22728,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.async_passthrough.create( +client.filestorage.passthrough.create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", @@ -23002,7 +22769,8 @@ client.filestorage.async_passthrough.create(
-
client.filestorage.async_passthrough.retrieve(...) +## Filestorage RegenerateKey +
client.filestorage.regenerate_key.create(...)
@@ -23014,7 +22782,7 @@ client.filestorage.async_passthrough.create(
-Retrieves data from earlier async-passthrough POST request +Exchange remote keys.
@@ -23035,8 +22803,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", +client.filestorage.regenerate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -23053,7 +22821,7 @@ client.filestorage.async_passthrough.retrieve(
-**async_passthrough_receipt_id:** `str` +**name:** `str` — The name of the remote key
@@ -23073,8 +22841,8 @@ client.filestorage.async_passthrough.retrieve(
-## Filestorage AuditTrail -
client.filestorage.audit_trail.list(...) +## Filestorage SyncStatus +
client.filestorage.sync_status.list(...)
@@ -23086,7 +22854,7 @@ client.filestorage.async_passthrough.retrieve(
-Gets a list of audit trail events. +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -23107,13 +22875,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.audit_trail.list( +client.filestorage.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - event_type="event_type", page_size=1, - start_date="start_date", - user_email="user_email", ) ``` @@ -23138,22 +22902,6 @@ client.filestorage.audit_trail.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`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - -
-
- -
-
- **page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -23162,22 +22910,6 @@ client.filestorage.audit_trail.list(
-**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time - -
-
- -
-
- -**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -23190,8 +22922,8 @@ client.filestorage.audit_trail.list(
-## Filestorage AvailableActions -
client.filestorage.available_actions.retrieve() +## Filestorage ForceResync +
client.filestorage.force_resync.sync_status_resync_create()
@@ -23203,7 +22935,7 @@ client.filestorage.audit_trail.list(
-Returns a list of models and actions available for an account. +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -23224,7 +22956,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.available_actions.retrieve() +client.filestorage.force_resync.sync_status_resync_create() ``` @@ -23252,8 +22984,8 @@ client.filestorage.available_actions.retrieve()
-## Filestorage Scopes -
client.filestorage.scopes.default_scopes_retrieve() +## Filestorage Users +
client.filestorage.users.list(...)
@@ -23265,7 +22997,7 @@ client.filestorage.available_actions.retrieve()
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns a list of `User` objects.
@@ -23280,13 +23012,35 @@ Get the default permissions for Merge Common Models and fields across all Linked
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.scopes.default_scopes_retrieve() +client.filestorage.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + is_me="is_me", + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) ```
@@ -23302,64 +23056,91 @@ client.filestorage.scopes.default_scopes_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
- -
+
+
+**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +
-
-
client.filestorage.scopes.linked_account_scopes_retrieve()
-#### 📝 Description +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + +
+
+
-Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### 🔌 Usage -
+**is_me:** `typing.Optional[str]` — If provided, will only return the user object for requestor. + +
+
+
-```python -from merge import Merge +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
-client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.scopes.linked_account_scopes_retrieve() +
+
-``` +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. +
-#### ⚙️ Parameters -
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+
@@ -23375,7 +23156,7 @@ client.filestorage.scopes.linked_account_scopes_retrieve()
-
client.filestorage.scopes.linked_account_scopes_create(...) +
client.filestorage.users.retrieve(...)
@@ -23387,7 +23168,7 @@ client.filestorage.scopes.linked_account_scopes_retrieve()
-Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) +Returns a `User` object with the given `id`.
@@ -23403,42 +23184,15 @@ Update permissions for any Common Model or field for a single Linked Account. An ```python from merge import Merge -from merge.resources.filestorage import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], +client.filestorage.users.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -23455,7 +23209,23 @@ client.filestorage.scopes.linked_account_scopes_create(
-**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -23475,8 +23245,8 @@ client.filestorage.scopes.linked_account_scopes_create(
-## Filestorage DeleteAccount -
client.filestorage.delete_account.delete() +## Filestorage WebhookReceivers +
client.filestorage.webhook_receivers.list()
@@ -23488,7 +23258,7 @@ client.filestorage.scopes.linked_account_scopes_create(
-Delete a linked account. +Returns a list of `WebhookReceiver` objects.
@@ -23509,7 +23279,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.delete_account.delete() +client.filestorage.webhook_receivers.list() ``` @@ -23537,8 +23307,7 @@ client.filestorage.delete_account.delete()
-## Filestorage Drives -
client.filestorage.drives.list(...) +
client.filestorage.webhook_receivers.create(...)
@@ -23550,7 +23319,7 @@ client.filestorage.delete_account.delete()
-Returns a list of `Drive` objects. +Creates a `WebhookReceiver` object with the given values.
@@ -23565,34 +23334,15 @@ Returns a list of `Drive` objects.
```python -import datetime - from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.drives.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - name="name", - page_size=1, - remote_id="remote_id", +client.filestorage.webhook_receivers.create( + event="event", + is_active=True, ) ``` @@ -23609,7 +23359,7 @@ client.filestorage.drives.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**event:** `str`
@@ -23617,7 +23367,7 @@ client.filestorage.drives.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**is_active:** `bool`
@@ -23625,7 +23375,7 @@ client.filestorage.drives.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**key:** `typing.Optional[str]`
@@ -23633,63 +23383,133 @@ client.filestorage.drives.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + + + +
+## Chat AccountDetails +
client.chat.account_details.retrieve()
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. +
+
+#### 🔌 Usage +
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.account_details.retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+ +## Chat AccountToken +
client.chat.account_token.retrieve(...) +
+
+ +#### 📝 Description + +
+
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +Returns the account token for the end user with the provided public token.
+
+
+ +#### 🔌 Usage
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
-
-**name:** `typing.Optional[str]` — If provided, will only return drives with this name. This performs an exact match. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.account_token.retrieve( + public_token="public_token", +) + +``` +
+
+#### ⚙️ Parameters +
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
-
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**public_token:** `str`
@@ -23709,7 +23529,8 @@ client.filestorage.drives.list(
-
client.filestorage.drives.retrieve(...) +## Chat AsyncPassthrough +
client.chat.async_passthrough.create(...)
@@ -23721,7 +23542,7 @@ client.filestorage.drives.list(
-Returns a `Drive` object with the given `id`. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -23737,15 +23558,17 @@ Returns a `Drive` object with the given `id`. ```python from merge import Merge +from merge.resources.chat import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.drives.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, +client.chat.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -23762,23 +23585,7 @@ client.filestorage.drives.retrieve(
-**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**request:** `DataPassthroughRequest`
@@ -23798,8 +23605,7 @@ client.filestorage.drives.retrieve(
-## Filestorage FieldMapping -
client.filestorage.field_mapping.field_mappings_retrieve(...) +
client.chat.async_passthrough.retrieve(...)
@@ -23811,7 +23617,7 @@ client.filestorage.drives.retrieve(
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Retrieves data from earlier async-passthrough POST request
@@ -23832,8 +23638,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_retrieve( - exclude_remote_field_metadata=True, +client.chat.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", ) ``` @@ -23850,7 +23656,7 @@ client.filestorage.field_mapping.field_mappings_retrieve(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**async_passthrough_receipt_id:** `str`
@@ -23870,7 +23676,8 @@ client.filestorage.field_mapping.field_mappings_retrieve(
-
client.filestorage.field_mapping.field_mappings_create(...) +## Chat AuditTrail +
client.chat.audit_trail.list(...)
@@ -23882,7 +23689,7 @@ client.filestorage.field_mapping.field_mappings_retrieve(
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Gets a list of audit trail events.
@@ -23903,14 +23710,13 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_create( - exclude_remote_field_metadata=True, - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", +client.chat.audit_trail.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", ) ``` @@ -23927,15 +23733,7 @@ client.filestorage.field_mapping.field_mappings_create(
-**target_field_name:** `str` — The name of the target field you want this remote field to map to. - -
-
- -
-
- -**target_field_description:** `str` — The description of the target field you want this remote field to map to. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -23943,7 +23741,7 @@ client.filestorage.field_mapping.field_mappings_create(
-**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time
@@ -23951,7 +23749,7 @@ client.filestorage.field_mapping.field_mappings_create(
-**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. +**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
@@ -23959,7 +23757,7 @@ client.filestorage.field_mapping.field_mappings_create(
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -23967,7 +23765,7 @@ client.filestorage.field_mapping.field_mappings_create(
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time
@@ -23975,7 +23773,7 @@ client.filestorage.field_mapping.field_mappings_create(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
@@ -23995,7 +23793,8 @@ client.filestorage.field_mapping.field_mappings_create(
-
client.filestorage.field_mapping.field_mappings_destroy(...) +## Chat AvailableActions +
client.chat.available_actions.retrieve()
@@ -24007,7 +23806,7 @@ client.filestorage.field_mapping.field_mappings_create(
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of models and actions available for an account.
@@ -24028,9 +23827,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", -) +client.chat.available_actions.retrieve() ``` @@ -24046,14 +23843,6 @@ client.filestorage.field_mapping.field_mappings_destroy(
-**field_mapping_id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -24066,7 +23855,8 @@ client.filestorage.field_mapping.field_mappings_destroy(
-
client.filestorage.field_mapping.field_mappings_partial_update(...) +## Chat Conversations +
client.chat.conversations.list(...)
@@ -24078,7 +23868,7 @@ client.filestorage.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of `Conversation` objects.
@@ -24093,14 +23883,33 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", +client.chat.conversations.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -24117,7 +23926,7 @@ client.filestorage.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -24125,7 +23934,7 @@ client.filestorage.field_mapping.field_mappings_partial_update(
-**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -24133,7 +23942,7 @@ client.filestorage.field_mapping.field_mappings_partial_update(
-**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -24141,7 +23950,63 @@ client.filestorage.field_mapping.field_mappings_partial_update(
-**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. +**expand:** `typing.Optional[typing.Literal["members"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -24161,7 +24026,7 @@ client.filestorage.field_mapping.field_mappings_partial_update(
-
client.filestorage.field_mapping.remote_fields_retrieve(...) +
client.chat.conversations.members_list(...)
@@ -24173,7 +24038,7 @@ client.filestorage.field_mapping.field_mappings_partial_update(
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns a list of `Member` objects.
@@ -24189,14 +24054,22 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields ```python from merge import Merge +from merge.resources.chat.resources.conversations import ( + ConversationsMembersListRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.field_mapping.remote_fields_retrieve( - common_models="common_models", - include_example_values="include_example_values", +client.chat.conversations.members_list( + conversation_id="conversation_id", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ConversationsMembersListRequestExpand.GROUP, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + page_size=1, ) ``` @@ -24213,7 +24086,7 @@ client.filestorage.field_mapping.remote_fields_retrieve(
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. +**conversation_id:** `str`
@@ -24221,7 +24094,7 @@ client.filestorage.field_mapping.remote_fields_retrieve(
-**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -24229,64 +24102,43 @@ client.filestorage.field_mapping.remote_fields_retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**expand:** `typing.Optional[ConversationsMembersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
- -
+
+
+**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +
-
-
client.filestorage.field_mapping.target_fields_retrieve()
-#### 📝 Description - -
-
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.field_mapping.target_fields_retrieve() - -``` -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +
-#### ⚙️ Parameters - -
-
-
@@ -24302,8 +24154,7 @@ client.filestorage.field_mapping.target_fields_retrieve()
-## Filestorage Files -
client.filestorage.files.list(...) +
client.chat.conversations.retrieve(...)
@@ -24315,7 +24166,7 @@ client.filestorage.field_mapping.target_fields_retrieve()
-Returns a list of `File` objects. +Returns a `Conversation` object with the given `id`.
@@ -24330,49 +24181,16 @@ Returns a list of `File` objects.
```python -import datetime - from merge import Merge -from merge.resources.filestorage.resources.files import ( - FilesListRequestExpand, - FilesListRequestOrderBy, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - drive_id="drive_id", - expand=FilesListRequestExpand.DRIVE, - folder_id="folder_id", - include_deleted_data=True, +client.chat.conversations.retrieve( + id="id", include_remote_data=True, include_shell_data=True, - mime_type="mime_type", - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - name="name", - order_by=FilesListRequestOrderBy.CREATED_AT_DESCENDING, - page_size=1, - remote_created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - remote_created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - remote_id="remote_id", ) ``` @@ -24389,7 +24207,7 @@ client.filestorage.files.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**id:** `str`
@@ -24397,7 +24215,7 @@ client.filestorage.files.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**expand:** `typing.Optional[typing.Literal["members"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -24405,7 +24223,7 @@ client.filestorage.files.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -24413,7 +24231,7 @@ client.filestorage.files.list(
-**drive_id:** `typing.Optional[str]` — Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -24421,115 +24239,126 @@ client.filestorage.files.list(
-**expand:** `typing.Optional[FilesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**folder_id:** `typing.Optional[str]` — Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory. -
+
+## Chat Scopes +
client.chat.scopes.default_scopes_retrieve()
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
+#### 📝 Description
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
-
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+#### 🔌 Usage +
-**mime_type:** `typing.Optional[str]` — If provided, will only return files with these mime_types. Multiple values can be separated by commas. - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.scopes.default_scopes_retrieve() + +``` +
+
+#### ⚙️ Parameters +
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
-
-**name:** `typing.Optional[str]` — If provided, will only return files with this name. This performs an exact match. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ + -
-
-**order_by:** `typing.Optional[FilesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. -
+
+
client.chat.scopes.linked_account_scopes_retrieve()
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - -
-
+#### 📝 Description
-**remote_created_after:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform after this datetime. - -
-
-
-**remote_created_before:** `typing.Optional[dt.datetime]` — If provided, will only return files created in the third party platform before this datetime. - +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +
+
+#### 🔌 Usage +
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.scopes.linked_account_scopes_retrieve() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -24545,7 +24374,7 @@ client.filestorage.files.list(
-
client.filestorage.files.create(...) +
client.chat.scopes.linked_account_scopes_create(...)
@@ -24557,7 +24386,7 @@ client.filestorage.files.list(
-Creates a `File` object with the given values. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -24573,16 +24402,42 @@ Creates a `File` object with the given values. ```python from merge import Merge -from merge.resources.filestorage import FileRequest +from merge.resources.chat import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.create( - is_debug_mode=True, - run_async=True, - model=FileRequest(), +client.chat.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], ) ``` @@ -24596,26 +24451,10 @@ client.filestorage.files.create(
-
-
- -**model:** `FileRequest` - -
-
- -
-
- -**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. +
+
+ +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for
@@ -24635,7 +24474,8 @@ client.filestorage.files.create(
-
client.filestorage.files.retrieve(...) +## Chat DeleteAccount +
client.chat.delete_account.delete()
@@ -24647,7 +24487,7 @@ client.filestorage.files.create(
-Returns a `File` object with the given `id`. +Delete a linked account.
@@ -24663,20 +24503,12 @@ Returns a `File` object with the given `id`. ```python from merge import Merge -from merge.resources.filestorage.resources.files import ( - FilesRetrieveRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.retrieve( - id="id", - expand=FilesRetrieveRequestExpand.DRIVE, - include_remote_data=True, - include_shell_data=True, -) +client.chat.delete_account.delete() ``` @@ -24692,38 +24524,6 @@ client.filestorage.files.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[FilesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -24736,7 +24536,8 @@ client.filestorage.files.retrieve(
-
client.filestorage.files.download_request_meta_retrieve(...) +## Chat FieldMapping +
client.chat.field_mapping.field_mappings_retrieve(...)
@@ -24748,7 +24549,7 @@ client.filestorage.files.retrieve(
-Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -24769,9 +24570,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.download_request_meta_retrieve( - id="id", - mime_type="mime_type", +client.chat.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -24788,15 +24588,7 @@ client.filestorage.files.download_request_meta_retrieve(
-**id:** `str` - -
-
- -
-
- -**mime_type:** `typing.Optional[str]` — If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations.
@@ -24816,7 +24608,7 @@ client.filestorage.files.download_request_meta_retrieve(
-
client.filestorage.files.download_request_meta_list(...) +
client.chat.field_mapping.field_mappings_create(...)
@@ -24828,7 +24620,7 @@ client.filestorage.files.download_request_meta_retrieve(
-Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -24844,24 +24636,19 @@ Returns metadata to construct authenticated file download requests, allowing you ```python from merge import Merge -from merge.resources.filestorage.resources.files import ( - FilesDownloadRequestMetaListRequestOrderBy, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.download_request_meta_list( - created_after="created_after", - created_before="created_before", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - mime_types="mime_types", - modified_after="modified_after", - modified_before="modified_before", - order_by=FilesDownloadRequestMetaListRequestOrderBy.CREATED_AT_DESCENDING, - page_size=1, +client.chat.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", ) ``` @@ -24878,23 +24665,7 @@ client.filestorage.files.download_request_meta_list(
-**created_after:** `typing.Optional[str]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[str]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -24902,7 +24673,7 @@ client.filestorage.files.download_request_meta_list(
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — If provided, will only return objects with the given IDs. Comma-separated list of strings. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
@@ -24910,7 +24681,7 @@ client.filestorage.files.download_request_meta_list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -24918,7 +24689,7 @@ client.filestorage.files.download_request_meta_list(
-**mime_types:** `typing.Optional[str]` — A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our export format help center article. +**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from.
@@ -24926,7 +24697,7 @@ client.filestorage.files.download_request_meta_list(
-**modified_after:** `typing.Optional[str]` — If provided, will only return objects modified after this datetime. +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from.
@@ -24934,7 +24705,7 @@ client.filestorage.files.download_request_meta_list(
-**modified_before:** `typing.Optional[str]` — If provided, will only return objects modified before this datetime. +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category.
@@ -24942,7 +24713,7 @@ client.filestorage.files.download_request_meta_list(
-**order_by:** `typing.Optional[FilesDownloadRequestMetaListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations.
@@ -24950,7 +24721,7 @@ client.filestorage.files.download_request_meta_list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -24970,7 +24741,7 @@ client.filestorage.files.download_request_meta_list(
-
client.filestorage.files.meta_post_retrieve() +
client.chat.field_mapping.field_mappings_destroy(...)
@@ -24982,7 +24753,7 @@ client.filestorage.files.download_request_meta_list(
-Returns metadata for `FileStorageFile` POSTs. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -25003,7 +24774,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.files.meta_post_retrieve() +client.chat.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", +) ``` @@ -25019,6 +24792,14 @@ client.filestorage.files.meta_post_retrieve()
+**field_mapping_id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -25031,8 +24812,7 @@ client.filestorage.files.meta_post_retrieve()
-## Filestorage Folders -
client.filestorage.folders.list(...) +
client.chat.field_mapping.field_mappings_partial_update(...)
@@ -25044,7 +24824,7 @@ client.filestorage.files.meta_post_retrieve()
-Returns a list of `Folder` objects. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -25059,40 +24839,14 @@ Returns a list of `Folder` objects.
```python -import datetime - from merge import Merge -from merge.resources.filestorage.resources.folders import ( - FoldersListRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.folders.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - drive_id="drive_id", - expand=FoldersListRequestExpand.DRIVE, - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - name="name", - page_size=1, - parent_folder_id="parent_folder_id", - remote_id="remote_id", +client.chat.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", ) ``` @@ -25109,7 +24863,7 @@ client.filestorage.folders.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**field_mapping_id:** `str`
@@ -25117,7 +24871,7 @@ client.filestorage.folders.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -25125,7 +24879,7 @@ client.filestorage.folders.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from.
@@ -25133,7 +24887,7 @@ client.filestorage.folders.list(
-**drive_id:** `typing.Optional[str]` — If provided, will only return folders in this drive. +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -25141,7 +24895,7 @@ client.filestorage.folders.list(
-**expand:** `typing.Optional[FoldersListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -25149,63 +24903,71 @@ client.filestorage.folders.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
+
+
client.chat.field_mapping.remote_fields_retrieve(...)
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
+#### 📝 Description
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
-
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +
+
+#### 🔌 Usage +
-**name:** `typing.Optional[str]` — If provided, will only return folders with this name. This performs an exact match. - -
-
-
-**page_size:** `typing.Optional[int]` — Number of results to return per page. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", +) + +``` +
+
+#### ⚙️ Parameters +
-**parent_folder_id:** `typing.Optional[str]` — If provided, will only return folders in this parent folder. If null, will return folders in root directory. +
+
+ +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
@@ -25213,7 +24975,7 @@ client.filestorage.folders.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
@@ -25233,7 +24995,7 @@ client.filestorage.folders.list(
-
client.filestorage.folders.create(...) +
client.chat.field_mapping.target_fields_retrieve()
@@ -25245,7 +25007,7 @@ client.filestorage.folders.list(
-Creates a `Folder` object with the given values. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -25261,17 +25023,12 @@ Creates a `Folder` object with the given values. ```python from merge import Merge -from merge.resources.filestorage import FolderRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.folders.create( - is_debug_mode=True, - run_async=True, - model=FolderRequest(), -) +client.chat.field_mapping.target_fields_retrieve() ``` @@ -25287,23 +25044,71 @@ client.filestorage.folders.create(
-**model:** `FolderRequest` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+## Chat GenerateKey +
client.chat.generate_key.create(...)
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. +
+
+#### 🔌 Usage +
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.generate_key.create( + name="Remote Deployment Key 1", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name of the remote key
@@ -25323,7 +25128,8 @@ client.filestorage.folders.create(
-
client.filestorage.folders.retrieve(...) +## Chat Groups +
client.chat.groups.list(...)
@@ -25335,7 +25141,7 @@ client.filestorage.folders.create(
-Returns a `Folder` object with the given `id`. +Returns a list of `Group` objects.
@@ -25350,20 +25156,33 @@ Returns a `Folder` object with the given `id`.
```python +import datetime + from merge import Merge -from merge.resources.filestorage.resources.folders import ( - FoldersRetrieveRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.folders.retrieve( - id="id", - expand=FoldersRetrieveRequestExpand.DRIVE, +client.chat.groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, include_remote_data=True, include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -25380,7 +25199,7 @@ client.filestorage.folders.retrieve(
-**id:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -25388,7 +25207,7 @@ client.filestorage.folders.retrieve(
-**expand:** `typing.Optional[FoldersRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -25396,7 +25215,7 @@ client.filestorage.folders.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -25404,7 +25223,7 @@ client.filestorage.folders.retrieve(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**expand:** `typing.Optional[typing.Literal["users"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -25412,64 +25231,59 @@ client.filestorage.folders.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
-
-
+
+
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-
-
client.filestorage.folders.meta_post_retrieve()
-#### 📝 Description - -
-
+**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
-Returns metadata for `FileStorageFolder` POSTs. -
-
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
-#### 🔌 Usage -
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.filestorage.folders.meta_post_retrieve() - -``` -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + -#### ⚙️ Parameters -
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+
@@ -25485,8 +25299,7 @@ client.filestorage.folders.meta_post_retrieve()
-## Filestorage GenerateKey -
client.filestorage.generate_key.create(...) +
client.chat.groups.retrieve(...)
@@ -25498,7 +25311,7 @@ client.filestorage.folders.meta_post_retrieve()
-Create a remote key. +Returns a `Group` object with the given `id`.
@@ -25519,8 +25332,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.generate_key.create( - name="Remote Deployment Key 1", +client.chat.groups.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -25537,7 +25352,31 @@ client.filestorage.generate_key.create(
-**name:** `str` — The name of the remote key +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["users"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -25557,8 +25396,8 @@ client.filestorage.generate_key.create(
-## Filestorage Groups -
client.filestorage.groups.list(...) +## Chat Issues +
client.chat.issues.list(...)
@@ -25570,7 +25409,7 @@ client.filestorage.generate_key.create(
-Returns a list of `Group` objects. +Gets all issues for Organization.
@@ -25588,30 +25427,35 @@ Returns a list of `Group` objects. import datetime from merge import Merge +from merge.resources.chat.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.groups.list( - created_after=datetime.datetime.fromisoformat( +client.chat.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - created_before=datetime.datetime.fromisoformat( + first_incident_time_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - modified_before=datetime.datetime.fromisoformat( + last_incident_time_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + linked_account_id="linked_account_id", page_size=1, - remote_id="remote_id", + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -25628,7 +25472,7 @@ client.filestorage.groups.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**account_token:** `typing.Optional[str]`
@@ -25636,7 +25480,7 @@ client.filestorage.groups.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -25644,7 +25488,7 @@ client.filestorage.groups.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time
@@ -25652,7 +25496,7 @@ client.filestorage.groups.list(
-**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**end_user_organization_name:** `typing.Optional[str]`
@@ -25660,7 +25504,7 @@ client.filestorage.groups.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime.
@@ -25668,7 +25512,7 @@ client.filestorage.groups.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime.
@@ -25676,7 +25520,7 @@ client.filestorage.groups.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_muted:** `typing.Optional[str]` — If true, will include muted issues
@@ -25684,7 +25528,31 @@ client.filestorage.groups.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**integration_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. + +
+
+ +
+
+ +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. + +
+
+ +
+
+ +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in.
@@ -25692,7 +25560,7 @@ client.filestorage.groups.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -25700,7 +25568,7 @@ client.filestorage.groups.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time
@@ -25708,7 +25576,12 @@ client.filestorage.groups.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -25728,7 +25601,7 @@ client.filestorage.groups.list(
-
client.filestorage.groups.retrieve(...) +
client.chat.issues.retrieve(...)
@@ -25740,7 +25613,7 @@ client.filestorage.groups.list(
-Returns a `Group` object with the given `id`. +Get a specific issue.
@@ -25761,10 +25634,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.groups.retrieve( +client.chat.issues.retrieve( id="id", - include_remote_data=True, - include_shell_data=True, ) ``` @@ -25789,30 +25660,6 @@ client.filestorage.groups.retrieve(
-**expand:** `typing.Optional[typing.Literal["child_groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -25825,8 +25672,8 @@ client.filestorage.groups.retrieve(
-## Filestorage Issues -
client.filestorage.issues.list(...) +## Chat LinkToken +
client.chat.link_token.create(...)
@@ -25838,7 +25685,7 @@ client.filestorage.groups.retrieve(
-Gets all issues for Organization. +Creates a link token to be used when linking a new end user. The link token expires after single use.
@@ -25853,38 +25700,18 @@ Gets all issues for Organization.
```python -import datetime - from merge import Merge -from merge.resources.filestorage.resources.issues import IssuesListRequestStatus +from merge.resources.chat import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.issues.list( - account_token="account_token", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - end_user_organization_name="end_user_organization_name", - first_incident_time_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - first_incident_time_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - include_muted="include_muted", - integration_name="integration_name", - last_incident_time_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - last_incident_time_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - linked_account_id="linked_account_id", - page_size=1, - start_date="start_date", - status=IssuesListRequestStatus.ONGOING, +client.chat.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -25901,7 +25728,7 @@ client.filestorage.issues.list(
-**account_token:** `typing.Optional[str]` +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -25909,7 +25736,7 @@ client.filestorage.issues.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_user_organization_name:** `str` — Your end user's organization.
@@ -25917,7 +25744,7 @@ client.filestorage.issues.list(
-**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -25925,7 +25752,7 @@ client.filestorage.issues.list(
-**end_user_organization_name:** `typing.Optional[str]` +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
@@ -25933,7 +25760,7 @@ client.filestorage.issues.list(
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
@@ -25941,7 +25768,7 @@ client.filestorage.issues.list(
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
@@ -25949,7 +25776,7 @@ client.filestorage.issues.list(
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -25957,7 +25784,7 @@ client.filestorage.issues.list(
-**integration_name:** `typing.Optional[str]` +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -25965,7 +25792,7 @@ client.filestorage.issues.list(
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -25973,7 +25800,14 @@ client.filestorage.issues.list(
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
@@ -25981,7 +25815,12 @@ client.filestorage.issues.list(
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. +**language:** `typing.Optional[EndUserDetailsRequestLanguage]` + +The following subset of IETF language tags can be used to configure localization. + +* `en` - en +* `de` - de
@@ -25989,7 +25828,7 @@ client.filestorage.issues.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled.
@@ -25997,7 +25836,7 @@ client.filestorage.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -26005,12 +25844,11 @@ client.filestorage.issues.list(
-**status:** `typing.Optional[IssuesListRequestStatus]` +**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` -Status of the issue. Options: ('ONGOING', 'RESOLVED') +When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +* `SELECTIVE_SYNC` - SELECTIVE_SYNC
@@ -26030,7 +25868,8 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.filestorage.issues.retrieve(...) +## Chat LinkedAccounts +
client.chat.linked_accounts.list(...)
@@ -26042,7 +25881,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +List linked accounts for your organization.
@@ -26058,13 +25897,28 @@ Get a specific issue. ```python from merge import Merge +from merge.resources.chat.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.issues.retrieve( +client.chat.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", ) ``` @@ -26081,7 +25935,115 @@ client.filestorage.issues.retrieve(
-**id:** `str` +**category:** `typing.Optional[LinkedAccountsListRequestCategory]` + +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` + +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage +* `knowledgebase` - knowledgebase +* `chat` - chat + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. + +
+
+ +
+
+ +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. + +
+
+ +
+
+ +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. + +
+
+ +
+
+ +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. + +
+
+ +
+
+ +**id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. + +
+
+ +
+
+ +**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. + +
+
+ +
+
+ +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. + +
+
+ +
+
+ +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
@@ -26101,8 +26063,8 @@ client.filestorage.issues.retrieve(
-## Filestorage LinkToken -
client.filestorage.link_token.create(...) +## Chat Messages +
client.chat.messages.list(...)
@@ -26114,7 +26076,7 @@ client.filestorage.issues.retrieve(
-Creates a link token to be used when linking a new end user. +Returns a list of `Message` objects.
@@ -26129,18 +26091,37 @@ Creates a link token to be used when linking a new end user.
```python +import datetime + from merge import Merge -from merge.resources.filestorage import CategoriesEnum +from merge.resources.chat.resources.messages import MessagesListRequestOrderBy client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +client.chat.messages.list( + conversation_id="conversation_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=MessagesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, + page_size=1, + remote_id="remote_id", + root_message="root_message", ) ``` @@ -26157,7 +26138,7 @@ client.filestorage.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. +**conversation_id:** `typing.Optional[str]` — Filter messages by conversation ID.
@@ -26165,7 +26146,7 @@ client.filestorage.link_token.create(
-**end_user_organization_name:** `str` — Your end user's organization. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -26173,7 +26154,7 @@ client.filestorage.link_token.create(
-**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -26181,7 +26162,7 @@ client.filestorage.link_token.create(
-**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -26189,7 +26170,7 @@ client.filestorage.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -26197,7 +26178,7 @@ client.filestorage.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -26205,7 +26186,7 @@ client.filestorage.link_token.create(
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -26213,7 +26194,7 @@ client.filestorage.link_token.create(
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -26221,7 +26202,7 @@ client.filestorage.link_token.create(
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -26229,14 +26210,7 @@ client.filestorage.link_token.create(
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +**order_by:** `typing.Optional[MessagesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at.
@@ -26244,12 +26218,7 @@ client.filestorage.link_token.create(
-**language:** `typing.Optional[LanguageEnum]` - -The following subset of IETF language tags can be used to configure localization. - -* `en` - en -* `de` - de +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -26257,7 +26226,7 @@ The following subset of IETF language tags can be used to configure localization
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -26265,7 +26234,7 @@ The following subset of IETF language tags can be used to configure localization
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. +**root_message:** `typing.Optional[str]` — If provided as 'true', will only return root messages (messages without a parent message).
@@ -26285,8 +26254,7 @@ The following subset of IETF language tags can be used to configure localization
-## Filestorage LinkedAccounts -
client.filestorage.linked_accounts.list(...) +
client.chat.messages.retrieve(...)
@@ -26298,7 +26266,7 @@ The following subset of IETF language tags can be used to configure localization
-List linked accounts for your organization. +Returns a `Message` object with the given `id`.
@@ -26314,28 +26282,15 @@ List linked accounts for your organization. ```python from merge import Merge -from merge.resources.filestorage.resources.linked_accounts import ( - LinkedAccountsListRequestCategory, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_user_email_address="end_user_email_address", - end_user_organization_name="end_user_organization_name", - end_user_origin_id="end_user_origin_id", - end_user_origin_ids="end_user_origin_ids", +client.chat.messages.retrieve( id="id", - ids="ids", - include_duplicates=True, - integration_name="integration_name", - is_test_account="is_test_account", - page_size=1, - status="status", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -26352,17 +26307,7 @@ client.filestorage.linked_accounts.list(
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` - -Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - -* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage +**id:** `str`
@@ -26370,7 +26315,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -26378,7 +26323,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -26386,31 +26331,79 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.chat.messages.replies_list(...)
-**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. - +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Message` objects. +
+
+#### 🔌 Usage +
-**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - +
+
+ +```python +from merge import Merge +from merge.resources.chat.resources.messages import ( + MessagesRepliesListRequestOrderBy, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.chat.messages.replies_list( + message_id="message_id", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + order_by=MessagesRepliesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, + page_size=1, +) + +```
+
+
+ +#### ⚙️ Parameters
-**id:** `typing.Optional[str]` +
+
+ +**message_id:** `str`
@@ -26418,7 +26411,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -26426,7 +26419,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -26434,7 +26427,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -26442,7 +26435,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -26450,7 +26443,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**order_by:** `typing.Optional[MessagesRepliesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at.
@@ -26458,7 +26451,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -26478,8 +26471,8 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
-## Filestorage Passthrough -
client.filestorage.passthrough.create(...) +## Chat Passthrough +
client.chat.passthrough.create(...)
@@ -26507,13 +26500,13 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.filestorage import DataPassthroughRequest, MethodEnum +from merge.resources.chat import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.passthrough.create( +client.chat.passthrough.create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", @@ -26554,8 +26547,8 @@ client.filestorage.passthrough.create(
-## Filestorage RegenerateKey -
client.filestorage.regenerate_key.create(...) +## Chat RegenerateKey +
client.chat.regenerate_key.create(...)
@@ -26588,7 +26581,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.regenerate_key.create( +client.chat.regenerate_key.create( name="Remote Deployment Key 1", ) @@ -26626,8 +26619,8 @@ client.filestorage.regenerate_key.create(
-## Filestorage SyncStatus -
client.filestorage.sync_status.list(...) +## Chat SyncStatus +
client.chat.sync_status.list(...)
@@ -26660,7 +26653,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.sync_status.list( +client.chat.sync_status.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", page_size=1, ) @@ -26687,7 +26680,7 @@ client.filestorage.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -26707,8 +26700,8 @@ client.filestorage.sync_status.list(
-## Filestorage ForceResync -
client.filestorage.force_resync.sync_status_resync_create() +## Chat ForceResync +
client.chat.force_resync.sync_status_resync_create()
@@ -26741,7 +26734,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.force_resync.sync_status_resync_create() +client.chat.force_resync.sync_status_resync_create() ```
@@ -26769,8 +26762,8 @@ client.filestorage.force_resync.sync_status_resync_create()
-## Filestorage Users -
client.filestorage.users.list(...) +## Chat Users +
client.chat.users.list(...)
@@ -26805,7 +26798,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.users.list( +client.chat.users.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -26816,7 +26809,6 @@ client.filestorage.users.list( include_deleted_data=True, include_remote_data=True, include_shell_data=True, - is_me="is_me", modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -26865,7 +26857,7 @@ client.filestorage.users.list(
-**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). +**expand:** `typing.Optional[typing.Literal["groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -26873,7 +26865,7 @@ client.filestorage.users.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -26881,7 +26873,7 @@ client.filestorage.users.list(
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -26889,7 +26881,7 @@ client.filestorage.users.list(
-**is_me:** `typing.Optional[str]` — If provided, will only return the user object for requestor. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
@@ -26913,7 +26905,7 @@ client.filestorage.users.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -26941,7 +26933,7 @@ client.filestorage.users.list(
-
client.filestorage.users.retrieve(...) +
client.chat.users.retrieve(...)
@@ -26974,7 +26966,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.users.retrieve( +client.chat.users.retrieve( id="id", include_remote_data=True, include_shell_data=True, @@ -27002,6 +26994,14 @@ client.filestorage.users.retrieve(
+**expand:** `typing.Optional[typing.Literal["groups"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -27030,8 +27030,8 @@ client.filestorage.users.retrieve(
-## Filestorage WebhookReceivers -
client.filestorage.webhook_receivers.list() +## Chat WebhookReceivers +
client.chat.webhook_receivers.list()
@@ -27064,7 +27064,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.webhook_receivers.list() +client.chat.webhook_receivers.list() ```
@@ -27092,7 +27092,7 @@ client.filestorage.webhook_receivers.list()
-
client.filestorage.webhook_receivers.create(...) +
client.chat.webhook_receivers.create(...)
@@ -27125,7 +27125,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.filestorage.webhook_receivers.create( +client.chat.webhook_receivers.create( event="event", is_active=True, ) @@ -38809,321 +38809,472 @@ client.knowledgebase.force_resync.sync_status_resync_create()
-## Knowledgebase Users -
client.knowledgebase.users.list(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a list of `User` objects. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -import datetime - -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.users.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. - -
-
- -
-
- -**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.knowledgebase.users.retrieve(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a `User` object with the given `id`. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.users.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `str` - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -## Knowledgebase WebhookReceivers -
client.knowledgebase.webhook_receivers.list() -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a list of `WebhookReceiver` objects. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.webhook_receivers.list() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.knowledgebase.webhook_receivers.create(...) +## Knowledgebase Users +
client.knowledgebase.users.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.knowledgebase.users.retrieve(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `User` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.users.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Knowledgebase WebhookReceivers +
client.knowledgebase.webhook_receivers.list() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.webhook_receivers.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.knowledgebase.webhook_receivers.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.webhook_receivers.create( + event="event", + is_active=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**event:** `str` + +
+
+ +
+
+ +**is_active:** `bool` + +
+
+ +
+
+ +**key:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Ticketing AccountDetails +
client.ticketing.account_details.retrieve() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.ticketing.account_details.retrieve() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Ticketing AccountToken +
client.ticketing.account_token.retrieve(...)
@@ -39135,7 +39286,7 @@ client.knowledgebase.webhook_receivers.list()
-Creates a `WebhookReceiver` object with the given values. +Returns the account token for the end user with the provided public token.
@@ -39156,9 +39307,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.webhook_receivers.create( - event="event", - is_active=True, +client.ticketing.account_token.retrieve( + public_token="public_token", ) ``` @@ -39175,88 +39325,10 @@ client.knowledgebase.webhook_receivers.create(
-**event:** `str` - -
-
- -
-
- -**is_active:** `bool` - -
-
- -
-
- -**key:** `typing.Optional[str]` - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**public_token:** `str`
- -
- - - - -
- -## Ticketing AccountDetails -
client.ticketing.account_details.retrieve() -
-
- -#### 📝 Description - -
-
- -
-
- -Get details for a linked account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.ticketing.account_details.retrieve() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
@@ -39273,8 +39345,7 @@ client.ticketing.account_details.retrieve()
-## Ticketing AccountToken -
client.ticketing.account_token.retrieve(...) +
client.ticketing.account_token.regenerate_create()
@@ -39286,7 +39357,7 @@ client.ticketing.account_details.retrieve()
-Returns the account token for the end user with the provided public token. +Exchange Linked Account account tokens.
@@ -39307,9 +39378,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.ticketing.account_token.retrieve( - public_token="public_token", -) +client.ticketing.account_token.regenerate_create() ``` @@ -39325,14 +39394,6 @@ client.ticketing.account_token.retrieve(
-**public_token:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -39480,7 +39541,7 @@ client.ticketing.accounts.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -42087,6 +42148,7 @@ client = Merge( ) client.ticketing.field_mapping.field_mappings_create( exclude_remote_field_metadata=True, + remote_data_iteration_count=1, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -42165,6 +42227,14 @@ client.ticketing.field_mapping.field_mappings_create(
+**remote_data_iteration_count:** `typing.Optional[int]` — Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + +
+
+ +
+
+ **jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -42291,6 +42361,7 @@ client = Merge( ) client.ticketing.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", + remote_data_iteration_count=1, ) ``` @@ -42315,6 +42386,14 @@ client.ticketing.field_mapping.field_mappings_partial_update(
+**remote_data_iteration_count:** `typing.Optional[int]` — Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + +
+
+ +
+
+ **remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -42861,7 +42940,7 @@ client.ticketing.issues.retrieve(
-Creates a link token to be used when linking a new end user. +Creates a link token to be used when linking a new end user. The link token expires after single use.
@@ -44700,7 +44779,6 @@ from merge.resources.ticketing.resources.tickets import ( TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, ) client = Merge( @@ -44756,6 +44834,7 @@ client.ticketing.tickets.list( ), remote_fields=TicketsListRequestRemoteFields.PRIORITY, remote_id="remote_id", + remote_ids="remote_ids", remote_updated_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -44763,7 +44842,7 @@ client.ticketing.tickets.list( "2024-01-15 09:30:00+00:00", ), show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, - status=TicketsListRequestStatus.EMPTY, + status="status", tags="tags", ticket_type="ticket_type", ticket_url="ticket_url", @@ -45014,6 +45093,14 @@ If provided, will only return tickets of this priority.
+**remote_ids:** `typing.Optional[str]` — If provided, will only return tickets with these remote IDs (comma-separated). + +
+
+ +
+
+ **remote_updated_after:** `typing.Optional[dt.datetime]` — If provided, will only return tickets updated in the third party platform after this datetime.
@@ -45038,7 +45125,7 @@ If provided, will only return tickets of this priority.
-**status:** `typing.Optional[TicketsListRequestStatus]` — If provided, will only return tickets of this status. +**status:** `typing.Optional[str]` — If provided, will only return tickets of this status.
@@ -45852,6 +45939,7 @@ client = Merge( api_key="YOUR_API_KEY", ) client.ticketing.users.list( + collections="collections", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -45872,7 +45960,9 @@ client.ticketing.users.list( ), page_size=1, remote_id="remote_id", + roles="roles", team="team", + teams="teams", ) ``` @@ -45889,6 +45979,14 @@ client.ticketing.users.list(
+**collections:** `typing.Optional[str]` — If provided, will only return users involved with at least one of these collections. + +
+
+ +
+
+ **created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -45985,6 +46083,14 @@ client.ticketing.users.list(
+**roles:** `typing.Optional[str]` — If provided, will only return users with at least one of these roles. + +
+
+ +
+
+ **team:** `typing.Optional[str]` — If provided, will only return users matching in this team.
@@ -45993,6 +46099,14 @@ client.ticketing.users.list(
+**teams:** `typing.Optional[str]` — If provided, will only return users with at least one of these teams. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/merge/client.py b/src/merge/client.py index 4350fe25..3ac56aa8 100644 --- a/src/merge/client.py +++ b/src/merge/client.py @@ -89,9 +89,9 @@ def __init__( timeout=_defaulted_timeout, ) self._ats: typing.Optional[AtsClient] = None - self._chat: typing.Optional[ChatClient] = None self._crm: typing.Optional[CrmClient] = None self._filestorage: typing.Optional[FilestorageClient] = None + self._chat: typing.Optional[ChatClient] = None self._hris: typing.Optional[HrisClient] = None self._knowledgebase: typing.Optional[KnowledgebaseClient] = None self._ticketing: typing.Optional[TicketingClient] = None @@ -105,14 +105,6 @@ def ats(self): self._ats = AtsClient(client_wrapper=self._client_wrapper) return self._ats - @property - def chat(self): - if self._chat is None: - from .resources.chat.client import ChatClient # noqa: E402 - - self._chat = ChatClient(client_wrapper=self._client_wrapper) - return self._chat - @property def crm(self): if self._crm is None: @@ -129,6 +121,14 @@ def filestorage(self): self._filestorage = FilestorageClient(client_wrapper=self._client_wrapper) return self._filestorage + @property + def chat(self): + if self._chat is None: + from .resources.chat.client import ChatClient # noqa: E402 + + self._chat = ChatClient(client_wrapper=self._client_wrapper) + return self._chat + @property def hris(self): if self._hris is None: @@ -232,9 +232,9 @@ def __init__( timeout=_defaulted_timeout, ) self._ats: typing.Optional[AsyncAtsClient] = None - self._chat: typing.Optional[AsyncChatClient] = None self._crm: typing.Optional[AsyncCrmClient] = None self._filestorage: typing.Optional[AsyncFilestorageClient] = None + self._chat: typing.Optional[AsyncChatClient] = None self._hris: typing.Optional[AsyncHrisClient] = None self._knowledgebase: typing.Optional[AsyncKnowledgebaseClient] = None self._ticketing: typing.Optional[AsyncTicketingClient] = None @@ -248,14 +248,6 @@ def ats(self): self._ats = AsyncAtsClient(client_wrapper=self._client_wrapper) return self._ats - @property - def chat(self): - if self._chat is None: - from .resources.chat.client import AsyncChatClient # noqa: E402 - - self._chat = AsyncChatClient(client_wrapper=self._client_wrapper) - return self._chat - @property def crm(self): if self._crm is None: @@ -272,6 +264,14 @@ def filestorage(self): self._filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper) return self._filestorage + @property + def chat(self): + if self._chat is None: + from .resources.chat.client import AsyncChatClient # noqa: E402 + + self._chat = AsyncChatClient(client_wrapper=self._client_wrapper) + return self._chat + @property def hris(self): if self._hris is None: diff --git a/src/merge/core/client_wrapper.py b/src/merge/core/client_wrapper.py index 45e75a53..af760778 100644 --- a/src/merge/core/client_wrapper.py +++ b/src/merge/core/client_wrapper.py @@ -24,10 +24,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "MergePythonClient/2.6.1", + "User-Agent": "MergePythonClient/2.6.2", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "MergePythonClient", - "X-Fern-SDK-Version": "2.6.1", + "X-Fern-SDK-Version": "2.6.2", **(self.get_custom_headers() or {}), } if self._account_token is not None: diff --git a/src/merge/resources/ticketing/__init__.py b/src/merge/resources/ticketing/__init__.py index 13477e7f..9ccc3800 100644 --- a/src/merge/resources/ticketing/__init__.py +++ b/src/merge/resources/ticketing/__init__.py @@ -17,6 +17,7 @@ AccountDetailsCategory, AccountIntegration, AccountToken, + ActionsEnum, AdvancedMetadata, AsyncPassthroughReciept, Attachment, @@ -34,6 +35,7 @@ CollectionAccessLevelEnum, CollectionCollectionType, CollectionParentCollection, + CollectionPermissionsItem, CollectionTypeEnum, Comment, CommentContact, @@ -54,6 +56,7 @@ DataPassthroughRequest, DebugModeLog, DebugModelLogSummary, + EffectEnum, EnabledActionsEnum, EncodingEnum, ErrorValidationProblem, @@ -110,8 +113,13 @@ PatchedTicketRequestAccessLevel, PatchedTicketRequestPriority, PatchedTicketRequestStatus, + Permission, + PermissionEffect, + PermissionRequest, + PermissionRequestEffect, PriorityEnum, Project, + RegenerateAccountToken, RemoteData, RemoteEndpointInfo, RemoteField, @@ -137,6 +145,7 @@ StatusFd5Enum, SyncStatus, SyncStatusLastSyncResult, + SyncStatusStatus, Tag, Team, Ticket, @@ -152,6 +161,7 @@ TicketContact, TicketCreator, TicketParentTicket, + TicketPermissionsItem, TicketPriority, TicketRequest, TicketRequestAccessLevel, @@ -195,7 +205,8 @@ TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, + TicketsLiveSearchRetrieveRequestRemoteFields, + TicketsLiveSearchRetrieveRequestShowEnumOrigins, TicketsRetrieveRequestExpand, TicketsRetrieveRequestRemoteFields, TicketsRetrieveRequestShowEnumOrigins, @@ -242,6 +253,7 @@ "AccountDetailsCategory": ".types", "AccountIntegration": ".types", "AccountToken": ".types", + "ActionsEnum": ".types", "AdvancedMetadata": ".types", "AsyncPassthroughReciept": ".types", "AsyncPassthroughRetrieveResponse": ".resources", @@ -260,6 +272,7 @@ "CollectionAccessLevelEnum": ".types", "CollectionCollectionType": ".types", "CollectionParentCollection": ".types", + "CollectionPermissionsItem": ".types", "CollectionTypeEnum": ".types", "CollectionsListRequestCollectionType": ".resources", "CollectionsViewersListRequestExpand": ".resources", @@ -284,6 +297,7 @@ "DataPassthroughRequest": ".types", "DebugModeLog": ".types", "DebugModelLogSummary": ".types", + "EffectEnum": ".types", "EnabledActionsEnum": ".types", "EncodingEnum": ".types", "EndUserDetailsRequestCompletedAccountInitialScreen": ".resources", @@ -344,9 +358,14 @@ "PatchedTicketRequestAccessLevel": ".types", "PatchedTicketRequestPriority": ".types", "PatchedTicketRequestStatus": ".types", + "Permission": ".types", + "PermissionEffect": ".types", + "PermissionRequest": ".types", + "PermissionRequestEffect": ".types", "PriorityEnum": ".types", "Project": ".types", "ProjectsUsersListRequestExpand": ".resources", + "RegenerateAccountToken": ".types", "RemoteData": ".types", "RemoteEndpointInfo": ".types", "RemoteField": ".types", @@ -372,6 +391,7 @@ "StatusFd5Enum": ".types", "SyncStatus": ".types", "SyncStatusLastSyncResult": ".types", + "SyncStatusStatus": ".types", "Tag": ".types", "Team": ".types", "Ticket": ".types", @@ -387,6 +407,7 @@ "TicketContact": ".types", "TicketCreator": ".types", "TicketParentTicket": ".types", + "TicketPermissionsItem": ".types", "TicketPriority": ".types", "TicketRequest": ".types", "TicketRequestAccessLevel": ".types", @@ -409,7 +430,8 @@ "TicketsListRequestPriority": ".resources", "TicketsListRequestRemoteFields": ".resources", "TicketsListRequestShowEnumOrigins": ".resources", - "TicketsListRequestStatus": ".resources", + "TicketsLiveSearchRetrieveRequestRemoteFields": ".resources", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins": ".resources", "TicketsRetrieveRequestExpand": ".resources", "TicketsRetrieveRequestRemoteFields": ".resources", "TicketsRetrieveRequestShowEnumOrigins": ".resources", @@ -486,6 +508,7 @@ def __dir__(): "AccountDetailsCategory", "AccountIntegration", "AccountToken", + "ActionsEnum", "AdvancedMetadata", "AsyncPassthroughReciept", "AsyncPassthroughRetrieveResponse", @@ -504,6 +527,7 @@ def __dir__(): "CollectionAccessLevelEnum", "CollectionCollectionType", "CollectionParentCollection", + "CollectionPermissionsItem", "CollectionTypeEnum", "CollectionsListRequestCollectionType", "CollectionsViewersListRequestExpand", @@ -528,6 +552,7 @@ def __dir__(): "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", + "EffectEnum", "EnabledActionsEnum", "EncodingEnum", "EndUserDetailsRequestCompletedAccountInitialScreen", @@ -588,9 +613,14 @@ def __dir__(): "PatchedTicketRequestAccessLevel", "PatchedTicketRequestPriority", "PatchedTicketRequestStatus", + "Permission", + "PermissionEffect", + "PermissionRequest", + "PermissionRequestEffect", "PriorityEnum", "Project", "ProjectsUsersListRequestExpand", + "RegenerateAccountToken", "RemoteData", "RemoteEndpointInfo", "RemoteField", @@ -616,6 +646,7 @@ def __dir__(): "StatusFd5Enum", "SyncStatus", "SyncStatusLastSyncResult", + "SyncStatusStatus", "Tag", "Team", "Ticket", @@ -631,6 +662,7 @@ def __dir__(): "TicketContact", "TicketCreator", "TicketParentTicket", + "TicketPermissionsItem", "TicketPriority", "TicketRequest", "TicketRequestAccessLevel", @@ -653,7 +685,8 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", - "TicketsListRequestStatus", + "TicketsLiveSearchRetrieveRequestRemoteFields", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/__init__.py b/src/merge/resources/ticketing/resources/__init__.py index 801852a6..d689feea 100644 --- a/src/merge/resources/ticketing/resources/__init__.py +++ b/src/merge/resources/ticketing/resources/__init__.py @@ -48,7 +48,8 @@ TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, + TicketsLiveSearchRetrieveRequestRemoteFields, + TicketsLiveSearchRetrieveRequestShowEnumOrigins, TicketsRetrieveRequestExpand, TicketsRetrieveRequestRemoteFields, TicketsRetrieveRequestShowEnumOrigins, @@ -70,7 +71,8 @@ "TicketsListRequestPriority": ".tickets", "TicketsListRequestRemoteFields": ".tickets", "TicketsListRequestShowEnumOrigins": ".tickets", - "TicketsListRequestStatus": ".tickets", + "TicketsLiveSearchRetrieveRequestRemoteFields": ".tickets", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins": ".tickets", "TicketsRetrieveRequestExpand": ".tickets", "TicketsRetrieveRequestRemoteFields": ".tickets", "TicketsRetrieveRequestShowEnumOrigins": ".tickets", @@ -142,7 +144,8 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", - "TicketsListRequestStatus", + "TicketsLiveSearchRetrieveRequestRemoteFields", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/account_token/client.py b/src/merge/resources/ticketing/resources/account_token/client.py index 45ac5bc2..fe45f14f 100644 --- a/src/merge/resources/ticketing/resources/account_token/client.py +++ b/src/merge/resources/ticketing/resources/account_token/client.py @@ -5,6 +5,7 @@ from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .....core.request_options import RequestOptions from ...types.account_token import AccountToken +from ...types.regenerate_account_token import RegenerateAccountToken from .raw_client import AsyncRawAccountTokenClient, RawAccountTokenClient @@ -54,6 +55,33 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques _response = self._raw_client.retrieve(public_token, request_options=request_options) return _response.data + def regenerate_create(self, *, request_options: typing.Optional[RequestOptions] = None) -> RegenerateAccountToken: + """ + Exchange Linked Account account tokens. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RegenerateAccountToken + + + Examples + -------- + from merge import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.ticketing.account_token.regenerate_create() + """ + _response = self._raw_client.regenerate_create(request_options=request_options) + return _response.data + class AsyncAccountTokenClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -110,3 +138,40 @@ async def main() -> None: """ _response = await self._raw_client.retrieve(public_token, request_options=request_options) return _response.data + + async def regenerate_create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> RegenerateAccountToken: + """ + Exchange Linked Account account tokens. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + RegenerateAccountToken + + + Examples + -------- + import asyncio + + from merge import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.ticketing.account_token.regenerate_create() + + + asyncio.run(main()) + """ + _response = await self._raw_client.regenerate_create(request_options=request_options) + return _response.data diff --git a/src/merge/resources/ticketing/resources/account_token/raw_client.py b/src/merge/resources/ticketing/resources/account_token/raw_client.py index fecf4148..2218516c 100644 --- a/src/merge/resources/ticketing/resources/account_token/raw_client.py +++ b/src/merge/resources/ticketing/resources/account_token/raw_client.py @@ -10,6 +10,7 @@ from .....core.request_options import RequestOptions from .....core.unchecked_base_model import construct_type from ...types.account_token import AccountToken +from ...types.regenerate_account_token import RegenerateAccountToken class RawAccountTokenClient: @@ -54,6 +55,42 @@ def retrieve( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def regenerate_create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[RegenerateAccountToken]: + """ + Exchange Linked Account account tokens. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[RegenerateAccountToken] + + """ + _response = self._client_wrapper.httpx_client.request( + "ticketing/v1/account-token/regenerate", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RegenerateAccountToken, + construct_type( + type_=RegenerateAccountToken, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawAccountTokenClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -96,3 +133,39 @@ async def retrieve( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def regenerate_create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[RegenerateAccountToken]: + """ + Exchange Linked Account account tokens. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[RegenerateAccountToken] + + """ + _response = await self._client_wrapper.httpx_client.request( + "ticketing/v1/account-token/regenerate", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + RegenerateAccountToken, + construct_type( + type_=RegenerateAccountToken, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/merge/resources/ticketing/resources/accounts/client.py b/src/merge/resources/ticketing/resources/accounts/client.py index 86947a64..8fb050ba 100644 --- a/src/merge/resources/ticketing/resources/accounts/client.py +++ b/src/merge/resources/ticketing/resources/accounts/client.py @@ -70,7 +70,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -241,7 +241,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/resources/accounts/raw_client.py b/src/merge/resources/ticketing/resources/accounts/raw_client.py index f0e4aa23..0bf8bd35 100644 --- a/src/merge/resources/ticketing/resources/accounts/raw_client.py +++ b/src/merge/resources/ticketing/resources/accounts/raw_client.py @@ -64,7 +64,7 @@ def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. @@ -212,7 +212,7 @@ async def list( If provided, only objects synced by Merge before this date time will be returned. page_size : typing.Optional[int] - Number of results to return per page. + Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. diff --git a/src/merge/resources/ticketing/resources/field_mapping/client.py b/src/merge/resources/ticketing/resources/field_mapping/client.py index 8cbd3674..04b3aa9a 100644 --- a/src/merge/resources/ticketing/resources/field_mapping/client.py +++ b/src/merge/resources/ticketing/resources/field_mapping/client.py @@ -78,6 +78,7 @@ def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + remote_data_iteration_count: typing.Optional[int] = None, jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: @@ -107,6 +108,9 @@ def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + jmes_path : typing.Optional[str] JMES path to specify json query expression to be used on field mapping. @@ -128,6 +132,7 @@ def field_mappings_create( ) client.ticketing.field_mapping.field_mappings_create( exclude_remote_field_metadata=True, + remote_data_iteration_count=1, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -144,6 +149,7 @@ def field_mappings_create( remote_url_path=remote_url_path, common_model_name=common_model_name, exclude_remote_field_metadata=exclude_remote_field_metadata, + remote_data_iteration_count=remote_data_iteration_count, jmes_path=jmes_path, request_options=request_options, ) @@ -186,6 +192,7 @@ def field_mappings_partial_update( self, field_mapping_id: str, *, + remote_data_iteration_count: typing.Optional[int] = None, remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, @@ -199,6 +206,9 @@ def field_mappings_partial_update( ---------- field_mapping_id : str + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. @@ -229,10 +239,12 @@ def field_mappings_partial_update( ) client.ticketing.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", + remote_data_iteration_count=1, ) """ _response = self._raw_client.field_mappings_partial_update( field_mapping_id, + remote_data_iteration_count=remote_data_iteration_count, remote_field_traversal_path=remote_field_traversal_path, remote_method=remote_method, remote_url_path=remote_url_path, @@ -387,6 +399,7 @@ async def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + remote_data_iteration_count: typing.Optional[int] = None, jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> FieldMappingInstanceResponse: @@ -416,6 +429,9 @@ async def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + jmes_path : typing.Optional[str] JMES path to specify json query expression to be used on field mapping. @@ -442,6 +458,7 @@ async def field_mappings_create( async def main() -> None: await client.ticketing.field_mapping.field_mappings_create( exclude_remote_field_metadata=True, + remote_data_iteration_count=1, target_field_name="example_target_field_name", target_field_description="this is a example description of the target field", remote_field_traversal_path=["example_remote_field"], @@ -461,6 +478,7 @@ async def main() -> None: remote_url_path=remote_url_path, common_model_name=common_model_name, exclude_remote_field_metadata=exclude_remote_field_metadata, + remote_data_iteration_count=remote_data_iteration_count, jmes_path=jmes_path, request_options=request_options, ) @@ -511,6 +529,7 @@ async def field_mappings_partial_update( self, field_mapping_id: str, *, + remote_data_iteration_count: typing.Optional[int] = None, remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, @@ -524,6 +543,9 @@ async def field_mappings_partial_update( ---------- field_mapping_id : str + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. @@ -559,6 +581,7 @@ async def field_mappings_partial_update( async def main() -> None: await client.ticketing.field_mapping.field_mappings_partial_update( field_mapping_id="field_mapping_id", + remote_data_iteration_count=1, ) @@ -566,6 +589,7 @@ async def main() -> None: """ _response = await self._raw_client.field_mappings_partial_update( field_mapping_id, + remote_data_iteration_count=remote_data_iteration_count, remote_field_traversal_path=remote_field_traversal_path, remote_method=remote_method, remote_url_path=remote_url_path, diff --git a/src/merge/resources/ticketing/resources/field_mapping/raw_client.py b/src/merge/resources/ticketing/resources/field_mapping/raw_client.py index 1609c8ac..cf42f54a 100644 --- a/src/merge/resources/ticketing/resources/field_mapping/raw_client.py +++ b/src/merge/resources/ticketing/resources/field_mapping/raw_client.py @@ -77,6 +77,7 @@ def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + remote_data_iteration_count: typing.Optional[int] = None, jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[FieldMappingInstanceResponse]: @@ -106,6 +107,9 @@ def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + jmes_path : typing.Optional[str] JMES path to specify json query expression to be used on field mapping. @@ -122,6 +126,7 @@ def field_mappings_create( method="POST", params={ "exclude_remote_field_metadata": exclude_remote_field_metadata, + "remote_data_iteration_count": remote_data_iteration_count, }, json={ "target_field_name": target_field_name, @@ -195,6 +200,7 @@ def field_mappings_partial_update( self, field_mapping_id: str, *, + remote_data_iteration_count: typing.Optional[int] = None, remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, @@ -208,6 +214,9 @@ def field_mappings_partial_update( ---------- field_mapping_id : str + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. @@ -231,6 +240,9 @@ def field_mappings_partial_update( _response = self._client_wrapper.httpx_client.request( f"ticketing/v1/field-mappings/{jsonable_encoder(field_mapping_id)}", method="PATCH", + params={ + "remote_data_iteration_count": remote_data_iteration_count, + }, json={ "remote_field_traversal_path": remote_field_traversal_path, "remote_method": remote_method, @@ -404,6 +416,7 @@ async def field_mappings_create( remote_url_path: str, common_model_name: str, exclude_remote_field_metadata: typing.Optional[bool] = None, + remote_data_iteration_count: typing.Optional[int] = None, jmes_path: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[FieldMappingInstanceResponse]: @@ -433,6 +446,9 @@ async def field_mappings_create( exclude_remote_field_metadata : typing.Optional[bool] If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + jmes_path : typing.Optional[str] JMES path to specify json query expression to be used on field mapping. @@ -449,6 +465,7 @@ async def field_mappings_create( method="POST", params={ "exclude_remote_field_metadata": exclude_remote_field_metadata, + "remote_data_iteration_count": remote_data_iteration_count, }, json={ "target_field_name": target_field_name, @@ -522,6 +539,7 @@ async def field_mappings_partial_update( self, field_mapping_id: str, *, + remote_data_iteration_count: typing.Optional[int] = None, remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, remote_method: typing.Optional[str] = OMIT, remote_url_path: typing.Optional[str] = OMIT, @@ -535,6 +553,9 @@ async def field_mappings_partial_update( ---------- field_mapping_id : str + remote_data_iteration_count : typing.Optional[int] + Number of common model instances to iterate through when fetching remote data for field mappings. Defaults to 250 if not provided. + remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. @@ -558,6 +579,9 @@ async def field_mappings_partial_update( _response = await self._client_wrapper.httpx_client.request( f"ticketing/v1/field-mappings/{jsonable_encoder(field_mapping_id)}", method="PATCH", + params={ + "remote_data_iteration_count": remote_data_iteration_count, + }, json={ "remote_field_traversal_path": remote_field_traversal_path, "remote_method": remote_method, diff --git a/src/merge/resources/ticketing/resources/link_token/client.py b/src/merge/resources/ticketing/resources/link_token/client.py index 9dba6f77..462b9b24 100644 --- a/src/merge/resources/ticketing/resources/link_token/client.py +++ b/src/merge/resources/ticketing/resources/link_token/client.py @@ -55,7 +55,7 @@ def create( request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ - Creates a link token to be used when linking a new end user. + Creates a link token to be used when linking a new end user. The link token expires after single use. Parameters ---------- @@ -187,7 +187,7 @@ async def create( request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ - Creates a link token to be used when linking a new end user. + Creates a link token to be used when linking a new end user. The link token expires after single use. Parameters ---------- diff --git a/src/merge/resources/ticketing/resources/link_token/raw_client.py b/src/merge/resources/ticketing/resources/link_token/raw_client.py index b93faced..9e9512ae 100644 --- a/src/merge/resources/ticketing/resources/link_token/raw_client.py +++ b/src/merge/resources/ticketing/resources/link_token/raw_client.py @@ -47,7 +47,7 @@ def create( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[LinkToken]: """ - Creates a link token to be used when linking a new end user. + Creates a link token to be used when linking a new end user. The link token expires after single use. Parameters ---------- @@ -173,7 +173,7 @@ async def create( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[LinkToken]: """ - Creates a link token to be used when linking a new end user. + Creates a link token to be used when linking a new end user. The link token expires after single use. Parameters ---------- diff --git a/src/merge/resources/ticketing/resources/tickets/__init__.py b/src/merge/resources/ticketing/resources/tickets/__init__.py index 564c5c59..27b0ae91 100644 --- a/src/merge/resources/ticketing/resources/tickets/__init__.py +++ b/src/merge/resources/ticketing/resources/tickets/__init__.py @@ -11,7 +11,8 @@ TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, + TicketsLiveSearchRetrieveRequestRemoteFields, + TicketsLiveSearchRetrieveRequestShowEnumOrigins, TicketsRetrieveRequestExpand, TicketsRetrieveRequestRemoteFields, TicketsRetrieveRequestShowEnumOrigins, @@ -22,7 +23,8 @@ "TicketsListRequestPriority": ".types", "TicketsListRequestRemoteFields": ".types", "TicketsListRequestShowEnumOrigins": ".types", - "TicketsListRequestStatus": ".types", + "TicketsLiveSearchRetrieveRequestRemoteFields": ".types", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins": ".types", "TicketsRetrieveRequestExpand": ".types", "TicketsRetrieveRequestRemoteFields": ".types", "TicketsRetrieveRequestShowEnumOrigins": ".types", @@ -54,7 +56,8 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", - "TicketsListRequestStatus", + "TicketsLiveSearchRetrieveRequestRemoteFields", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/tickets/client.py b/src/merge/resources/ticketing/resources/tickets/client.py index f23cd724..e949c2a9 100644 --- a/src/merge/resources/ticketing/resources/tickets/client.py +++ b/src/merge/resources/ticketing/resources/tickets/client.py @@ -18,7 +18,10 @@ from .types.tickets_list_request_priority import TicketsListRequestPriority from .types.tickets_list_request_remote_fields import TicketsListRequestRemoteFields from .types.tickets_list_request_show_enum_origins import TicketsListRequestShowEnumOrigins -from .types.tickets_list_request_status import TicketsListRequestStatus +from .types.tickets_live_search_retrieve_request_remote_fields import TicketsLiveSearchRetrieveRequestRemoteFields +from .types.tickets_live_search_retrieve_request_show_enum_origins import ( + TicketsLiveSearchRetrieveRequestShowEnumOrigins, +) from .types.tickets_retrieve_request_expand import TicketsRetrieveRequestExpand from .types.tickets_retrieve_request_remote_fields import TicketsRetrieveRequestRemoteFields from .types.tickets_retrieve_request_show_enum_origins import TicketsRetrieveRequestShowEnumOrigins @@ -74,10 +77,11 @@ def list( remote_created_before: typing.Optional[dt.datetime] = None, remote_fields: typing.Optional[TicketsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, + remote_ids: typing.Optional[str] = None, remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[TicketsListRequestStatus] = None, + status: typing.Optional[str] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -177,6 +181,9 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + remote_ids : typing.Optional[str] + If provided, will only return tickets with these remote IDs (comma-separated). + remote_updated_after : typing.Optional[dt.datetime] If provided, will only return tickets updated in the third party platform after this datetime. @@ -186,7 +193,7 @@ def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status : typing.Optional[TicketsListRequestStatus] + status : typing.Optional[str] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -216,7 +223,6 @@ def list( TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, ) client = Merge( @@ -272,6 +278,7 @@ def list( ), remote_fields=TicketsListRequestRemoteFields.PRIORITY, remote_id="remote_id", + remote_ids="remote_ids", remote_updated_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -279,7 +286,7 @@ def list( "2024-01-15 09:30:00+00:00", ), show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, - status=TicketsListRequestStatus.EMPTY, + status="status", tags="tags", ticket_type="ticket_type", ticket_url="ticket_url", @@ -314,6 +321,7 @@ def list( remote_created_before=remote_created_before, remote_fields=remote_fields, remote_id=remote_id, + remote_ids=remote_ids, remote_updated_after=remote_updated_after, remote_updated_before=remote_updated_before, show_enum_origins=show_enum_origins, @@ -585,6 +593,94 @@ def viewers_list( ) return _response.data + def live_search_retrieve( + self, + *, + assignee_ids: typing.Optional[str] = None, + assignees: typing.Optional[str] = None, + collection_ids: typing.Optional[str] = None, + collections: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_fields: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + name: typing.Optional[str] = None, + remote_cursor: typing.Optional[str] = None, + remote_fields: typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] = None, + show_enum_origins: typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] = None, + status: typing.Optional[str] = None, + ticket_url: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[bytes]: + """ + Returns a list of `Ticket` objects. + + Parameters + ---------- + assignee_ids : typing.Optional[str] + Filter tickets by assignee IDs (comma-separated) + + assignees : typing.Optional[str] + Filter tickets by assignee names (comma-separated) + + collection_ids : typing.Optional[str] + Filter tickets by collection IDs (comma-separated) + + collections : typing.Optional[str] + Filter tickets by collection names (comma-separated) + + include_deleted_data : typing.Optional[bool] + Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + + include_remote_fields : typing.Optional[bool] + Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + name : typing.Optional[str] + Filter tickets by name/title + + remote_cursor : typing.Optional[str] + Pagination cursor for remote data + + remote_fields : typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] + Deprecated. Use show_enum_origins. + + show_enum_origins : typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] + A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + + status : typing.Optional[str] + Filter tickets by status + + ticket_url : typing.Optional[str] + Filter tickets by URL + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[bytes] + + """ + with self._raw_client.live_search_retrieve( + assignee_ids=assignee_ids, + assignees=assignees, + collection_ids=collection_ids, + collections=collections, + include_deleted_data=include_deleted_data, + include_remote_fields=include_remote_fields, + include_shell_data=include_shell_data, + name=name, + remote_cursor=remote_cursor, + remote_fields=remote_fields, + show_enum_origins=show_enum_origins, + status=status, + ticket_url=ticket_url, + request_options=request_options, + ) as r: + yield from r.data + def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: """ Returns metadata for `Ticket` PATCHs. @@ -789,10 +885,11 @@ async def list( remote_created_before: typing.Optional[dt.datetime] = None, remote_fields: typing.Optional[TicketsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, + remote_ids: typing.Optional[str] = None, remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[TicketsListRequestStatus] = None, + status: typing.Optional[str] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -892,6 +989,9 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + remote_ids : typing.Optional[str] + If provided, will only return tickets with these remote IDs (comma-separated). + remote_updated_after : typing.Optional[dt.datetime] If provided, will only return tickets updated in the third party platform after this datetime. @@ -901,7 +1001,7 @@ async def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status : typing.Optional[TicketsListRequestStatus] + status : typing.Optional[str] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -932,7 +1032,6 @@ async def list( TicketsListRequestPriority, TicketsListRequestRemoteFields, TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, ) client = AsyncMerge( @@ -991,6 +1090,7 @@ async def main() -> None: ), remote_fields=TicketsListRequestRemoteFields.PRIORITY, remote_id="remote_id", + remote_ids="remote_ids", remote_updated_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -998,7 +1098,7 @@ async def main() -> None: "2024-01-15 09:30:00+00:00", ), show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, - status=TicketsListRequestStatus.EMPTY, + status="status", tags="tags", ticket_type="ticket_type", ticket_url="ticket_url", @@ -1036,6 +1136,7 @@ async def main() -> None: remote_created_before=remote_created_before, remote_fields=remote_fields, remote_id=remote_id, + remote_ids=remote_ids, remote_updated_after=remote_updated_after, remote_updated_before=remote_updated_before, show_enum_origins=show_enum_origins, @@ -1339,6 +1440,95 @@ async def main() -> None: ) return _response.data + async def live_search_retrieve( + self, + *, + assignee_ids: typing.Optional[str] = None, + assignees: typing.Optional[str] = None, + collection_ids: typing.Optional[str] = None, + collections: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_fields: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + name: typing.Optional[str] = None, + remote_cursor: typing.Optional[str] = None, + remote_fields: typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] = None, + show_enum_origins: typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] = None, + status: typing.Optional[str] = None, + ticket_url: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[bytes]: + """ + Returns a list of `Ticket` objects. + + Parameters + ---------- + assignee_ids : typing.Optional[str] + Filter tickets by assignee IDs (comma-separated) + + assignees : typing.Optional[str] + Filter tickets by assignee names (comma-separated) + + collection_ids : typing.Optional[str] + Filter tickets by collection IDs (comma-separated) + + collections : typing.Optional[str] + Filter tickets by collection names (comma-separated) + + include_deleted_data : typing.Optional[bool] + Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + + include_remote_fields : typing.Optional[bool] + Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + name : typing.Optional[str] + Filter tickets by name/title + + remote_cursor : typing.Optional[str] + Pagination cursor for remote data + + remote_fields : typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] + Deprecated. Use show_enum_origins. + + show_enum_origins : typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] + A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + + status : typing.Optional[str] + Filter tickets by status + + ticket_url : typing.Optional[str] + Filter tickets by URL + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[bytes] + + """ + async with self._raw_client.live_search_retrieve( + assignee_ids=assignee_ids, + assignees=assignees, + collection_ids=collection_ids, + collections=collections, + include_deleted_data=include_deleted_data, + include_remote_fields=include_remote_fields, + include_shell_data=include_shell_data, + name=name, + remote_cursor=remote_cursor, + remote_fields=remote_fields, + show_enum_origins=show_enum_origins, + status=status, + ticket_url=ticket_url, + request_options=request_options, + ) as r: + async for _chunk in r.data: + yield _chunk + async def meta_patch_retrieve( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> MetaResponse: diff --git a/src/merge/resources/ticketing/resources/tickets/raw_client.py b/src/merge/resources/ticketing/resources/tickets/raw_client.py index b9bb7a0d..7bc09554 100644 --- a/src/merge/resources/ticketing/resources/tickets/raw_client.py +++ b/src/merge/resources/ticketing/resources/tickets/raw_client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import contextlib import datetime as dt import typing from json.decoder import JSONDecodeError @@ -23,7 +24,10 @@ from .types.tickets_list_request_priority import TicketsListRequestPriority from .types.tickets_list_request_remote_fields import TicketsListRequestRemoteFields from .types.tickets_list_request_show_enum_origins import TicketsListRequestShowEnumOrigins -from .types.tickets_list_request_status import TicketsListRequestStatus +from .types.tickets_live_search_retrieve_request_remote_fields import TicketsLiveSearchRetrieveRequestRemoteFields +from .types.tickets_live_search_retrieve_request_show_enum_origins import ( + TicketsLiveSearchRetrieveRequestShowEnumOrigins, +) from .types.tickets_retrieve_request_expand import TicketsRetrieveRequestExpand from .types.tickets_retrieve_request_remote_fields import TicketsRetrieveRequestRemoteFields from .types.tickets_retrieve_request_show_enum_origins import TicketsRetrieveRequestShowEnumOrigins @@ -68,10 +72,11 @@ def list( remote_created_before: typing.Optional[dt.datetime] = None, remote_fields: typing.Optional[TicketsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, + remote_ids: typing.Optional[str] = None, remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[TicketsListRequestStatus] = None, + status: typing.Optional[str] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -171,6 +176,9 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + remote_ids : typing.Optional[str] + If provided, will only return tickets with these remote IDs (comma-separated). + remote_updated_after : typing.Optional[dt.datetime] If provided, will only return tickets updated in the third party platform after this datetime. @@ -180,7 +188,7 @@ def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status : typing.Optional[TicketsListRequestStatus] + status : typing.Optional[str] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -236,6 +244,7 @@ def list( else None, "remote_fields": remote_fields, "remote_id": remote_id, + "remote_ids": remote_ids, "remote_updated_after": serialize_datetime(remote_updated_after) if remote_updated_after is not None else None, @@ -534,6 +543,115 @@ def viewers_list( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + @contextlib.contextmanager + def live_search_retrieve( + self, + *, + assignee_ids: typing.Optional[str] = None, + assignees: typing.Optional[str] = None, + collection_ids: typing.Optional[str] = None, + collections: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_fields: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + name: typing.Optional[str] = None, + remote_cursor: typing.Optional[str] = None, + remote_fields: typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] = None, + show_enum_origins: typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] = None, + status: typing.Optional[str] = None, + ticket_url: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + """ + Returns a list of `Ticket` objects. + + Parameters + ---------- + assignee_ids : typing.Optional[str] + Filter tickets by assignee IDs (comma-separated) + + assignees : typing.Optional[str] + Filter tickets by assignee names (comma-separated) + + collection_ids : typing.Optional[str] + Filter tickets by collection IDs (comma-separated) + + collections : typing.Optional[str] + Filter tickets by collection names (comma-separated) + + include_deleted_data : typing.Optional[bool] + Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + + include_remote_fields : typing.Optional[bool] + Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + name : typing.Optional[str] + Filter tickets by name/title + + remote_cursor : typing.Optional[str] + Pagination cursor for remote data + + remote_fields : typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] + Deprecated. Use show_enum_origins. + + show_enum_origins : typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] + A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + + status : typing.Optional[str] + Filter tickets by status + + ticket_url : typing.Optional[str] + Filter tickets by URL + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[HttpResponse[typing.Iterator[bytes]]] + + """ + with self._client_wrapper.httpx_client.stream( + "ticketing/v1/tickets/live-search", + method="GET", + params={ + "assignee_ids": assignee_ids, + "assignees": assignees, + "collection_ids": collection_ids, + "collections": collections, + "include_deleted_data": include_deleted_data, + "include_remote_fields": include_remote_fields, + "include_shell_data": include_shell_data, + "name": name, + "remote_cursor": remote_cursor, + "remote_fields": remote_fields, + "show_enum_origins": show_enum_origins, + "status": status, + "ticket_url": ticket_url, + }, + request_options=request_options, + ) as _response: + + def _stream() -> HttpResponse[typing.Iterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None + return HttpResponse( + response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) + ) + _response.read() + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + def meta_patch_retrieve( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[MetaResponse]: @@ -738,10 +856,11 @@ async def list( remote_created_before: typing.Optional[dt.datetime] = None, remote_fields: typing.Optional[TicketsListRequestRemoteFields] = None, remote_id: typing.Optional[str] = None, + remote_ids: typing.Optional[str] = None, remote_updated_after: typing.Optional[dt.datetime] = None, remote_updated_before: typing.Optional[dt.datetime] = None, show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins] = None, - status: typing.Optional[TicketsListRequestStatus] = None, + status: typing.Optional[str] = None, tags: typing.Optional[str] = None, ticket_type: typing.Optional[str] = None, ticket_url: typing.Optional[str] = None, @@ -841,6 +960,9 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + remote_ids : typing.Optional[str] + If provided, will only return tickets with these remote IDs (comma-separated). + remote_updated_after : typing.Optional[dt.datetime] If provided, will only return tickets updated in the third party platform after this datetime. @@ -850,7 +972,7 @@ async def list( show_enum_origins : typing.Optional[TicketsListRequestShowEnumOrigins] A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status : typing.Optional[TicketsListRequestStatus] + status : typing.Optional[str] If provided, will only return tickets of this status. tags : typing.Optional[str] @@ -906,6 +1028,7 @@ async def list( else None, "remote_fields": remote_fields, "remote_id": remote_id, + "remote_ids": remote_ids, "remote_updated_after": serialize_datetime(remote_updated_after) if remote_updated_after is not None else None, @@ -1204,6 +1327,116 @@ async def viewers_list( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + @contextlib.asynccontextmanager + async def live_search_retrieve( + self, + *, + assignee_ids: typing.Optional[str] = None, + assignees: typing.Optional[str] = None, + collection_ids: typing.Optional[str] = None, + collections: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_fields: typing.Optional[bool] = None, + include_shell_data: typing.Optional[bool] = None, + name: typing.Optional[str] = None, + remote_cursor: typing.Optional[str] = None, + remote_fields: typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] = None, + show_enum_origins: typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] = None, + status: typing.Optional[str] = None, + ticket_url: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + """ + Returns a list of `Ticket` objects. + + Parameters + ---------- + assignee_ids : typing.Optional[str] + Filter tickets by assignee IDs (comma-separated) + + assignees : typing.Optional[str] + Filter tickets by assignee names (comma-separated) + + collection_ids : typing.Optional[str] + Filter tickets by collection IDs (comma-separated) + + collections : typing.Optional[str] + Filter tickets by collection names (comma-separated) + + include_deleted_data : typing.Optional[bool] + Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + + include_remote_fields : typing.Optional[bool] + Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. + + include_shell_data : typing.Optional[bool] + Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + + name : typing.Optional[str] + Filter tickets by name/title + + remote_cursor : typing.Optional[str] + Pagination cursor for remote data + + remote_fields : typing.Optional[TicketsLiveSearchRetrieveRequestRemoteFields] + Deprecated. Use show_enum_origins. + + show_enum_origins : typing.Optional[TicketsLiveSearchRetrieveRequestShowEnumOrigins] + A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + + status : typing.Optional[str] + Filter tickets by status + + ticket_url : typing.Optional[str] + Filter tickets by URL + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] + + """ + async with self._client_wrapper.httpx_client.stream( + "ticketing/v1/tickets/live-search", + method="GET", + params={ + "assignee_ids": assignee_ids, + "assignees": assignees, + "collection_ids": collection_ids, + "collections": collections, + "include_deleted_data": include_deleted_data, + "include_remote_fields": include_remote_fields, + "include_shell_data": include_shell_data, + "name": name, + "remote_cursor": remote_cursor, + "remote_fields": remote_fields, + "show_enum_origins": show_enum_origins, + "status": status, + "ticket_url": ticket_url, + }, + request_options=request_options, + ) as _response: + + async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None + return AsyncHttpResponse( + response=_response, + data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), + ) + await _response.aread() + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() + async def meta_patch_retrieve( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[MetaResponse]: diff --git a/src/merge/resources/ticketing/resources/tickets/types/__init__.py b/src/merge/resources/ticketing/resources/tickets/types/__init__.py index af027d4e..caa0fe71 100644 --- a/src/merge/resources/ticketing/resources/tickets/types/__init__.py +++ b/src/merge/resources/ticketing/resources/tickets/types/__init__.py @@ -10,7 +10,8 @@ from .tickets_list_request_priority import TicketsListRequestPriority from .tickets_list_request_remote_fields import TicketsListRequestRemoteFields from .tickets_list_request_show_enum_origins import TicketsListRequestShowEnumOrigins - from .tickets_list_request_status import TicketsListRequestStatus + from .tickets_live_search_retrieve_request_remote_fields import TicketsLiveSearchRetrieveRequestRemoteFields + from .tickets_live_search_retrieve_request_show_enum_origins import TicketsLiveSearchRetrieveRequestShowEnumOrigins from .tickets_retrieve_request_expand import TicketsRetrieveRequestExpand from .tickets_retrieve_request_remote_fields import TicketsRetrieveRequestRemoteFields from .tickets_retrieve_request_show_enum_origins import TicketsRetrieveRequestShowEnumOrigins @@ -20,7 +21,8 @@ "TicketsListRequestPriority": ".tickets_list_request_priority", "TicketsListRequestRemoteFields": ".tickets_list_request_remote_fields", "TicketsListRequestShowEnumOrigins": ".tickets_list_request_show_enum_origins", - "TicketsListRequestStatus": ".tickets_list_request_status", + "TicketsLiveSearchRetrieveRequestRemoteFields": ".tickets_live_search_retrieve_request_remote_fields", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins": ".tickets_live_search_retrieve_request_show_enum_origins", "TicketsRetrieveRequestExpand": ".tickets_retrieve_request_expand", "TicketsRetrieveRequestRemoteFields": ".tickets_retrieve_request_remote_fields", "TicketsRetrieveRequestShowEnumOrigins": ".tickets_retrieve_request_show_enum_origins", @@ -52,7 +54,8 @@ def __dir__(): "TicketsListRequestPriority", "TicketsListRequestRemoteFields", "TicketsListRequestShowEnumOrigins", - "TicketsListRequestStatus", + "TicketsLiveSearchRetrieveRequestRemoteFields", + "TicketsLiveSearchRetrieveRequestShowEnumOrigins", "TicketsRetrieveRequestExpand", "TicketsRetrieveRequestRemoteFields", "TicketsRetrieveRequestShowEnumOrigins", diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py deleted file mode 100644 index edb298e9..00000000 --- a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class TicketsListRequestStatus(str, enum.Enum): - EMPTY = "" - CLOSED = "CLOSED" - IN_PROGRESS = "IN_PROGRESS" - ON_HOLD = "ON_HOLD" - OPEN = "OPEN" - - def visit( - self, - empty: typing.Callable[[], T_Result], - closed: typing.Callable[[], T_Result], - in_progress: typing.Callable[[], T_Result], - on_hold: typing.Callable[[], T_Result], - open: typing.Callable[[], T_Result], - ) -> T_Result: - if self is TicketsListRequestStatus.EMPTY: - return empty() - if self is TicketsListRequestStatus.CLOSED: - return closed() - if self is TicketsListRequestStatus.IN_PROGRESS: - return in_progress() - if self is TicketsListRequestStatus.ON_HOLD: - return on_hold() - if self is TicketsListRequestStatus.OPEN: - return open() diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_live_search_retrieve_request_remote_fields.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_live_search_retrieve_request_remote_fields.py new file mode 100644 index 00000000..1a43df23 --- /dev/null +++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_live_search_retrieve_request_remote_fields.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class TicketsLiveSearchRetrieveRequestRemoteFields(str, enum.Enum): + PRIORITY = "priority" + PRIORITY_STATUS = "priority,status" + PRIORITY_STATUS_TICKET_TYPE = "priority,status,ticket_type" + PRIORITY_TICKET_TYPE = "priority,ticket_type" + STATUS = "status" + STATUS_TICKET_TYPE = "status,ticket_type" + TICKET_TYPE = "ticket_type" + + def visit( + self, + priority: typing.Callable[[], T_Result], + priority_status: typing.Callable[[], T_Result], + priority_status_ticket_type: typing.Callable[[], T_Result], + priority_ticket_type: typing.Callable[[], T_Result], + status: typing.Callable[[], T_Result], + status_ticket_type: typing.Callable[[], T_Result], + ticket_type: typing.Callable[[], T_Result], + ) -> T_Result: + if self is TicketsLiveSearchRetrieveRequestRemoteFields.PRIORITY: + return priority() + if self is TicketsLiveSearchRetrieveRequestRemoteFields.PRIORITY_STATUS: + return priority_status() + if self is TicketsLiveSearchRetrieveRequestRemoteFields.PRIORITY_STATUS_TICKET_TYPE: + return priority_status_ticket_type() + if self is TicketsLiveSearchRetrieveRequestRemoteFields.PRIORITY_TICKET_TYPE: + return priority_ticket_type() + if self is TicketsLiveSearchRetrieveRequestRemoteFields.STATUS: + return status() + if self is TicketsLiveSearchRetrieveRequestRemoteFields.STATUS_TICKET_TYPE: + return status_ticket_type() + if self is TicketsLiveSearchRetrieveRequestRemoteFields.TICKET_TYPE: + return ticket_type() diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_live_search_retrieve_request_show_enum_origins.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_live_search_retrieve_request_show_enum_origins.py new file mode 100644 index 00000000..203e0ded --- /dev/null +++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_live_search_retrieve_request_show_enum_origins.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class TicketsLiveSearchRetrieveRequestShowEnumOrigins(str, enum.Enum): + PRIORITY = "priority" + PRIORITY_STATUS = "priority,status" + PRIORITY_STATUS_TICKET_TYPE = "priority,status,ticket_type" + PRIORITY_TICKET_TYPE = "priority,ticket_type" + STATUS = "status" + STATUS_TICKET_TYPE = "status,ticket_type" + TICKET_TYPE = "ticket_type" + + def visit( + self, + priority: typing.Callable[[], T_Result], + priority_status: typing.Callable[[], T_Result], + priority_status_ticket_type: typing.Callable[[], T_Result], + priority_ticket_type: typing.Callable[[], T_Result], + status: typing.Callable[[], T_Result], + status_ticket_type: typing.Callable[[], T_Result], + ticket_type: typing.Callable[[], T_Result], + ) -> T_Result: + if self is TicketsLiveSearchRetrieveRequestShowEnumOrigins.PRIORITY: + return priority() + if self is TicketsLiveSearchRetrieveRequestShowEnumOrigins.PRIORITY_STATUS: + return priority_status() + if self is TicketsLiveSearchRetrieveRequestShowEnumOrigins.PRIORITY_STATUS_TICKET_TYPE: + return priority_status_ticket_type() + if self is TicketsLiveSearchRetrieveRequestShowEnumOrigins.PRIORITY_TICKET_TYPE: + return priority_ticket_type() + if self is TicketsLiveSearchRetrieveRequestShowEnumOrigins.STATUS: + return status() + if self is TicketsLiveSearchRetrieveRequestShowEnumOrigins.STATUS_TICKET_TYPE: + return status_ticket_type() + if self is TicketsLiveSearchRetrieveRequestShowEnumOrigins.TICKET_TYPE: + return ticket_type() diff --git a/src/merge/resources/ticketing/resources/users/client.py b/src/merge/resources/ticketing/resources/users/client.py index 69855e85..1f3a9847 100644 --- a/src/merge/resources/ticketing/resources/users/client.py +++ b/src/merge/resources/ticketing/resources/users/client.py @@ -30,6 +30,7 @@ def with_raw_response(self) -> RawUsersClient: def list( self, *, + collections: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -42,7 +43,9 @@ def list( modified_before: typing.Optional[dt.datetime] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + roles: typing.Optional[str] = None, team: typing.Optional[str] = None, + teams: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedUserList: """ @@ -50,6 +53,9 @@ def list( Parameters ---------- + collections : typing.Optional[str] + If provided, will only return users involved with at least one of these collections. + created_after : typing.Optional[dt.datetime] If provided, will only return objects created after this datetime. @@ -86,9 +92,15 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + roles : typing.Optional[str] + If provided, will only return users with at least one of these roles. + team : typing.Optional[str] If provided, will only return users matching in this team. + teams : typing.Optional[str] + If provided, will only return users with at least one of these teams. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -109,6 +121,7 @@ def list( api_key="YOUR_API_KEY", ) client.ticketing.users.list( + collections="collections", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -129,10 +142,13 @@ def list( ), page_size=1, remote_id="remote_id", + roles="roles", team="team", + teams="teams", ) """ _response = self._raw_client.list( + collections=collections, created_after=created_after, created_before=created_before, cursor=cursor, @@ -145,7 +161,9 @@ def list( modified_before=modified_before, page_size=page_size, remote_id=remote_id, + roles=roles, team=team, + teams=teams, request_options=request_options, ) return _response.data @@ -227,6 +245,7 @@ def with_raw_response(self) -> AsyncRawUsersClient: async def list( self, *, + collections: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -239,7 +258,9 @@ async def list( modified_before: typing.Optional[dt.datetime] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + roles: typing.Optional[str] = None, team: typing.Optional[str] = None, + teams: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedUserList: """ @@ -247,6 +268,9 @@ async def list( Parameters ---------- + collections : typing.Optional[str] + If provided, will only return users involved with at least one of these collections. + created_after : typing.Optional[dt.datetime] If provided, will only return objects created after this datetime. @@ -283,9 +307,15 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + roles : typing.Optional[str] + If provided, will only return users with at least one of these roles. + team : typing.Optional[str] If provided, will only return users matching in this team. + teams : typing.Optional[str] + If provided, will only return users with at least one of these teams. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -310,6 +340,7 @@ async def list( async def main() -> None: await client.ticketing.users.list( + collections="collections", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -330,13 +361,16 @@ async def main() -> None: ), page_size=1, remote_id="remote_id", + roles="roles", team="team", + teams="teams", ) asyncio.run(main()) """ _response = await self._raw_client.list( + collections=collections, created_after=created_after, created_before=created_before, cursor=cursor, @@ -349,7 +383,9 @@ async def main() -> None: modified_before=modified_before, page_size=page_size, remote_id=remote_id, + roles=roles, team=team, + teams=teams, request_options=request_options, ) return _response.data diff --git a/src/merge/resources/ticketing/resources/users/raw_client.py b/src/merge/resources/ticketing/resources/users/raw_client.py index b7f9c286..a9ce10db 100644 --- a/src/merge/resources/ticketing/resources/users/raw_client.py +++ b/src/merge/resources/ticketing/resources/users/raw_client.py @@ -24,6 +24,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, + collections: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -36,7 +37,9 @@ def list( modified_before: typing.Optional[dt.datetime] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + roles: typing.Optional[str] = None, team: typing.Optional[str] = None, + teams: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedUserList]: """ @@ -44,6 +47,9 @@ def list( Parameters ---------- + collections : typing.Optional[str] + If provided, will only return users involved with at least one of these collections. + created_after : typing.Optional[dt.datetime] If provided, will only return objects created after this datetime. @@ -80,9 +86,15 @@ def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + roles : typing.Optional[str] + If provided, will only return users with at least one of these roles. + team : typing.Optional[str] If provided, will only return users matching in this team. + teams : typing.Optional[str] + If provided, will only return users with at least one of these teams. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -95,6 +107,7 @@ def list( "ticketing/v1/users", method="GET", params={ + "collections": collections, "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, @@ -107,7 +120,9 @@ def list( "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, "page_size": page_size, "remote_id": remote_id, + "roles": roles, "team": team, + "teams": teams, }, request_options=request_options, ) @@ -192,6 +207,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, + collections: typing.Optional[str] = None, created_after: typing.Optional[dt.datetime] = None, created_before: typing.Optional[dt.datetime] = None, cursor: typing.Optional[str] = None, @@ -204,7 +220,9 @@ async def list( modified_before: typing.Optional[dt.datetime] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + roles: typing.Optional[str] = None, team: typing.Optional[str] = None, + teams: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedUserList]: """ @@ -212,6 +230,9 @@ async def list( Parameters ---------- + collections : typing.Optional[str] + If provided, will only return users involved with at least one of these collections. + created_after : typing.Optional[dt.datetime] If provided, will only return objects created after this datetime. @@ -248,9 +269,15 @@ async def list( remote_id : typing.Optional[str] The API provider's ID for the given object. + roles : typing.Optional[str] + If provided, will only return users with at least one of these roles. + team : typing.Optional[str] If provided, will only return users matching in this team. + teams : typing.Optional[str] + If provided, will only return users with at least one of these teams. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -263,6 +290,7 @@ async def list( "ticketing/v1/users", method="GET", params={ + "collections": collections, "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, @@ -275,7 +303,9 @@ async def list( "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, "page_size": page_size, "remote_id": remote_id, + "roles": roles, "team": team, + "teams": teams, }, request_options=request_options, ) diff --git a/src/merge/resources/ticketing/types/__init__.py b/src/merge/resources/ticketing/types/__init__.py index 59da70e3..ddcdc109 100644 --- a/src/merge/resources/ticketing/types/__init__.py +++ b/src/merge/resources/ticketing/types/__init__.py @@ -16,6 +16,7 @@ from .account_details_category import AccountDetailsCategory from .account_integration import AccountIntegration from .account_token import AccountToken + from .actions_enum import ActionsEnum from .advanced_metadata import AdvancedMetadata from .async_passthrough_reciept import AsyncPassthroughReciept from .attachment import Attachment @@ -33,6 +34,7 @@ from .collection_access_level_enum import CollectionAccessLevelEnum from .collection_collection_type import CollectionCollectionType from .collection_parent_collection import CollectionParentCollection + from .collection_permissions_item import CollectionPermissionsItem from .collection_type_enum import CollectionTypeEnum from .comment import Comment from .comment_contact import CommentContact @@ -53,6 +55,7 @@ from .data_passthrough_request import DataPassthroughRequest from .debug_mode_log import DebugModeLog from .debug_model_log_summary import DebugModelLogSummary + from .effect_enum import EffectEnum from .enabled_actions_enum import EnabledActionsEnum from .encoding_enum import EncodingEnum from .error_validation_problem import ErrorValidationProblem @@ -111,8 +114,13 @@ from .patched_ticket_request_access_level import PatchedTicketRequestAccessLevel from .patched_ticket_request_priority import PatchedTicketRequestPriority from .patched_ticket_request_status import PatchedTicketRequestStatus + from .permission import Permission + from .permission_effect import PermissionEffect + from .permission_request import PermissionRequest + from .permission_request_effect import PermissionRequestEffect from .priority_enum import PriorityEnum from .project import Project + from .regenerate_account_token import RegenerateAccountToken from .remote_data import RemoteData from .remote_endpoint_info import RemoteEndpointInfo from .remote_field import RemoteField @@ -138,6 +146,7 @@ from .status_fd_5_enum import StatusFd5Enum from .sync_status import SyncStatus from .sync_status_last_sync_result import SyncStatusLastSyncResult + from .sync_status_status import SyncStatusStatus from .tag import Tag from .team import Team from .ticket import Ticket @@ -153,6 +162,7 @@ from .ticket_contact import TicketContact from .ticket_creator import TicketCreator from .ticket_parent_ticket import TicketParentTicket + from .ticket_permissions_item import TicketPermissionsItem from .ticket_priority import TicketPriority from .ticket_request import TicketRequest from .ticket_request_access_level import TicketRequestAccessLevel @@ -191,6 +201,7 @@ "AccountDetailsCategory": ".account_details_category", "AccountIntegration": ".account_integration", "AccountToken": ".account_token", + "ActionsEnum": ".actions_enum", "AdvancedMetadata": ".advanced_metadata", "AsyncPassthroughReciept": ".async_passthrough_reciept", "Attachment": ".attachment", @@ -208,6 +219,7 @@ "CollectionAccessLevelEnum": ".collection_access_level_enum", "CollectionCollectionType": ".collection_collection_type", "CollectionParentCollection": ".collection_parent_collection", + "CollectionPermissionsItem": ".collection_permissions_item", "CollectionTypeEnum": ".collection_type_enum", "Comment": ".comment", "CommentContact": ".comment_contact", @@ -228,6 +240,7 @@ "DataPassthroughRequest": ".data_passthrough_request", "DebugModeLog": ".debug_mode_log", "DebugModelLogSummary": ".debug_model_log_summary", + "EffectEnum": ".effect_enum", "EnabledActionsEnum": ".enabled_actions_enum", "EncodingEnum": ".encoding_enum", "ErrorValidationProblem": ".error_validation_problem", @@ -284,8 +297,13 @@ "PatchedTicketRequestAccessLevel": ".patched_ticket_request_access_level", "PatchedTicketRequestPriority": ".patched_ticket_request_priority", "PatchedTicketRequestStatus": ".patched_ticket_request_status", + "Permission": ".permission", + "PermissionEffect": ".permission_effect", + "PermissionRequest": ".permission_request", + "PermissionRequestEffect": ".permission_request_effect", "PriorityEnum": ".priority_enum", "Project": ".project", + "RegenerateAccountToken": ".regenerate_account_token", "RemoteData": ".remote_data", "RemoteEndpointInfo": ".remote_endpoint_info", "RemoteField": ".remote_field", @@ -311,6 +329,7 @@ "StatusFd5Enum": ".status_fd_5_enum", "SyncStatus": ".sync_status", "SyncStatusLastSyncResult": ".sync_status_last_sync_result", + "SyncStatusStatus": ".sync_status_status", "Tag": ".tag", "Team": ".team", "Ticket": ".ticket", @@ -326,6 +345,7 @@ "TicketContact": ".ticket_contact", "TicketCreator": ".ticket_creator", "TicketParentTicket": ".ticket_parent_ticket", + "TicketPermissionsItem": ".ticket_permissions_item", "TicketPriority": ".ticket_priority", "TicketRequest": ".ticket_request", "TicketRequestAccessLevel": ".ticket_request_access_level", @@ -386,6 +406,7 @@ def __dir__(): "AccountDetailsCategory", "AccountIntegration", "AccountToken", + "ActionsEnum", "AdvancedMetadata", "AsyncPassthroughReciept", "Attachment", @@ -403,6 +424,7 @@ def __dir__(): "CollectionAccessLevelEnum", "CollectionCollectionType", "CollectionParentCollection", + "CollectionPermissionsItem", "CollectionTypeEnum", "Comment", "CommentContact", @@ -423,6 +445,7 @@ def __dir__(): "DataPassthroughRequest", "DebugModeLog", "DebugModelLogSummary", + "EffectEnum", "EnabledActionsEnum", "EncodingEnum", "ErrorValidationProblem", @@ -479,8 +502,13 @@ def __dir__(): "PatchedTicketRequestAccessLevel", "PatchedTicketRequestPriority", "PatchedTicketRequestStatus", + "Permission", + "PermissionEffect", + "PermissionRequest", + "PermissionRequestEffect", "PriorityEnum", "Project", + "RegenerateAccountToken", "RemoteData", "RemoteEndpointInfo", "RemoteField", @@ -506,6 +534,7 @@ def __dir__(): "StatusFd5Enum", "SyncStatus", "SyncStatusLastSyncResult", + "SyncStatusStatus", "Tag", "Team", "Ticket", @@ -521,6 +550,7 @@ def __dir__(): "TicketContact", "TicketCreator", "TicketParentTicket", + "TicketPermissionsItem", "TicketPriority", "TicketRequest", "TicketRequestAccessLevel", diff --git a/src/merge/resources/ticketing/types/actions_enum.py b/src/merge/resources/ticketing/types/actions_enum.py new file mode 100644 index 00000000..77b81831 --- /dev/null +++ b/src/merge/resources/ticketing/types/actions_enum.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class ActionsEnum(str, enum.Enum): + """ + * `VIEW` - VIEW + * `CREATE` - CREATE + * `EDIT` - EDIT + * `DELETE` - DELETE + """ + + VIEW = "VIEW" + CREATE = "CREATE" + EDIT = "EDIT" + DELETE = "DELETE" + + def visit( + self, + view: typing.Callable[[], T_Result], + create: typing.Callable[[], T_Result], + edit: typing.Callable[[], T_Result], + delete: typing.Callable[[], T_Result], + ) -> T_Result: + if self is ActionsEnum.VIEW: + return view() + if self is ActionsEnum.CREATE: + return create() + if self is ActionsEnum.EDIT: + return edit() + if self is ActionsEnum.DELETE: + return delete() diff --git a/src/merge/resources/ticketing/types/collection.py b/src/merge/resources/ticketing/types/collection.py index b74584a0..d881c678 100644 --- a/src/merge/resources/ticketing/types/collection.py +++ b/src/merge/resources/ticketing/types/collection.py @@ -10,6 +10,7 @@ from ....core.unchecked_base_model import UncheckedBaseModel from .collection_access_level import CollectionAccessLevel from .collection_collection_type import CollectionCollectionType +from .collection_permissions_item import CollectionPermissionsItem from .remote_data import RemoteData @@ -72,6 +73,7 @@ class Collection(UncheckedBaseModel): The parent collection for this collection. """ + permissions: typing.Optional[typing.List[CollectionPermissionsItem]] = None collection_url: typing.Optional[str] = pydantic.Field(default=None) """ The 3rd party url of the Collection. diff --git a/src/merge/resources/ticketing/types/collection_permissions_item.py b/src/merge/resources/ticketing/types/collection_permissions_item.py new file mode 100644 index 00000000..09b1aa44 --- /dev/null +++ b/src/merge/resources/ticketing/types/collection_permissions_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .permission import Permission + +CollectionPermissionsItem = typing.Union[str, Permission] diff --git a/src/merge/resources/ticketing/types/effect_enum.py b/src/merge/resources/ticketing/types/effect_enum.py new file mode 100644 index 00000000..4b8cafc9 --- /dev/null +++ b/src/merge/resources/ticketing/types/effect_enum.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class EffectEnum(str, enum.Enum): + """ + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + """ + + ALLOWED = "ALLOWED" + DENIED = "DENIED" + INHERITED = "INHERITED" + + def visit( + self, + allowed: typing.Callable[[], T_Result], + denied: typing.Callable[[], T_Result], + inherited: typing.Callable[[], T_Result], + ) -> T_Result: + if self is EffectEnum.ALLOWED: + return allowed() + if self is EffectEnum.DENIED: + return denied() + if self is EffectEnum.INHERITED: + return inherited() diff --git a/src/merge/resources/ticketing/types/permission.py b/src/merge/resources/ticketing/types/permission.py new file mode 100644 index 00000000..bb45eeff --- /dev/null +++ b/src/merge/resources/ticketing/types/permission.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .actions_enum import ActionsEnum +from .permission_effect import PermissionEffect + + +class Permission(UncheckedBaseModel): + """ + # The Permission Object + ### Description + The `Permission` object is used to represent permissions that can be applied to users, roles, teams, collections, and tickets. + + ### Usage Example + TODO + """ + + id: typing.Optional[str] = None + remote_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The third-party API ID of the matching object. + """ + + created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was created by Merge. + """ + + modified_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The datetime that this object was modified by Merge. + """ + + effect: typing.Optional[PermissionEffect] = pydantic.Field(default=None) + """ + Outcome of this permission rule for matching users. + + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + """ + + actions: typing.Optional[typing.List[typing.Optional[ActionsEnum]]] = pydantic.Field(default=None) + """ + Operations that this permission applies to. If the entity inherits permission from a parent entity, then this should be an empty array. In that case, the entity would inherit the parent entity’s actions. + """ + + applied_to_users: typing.Optional[typing.List[typing.Optional[str]]] = None + applied_to_roles: typing.Optional[typing.List[typing.Optional[str]]] = None + applied_to_teams: typing.Optional[typing.List[typing.Optional[str]]] = None + applied_to_collections: typing.Optional[typing.List[typing.Optional[str]]] = None + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) + """ + Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + """ + + field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/ticketing/types/permission_effect.py b/src/merge/resources/ticketing/types/permission_effect.py new file mode 100644 index 00000000..88d536ee --- /dev/null +++ b/src/merge/resources/ticketing/types/permission_effect.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .effect_enum import EffectEnum + +PermissionEffect = typing.Union[EffectEnum, str] diff --git a/src/merge/resources/ticketing/types/permission_request.py b/src/merge/resources/ticketing/types/permission_request.py new file mode 100644 index 00000000..4d4252b2 --- /dev/null +++ b/src/merge/resources/ticketing/types/permission_request.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel +from .actions_enum import ActionsEnum +from .permission_request_effect import PermissionRequestEffect + + +class PermissionRequest(UncheckedBaseModel): + """ + # The Permission Object + ### Description + The `Permission` object is used to represent permissions that can be applied to users, roles, teams, collections, and tickets. + + ### Usage Example + TODO + """ + + remote_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The third-party API ID of the matching object. + """ + + effect: typing.Optional[PermissionRequestEffect] = pydantic.Field(default=None) + """ + Outcome of this permission rule for matching users. + + * `ALLOWED` - ALLOWED + * `DENIED` - DENIED + * `INHERITED` - INHERITED + """ + + actions: typing.Optional[typing.List[typing.Optional[ActionsEnum]]] = pydantic.Field(default=None) + """ + Operations that this permission applies to. If the entity inherits permission from a parent entity, then this should be an empty array. In that case, the entity would inherit the parent entity’s actions. + """ + + applied_to_users: typing.Optional[typing.List[typing.Optional[str]]] = None + applied_to_roles: typing.Optional[typing.List[typing.Optional[str]]] = None + applied_to_teams: typing.Optional[typing.List[typing.Optional[str]]] = None + applied_to_collections: typing.Optional[typing.List[typing.Optional[str]]] = None + integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/ticketing/types/permission_request_effect.py b/src/merge/resources/ticketing/types/permission_request_effect.py new file mode 100644 index 00000000..9ae4c411 --- /dev/null +++ b/src/merge/resources/ticketing/types/permission_request_effect.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .effect_enum import EffectEnum + +PermissionRequestEffect = typing.Union[EffectEnum, str] diff --git a/src/merge/resources/ticketing/types/regenerate_account_token.py b/src/merge/resources/ticketing/types/regenerate_account_token.py new file mode 100644 index 00000000..5c31cf57 --- /dev/null +++ b/src/merge/resources/ticketing/types/regenerate_account_token.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class RegenerateAccountToken(UncheckedBaseModel): + """ + # The RegenerateAccountToken Object + ### Description + The `RegenerateAccountToken` object is used to exchange an old account token for a new one. + + ### Usage Example + Post to receive a new `RegenerateAccountToken`. + """ + + linked_account_id: str + account_token: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/merge/resources/ticketing/types/role_enum.py b/src/merge/resources/ticketing/types/role_enum.py index a6cfcc6f..8f2c9b1d 100644 --- a/src/merge/resources/ticketing/types/role_enum.py +++ b/src/merge/resources/ticketing/types/role_enum.py @@ -14,6 +14,7 @@ class RoleEnum(str, enum.Enum): * `API` - API * `SYSTEM` - SYSTEM * `MERGE_TEAM` - MERGE_TEAM + * `SUPPORT` - SUPPORT """ ADMIN = "ADMIN" @@ -22,6 +23,7 @@ class RoleEnum(str, enum.Enum): API = "API" SYSTEM = "SYSTEM" MERGE_TEAM = "MERGE_TEAM" + SUPPORT = "SUPPORT" def visit( self, @@ -31,6 +33,7 @@ def visit( api: typing.Callable[[], T_Result], system: typing.Callable[[], T_Result], merge_team: typing.Callable[[], T_Result], + support: typing.Callable[[], T_Result], ) -> T_Result: if self is RoleEnum.ADMIN: return admin() @@ -44,3 +47,5 @@ def visit( return system() if self is RoleEnum.MERGE_TEAM: return merge_team() + if self is RoleEnum.SUPPORT: + return support() diff --git a/src/merge/resources/ticketing/types/sync_status.py b/src/merge/resources/ticketing/types/sync_status.py index 4a628c4f..07ab1dc2 100644 --- a/src/merge/resources/ticketing/types/sync_status.py +++ b/src/merge/resources/ticketing/types/sync_status.py @@ -7,8 +7,8 @@ from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum -from .status_fd_5_enum import StatusFd5Enum from .sync_status_last_sync_result import SyncStatusLastSyncResult +from .sync_status_status import SyncStatusStatus class SyncStatus(UncheckedBaseModel): @@ -27,7 +27,7 @@ class SyncStatus(UncheckedBaseModel): next_sync_start: typing.Optional[dt.datetime] = None last_sync_result: typing.Optional[SyncStatusLastSyncResult] = None last_sync_finished: typing.Optional[dt.datetime] = None - status: StatusFd5Enum + status: SyncStatusStatus is_initial_sync: bool selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum] = None diff --git a/src/merge/resources/ticketing/types/sync_status_status.py b/src/merge/resources/ticketing/types/sync_status_status.py new file mode 100644 index 00000000..78e4cc47 --- /dev/null +++ b/src/merge/resources/ticketing/types/sync_status_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .status_fd_5_enum import StatusFd5Enum + +SyncStatusStatus = typing.Union[StatusFd5Enum, str] diff --git a/src/merge/resources/ticketing/types/ticket.py b/src/merge/resources/ticketing/types/ticket.py index 0a550a82..e645788f 100644 --- a/src/merge/resources/ticketing/types/ticket.py +++ b/src/merge/resources/ticketing/types/ticket.py @@ -17,6 +17,7 @@ from .ticket_collections_item import TicketCollectionsItem from .ticket_contact import TicketContact from .ticket_creator import TicketCreator +from .ticket_permissions_item import TicketPermissionsItem from .ticket_priority import TicketPriority from .ticket_status import TicketStatus @@ -124,6 +125,7 @@ class Ticket(UncheckedBaseModel): * `COLLECTION` - COLLECTION """ + permissions: typing.Optional[typing.List[TicketPermissionsItem]] = None tags: typing.Optional[typing.List[typing.Optional[str]]] = None roles: typing.Optional[typing.List[typing.Optional[str]]] = None remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) diff --git a/src/merge/resources/ticketing/types/ticket_permissions_item.py b/src/merge/resources/ticketing/types/ticket_permissions_item.py new file mode 100644 index 00000000..9006419e --- /dev/null +++ b/src/merge/resources/ticketing/types/ticket_permissions_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .permission import Permission + +TicketPermissionsItem = typing.Union[str, Permission]