From 9e8823454b1e749c9eb66a6376b043bb4c4fa8af Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:45:35 +0000 Subject: [PATCH] SDK regeneration --- .mock/definition/accounting/__package__.yml | 77 + .mock/definition/accounting/contacts.yml | 280 ++ .mock/definition/accounting/transactions.yml | 128 + .mock/definition/ats/__package__.yml | 1 + .mock/definition/filestorage/files.yml | 16 + .mock/definition/hris/__package__.yml | 10 +- .mock/definition/hris/benefits.yml | 4 +- .mock/definition/ticketing/__package__.yml | 6 +- .mock/definition/ticketing/tickets.yml | 3 + package.json | 2 +- reference.md | 2798 +++++++++-------- src/Client.ts | 16 +- .../resources/contacts/client/Client.ts | 182 ++ .../requests/PatchedContactEndpointRequest.ts | 19 + .../contacts/client/requests/index.ts | 1 + .../types/TransactionsListRequestExpand.ts | 70 +- .../TransactionsRetrieveRequestExpand.ts | 70 +- .../accounting/types/PatchedContactRequest.ts | 46 + .../PatchedContactRequestAddressesItem.ts | 7 + src/api/resources/accounting/types/index.ts | 2 + src/api/resources/ats/types/EventTypeEnum.ts | 2 + .../resources/files/client/Client.ts | 19 + .../FilesDownloadRequestMetaListRequest.ts | 2 + .../files/client/requests/FilesListRequest.ts | 4 + src/api/resources/hris/types/Benefit.ts | 4 +- src/api/resources/index.ts | 2 +- .../resources/tickets/client/Client.ts | 5 + .../client/requests/TicketsListRequest.ts | 2 + .../ticketing/types/PatchedTicketRequest.ts | 4 +- .../requests/PatchedContactEndpointRequest.ts | 21 + .../contacts/client/requests/index.ts | 1 + .../types/TransactionsListRequestExpand.ts | 66 +- .../TransactionsRetrieveRequestExpand.ts | 66 +- .../accounting/types/PatchedContactRequest.ts | 56 + .../PatchedContactRequestAddressesItem.ts | 17 + .../resources/accounting/types/index.ts | 2 + .../resources/ats/types/EventTypeEnum.ts | 2 + .../resources/hris/types/Benefit.ts | 4 +- src/serialization/resources/index.ts | 2 +- .../ticketing/types/PatchedTicketRequest.ts | 4 +- src/version.ts | 2 +- tests/wire/accounting/contacts.test.ts | 571 ++++ tests/wire/hris/benefits.test.ts | 8 +- yarn.lock | 79 +- 44 files changed, 3280 insertions(+), 1403 deletions(-) create mode 100644 src/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts create mode 100644 src/api/resources/accounting/types/PatchedContactRequest.ts create mode 100644 src/api/resources/accounting/types/PatchedContactRequestAddressesItem.ts create mode 100644 src/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts create mode 100644 src/serialization/resources/accounting/types/PatchedContactRequest.ts create mode 100644 src/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.ts diff --git a/.mock/definition/accounting/__package__.yml b/.mock/definition/accounting/__package__.yml index c4e8cb248..934343709 100644 --- a/.mock/definition/accounting/__package__.yml +++ b/.mock/definition/accounting/__package__.yml @@ -41304,6 +41304,83 @@ types: results: optional> source: openapi: openapi/openapi.yml + PatchedContactRequestAddressesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: openapi/openapi.yml + inline: true + PatchedContactRequest: + docs: >- + # The Contact Object + + ### Description + + A `Contact` is an individual or business entity to which products and + services are sold to or purchased from. The `Contact` model contains both + Customers, in which products and services are sold to, and Vendors (or + Suppliers), in which products and services are purchased from. + + * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + + * A `Contact` is a customer if the `is_customer` property is true. + + + ### Usage Example + + Fetch from the `LIST Contacts` endpoint and view a company's contacts. + properties: + name: + type: optional + docs: The contact's name. + is_supplier: + type: optional + docs: Whether the contact is a supplier. + is_customer: + type: optional + docs: Whether the contact is a customer. + email_address: + type: optional + docs: The contact's email address. + tax_number: + type: optional + docs: The contact's tax number. + status: + type: optional + docs: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + currency: + type: optional + docs: The currency the contact's transactions are in. + company: + type: optional + docs: The company the contact belongs to. + validation: + format: uuid + addresses: + type: optional>> + docs: '`Address` object IDs for the given `Contacts` object.' + phone_numbers: + type: optional> + docs: '`AccountingPhoneNumber` object for the given `Contacts` object.' + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml PatchedItemRequestRequestStatus: discriminated: false docs: |- diff --git a/.mock/definition/accounting/contacts.yml b/.mock/definition/accounting/contacts.yml index c809b0ff6..c03c58805 100644 --- a/.mock/definition/accounting/contacts.yml +++ b/.mock/definition/accounting/contacts.yml @@ -354,6 +354,286 @@ service: - remote_field_class: remote_field_class value: key: value + partialUpdate: + path: /accounting/v1/contacts/{id} + method: PATCH + auth: true + docs: Updates a `Contact` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedContactRequest + content-type: application/json + response: + docs: '' + type: root.ContactResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: X-Account-Token + request: + model: {} + response: + body: + model: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig's pickleball store + is_supplier: true + is_customer: true + email_address: pickleball@merge.dev + tax_number: 12-3456789 + status: ACTIVE + currency: USD + remote_updated_at: '2020-03-31T00:00:00Z' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /accounting/v1/contacts/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Contact` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: X-Account-Token + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true metaPostRetrieve: path: /accounting/v1/contacts/meta/post method: GET diff --git a/.mock/definition/accounting/transactions.yml b/.mock/definition/accounting/transactions.yml index 342ce17fd..672ad121d 100644 --- a/.mock/definition/accounting/transactions.yml +++ b/.mock/definition/accounting/transactions.yml @@ -4,60 +4,124 @@ types: - account - value: account,accounting_period name: AccountAccountingPeriod + - value: account,company + name: AccountCompany + - value: account,company,accounting_period + name: AccountCompanyAccountingPeriod - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod - contact - value: contact,account name: ContactAccount - value: contact,account,accounting_period name: ContactAccountAccountingPeriod + - value: contact,account,company + name: ContactAccountCompany + - value: contact,account,company,accounting_period + name: ContactAccountCompanyAccountingPeriod - value: contact,accounting_period name: ContactAccountingPeriod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod - line_items - value: line_items,account name: LineItemsAccount - value: line_items,account,accounting_period name: LineItemsAccountAccountingPeriod + - value: line_items,account,company + name: LineItemsAccountCompany + - value: line_items,account,company,accounting_period + name: LineItemsAccountCompanyAccountingPeriod - value: line_items,accounting_period name: LineItemsAccountingPeriod + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod - value: line_items,contact name: LineItemsContact - value: line_items,contact,account name: LineItemsContactAccount - value: line_items,contact,account,accounting_period name: LineItemsContactAccountAccountingPeriod + - value: line_items,contact,account,company + name: LineItemsContactAccountCompany + - value: line_items,contact,account,company,accounting_period + name: LineItemsContactAccountCompanyAccountingPeriod - value: line_items,contact,accounting_period name: LineItemsContactAccountingPeriod + - value: line_items,contact,company + name: LineItemsContactCompany + - value: line_items,contact,company,accounting_period + name: LineItemsContactCompanyAccountingPeriod - value: line_items,tracking_categories name: LineItemsTrackingCategories - value: line_items,tracking_categories,account name: LineItemsTrackingCategoriesAccount - value: line_items,tracking_categories,account,accounting_period name: LineItemsTrackingCategoriesAccountAccountingPeriod + - value: line_items,tracking_categories,account,company + name: LineItemsTrackingCategoriesAccountCompany + - value: line_items,tracking_categories,account,company,accounting_period + name: LineItemsTrackingCategoriesAccountCompanyAccountingPeriod - value: line_items,tracking_categories,accounting_period name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod - value: line_items,tracking_categories,contact name: LineItemsTrackingCategoriesContact - value: line_items,tracking_categories,contact,account name: LineItemsTrackingCategoriesContactAccount - value: line_items,tracking_categories,contact,account,accounting_period name: LineItemsTrackingCategoriesContactAccountAccountingPeriod + - value: line_items,tracking_categories,contact,account,company + name: LineItemsTrackingCategoriesContactAccountCompany + - value: >- + line_items,tracking_categories,contact,account,company,accounting_period + name: LineItemsTrackingCategoriesContactAccountCompanyAccountingPeriod - value: line_items,tracking_categories,contact,accounting_period name: LineItemsTrackingCategoriesContactAccountingPeriod + - value: line_items,tracking_categories,contact,company + name: LineItemsTrackingCategoriesContactCompany + - value: line_items,tracking_categories,contact,company,accounting_period + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriod - tracking_categories - value: tracking_categories,account name: TrackingCategoriesAccount - value: tracking_categories,account,accounting_period name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,account,company + name: TrackingCategoriesAccountCompany + - value: tracking_categories,account,company,accounting_period + name: TrackingCategoriesAccountCompanyAccountingPeriod - value: tracking_categories,accounting_period name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod - value: tracking_categories,contact name: TrackingCategoriesContact - value: tracking_categories,contact,account name: TrackingCategoriesContactAccount - value: tracking_categories,contact,account,accounting_period name: TrackingCategoriesContactAccountAccountingPeriod + - value: tracking_categories,contact,account,company + name: TrackingCategoriesContactAccountCompany + - value: tracking_categories,contact,account,company,accounting_period + name: TrackingCategoriesContactAccountCompanyAccountingPeriod - value: tracking_categories,contact,accounting_period name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod source: openapi: openapi/openapi.yml TransactionsRetrieveRequestExpand: @@ -65,60 +129,124 @@ types: - account - value: account,accounting_period name: AccountAccountingPeriod + - value: account,company + name: AccountCompany + - value: account,company,accounting_period + name: AccountCompanyAccountingPeriod - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod - contact - value: contact,account name: ContactAccount - value: contact,account,accounting_period name: ContactAccountAccountingPeriod + - value: contact,account,company + name: ContactAccountCompany + - value: contact,account,company,accounting_period + name: ContactAccountCompanyAccountingPeriod - value: contact,accounting_period name: ContactAccountingPeriod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod - line_items - value: line_items,account name: LineItemsAccount - value: line_items,account,accounting_period name: LineItemsAccountAccountingPeriod + - value: line_items,account,company + name: LineItemsAccountCompany + - value: line_items,account,company,accounting_period + name: LineItemsAccountCompanyAccountingPeriod - value: line_items,accounting_period name: LineItemsAccountingPeriod + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod - value: line_items,contact name: LineItemsContact - value: line_items,contact,account name: LineItemsContactAccount - value: line_items,contact,account,accounting_period name: LineItemsContactAccountAccountingPeriod + - value: line_items,contact,account,company + name: LineItemsContactAccountCompany + - value: line_items,contact,account,company,accounting_period + name: LineItemsContactAccountCompanyAccountingPeriod - value: line_items,contact,accounting_period name: LineItemsContactAccountingPeriod + - value: line_items,contact,company + name: LineItemsContactCompany + - value: line_items,contact,company,accounting_period + name: LineItemsContactCompanyAccountingPeriod - value: line_items,tracking_categories name: LineItemsTrackingCategories - value: line_items,tracking_categories,account name: LineItemsTrackingCategoriesAccount - value: line_items,tracking_categories,account,accounting_period name: LineItemsTrackingCategoriesAccountAccountingPeriod + - value: line_items,tracking_categories,account,company + name: LineItemsTrackingCategoriesAccountCompany + - value: line_items,tracking_categories,account,company,accounting_period + name: LineItemsTrackingCategoriesAccountCompanyAccountingPeriod - value: line_items,tracking_categories,accounting_period name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod - value: line_items,tracking_categories,contact name: LineItemsTrackingCategoriesContact - value: line_items,tracking_categories,contact,account name: LineItemsTrackingCategoriesContactAccount - value: line_items,tracking_categories,contact,account,accounting_period name: LineItemsTrackingCategoriesContactAccountAccountingPeriod + - value: line_items,tracking_categories,contact,account,company + name: LineItemsTrackingCategoriesContactAccountCompany + - value: >- + line_items,tracking_categories,contact,account,company,accounting_period + name: LineItemsTrackingCategoriesContactAccountCompanyAccountingPeriod - value: line_items,tracking_categories,contact,accounting_period name: LineItemsTrackingCategoriesContactAccountingPeriod + - value: line_items,tracking_categories,contact,company + name: LineItemsTrackingCategoriesContactCompany + - value: line_items,tracking_categories,contact,company,accounting_period + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriod - tracking_categories - value: tracking_categories,account name: TrackingCategoriesAccount - value: tracking_categories,account,accounting_period name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,account,company + name: TrackingCategoriesAccountCompany + - value: tracking_categories,account,company,accounting_period + name: TrackingCategoriesAccountCompanyAccountingPeriod - value: tracking_categories,accounting_period name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod - value: tracking_categories,contact name: TrackingCategoriesContact - value: tracking_categories,contact,account name: TrackingCategoriesContactAccount - value: tracking_categories,contact,account,accounting_period name: TrackingCategoriesContactAccountAccountingPeriod + - value: tracking_categories,contact,account,company + name: TrackingCategoriesContactAccountCompany + - value: tracking_categories,contact,account,company,accounting_period + name: TrackingCategoriesContactAccountCompanyAccountingPeriod - value: tracking_categories,contact,accounting_period name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod source: openapi: openapi/openapi.yml imports: diff --git a/.mock/definition/ats/__package__.yml b/.mock/definition/ats/__package__.yml index 8f3c78574..e280d6939 100644 --- a/.mock/definition/ats/__package__.yml +++ b/.mock/definition/ats/__package__.yml @@ -1974,6 +1974,7 @@ types: - 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 diff --git a/.mock/definition/filestorage/files.yml b/.mock/definition/filestorage/files.yml index 97b56cdeb..90bb68bd4 100644 --- a/.mock/definition/filestorage/files.yml +++ b/.mock/definition/filestorage/files.yml @@ -142,6 +142,16 @@ service: page_size: type: optional docs: Number of results to return per page. + remote_created_after: + type: optional + docs: >- + If provided, will only return files created in the third party + platform after this datetime. + remote_created_before: + type: optional + docs: >- + If provided, will only return files created in the third party + platform before this datetime. remote_id: type: optional docs: The API provider's ID for the given object. @@ -438,6 +448,12 @@ service: cursor: type: optional docs: The pagination cursor value. + ids: + type: optional + allow-multiple: true + docs: >- + If provided, will only return objects with the given IDs. + Comma-separated list of strings. include_deleted_data: type: optional docs: >- diff --git a/.mock/definition/hris/__package__.yml b/.mock/definition/hris/__package__.yml index 3e17db3f0..2491e3f2c 100644 --- a/.mock/definition/hris/__package__.yml +++ b/.mock/definition/hris/__package__.yml @@ -689,6 +689,11 @@ types: end_date: type: optional docs: The day and time the benefit ended. + employer_benefit: + type: optional + docs: The employer benefit plan the employee is enrolled in. + validation: + format: uuid remote_was_deleted: type: optional docs: >- @@ -698,11 +703,6 @@ types: [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). access: read-only - employer_benefit: - type: optional - docs: The employer benefit plan the employee is enrolled in. - validation: - format: uuid field_mappings: type: optional> access: read-only diff --git a/.mock/definition/hris/benefits.yml b/.mock/definition/hris/benefits.yml index a4ad2db24..2802723bd 100644 --- a/.mock/definition/hris/benefits.yml +++ b/.mock/definition/hris/benefits.yml @@ -93,8 +93,8 @@ service: company_contribution: 150 start_date: '2020-11-15T00:59:25Z' end_date: '2021-10-15T00:23:25Z' - remote_was_deleted: true employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe + remote_was_deleted: true field_mappings: organization_defined_targets: custom_key: custom_value @@ -152,8 +152,8 @@ service: company_contribution: 150 start_date: '2020-11-15T00:59:25Z' end_date: '2021-10-15T00:23:25Z' - remote_was_deleted: true employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe + remote_was_deleted: true field_mappings: organization_defined_targets: custom_key: custom_value diff --git a/.mock/definition/ticketing/__package__.yml b/.mock/definition/ticketing/__package__.yml index 845b06999..640595be6 100644 --- a/.mock/definition/ticketing/__package__.yml +++ b/.mock/definition/ticketing/__package__.yml @@ -2117,9 +2117,6 @@ types: * `COLLECTION` - COLLECTION tags: optional>> roles: optional>> - completed_at: - type: optional - docs: When the ticket was completed. ticket_url: type: optional docs: The 3rd party url of the Ticket. @@ -2135,6 +2132,9 @@ types: * `HIGH` - HIGH * `NORMAL` - NORMAL * `LOW` - LOW + completed_at: + type: optional + docs: When the ticket was completed. integration_params: type: optional> access: write-only diff --git a/.mock/definition/ticketing/tickets.yml b/.mock/definition/ticketing/tickets.yml index 07c87379f..2d4a7ec5c 100644 --- a/.mock/definition/ticketing/tickets.yml +++ b/.mock/definition/ticketing/tickets.yml @@ -1158,6 +1158,9 @@ service: docs: >- If provided, will only return objects created before this datetime. + creator_id: + type: optional + docs: If provided, will only return tickets created by this creator_id. cursor: type: optional docs: The pagination cursor value. diff --git a/package.json b/package.json index 8b5d24221..3107d52b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mergeapi/merge-node-client", - "version": "2.1.3", + "version": "2.2.0", "private": false, "repository": "github:merge-api/merge-node-client", "main": "./index.js", diff --git a/reference.md b/reference.md index d328cf66c..87e66a192 100644 --- a/reference.md +++ b/reference.md @@ -4845,9 +4845,9 @@ await client.ats.webhookReceivers.create({ -## Crm AccountDetails +## Filestorage AccountDetails -
client.crm.accountDetails.retrieve() -> Merge.AccountDetails +
client.filestorage.accountDetails.retrieve() -> Merge.AccountDetails
@@ -4875,7 +4875,7 @@ Get details for a linked account.
```typescript -await client.crm.accountDetails.retrieve(); +await client.filestorage.accountDetails.retrieve(); ```
@@ -4902,9 +4902,9 @@ await client.crm.accountDetails.retrieve();
-## Crm AccountToken +## Filestorage AccountToken -
client.crm.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.filestorage.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -4932,7 +4932,7 @@ Returns the account token for the end user with the provided public token.
```typescript -await client.crm.accountToken.retrieve("public_token"); +await client.filestorage.accountToken.retrieve("public_token"); ```
@@ -4967,9 +4967,9 @@ await client.crm.accountToken.retrieve("public_token");
-## Crm Accounts +## Filestorage AsyncPassthrough -
client.crm.accounts.list({ ...params }) -> Merge.PaginatedAccountList +
client.filestorage.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -4981,7 +4981,7 @@ await client.crm.accountToken.retrieve("public_token");
-Returns a list of `Account` objects. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -4997,8 +4997,9 @@ Returns a list of `Account` objects.
```typescript -await client.crm.accounts.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.filestorage.asyncPassthrough.create({ + method: "GET", + path: "/scooters", }); ``` @@ -5015,7 +5016,7 @@ await client.crm.accounts.list({
-**request:** `Merge.crm.AccountsListRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -5023,7 +5024,7 @@ await client.crm.accounts.list({
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -5034,7 +5035,7 @@ await client.crm.accounts.list({
-
client.crm.accounts.create({ ...params }) -> Merge.CrmAccountResponse +
client.filestorage.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -5046,7 +5047,7 @@ await client.crm.accounts.list({
-Creates an `Account` object with the given values. +Retrieves data from earlier async-passthrough POST request
@@ -5062,9 +5063,7 @@ Creates an `Account` object with the given values.
```typescript -await client.crm.accounts.create({ - model: {}, -}); +await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -5080,7 +5079,7 @@ await client.crm.accounts.create({
-**request:** `Merge.crm.CrmAccountEndpointRequest` +**asyncPassthroughReceiptId:** `string`
@@ -5088,7 +5087,7 @@ await client.crm.accounts.create({
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -5099,7 +5098,9 @@ await client.crm.accounts.create({
-
client.crm.accounts.retrieve(id, { ...params }) -> Merge.Account +## Filestorage AuditTrail + +
client.filestorage.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -5111,7 +5112,7 @@ await client.crm.accounts.create({
-Returns an `Account` object with the given `id`. +Gets a list of audit trail events.
@@ -5127,7 +5128,9 @@ Returns an `Account` object with the given `id`.
```typescript -await client.crm.accounts.retrieve("id"); +await client.filestorage.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -5143,15 +5146,7 @@ await client.crm.accounts.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.AccountsRetrieveRequest` +**request:** `Merge.filestorage.AuditTrailListRequest`
@@ -5159,7 +5154,7 @@ await client.crm.accounts.retrieve("id");
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -5170,7 +5165,9 @@ await client.crm.accounts.retrieve("id");
-
client.crm.accounts.partialUpdate(id, { ...params }) -> Merge.CrmAccountResponse +## Filestorage AvailableActions + +
client.filestorage.availableActions.retrieve() -> Merge.AvailableActions
@@ -5182,7 +5179,7 @@ await client.crm.accounts.retrieve("id");
-Updates an `Account` object with the given `id`. +Returns a list of models and actions available for an account.
@@ -5198,9 +5195,7 @@ Updates an `Account` object with the given `id`.
```typescript -await client.crm.accounts.partialUpdate("id", { - model: {}, -}); +await client.filestorage.availableActions.retrieve(); ```
@@ -5216,23 +5211,7 @@ await client.crm.accounts.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedCrmAccountEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -5243,7 +5222,9 @@ await client.crm.accounts.partialUpdate("id", {
-
client.crm.accounts.metaPatchRetrieve(id) -> Merge.MetaResponse +## Filestorage Scopes + +
client.filestorage.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -5255,7 +5236,7 @@ await client.crm.accounts.partialUpdate("id", {
-Returns metadata for `CRMAccount` PATCHs. +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).
@@ -5271,7 +5252,7 @@ Returns metadata for `CRMAccount` PATCHs.
```typescript -await client.crm.accounts.metaPatchRetrieve("id"); +await client.filestorage.scopes.defaultScopesRetrieve(); ```
@@ -5287,15 +5268,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-**id:** `string` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -5306,7 +5279,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-
client.crm.accounts.metaPostRetrieve() -> Merge.MetaResponse +
client.filestorage.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -5318,7 +5291,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-Returns metadata for `CRMAccount` POSTs. +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).
@@ -5334,7 +5307,7 @@ Returns metadata for `CRMAccount` POSTs.
```typescript -await client.crm.accounts.metaPostRetrieve(); +await client.filestorage.scopes.linkedAccountScopesRetrieve(); ```
@@ -5350,7 +5323,7 @@ await client.crm.accounts.metaPostRetrieve();
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -5361,7 +5334,7 @@ await client.crm.accounts.metaPostRetrieve();
-
client.crm.accounts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.filestorage.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -5373,7 +5346,7 @@ await client.crm.accounts.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -5389,8 +5362,32 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.accounts.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.filestorage.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: ["avatar", "home_location"], + disabledFields: ["work_location"], + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], }); ``` @@ -5407,7 +5404,7 @@ await client.crm.accounts.remoteFieldClassesList({
-**request:** `Merge.crm.AccountsRemoteFieldClassesListRequest` +**request:** `Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -5415,7 +5412,7 @@ await client.crm.accounts.remoteFieldClassesList({
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -5426,9 +5423,9 @@ await client.crm.accounts.remoteFieldClassesList({
-## Crm AsyncPassthrough +## Filestorage DeleteAccount -
client.crm.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.filestorage.deleteAccount.delete() -> void
@@ -5440,7 +5437,7 @@ await client.crm.accounts.remoteFieldClassesList({
-Asynchronously pull data from an endpoint not currently supported by Merge. +Delete a linked account.
@@ -5456,10 +5453,7 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```typescript -await client.crm.asyncPassthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.filestorage.deleteAccount.delete(); ```
@@ -5475,15 +5469,7 @@ await client.crm.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` - -
-
- -
-
- -**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -5494,7 +5480,9 @@ await client.crm.asyncPassthrough.create({
-
client.crm.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +## Filestorage Drives + +
client.filestorage.drives.list({ ...params }) -> Merge.PaginatedDriveList
@@ -5506,7 +5494,7 @@ await client.crm.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Returns a list of `Drive` objects.
@@ -5522,7 +5510,9 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.filestorage.drives.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -5538,7 +5528,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**asyncPassthroughReceiptId:** `string` +**request:** `Merge.filestorage.DrivesListRequest`
@@ -5546,7 +5536,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Drives.RequestOptions`
@@ -5557,9 +5547,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-## Crm AuditTrail - -
client.crm.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.filestorage.drives.retrieve(id, { ...params }) -> Merge.Drive
@@ -5571,7 +5559,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-Gets a list of audit trail events. +Returns a `Drive` object with the given `id`.
@@ -5587,9 +5575,7 @@ Gets a list of audit trail events.
```typescript -await client.crm.auditTrail.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.drives.retrieve("id"); ```
@@ -5605,7 +5591,7 @@ await client.crm.auditTrail.list({
-**request:** `Merge.crm.AuditTrailListRequest` +**id:** `string`
@@ -5613,7 +5599,15 @@ await client.crm.auditTrail.list({
-**requestOptions:** `AuditTrail.RequestOptions` +**request:** `Merge.filestorage.DrivesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Drives.RequestOptions`
@@ -5624,9 +5618,9 @@ await client.crm.auditTrail.list({
-## Crm AvailableActions +## Filestorage FieldMapping -
client.crm.availableActions.retrieve() -> Merge.AvailableActions +
client.filestorage.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -5638,7 +5632,7 @@ await client.crm.auditTrail.list({
-Returns a list of models and actions available for an account. +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/).
@@ -5654,7 +5648,7 @@ Returns a list of models and actions available for an account.
```typescript -await client.crm.availableActions.retrieve(); +await client.filestorage.fieldMapping.fieldMappingsRetrieve(); ```
@@ -5670,7 +5664,15 @@ await client.crm.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**request:** `Merge.filestorage.FieldMappingsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5681,9 +5683,7 @@ await client.crm.availableActions.retrieve();
-## Crm Contacts - -
client.crm.contacts.list({ ...params }) -> Merge.PaginatedContactList +
client.filestorage.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -5695,7 +5695,7 @@ await client.crm.availableActions.retrieve();
-Returns a list of `Contact` 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.
@@ -5711,8 +5711,13 @@ Returns a list of `Contact` objects.
```typescript -await client.crm.contacts.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.filestorage.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", }); ``` @@ -5729,7 +5734,7 @@ await client.crm.contacts.list({
-**request:** `Merge.crm.ContactsListRequest` +**request:** `Merge.filestorage.CreateFieldMappingRequest`
@@ -5737,7 +5742,7 @@ await client.crm.contacts.list({
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5748,7 +5753,7 @@ await client.crm.contacts.list({
-
client.crm.contacts.create({ ...params }) -> Merge.CrmContactResponse +
client.filestorage.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -5760,7 +5765,7 @@ await client.crm.contacts.list({
-Creates a `Contact` object with the given values. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -5776,9 +5781,7 @@ Creates a `Contact` object with the given values.
```typescript -await client.crm.contacts.create({ - model: {}, -}); +await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -5794,7 +5797,7 @@ await client.crm.contacts.create({
-**request:** `Merge.crm.CrmContactEndpointRequest` +**fieldMappingId:** `string`
@@ -5802,7 +5805,7 @@ await client.crm.contacts.create({
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5813,7 +5816,7 @@ await client.crm.contacts.create({
-
client.crm.contacts.retrieve(id, { ...params }) -> Merge.Contact +
client.filestorage.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -5825,7 +5828,7 @@ await client.crm.contacts.create({
-Returns a `Contact` object with the given `id`. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -5841,7 +5844,7 @@ Returns a `Contact` object with the given `id`.
```typescript -await client.crm.contacts.retrieve("id"); +await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -5857,7 +5860,7 @@ await client.crm.contacts.retrieve("id");
-**id:** `string` +**fieldMappingId:** `string`
@@ -5865,7 +5868,7 @@ await client.crm.contacts.retrieve("id");
-**request:** `Merge.crm.ContactsRetrieveRequest` +**request:** `Merge.filestorage.PatchedEditFieldMappingRequest`
@@ -5873,7 +5876,7 @@ await client.crm.contacts.retrieve("id");
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5884,7 +5887,7 @@ await client.crm.contacts.retrieve("id");
-
client.crm.contacts.partialUpdate(id, { ...params }) -> Merge.CrmContactResponse +
client.filestorage.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -5896,7 +5899,7 @@ await client.crm.contacts.retrieve("id");
-Updates a `Contact` 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/).
@@ -5912,9 +5915,7 @@ Updates a `Contact` object with the given `id`.
```typescript -await client.crm.contacts.partialUpdate("id", { - model: {}, -}); +await client.filestorage.fieldMapping.remoteFieldsRetrieve(); ```
@@ -5930,15 +5931,7 @@ await client.crm.contacts.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedCrmContactEndpointRequest` +**request:** `Merge.filestorage.RemoteFieldsRetrieveRequest`
@@ -5946,7 +5939,7 @@ await client.crm.contacts.partialUpdate("id", {
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5957,7 +5950,7 @@ await client.crm.contacts.partialUpdate("id", {
-
client.crm.contacts.ignoreCreate(modelId, { ...params }) -> void +
client.filestorage.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
@@ -5969,7 +5962,7 @@ await client.crm.contacts.partialUpdate("id", {
-Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +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/).
@@ -5985,9 +5978,7 @@ Ignores a specific row based on the `model_id` in the url. These records will ha
```typescript -await client.crm.contacts.ignoreCreate("model_id", { - reason: "GENERAL_CUSTOMER_REQUEST", -}); +await client.filestorage.fieldMapping.targetFieldsRetrieve(); ```
@@ -6003,23 +5994,7 @@ await client.crm.contacts.ignoreCreate("model_id", {
-**modelId:** `string` - -
-
- -
-
- -**request:** `Merge.IgnoreCommonModelRequest` - -
-
- -
-
- -**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -6030,7 +6005,9 @@ await client.crm.contacts.ignoreCreate("model_id", {
-
client.crm.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse +## Filestorage Files + +
client.filestorage.files.list({ ...params }) -> Merge.PaginatedFileList
@@ -6042,7 +6019,7 @@ await client.crm.contacts.ignoreCreate("model_id", {
-Returns metadata for `CRMContact` PATCHs. +Returns a list of `File` objects.
@@ -6058,7 +6035,9 @@ Returns metadata for `CRMContact` PATCHs.
```typescript -await client.crm.contacts.metaPatchRetrieve("id"); +await client.filestorage.files.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6074,7 +6053,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-**id:** `string` +**request:** `Merge.filestorage.FilesListRequest`
@@ -6082,7 +6061,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -6093,7 +6072,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-
client.crm.contacts.metaPostRetrieve() -> Merge.MetaResponse +
client.filestorage.files.create({ ...params }) -> Merge.FileStorageFileResponse
@@ -6105,7 +6084,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-Returns metadata for `CRMContact` POSTs. +Creates a `File` object with the given values.
@@ -6121,7 +6100,9 @@ Returns metadata for `CRMContact` POSTs.
```typescript -await client.crm.contacts.metaPostRetrieve(); +await client.filestorage.files.create({ + model: {}, +}); ```
@@ -6137,7 +6118,15 @@ await client.crm.contacts.metaPostRetrieve();
-**requestOptions:** `Contacts.RequestOptions` +**request:** `Merge.filestorage.FileStorageFileEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -6148,7 +6137,7 @@ await client.crm.contacts.metaPostRetrieve();
-
client.crm.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.filestorage.files.retrieve(id, { ...params }) -> Merge.File_
@@ -6160,7 +6149,7 @@ await client.crm.contacts.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns a `File` object with the given `id`.
@@ -6176,9 +6165,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.contacts.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.files.retrieve("id"); ```
@@ -6194,7 +6181,7 @@ await client.crm.contacts.remoteFieldClassesList({
-**request:** `Merge.crm.ContactsRemoteFieldClassesListRequest` +**id:** `string`
@@ -6202,7 +6189,15 @@ await client.crm.contacts.remoteFieldClassesList({
-**requestOptions:** `Contacts.RequestOptions` +**request:** `Merge.filestorage.FilesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -6213,9 +6208,7 @@ await client.crm.contacts.remoteFieldClassesList({
-## Crm CustomObjectClasses - -
client.crm.customObjectClasses.list({ ...params }) -> Merge.PaginatedCustomObjectClassList +
client.filestorage.files.downloadRequestMetaRetrieve(id, { ...params }) -> Merge.DownloadRequestMeta
@@ -6227,7 +6220,7 @@ await client.crm.contacts.remoteFieldClassesList({
-Returns a list of `CustomObjectClass` objects. +Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party.
@@ -6243,9 +6236,7 @@ Returns a list of `CustomObjectClass` objects.
```typescript -await client.crm.customObjectClasses.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.files.downloadRequestMetaRetrieve("id"); ```
@@ -6261,7 +6252,7 @@ await client.crm.customObjectClasses.list({
-**request:** `Merge.crm.CustomObjectClassesListRequest` +**id:** `string`
@@ -6269,7 +6260,15 @@ await client.crm.customObjectClasses.list({
-**requestOptions:** `CustomObjectClasses.RequestOptions` +**request:** `Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -6280,7 +6279,7 @@ await client.crm.customObjectClasses.list({
-
client.crm.customObjectClasses.retrieve(id, { ...params }) -> Merge.CustomObjectClass +
client.filestorage.files.downloadRequestMetaList({ ...params }) -> Merge.PaginatedDownloadRequestMetaList
@@ -6292,7 +6291,7 @@ await client.crm.customObjectClasses.list({
-Returns a `CustomObjectClass` object with the given `id`. +Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party.
@@ -6308,7 +6307,9 @@ Returns a `CustomObjectClass` object with the given `id`.
```typescript -await client.crm.customObjectClasses.retrieve("id"); +await client.filestorage.files.downloadRequestMetaList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6324,15 +6325,7 @@ await client.crm.customObjectClasses.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesRetrieveRequest` +**request:** `Merge.filestorage.FilesDownloadRequestMetaListRequest`
@@ -6340,7 +6333,7 @@ await client.crm.customObjectClasses.retrieve("id");
-**requestOptions:** `CustomObjectClasses.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -6351,9 +6344,7 @@ await client.crm.customObjectClasses.retrieve("id");
-## Crm AssociationTypes - -
client.crm.associationTypes.customObjectClassesAssociationTypesList(customObjectClassId, { ...params }) -> Merge.PaginatedAssociationTypeList +
client.filestorage.files.metaPostRetrieve() -> Merge.MetaResponse
@@ -6365,7 +6356,7 @@ await client.crm.customObjectClasses.retrieve("id");
-Returns a list of `AssociationType` objects. +Returns metadata for `FileStorageFile` POSTs.
@@ -6381,9 +6372,7 @@ Returns a list of `AssociationType` objects.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id", { - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.files.metaPostRetrieve(); ```
@@ -6399,23 +6388,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesAssociationTypesListRequest` - -
-
- -
-
- -**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -6426,7 +6399,9 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-
client.crm.associationTypes.customObjectClassesAssociationTypesCreate(customObjectClassId, { ...params }) -> Merge.CrmAssociationTypeResponse +## Filestorage Folders + +
client.filestorage.folders.list({ ...params }) -> Merge.PaginatedFolderList
@@ -6438,7 +6413,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-Creates an `AssociationType` object with the given values. +Returns a list of `Folder` objects.
@@ -6454,20 +6429,8 @@ Creates an `AssociationType` object with the given values.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("custom_object_class_id", { - model: { - sourceObjectClass: { - id: "id", - originType: "CUSTOM_OBJECT", - }, - targetObjectClasses: [ - { - id: "id", - originType: "CUSTOM_OBJECT", - }, - ], - remoteKeyName: "remote_key_name", - }, +await client.filestorage.folders.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -6484,15 +6447,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CrmAssociationTypeEndpointRequest` +**request:** `Merge.filestorage.FoldersListRequest`
@@ -6500,7 +6455,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -6511,7 +6466,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-
client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, { ...params }) -> Merge.AssociationType +
client.filestorage.folders.create({ ...params }) -> Merge.FileStorageFolderResponse
@@ -6523,7 +6478,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-Returns an `AssociationType` object with the given `id`. +Creates a `Folder` object with the given values.
@@ -6539,7 +6494,9 @@ Returns an `AssociationType` object with the given `id`.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id"); +await client.filestorage.folders.create({ + model: {}, +}); ```
@@ -6555,23 +6512,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-**customObjectClassId:** `string` - -
-
- -
-
- -**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest` +**request:** `Merge.filestorage.FileStorageFolderEndpointRequest`
@@ -6579,7 +6520,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -6590,7 +6531,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-
client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +
client.filestorage.folders.retrieve(id, { ...params }) -> Merge.Folder
@@ -6602,7 +6543,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-Returns metadata for `CRMAssociationType` POSTs. +Returns a `Folder` object with the given `id`.
@@ -6618,7 +6559,7 @@ Returns metadata for `CRMAssociationType` POSTs.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id"); +await client.filestorage.folders.retrieve("id"); ```
@@ -6634,7 +6575,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-**customObjectClassId:** `string` +**id:** `string`
@@ -6642,20 +6583,26 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-**requestOptions:** `AssociationTypes.RequestOptions` +**request:** `Merge.filestorage.FoldersRetrieveRequest` -
-
- +
+
+ +**requestOptions:** `Folders.RequestOptions` + +
+
+ -
-## Crm CustomObjects + + +
-
client.crm.customObjects.customObjectClassesCustomObjectsList(customObjectClassId, { ...params }) -> Merge.PaginatedCustomObjectList +
client.filestorage.folders.metaPostRetrieve() -> Merge.MetaResponse
@@ -6667,7 +6614,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-Returns a list of `CustomObject` objects. +Returns metadata for `FileStorageFolder` POSTs.
@@ -6683,9 +6630,7 @@ Returns a list of `CustomObject` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", { - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.folders.metaPostRetrieve(); ```
@@ -6701,23 +6646,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsListRequest` - -
-
- -
-
- -**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -6728,7 +6657,9 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-
client.crm.customObjects.customObjectClassesCustomObjectsCreate(customObjectClassId, { ...params }) -> Merge.CrmCustomObjectResponse +## Filestorage GenerateKey + +
client.filestorage.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -6740,7 +6671,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-Creates a `CustomObject` object with the given values. +Create a remote key.
@@ -6756,12 +6687,8 @@ Creates a `CustomObject` object with the given values.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { - model: { - fields: { - test_field: "hello", - }, - }, +await client.filestorage.generateKey.create({ + name: "Remote Deployment Key 1", }); ``` @@ -6778,15 +6705,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CrmCustomObjectEndpointRequest` +**request:** `Merge.filestorage.GenerateRemoteKeyRequest`
@@ -6794,7 +6713,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `GenerateKey.RequestOptions`
@@ -6805,7 +6724,9 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-
client.crm.customObjects.customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, { ...params }) -> Merge.CustomObject +## Filestorage Groups + +
client.filestorage.groups.list({ ...params }) -> Merge.PaginatedGroupList
@@ -6817,7 +6738,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-Returns a `CustomObject` object with the given `id`. +Returns a list of `Group` objects.
@@ -6833,7 +6754,9 @@ Returns a `CustomObject` object with the given `id`.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id"); +await client.filestorage.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6849,23 +6772,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-**customObjectClassId:** `string` - -
-
- -
-
- -**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest` +**request:** `Merge.filestorage.GroupsListRequest`
@@ -6873,7 +6780,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Groups.RequestOptions`
@@ -6884,7 +6791,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-
client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +
client.filestorage.groups.retrieve(id, { ...params }) -> Merge.Group
@@ -6896,7 +6803,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-Returns metadata for `CRMCustomObject` POSTs. +Returns a `Group` object with the given `id`.
@@ -6912,7 +6819,7 @@ Returns metadata for `CRMCustomObject` POSTs.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id"); +await client.filestorage.groups.retrieve("id"); ```
@@ -6928,7 +6835,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-**customObjectClassId:** `string` +**id:** `string`
@@ -6936,7 +6843,15 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-**requestOptions:** `CustomObjects.RequestOptions` +**request:** `Merge.filestorage.GroupsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions`
@@ -6947,7 +6862,9 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-
client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Filestorage Issues + +
client.filestorage.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -6959,7 +6876,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-Returns a list of `RemoteFieldClass` objects. +Gets all issues for Organization.
@@ -6975,7 +6892,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ +await client.filestorage.issues.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -6993,7 +6910,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-**request:** `Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest` +**request:** `Merge.filestorage.IssuesListRequest`
@@ -7001,7 +6918,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -7012,9 +6929,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-## Crm Associations - -
client.crm.associations.customObjectClassesCustomObjectsAssociationsList(customObjectClassId, objectId, { ...params }) -> Merge.PaginatedAssociationList +
client.filestorage.issues.retrieve(id) -> Merge.Issue
@@ -7026,7 +6941,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-Returns a list of `Association` objects. +Get a specific issue.
@@ -7042,9 +6957,7 @@ Returns a list of `Association` objects.
```typescript -await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id", { - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.issues.retrieve("id"); ```
@@ -7060,23 +6973,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-**customObjectClassId:** `string` - -
-
- -
-
- -**objectId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest` +**id:** `string`
@@ -7084,7 +6981,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-**requestOptions:** `Associations.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -7095,7 +6992,9 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-
client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate(associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, { ...params }) -> Merge.Association +## Filestorage LinkToken + +
client.filestorage.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -7107,7 +7006,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. +Creates a link token to be used when linking a new end user.
@@ -7123,13 +7022,12 @@ Creates an Association between `source_object_id` and `target_object_id` of type
```typescript -await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate( - "association_type_id", - "source_class_id", - "source_object_id", - "target_class_id", - "target_object_id", -); +await client.filestorage.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -7145,7 +7043,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-**associationTypeId:** `string` +**request:** `Merge.filestorage.EndUserDetailsRequest`
@@ -7153,39 +7051,66 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-**sourceClassId:** `string` +**requestOptions:** `LinkToken.RequestOptions` + +
+
+ +
+
+ +## Filestorage LinkedAccounts +
client.filestorage.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
-**sourceObjectId:** `string` +#### 📝 Description -
-
+
+
-**targetClassId:** `string` +List linked accounts for your organization.
+
+
+ +#### 🔌 Usage
-**targetObjectId:** `string` +
+
+```typescript +await client.filestorage.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+#### ⚙️ Parameters +
-**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest` +
+
+ +**request:** `Merge.filestorage.LinkedAccountsListRequest`
@@ -7193,7 +7118,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-**requestOptions:** `Associations.RequestOptions` +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -7204,9 +7129,9 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-## Crm Scopes +## Filestorage Passthrough -
client.crm.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.filestorage.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -7218,7 +7143,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-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). +Pull data from an endpoint not currently supported by Merge.
@@ -7234,7 +7159,10 @@ Get the default permissions for Merge Common Models and fields across all Linked
```typescript -await client.crm.scopes.defaultScopesRetrieve(); +await client.filestorage.passthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -7250,7 +7178,15 @@ await client.crm.scopes.defaultScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions`
@@ -7261,7 +7197,9 @@ await client.crm.scopes.defaultScopesRetrieve();
-
client.crm.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +## Filestorage RegenerateKey + +
client.filestorage.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -7273,7 +7211,7 @@ await client.crm.scopes.defaultScopesRetrieve();
-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). +Exchange remote keys.
@@ -7289,7 +7227,9 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.crm.scopes.linkedAccountScopesRetrieve(); +await client.filestorage.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -7305,7 +7245,15 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.filestorage.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -7316,7 +7264,9 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-
client.crm.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +## Filestorage SyncStatus + +
client.filestorage.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -7328,7 +7278,7 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-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) +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).
@@ -7344,32 +7294,8 @@ Update permissions for any Common Model or field for a single Linked Account. An
```typescript -await client.crm.scopes.linkedAccountScopesCreate({ - commonModels: [ - { - modelName: "Employee", - modelPermissions: { - READ: { - isEnabled: true, - }, - WRITE: { - isEnabled: false, - }, - }, - fieldPermissions: { - enabledFields: ["avatar", "home_location"], - disabledFields: ["work_location"], - }, - }, - { - modelName: "Benefit", - modelPermissions: { - WRITE: { - isEnabled: false, - }, - }, - }, - ], +await client.filestorage.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -7386,7 +7312,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-**request:** `Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest` +**request:** `Merge.filestorage.SyncStatusListRequest`
@@ -7394,7 +7320,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `SyncStatus.RequestOptions`
@@ -7405,9 +7331,9 @@ await client.crm.scopes.linkedAccountScopesCreate({
-## Crm DeleteAccount +## Filestorage ForceResync -
client.crm.deleteAccount.delete() -> void +
client.filestorage.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -7419,7 +7345,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-Delete a linked 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.
@@ -7435,7 +7361,7 @@ Delete a linked account.
```typescript -await client.crm.deleteAccount.delete(); +await client.filestorage.forceResync.syncStatusResyncCreate(); ```
@@ -7451,7 +7377,7 @@ await client.crm.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -7462,9 +7388,9 @@ await client.crm.deleteAccount.delete();
-## Crm EngagementTypes +## Filestorage Users -
client.crm.engagementTypes.list({ ...params }) -> Merge.PaginatedEngagementTypeList +
client.filestorage.users.list({ ...params }) -> Merge.PaginatedUserList
@@ -7476,7 +7402,7 @@ await client.crm.deleteAccount.delete();
-Returns a list of `EngagementType` objects. +Returns a list of `User` objects.
@@ -7492,7 +7418,7 @@ Returns a list of `EngagementType` objects.
```typescript -await client.crm.engagementTypes.list({ +await client.filestorage.users.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -7510,7 +7436,7 @@ await client.crm.engagementTypes.list({
-**request:** `Merge.crm.EngagementTypesListRequest` +**request:** `Merge.filestorage.UsersListRequest`
@@ -7518,7 +7444,7 @@ await client.crm.engagementTypes.list({
-**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -7529,7 +7455,7 @@ await client.crm.engagementTypes.list({
-
client.crm.engagementTypes.retrieve(id, { ...params }) -> Merge.EngagementType +
client.filestorage.users.retrieve(id, { ...params }) -> Merge.User
@@ -7541,7 +7467,7 @@ await client.crm.engagementTypes.list({
-Returns an `EngagementType` object with the given `id`. +Returns a `User` object with the given `id`.
@@ -7557,7 +7483,7 @@ Returns an `EngagementType` object with the given `id`.
```typescript -await client.crm.engagementTypes.retrieve("id"); +await client.filestorage.users.retrieve("id"); ```
@@ -7581,7 +7507,7 @@ await client.crm.engagementTypes.retrieve("id");
-**request:** `Merge.crm.EngagementTypesRetrieveRequest` +**request:** `Merge.filestorage.UsersRetrieveRequest`
@@ -7589,7 +7515,7 @@ await client.crm.engagementTypes.retrieve("id");
-**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -7600,7 +7526,9 @@ await client.crm.engagementTypes.retrieve("id");
-
client.crm.engagementTypes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Filestorage WebhookReceivers + +
client.filestorage.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -7612,7 +7540,7 @@ await client.crm.engagementTypes.retrieve("id");
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `WebhookReceiver` objects.
@@ -7628,9 +7556,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagementTypes.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.webhookReceivers.list(); ```
@@ -7646,15 +7572,7 @@ await client.crm.engagementTypes.remoteFieldClassesList({
-**request:** `Merge.crm.EngagementTypesRemoteFieldClassesListRequest` - -
-
- -
-
- -**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -7665,9 +7583,7 @@ await client.crm.engagementTypes.remoteFieldClassesList({
-## Crm Engagements - -
client.crm.engagements.list({ ...params }) -> Merge.PaginatedEngagementList +
client.filestorage.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -7679,7 +7595,7 @@ await client.crm.engagementTypes.remoteFieldClassesList({
-Returns a list of `Engagement` objects. +Creates a `WebhookReceiver` object with the given values.
@@ -7695,8 +7611,9 @@ Returns a list of `Engagement` objects.
```typescript -await client.crm.engagements.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.filestorage.webhookReceivers.create({ + event: "event", + isActive: true, }); ``` @@ -7713,7 +7630,7 @@ await client.crm.engagements.list({
-**request:** `Merge.crm.EngagementsListRequest` +**request:** `Merge.filestorage.WebhookReceiverRequest`
@@ -7721,7 +7638,7 @@ await client.crm.engagements.list({
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -7732,7 +7649,9 @@ await client.crm.engagements.list({
-
client.crm.engagements.create({ ...params }) -> Merge.EngagementResponse +## Crm AccountDetails + +
client.crm.accountDetails.retrieve() -> Merge.AccountDetails
@@ -7744,7 +7663,7 @@ await client.crm.engagements.list({
-Creates an `Engagement` object with the given values. +Get details for a linked account.
@@ -7760,9 +7679,7 @@ Creates an `Engagement` object with the given values.
```typescript -await client.crm.engagements.create({ - model: {}, -}); +await client.crm.accountDetails.retrieve(); ```
@@ -7778,15 +7695,7 @@ await client.crm.engagements.create({
-**request:** `Merge.crm.EngagementEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `AccountDetails.RequestOptions`
@@ -7797,7 +7706,9 @@ await client.crm.engagements.create({
-
client.crm.engagements.retrieve(id, { ...params }) -> Merge.Engagement +## Crm AccountToken + +
client.crm.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -7809,7 +7720,7 @@ await client.crm.engagements.create({
-Returns an `Engagement` object with the given `id`. +Returns the account token for the end user with the provided public token.
@@ -7825,7 +7736,7 @@ Returns an `Engagement` object with the given `id`.
```typescript -await client.crm.engagements.retrieve("id"); +await client.crm.accountToken.retrieve("public_token"); ```
@@ -7841,15 +7752,7 @@ await client.crm.engagements.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.EngagementsRetrieveRequest` +**publicToken:** `string`
@@ -7857,7 +7760,7 @@ await client.crm.engagements.retrieve("id");
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `AccountToken.RequestOptions`
@@ -7868,7 +7771,9 @@ await client.crm.engagements.retrieve("id");
-
client.crm.engagements.partialUpdate(id, { ...params }) -> Merge.EngagementResponse +## Crm Accounts + +
client.crm.accounts.list({ ...params }) -> Merge.PaginatedAccountList
@@ -7880,7 +7785,7 @@ await client.crm.engagements.retrieve("id");
-Updates an `Engagement` object with the given `id`. +Returns a list of `Account` objects.
@@ -7896,8 +7801,8 @@ Updates an `Engagement` object with the given `id`.
```typescript -await client.crm.engagements.partialUpdate("id", { - model: {}, +await client.crm.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -7914,15 +7819,7 @@ await client.crm.engagements.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedEngagementEndpointRequest` +**request:** `Merge.crm.AccountsListRequest`
@@ -7930,7 +7827,7 @@ await client.crm.engagements.partialUpdate("id", {
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -7941,7 +7838,7 @@ await client.crm.engagements.partialUpdate("id", {
-
client.crm.engagements.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.crm.accounts.create({ ...params }) -> Merge.CrmAccountResponse
@@ -7953,7 +7850,7 @@ await client.crm.engagements.partialUpdate("id", {
-Returns metadata for `Engagement` PATCHs. +Creates an `Account` object with the given values.
@@ -7969,7 +7866,9 @@ Returns metadata for `Engagement` PATCHs.
```typescript -await client.crm.engagements.metaPatchRetrieve("id"); +await client.crm.accounts.create({ + model: {}, +}); ```
@@ -7985,7 +7884,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-**id:** `string` +**request:** `Merge.crm.CrmAccountEndpointRequest`
@@ -7993,7 +7892,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -8004,7 +7903,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-
client.crm.engagements.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.accounts.retrieve(id, { ...params }) -> Merge.Account
@@ -8016,7 +7915,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-Returns metadata for `Engagement` POSTs. +Returns an `Account` object with the given `id`.
@@ -8032,7 +7931,7 @@ Returns metadata for `Engagement` POSTs.
```typescript -await client.crm.engagements.metaPostRetrieve(); +await client.crm.accounts.retrieve("id"); ```
@@ -8048,7 +7947,23 @@ await client.crm.engagements.metaPostRetrieve();
-**requestOptions:** `Engagements.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.AccountsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -8059,7 +7974,7 @@ await client.crm.engagements.metaPostRetrieve();
-
client.crm.engagements.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.crm.accounts.partialUpdate(id, { ...params }) -> Merge.CrmAccountResponse
@@ -8071,7 +7986,7 @@ await client.crm.engagements.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Updates an `Account` object with the given `id`.
@@ -8087,8 +8002,8 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagements.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.crm.accounts.partialUpdate("id", { + model: {}, }); ``` @@ -8105,7 +8020,7 @@ await client.crm.engagements.remoteFieldClassesList({
-**request:** `Merge.crm.EngagementsRemoteFieldClassesListRequest` +**id:** `string`
@@ -8113,7 +8028,15 @@ await client.crm.engagements.remoteFieldClassesList({
-**requestOptions:** `Engagements.RequestOptions` +**request:** `Merge.crm.PatchedCrmAccountEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -8124,9 +8047,7 @@ await client.crm.engagements.remoteFieldClassesList({
-## Crm FieldMapping - -
client.crm.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.crm.accounts.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -8138,7 +8059,7 @@ await client.crm.engagements.remoteFieldClassesList({
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns metadata for `CRMAccount` PATCHs.
@@ -8154,7 +8075,7 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.crm.fieldMapping.fieldMappingsRetrieve(); +await client.crm.accounts.metaPatchRetrieve("id"); ```
@@ -8170,7 +8091,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.crm.FieldMappingsRetrieveRequest` +**id:** `string`
@@ -8178,7 +8099,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -8189,7 +8110,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-
client.crm.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
client.crm.accounts.metaPostRetrieve() -> Merge.MetaResponse
@@ -8201,7 +8122,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns metadata for `CRMAccount` POSTs.
@@ -8217,14 +8138,7 @@ Create new Field Mappings that will be available after the next scheduled sync.
```typescript -await client.crm.fieldMapping.fieldMappingsCreate({ - targetFieldName: "example_target_field_name", - targetFieldDescription: "this is a example description of the target field", - remoteFieldTraversalPath: ["example_remote_field"], - remoteMethod: "GET", - remoteUrlPath: "/example-url-path", - commonModelName: "ExampleCommonModel", -}); +await client.crm.accounts.metaPostRetrieve(); ```
@@ -8240,15 +8154,7 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.crm.CreateFieldMappingRequest` - -
-
- -
-
- -**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -8259,7 +8165,7 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-
client.crm.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
client.crm.accounts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -8271,7 +8177,7 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-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 `RemoteFieldClass` objects.
@@ -8287,7 +8193,9 @@ Deletes Field Mappings for a Linked Account. All data related to this Field Mapp
```typescript -await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +await client.crm.accounts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -8303,7 +8211,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` +**request:** `Merge.crm.AccountsRemoteFieldClassesListRequest`
@@ -8311,7 +8219,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -8322,7 +8230,9 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.crm.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +## Crm AsyncPassthrough + +
client.crm.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -8334,7 +8244,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -8350,7 +8260,10 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```typescript -await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +await client.crm.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -8366,15 +8279,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**fieldMappingId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedEditFieldMappingRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -8382,7 +8287,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -8393,7 +8298,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-
client.crm.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
client.crm.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -8405,7 +8310,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_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/). +Retrieves data from earlier async-passthrough POST request
@@ -8421,7 +8326,7 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.crm.fieldMapping.remoteFieldsRetrieve(); +await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -8437,7 +8342,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.crm.RemoteFieldsRetrieveRequest` +**asyncPassthroughReceiptId:** `string`
@@ -8445,7 +8350,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -8456,7 +8361,9 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-
client.crm.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +## Crm AuditTrail + +
client.crm.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -8468,7 +8375,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-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/). +Gets a list of audit trail events.
@@ -8484,7 +8391,9 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.crm.fieldMapping.targetFieldsRetrieve(); +await client.crm.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -8500,7 +8409,15 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.crm.AuditTrailListRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditTrail.RequestOptions`
@@ -8511,9 +8428,9 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-## Crm GenerateKey +## Crm AvailableActions -
client.crm.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.availableActions.retrieve() -> Merge.AvailableActions
@@ -8525,7 +8442,7 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-Create a remote key. +Returns a list of models and actions available for an account.
@@ -8541,9 +8458,7 @@ Create a remote key.
```typescript -await client.crm.generateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.crm.availableActions.retrieve(); ```
@@ -8559,15 +8474,7 @@ await client.crm.generateKey.create({
-**request:** `Merge.crm.GenerateRemoteKeyRequest` - -
-
- -
-
- -**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -8578,9 +8485,9 @@ await client.crm.generateKey.create({
-## Crm Issues +## Crm Contacts -
client.crm.issues.list({ ...params }) -> Merge.PaginatedIssueList +
client.crm.contacts.list({ ...params }) -> Merge.PaginatedContactList
@@ -8592,7 +8499,7 @@ await client.crm.generateKey.create({
-Gets all issues for Organization. +Returns a list of `Contact` objects.
@@ -8608,7 +8515,7 @@ Gets all issues for Organization.
```typescript -await client.crm.issues.list({ +await client.crm.contacts.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -8626,7 +8533,7 @@ await client.crm.issues.list({
-**request:** `Merge.crm.IssuesListRequest` +**request:** `Merge.crm.ContactsListRequest`
@@ -8634,7 +8541,7 @@ await client.crm.issues.list({
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -8645,7 +8552,7 @@ await client.crm.issues.list({
-
client.crm.issues.retrieve(id) -> Merge.Issue +
client.crm.contacts.create({ ...params }) -> Merge.CrmContactResponse
@@ -8657,7 +8564,7 @@ await client.crm.issues.list({
-Get a specific issue. +Creates a `Contact` object with the given values.
@@ -8673,7 +8580,9 @@ Get a specific issue.
```typescript -await client.crm.issues.retrieve("id"); +await client.crm.contacts.create({ + model: {}, +}); ```
@@ -8689,7 +8598,7 @@ await client.crm.issues.retrieve("id");
-**id:** `string` +**request:** `Merge.crm.CrmContactEndpointRequest`
@@ -8697,7 +8606,7 @@ await client.crm.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -8708,9 +8617,7 @@ await client.crm.issues.retrieve("id");
-## Crm Leads - -
client.crm.leads.list({ ...params }) -> Merge.PaginatedLeadList +
client.crm.contacts.retrieve(id, { ...params }) -> Merge.Contact
@@ -8722,7 +8629,7 @@ await client.crm.issues.retrieve("id");
-Returns a list of `Lead` objects. +Returns a `Contact` object with the given `id`.
@@ -8738,9 +8645,7 @@ Returns a list of `Lead` objects.
```typescript -await client.crm.leads.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.contacts.retrieve("id"); ```
@@ -8756,7 +8661,7 @@ await client.crm.leads.list({
-**request:** `Merge.crm.LeadsListRequest` +**id:** `string`
@@ -8764,7 +8669,15 @@ await client.crm.leads.list({
-**requestOptions:** `Leads.RequestOptions` +**request:** `Merge.crm.ContactsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -8775,7 +8688,7 @@ await client.crm.leads.list({
-
client.crm.leads.create({ ...params }) -> Merge.LeadResponse +
client.crm.contacts.partialUpdate(id, { ...params }) -> Merge.CrmContactResponse
@@ -8787,7 +8700,7 @@ await client.crm.leads.list({
-Creates a `Lead` object with the given values. +Updates a `Contact` object with the given `id`.
@@ -8803,7 +8716,7 @@ Creates a `Lead` object with the given values.
```typescript -await client.crm.leads.create({ +await client.crm.contacts.partialUpdate("id", { model: {}, }); ``` @@ -8821,7 +8734,7 @@ await client.crm.leads.create({
-**request:** `Merge.crm.LeadEndpointRequest` +**id:** `string`
@@ -8829,7 +8742,15 @@ await client.crm.leads.create({
-**requestOptions:** `Leads.RequestOptions` +**request:** `Merge.crm.PatchedCrmContactEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -8840,7 +8761,7 @@ await client.crm.leads.create({
-
client.crm.leads.retrieve(id, { ...params }) -> Merge.Lead +
client.crm.contacts.ignoreCreate(modelId, { ...params }) -> void
@@ -8852,7 +8773,7 @@ await client.crm.leads.create({
-Returns a `Lead` object with the given `id`. +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
@@ -8868,7 +8789,9 @@ Returns a `Lead` object with the given `id`.
```typescript -await client.crm.leads.retrieve("id"); +await client.crm.contacts.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); ```
@@ -8884,7 +8807,7 @@ await client.crm.leads.retrieve("id");
-**id:** `string` +**modelId:** `string`
@@ -8892,7 +8815,7 @@ await client.crm.leads.retrieve("id");
-**request:** `Merge.crm.LeadsRetrieveRequest` +**request:** `Merge.IgnoreCommonModelRequest`
@@ -8900,7 +8823,7 @@ await client.crm.leads.retrieve("id");
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -8911,7 +8834,7 @@ await client.crm.leads.retrieve("id");
-
client.crm.leads.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -8923,7 +8846,7 @@ await client.crm.leads.retrieve("id");
-Returns metadata for `Lead` POSTs. +Returns metadata for `CRMContact` PATCHs.
@@ -8939,7 +8862,7 @@ Returns metadata for `Lead` POSTs.
```typescript -await client.crm.leads.metaPostRetrieve(); +await client.crm.contacts.metaPatchRetrieve("id"); ```
@@ -8955,7 +8878,15 @@ await client.crm.leads.metaPostRetrieve();
-**requestOptions:** `Leads.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -8966,7 +8897,7 @@ await client.crm.leads.metaPostRetrieve();
-
client.crm.leads.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.crm.contacts.metaPostRetrieve() -> Merge.MetaResponse
@@ -8978,7 +8909,7 @@ await client.crm.leads.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns metadata for `CRMContact` POSTs.
@@ -8994,9 +8925,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.leads.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.contacts.metaPostRetrieve(); ```
@@ -9012,15 +8941,7 @@ await client.crm.leads.remoteFieldClassesList({
-**request:** `Merge.crm.LeadsRemoteFieldClassesListRequest` - -
-
- -
-
- -**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -9031,9 +8952,7 @@ await client.crm.leads.remoteFieldClassesList({
-## Crm LinkToken - -
client.crm.linkToken.create({ ...params }) -> Merge.LinkToken +
client.crm.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -9045,7 +8964,7 @@ await client.crm.leads.remoteFieldClassesList({
-Creates a link token to be used when linking a new end user. +Returns a list of `RemoteFieldClass` objects.
@@ -9061,11 +8980,8 @@ Creates a link token to be used when linking a new end user.
```typescript -await client.crm.linkToken.create({ - endUserEmailAddress: "example@gmail.com", - endUserOrganizationName: "Test Organization", - endUserOriginId: "12345", - categories: ["hris", "ats"], +await client.crm.contacts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -9082,7 +8998,7 @@ await client.crm.linkToken.create({
-**request:** `Merge.crm.EndUserDetailsRequest` +**request:** `Merge.crm.ContactsRemoteFieldClassesListRequest`
@@ -9090,7 +9006,7 @@ await client.crm.linkToken.create({
-**requestOptions:** `LinkToken.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -9101,9 +9017,9 @@ await client.crm.linkToken.create({
-## Crm LinkedAccounts +## Crm CustomObjectClasses -
client.crm.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
client.crm.customObjectClasses.list({ ...params }) -> Merge.PaginatedCustomObjectClassList
@@ -9115,7 +9031,7 @@ await client.crm.linkToken.create({
-List linked accounts for your organization. +Returns a list of `CustomObjectClass` objects.
@@ -9131,7 +9047,7 @@ List linked accounts for your organization.
```typescript -await client.crm.linkedAccounts.list({ +await client.crm.customObjectClasses.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -9149,7 +9065,7 @@ await client.crm.linkedAccounts.list({
-**request:** `Merge.crm.LinkedAccountsListRequest` +**request:** `Merge.crm.CustomObjectClassesListRequest`
@@ -9157,7 +9073,7 @@ await client.crm.linkedAccounts.list({
-**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `CustomObjectClasses.RequestOptions`
@@ -9168,9 +9084,7 @@ await client.crm.linkedAccounts.list({
-## Crm Notes - -
client.crm.notes.list({ ...params }) -> Merge.PaginatedNoteList +
client.crm.customObjectClasses.retrieve(id, { ...params }) -> Merge.CustomObjectClass
@@ -9182,7 +9096,7 @@ await client.crm.linkedAccounts.list({
-Returns a list of `Note` objects. +Returns a `CustomObjectClass` object with the given `id`.
@@ -9198,9 +9112,7 @@ Returns a list of `Note` objects.
```typescript -await client.crm.notes.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.customObjectClasses.retrieve("id"); ```
@@ -9216,7 +9128,7 @@ await client.crm.notes.list({
-**request:** `Merge.crm.NotesListRequest` +**id:** `string`
@@ -9224,7 +9136,15 @@ await client.crm.notes.list({
-**requestOptions:** `Notes.RequestOptions` +**request:** `Merge.crm.CustomObjectClassesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjectClasses.RequestOptions`
@@ -9235,7 +9155,9 @@ await client.crm.notes.list({
-
client.crm.notes.create({ ...params }) -> Merge.NoteResponse +## Crm AssociationTypes + +
client.crm.associationTypes.customObjectClassesAssociationTypesList(customObjectClassId, { ...params }) -> Merge.PaginatedAssociationTypeList
@@ -9247,7 +9169,7 @@ await client.crm.notes.list({
-Creates a `Note` object with the given values. +Returns a list of `AssociationType` objects.
@@ -9263,8 +9185,8 @@ Creates a `Note` object with the given values.
```typescript -await client.crm.notes.create({ - model: {}, +await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -9281,7 +9203,7 @@ await client.crm.notes.create({
-**request:** `Merge.crm.NoteEndpointRequest` +**customObjectClassId:** `string`
@@ -9289,7 +9211,15 @@ await client.crm.notes.create({
-**requestOptions:** `Notes.RequestOptions` +**request:** `Merge.crm.CustomObjectClassesAssociationTypesListRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -9300,7 +9230,7 @@ await client.crm.notes.create({
-
client.crm.notes.retrieve(id, { ...params }) -> Merge.Note +
client.crm.associationTypes.customObjectClassesAssociationTypesCreate(customObjectClassId, { ...params }) -> Merge.CrmAssociationTypeResponse
@@ -9312,7 +9242,7 @@ await client.crm.notes.create({
-Returns a `Note` object with the given `id`. +Creates an `AssociationType` object with the given values.
@@ -9328,7 +9258,21 @@ Returns a `Note` object with the given `id`.
```typescript -await client.crm.notes.retrieve("id"); +await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("custom_object_class_id", { + model: { + sourceObjectClass: { + id: "id", + originType: "CUSTOM_OBJECT", + }, + targetObjectClasses: [ + { + id: "id", + originType: "CUSTOM_OBJECT", + }, + ], + remoteKeyName: "remote_key_name", + }, +}); ```
@@ -9344,7 +9288,7 @@ await client.crm.notes.retrieve("id");
-**id:** `string` +**customObjectClassId:** `string`
@@ -9352,7 +9296,7 @@ await client.crm.notes.retrieve("id");
-**request:** `Merge.crm.NotesRetrieveRequest` +**request:** `Merge.crm.CrmAssociationTypeEndpointRequest`
@@ -9360,7 +9304,7 @@ await client.crm.notes.retrieve("id");
-**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -9371,7 +9315,7 @@ await client.crm.notes.retrieve("id");
-
client.crm.notes.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, { ...params }) -> Merge.AssociationType
@@ -9383,7 +9327,7 @@ await client.crm.notes.retrieve("id");
-Returns metadata for `Note` POSTs. +Returns an `AssociationType` object with the given `id`.
@@ -9399,7 +9343,7 @@ Returns metadata for `Note` POSTs.
```typescript -await client.crm.notes.metaPostRetrieve(); +await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id"); ```
@@ -9415,7 +9359,31 @@ await client.crm.notes.metaPostRetrieve();
-**requestOptions:** `Notes.RequestOptions` +**customObjectClassId:** `string` + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -9426,7 +9394,7 @@ await client.crm.notes.metaPostRetrieve();
-
client.crm.notes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse
@@ -9438,7 +9406,7 @@ await client.crm.notes.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns metadata for `CRMAssociationType` POSTs.
@@ -9454,9 +9422,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.notes.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id"); ```
@@ -9472,7 +9438,7 @@ await client.crm.notes.remoteFieldClassesList({
-**request:** `Merge.crm.NotesRemoteFieldClassesListRequest` +**customObjectClassId:** `string`
@@ -9480,7 +9446,7 @@ await client.crm.notes.remoteFieldClassesList({
-**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -9491,9 +9457,9 @@ await client.crm.notes.remoteFieldClassesList({
-## Crm Opportunities +## Crm CustomObjects -
client.crm.opportunities.list({ ...params }) -> Merge.PaginatedOpportunityList +
client.crm.customObjects.customObjectClassesCustomObjectsList(customObjectClassId, { ...params }) -> Merge.PaginatedCustomObjectList
@@ -9505,7 +9471,7 @@ await client.crm.notes.remoteFieldClassesList({
-Returns a list of `Opportunity` objects. +Returns a list of `CustomObject` objects.
@@ -9521,7 +9487,7 @@ Returns a list of `Opportunity` objects.
```typescript -await client.crm.opportunities.list({ +await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", { cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -9539,7 +9505,7 @@ await client.crm.opportunities.list({
-**request:** `Merge.crm.OpportunitiesListRequest` +**customObjectClassId:** `string`
@@ -9547,7 +9513,15 @@ await client.crm.opportunities.list({
-**requestOptions:** `Opportunities.RequestOptions` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsListRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9558,7 +9532,7 @@ await client.crm.opportunities.list({
-
client.crm.opportunities.create({ ...params }) -> Merge.OpportunityResponse +
client.crm.customObjects.customObjectClassesCustomObjectsCreate(customObjectClassId, { ...params }) -> Merge.CrmCustomObjectResponse
@@ -9570,7 +9544,7 @@ await client.crm.opportunities.list({
-Creates an `Opportunity` object with the given values. +Creates a `CustomObject` object with the given values.
@@ -9586,8 +9560,12 @@ Creates an `Opportunity` object with the given values.
```typescript -await client.crm.opportunities.create({ - model: {}, +await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { + model: { + fields: { + test_field: "hello", + }, + }, }); ``` @@ -9604,7 +9582,7 @@ await client.crm.opportunities.create({
-**request:** `Merge.crm.OpportunityEndpointRequest` +**customObjectClassId:** `string`
@@ -9612,7 +9590,15 @@ await client.crm.opportunities.create({
-**requestOptions:** `Opportunities.RequestOptions` +**request:** `Merge.crm.CrmCustomObjectEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9623,7 +9609,7 @@ await client.crm.opportunities.create({
-
client.crm.opportunities.retrieve(id, { ...params }) -> Merge.Opportunity +
client.crm.customObjects.customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, { ...params }) -> Merge.CustomObject
@@ -9635,7 +9621,7 @@ await client.crm.opportunities.create({
-Returns an `Opportunity` object with the given `id`. +Returns a `CustomObject` object with the given `id`.
@@ -9651,7 +9637,7 @@ Returns an `Opportunity` object with the given `id`.
```typescript -await client.crm.opportunities.retrieve("id"); +await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id"); ```
@@ -9667,6 +9653,14 @@ await client.crm.opportunities.retrieve("id");
+**customObjectClassId:** `string` + +
+
+ +
+
+ **id:** `string`
@@ -9675,7 +9669,7 @@ await client.crm.opportunities.retrieve("id");
-**request:** `Merge.crm.OpportunitiesRetrieveRequest` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest`
@@ -9683,7 +9677,7 @@ await client.crm.opportunities.retrieve("id");
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9694,7 +9688,7 @@ await client.crm.opportunities.retrieve("id");
-
client.crm.opportunities.partialUpdate(id, { ...params }) -> Merge.OpportunityResponse +
client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse
@@ -9706,7 +9700,7 @@ await client.crm.opportunities.retrieve("id");
-Updates an `Opportunity` object with the given `id`. +Returns metadata for `CRMCustomObject` POSTs.
@@ -9722,9 +9716,7 @@ Updates an `Opportunity` object with the given `id`.
```typescript -await client.crm.opportunities.partialUpdate("id", { - model: {}, -}); +await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id"); ```
@@ -9740,15 +9732,7 @@ await client.crm.opportunities.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedOpportunityEndpointRequest` +**customObjectClassId:** `string`
@@ -9756,7 +9740,7 @@ await client.crm.opportunities.partialUpdate("id", {
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9767,7 +9751,7 @@ await client.crm.opportunities.partialUpdate("id", {
-
client.crm.opportunities.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -9779,7 +9763,7 @@ await client.crm.opportunities.partialUpdate("id", {
-Returns metadata for `Opportunity` PATCHs. +Returns a list of `RemoteFieldClass` objects.
@@ -9795,7 +9779,9 @@ Returns metadata for `Opportunity` PATCHs.
```typescript -await client.crm.opportunities.metaPatchRetrieve("id"); +await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -9811,7 +9797,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-**id:** `string` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest`
@@ -9819,7 +9805,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9830,7 +9816,9 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-
client.crm.opportunities.metaPostRetrieve() -> Merge.MetaResponse +## Crm Associations + +
client.crm.associations.customObjectClassesCustomObjectsAssociationsList(customObjectClassId, objectId, { ...params }) -> Merge.PaginatedAssociationList
@@ -9842,7 +9830,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-Returns metadata for `Opportunity` POSTs. +Returns a list of `Association` objects.
@@ -9858,7 +9846,9 @@ Returns metadata for `Opportunity` POSTs.
```typescript -await client.crm.opportunities.metaPostRetrieve(); +await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -9874,7 +9864,31 @@ await client.crm.opportunities.metaPostRetrieve();
-**requestOptions:** `Opportunities.RequestOptions` +**customObjectClassId:** `string` + +
+
+ +
+
+ +**objectId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Associations.RequestOptions`
@@ -9885,7 +9899,7 @@ await client.crm.opportunities.metaPostRetrieve();
-
client.crm.opportunities.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate(associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, { ...params }) -> Merge.Association
@@ -9897,7 +9911,7 @@ await client.crm.opportunities.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`.
@@ -9913,9 +9927,13 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.opportunities.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate( + "association_type_id", + "source_class_id", + "source_object_id", + "target_class_id", + "target_object_id", +); ```
@@ -9931,7 +9949,7 @@ await client.crm.opportunities.remoteFieldClassesList({
-**request:** `Merge.crm.OpportunitiesRemoteFieldClassesListRequest` +**associationTypeId:** `string`
@@ -9939,67 +9957,39 @@ await client.crm.opportunities.remoteFieldClassesList({
-**requestOptions:** `Opportunities.RequestOptions` - -
-
- -
+**sourceClassId:** `string` -
-## Crm Passthrough - -
client.crm.passthrough.create({ ...params }) -> Merge.RemoteResponse
-#### 📝 Description +**sourceObjectId:** `string` -
-
+
+
-Pull data from an endpoint not currently supported by Merge. +**targetClassId:** `string`
-
-
- -#### 🔌 Usage - -
-
-```typescript -await client.crm.passthrough.create({ - method: "GET", - path: "/scooters", -}); -``` +**targetObjectId:** `string`
-
-
- -#### ⚙️ Parameters - -
-
-**request:** `Merge.DataPassthroughRequest` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest`
@@ -10007,7 +9997,7 @@ await client.crm.passthrough.create({
-**requestOptions:** `Passthrough.RequestOptions` +**requestOptions:** `Associations.RequestOptions`
@@ -10018,9 +10008,9 @@ await client.crm.passthrough.create({
-## Crm RegenerateKey +## Crm Scopes -
client.crm.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -10032,7 +10022,7 @@ await client.crm.passthrough.create({
-Exchange remote keys. +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).
@@ -10048,9 +10038,7 @@ Exchange remote keys.
```typescript -await client.crm.regenerateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.crm.scopes.defaultScopesRetrieve(); ```
@@ -10066,15 +10054,7 @@ await client.crm.regenerateKey.create({
-**request:** `Merge.crm.RemoteKeyForRegenerationRequest` - -
-
- -
-
- -**requestOptions:** `RegenerateKey.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -10085,9 +10065,7 @@ await client.crm.regenerateKey.create({
-## Crm Stages - -
client.crm.stages.list({ ...params }) -> Merge.PaginatedStageList +
client.crm.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -10099,7 +10077,7 @@ await client.crm.regenerateKey.create({
-Returns a list of `Stage` objects. +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).
@@ -10115,9 +10093,7 @@ Returns a list of `Stage` objects.
```typescript -await client.crm.stages.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.scopes.linkedAccountScopesRetrieve(); ```
@@ -10133,15 +10109,7 @@ await client.crm.stages.list({
-**request:** `Merge.crm.StagesListRequest` - -
-
- -
-
- -**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -10152,7 +10120,7 @@ await client.crm.stages.list({
-
client.crm.stages.retrieve(id, { ...params }) -> Merge.Stage +
client.crm.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -10164,7 +10132,7 @@ await client.crm.stages.list({
-Returns a `Stage` object with the given `id`. +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)
@@ -10180,7 +10148,33 @@ Returns a `Stage` object with the given `id`.
```typescript -await client.crm.stages.retrieve("id"); +await client.crm.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: ["avatar", "home_location"], + disabledFields: ["work_location"], + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); ```
@@ -10196,15 +10190,7 @@ await client.crm.stages.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.StagesRetrieveRequest` +**request:** `Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -10212,7 +10198,7 @@ await client.crm.stages.retrieve("id");
-**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -10223,7 +10209,9 @@ await client.crm.stages.retrieve("id");
-
client.crm.stages.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Crm DeleteAccount + +
client.crm.deleteAccount.delete() -> void
@@ -10235,7 +10223,7 @@ await client.crm.stages.retrieve("id");
-Returns a list of `RemoteFieldClass` objects. +Delete a linked account.
@@ -10251,9 +10239,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.stages.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.deleteAccount.delete(); ```
@@ -10269,15 +10255,7 @@ await client.crm.stages.remoteFieldClassesList({
-**request:** `Merge.crm.StagesRemoteFieldClassesListRequest` - -
-
- -
-
- -**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -10288,9 +10266,9 @@ await client.crm.stages.remoteFieldClassesList({
-## Crm SyncStatus +## Crm EngagementTypes -
client.crm.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.crm.engagementTypes.list({ ...params }) -> Merge.PaginatedEngagementTypeList
@@ -10302,7 +10280,7 @@ await client.crm.stages.remoteFieldClassesList({
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +Returns a list of `EngagementType` objects.
@@ -10318,7 +10296,7 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.crm.syncStatus.list({ +await client.crm.engagementTypes.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -10336,7 +10314,7 @@ await client.crm.syncStatus.list({
-**request:** `Merge.crm.SyncStatusListRequest` +**request:** `Merge.crm.EngagementTypesListRequest`
@@ -10344,7 +10322,7 @@ await client.crm.syncStatus.list({
-**requestOptions:** `SyncStatus.RequestOptions` +**requestOptions:** `EngagementTypes.RequestOptions`
@@ -10355,9 +10333,7 @@ await client.crm.syncStatus.list({
-## Crm ForceResync - -
client.crm.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.crm.engagementTypes.retrieve(id, { ...params }) -> Merge.EngagementType
@@ -10369,7 +10345,7 @@ await client.crm.syncStatus.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 an `EngagementType` object with the given `id`.
@@ -10385,7 +10361,7 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.crm.forceResync.syncStatusResyncCreate(); +await client.crm.engagementTypes.retrieve("id"); ```
@@ -10401,7 +10377,23 @@ await client.crm.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions`
@@ -10412,9 +10404,7 @@ await client.crm.forceResync.syncStatusResyncCreate();
-## Crm Tasks - -
client.crm.tasks.list({ ...params }) -> Merge.PaginatedTaskList +
client.crm.engagementTypes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -10426,7 +10416,7 @@ await client.crm.forceResync.syncStatusResyncCreate();
-Returns a list of `Task` objects. +Returns a list of `RemoteFieldClass` objects.
@@ -10442,7 +10432,7 @@ Returns a list of `Task` objects.
```typescript -await client.crm.tasks.list({ +await client.crm.engagementTypes.remoteFieldClassesList({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -10460,7 +10450,7 @@ await client.crm.tasks.list({
-**request:** `Merge.crm.TasksListRequest` +**request:** `Merge.crm.EngagementTypesRemoteFieldClassesListRequest`
@@ -10468,7 +10458,7 @@ await client.crm.tasks.list({
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `EngagementTypes.RequestOptions`
@@ -10479,7 +10469,9 @@ await client.crm.tasks.list({
-
client.crm.tasks.create({ ...params }) -> Merge.TaskResponse +## Crm Engagements + +
client.crm.engagements.list({ ...params }) -> Merge.PaginatedEngagementList
@@ -10491,7 +10483,7 @@ await client.crm.tasks.list({
-Creates a `Task` object with the given values. +Returns a list of `Engagement` objects.
@@ -10507,8 +10499,8 @@ Creates a `Task` object with the given values.
```typescript -await client.crm.tasks.create({ - model: {}, +await client.crm.engagements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -10525,7 +10517,7 @@ await client.crm.tasks.create({
-**request:** `Merge.crm.TaskEndpointRequest` +**request:** `Merge.crm.EngagementsListRequest`
@@ -10533,7 +10525,7 @@ await client.crm.tasks.create({
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10544,7 +10536,7 @@ await client.crm.tasks.create({
-
client.crm.tasks.retrieve(id, { ...params }) -> Merge.Task +
client.crm.engagements.create({ ...params }) -> Merge.EngagementResponse
@@ -10556,7 +10548,7 @@ await client.crm.tasks.create({
-Returns a `Task` object with the given `id`. +Creates an `Engagement` object with the given values.
@@ -10572,7 +10564,9 @@ Returns a `Task` object with the given `id`.
```typescript -await client.crm.tasks.retrieve("id"); +await client.crm.engagements.create({ + model: {}, +}); ```
@@ -10588,15 +10582,7 @@ await client.crm.tasks.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.TasksRetrieveRequest` +**request:** `Merge.crm.EngagementEndpointRequest`
@@ -10604,7 +10590,7 @@ await client.crm.tasks.retrieve("id");
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10615,7 +10601,7 @@ await client.crm.tasks.retrieve("id");
-
client.crm.tasks.partialUpdate(id, { ...params }) -> Merge.TaskResponse +
client.crm.engagements.retrieve(id, { ...params }) -> Merge.Engagement
@@ -10627,7 +10613,7 @@ await client.crm.tasks.retrieve("id");
-Updates a `Task` object with the given `id`. +Returns an `Engagement` object with the given `id`.
@@ -10643,9 +10629,7 @@ Updates a `Task` object with the given `id`.
```typescript -await client.crm.tasks.partialUpdate("id", { - model: {}, -}); +await client.crm.engagements.retrieve("id"); ```
@@ -10669,7 +10653,7 @@ await client.crm.tasks.partialUpdate("id", {
-**request:** `Merge.crm.PatchedTaskEndpointRequest` +**request:** `Merge.crm.EngagementsRetrieveRequest`
@@ -10677,7 +10661,7 @@ await client.crm.tasks.partialUpdate("id", {
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10688,7 +10672,7 @@ await client.crm.tasks.partialUpdate("id", {
-
client.crm.tasks.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.crm.engagements.partialUpdate(id, { ...params }) -> Merge.EngagementResponse
@@ -10700,7 +10684,7 @@ await client.crm.tasks.partialUpdate("id", {
-Returns metadata for `Task` PATCHs. +Updates an `Engagement` object with the given `id`.
@@ -10716,7 +10700,9 @@ Returns metadata for `Task` PATCHs.
```typescript -await client.crm.tasks.metaPatchRetrieve("id"); +await client.crm.engagements.partialUpdate("id", { + model: {}, +}); ```
@@ -10740,7 +10726,15 @@ await client.crm.tasks.metaPatchRetrieve("id");
-**requestOptions:** `Tasks.RequestOptions` +**request:** `Merge.crm.PatchedEngagementEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions`
@@ -10751,7 +10745,7 @@ await client.crm.tasks.metaPatchRetrieve("id");
-
client.crm.tasks.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.engagements.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -10763,7 +10757,7 @@ await client.crm.tasks.metaPatchRetrieve("id");
-Returns metadata for `Task` POSTs. +Returns metadata for `Engagement` PATCHs.
@@ -10779,7 +10773,7 @@ Returns metadata for `Task` POSTs.
```typescript -await client.crm.tasks.metaPostRetrieve(); +await client.crm.engagements.metaPatchRetrieve("id"); ```
@@ -10795,7 +10789,15 @@ await client.crm.tasks.metaPostRetrieve();
-**requestOptions:** `Tasks.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions`
@@ -10806,7 +10808,7 @@ await client.crm.tasks.metaPostRetrieve();
-
client.crm.tasks.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.crm.engagements.metaPostRetrieve() -> Merge.MetaResponse
@@ -10818,7 +10820,7 @@ await client.crm.tasks.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns metadata for `Engagement` POSTs.
@@ -10834,9 +10836,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.tasks.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.engagements.metaPostRetrieve(); ```
@@ -10852,15 +10852,7 @@ await client.crm.tasks.remoteFieldClassesList({
-**request:** `Merge.crm.TasksRemoteFieldClassesListRequest` - -
-
- -
-
- -**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10871,9 +10863,7 @@ await client.crm.tasks.remoteFieldClassesList({
-## Crm Users - -
client.crm.users.list({ ...params }) -> Merge.PaginatedUserList +
client.crm.engagements.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -10885,7 +10875,7 @@ await client.crm.tasks.remoteFieldClassesList({
-Returns a list of `User` objects. +Returns a list of `RemoteFieldClass` objects.
@@ -10901,7 +10891,7 @@ Returns a list of `User` objects.
```typescript -await client.crm.users.list({ +await client.crm.engagements.remoteFieldClassesList({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -10919,7 +10909,7 @@ await client.crm.users.list({
-**request:** `Merge.crm.UsersListRequest` +**request:** `Merge.crm.EngagementsRemoteFieldClassesListRequest`
@@ -10927,7 +10917,7 @@ await client.crm.users.list({
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10938,7 +10928,9 @@ await client.crm.users.list({
-
client.crm.users.retrieve(id, { ...params }) -> Merge.User +## Crm FieldMapping + +
client.crm.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -10950,7 +10942,7 @@ await client.crm.users.list({
-Returns a `User` object with the given `id`. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -10966,7 +10958,7 @@ Returns a `User` object with the given `id`.
```typescript -await client.crm.users.retrieve("id"); +await client.crm.fieldMapping.fieldMappingsRetrieve(); ```
@@ -10982,15 +10974,7 @@ await client.crm.users.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.UsersRetrieveRequest` +**request:** `Merge.crm.FieldMappingsRetrieveRequest`
@@ -10998,7 +10982,7 @@ await client.crm.users.retrieve("id");
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11009,7 +10993,7 @@ await client.crm.users.retrieve("id");
-
client.crm.users.ignoreCreate(modelId, { ...params }) -> void +
client.crm.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -11021,7 +11005,7 @@ await client.crm.users.retrieve("id");
-Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. +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.
@@ -11037,8 +11021,13 @@ Ignores a specific row based on the `model_id` in the url. These records will ha
```typescript -await client.crm.users.ignoreCreate("model_id", { - reason: "GENERAL_CUSTOMER_REQUEST", +await client.crm.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", }); ``` @@ -11055,15 +11044,7 @@ await client.crm.users.ignoreCreate("model_id", {
-**modelId:** `string` - -
-
- -
-
- -**request:** `Merge.IgnoreCommonModelRequest` +**request:** `Merge.crm.CreateFieldMappingRequest`
@@ -11071,7 +11052,7 @@ await client.crm.users.ignoreCreate("model_id", {
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11082,7 +11063,7 @@ await client.crm.users.ignoreCreate("model_id", {
-
client.crm.users.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.crm.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -11094,7 +11075,7 @@ await client.crm.users.ignoreCreate("model_id", {
-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.
@@ -11110,9 +11091,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.users.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -11128,7 +11107,7 @@ await client.crm.users.remoteFieldClassesList({
-**request:** `Merge.crm.UsersRemoteFieldClassesListRequest` +**fieldMappingId:** `string`
@@ -11136,7 +11115,7 @@ await client.crm.users.remoteFieldClassesList({
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11147,9 +11126,7 @@ await client.crm.users.remoteFieldClassesList({
-## Crm WebhookReceivers - -
client.crm.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.crm.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -11161,7 +11138,7 @@ await client.crm.users.remoteFieldClassesList({
-Returns a list of `WebhookReceiver` 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.
@@ -11177,7 +11154,7 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.crm.webhookReceivers.list(); +await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -11193,7 +11170,23 @@ await client.crm.webhookReceivers.list();
-**requestOptions:** `WebhookReceivers.RequestOptions` +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11204,7 +11197,7 @@ await client.crm.webhookReceivers.list();
-
client.crm.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
client.crm.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -11216,7 +11209,7 @@ await client.crm.webhookReceivers.list();
-Creates a `WebhookReceiver` object with the given values. +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/).
@@ -11232,10 +11225,7 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.crm.webhookReceivers.create({ - event: "event", - isActive: true, -}); +await client.crm.fieldMapping.remoteFieldsRetrieve(); ```
@@ -11251,7 +11241,7 @@ await client.crm.webhookReceivers.create({
-**request:** `Merge.crm.WebhookReceiverRequest` +**request:** `Merge.crm.RemoteFieldsRetrieveRequest`
@@ -11259,7 +11249,7 @@ await client.crm.webhookReceivers.create({
-**requestOptions:** `WebhookReceivers.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11270,9 +11260,7 @@ await client.crm.webhookReceivers.create({
-## Filestorage AccountDetails - -
client.filestorage.accountDetails.retrieve() -> Merge.AccountDetails +
client.crm.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
@@ -11284,7 +11272,7 @@ await client.crm.webhookReceivers.create({
-Get details for a linked account. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -11300,7 +11288,7 @@ Get details for a linked account.
```typescript -await client.filestorage.accountDetails.retrieve(); +await client.crm.fieldMapping.targetFieldsRetrieve(); ```
@@ -11316,7 +11304,7 @@ await client.filestorage.accountDetails.retrieve();
-**requestOptions:** `AccountDetails.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11327,9 +11315,9 @@ await client.filestorage.accountDetails.retrieve();
-## Filestorage AccountToken +## Crm GenerateKey -
client.filestorage.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.crm.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -11341,7 +11329,7 @@ await client.filestorage.accountDetails.retrieve();
-Returns the account token for the end user with the provided public token. +Create a remote key.
@@ -11357,7 +11345,9 @@ Returns the account token for the end user with the provided public token.
```typescript -await client.filestorage.accountToken.retrieve("public_token"); +await client.crm.generateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -11373,7 +11363,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-**publicToken:** `string` +**request:** `Merge.crm.GenerateRemoteKeyRequest`
@@ -11381,7 +11371,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-**requestOptions:** `AccountToken.RequestOptions` +**requestOptions:** `GenerateKey.RequestOptions`
@@ -11392,9 +11382,9 @@ await client.filestorage.accountToken.retrieve("public_token");
-## Filestorage AsyncPassthrough +## Crm Issues -
client.filestorage.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.crm.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -11406,7 +11396,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-Asynchronously pull data from an endpoint not currently supported by Merge. +Gets all issues for Organization.
@@ -11422,9 +11412,8 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```typescript -await client.filestorage.asyncPassthrough.create({ - method: "GET", - path: "/scooters", +await client.crm.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -11441,7 +11430,7 @@ await client.filestorage.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` +**request:** `Merge.crm.IssuesListRequest`
@@ -11449,7 +11438,7 @@ await client.filestorage.asyncPassthrough.create({
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -11460,7 +11449,7 @@ await client.filestorage.asyncPassthrough.create({
-
client.filestorage.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
client.crm.issues.retrieve(id) -> Merge.Issue
@@ -11472,7 +11461,7 @@ await client.filestorage.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Get a specific issue.
@@ -11488,7 +11477,7 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.crm.issues.retrieve("id"); ```
@@ -11504,7 +11493,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-**asyncPassthroughReceiptId:** `string` +**id:** `string`
@@ -11512,7 +11501,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -11523,9 +11512,9 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-## Filestorage AuditTrail +## Crm Leads -
client.filestorage.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.crm.leads.list({ ...params }) -> Merge.PaginatedLeadList
@@ -11537,7 +11526,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-Gets a list of audit trail events. +Returns a list of `Lead` objects.
@@ -11553,7 +11542,7 @@ Gets a list of audit trail events.
```typescript -await client.filestorage.auditTrail.list({ +await client.crm.leads.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -11571,7 +11560,7 @@ await client.filestorage.auditTrail.list({
-**request:** `Merge.filestorage.AuditTrailListRequest` +**request:** `Merge.crm.LeadsListRequest`
@@ -11579,7 +11568,7 @@ await client.filestorage.auditTrail.list({
-**requestOptions:** `AuditTrail.RequestOptions` +**requestOptions:** `Leads.RequestOptions`
@@ -11590,9 +11579,7 @@ await client.filestorage.auditTrail.list({
-## Filestorage AvailableActions - -
client.filestorage.availableActions.retrieve() -> Merge.AvailableActions +
client.crm.leads.create({ ...params }) -> Merge.LeadResponse
@@ -11604,7 +11591,7 @@ await client.filestorage.auditTrail.list({
-Returns a list of models and actions available for an account. +Creates a `Lead` object with the given values.
@@ -11620,7 +11607,9 @@ Returns a list of models and actions available for an account.
```typescript -await client.filestorage.availableActions.retrieve(); +await client.crm.leads.create({ + model: {}, +}); ```
@@ -11636,7 +11625,15 @@ await client.filestorage.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**request:** `Merge.crm.LeadEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions`
@@ -11647,9 +11644,7 @@ await client.filestorage.availableActions.retrieve();
-## Filestorage Scopes - -
client.filestorage.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.leads.retrieve(id, { ...params }) -> Merge.Lead
@@ -11661,7 +11656,7 @@ await client.filestorage.availableActions.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 `Lead` object with the given `id`.
@@ -11676,24 +11671,40 @@ Get the default permissions for Merge Common Models and fields across all Linked
-```typescript -await client.filestorage.scopes.defaultScopesRetrieve(); -``` +```typescript +await client.crm.leads.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string`
-
-
- -#### ⚙️ Parameters
+**request:** `Merge.crm.LeadsRetrieveRequest` + +
+
+
-**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `Leads.RequestOptions`
@@ -11704,7 +11715,7 @@ await client.filestorage.scopes.defaultScopesRetrieve();
-
client.filestorage.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.leads.metaPostRetrieve() -> Merge.MetaResponse
@@ -11716,7 +11727,7 @@ await client.filestorage.scopes.defaultScopesRetrieve();
-Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns metadata for `Lead` POSTs.
@@ -11732,7 +11743,7 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.filestorage.scopes.linkedAccountScopesRetrieve(); +await client.crm.leads.metaPostRetrieve(); ```
@@ -11748,7 +11759,7 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `Leads.RequestOptions`
@@ -11759,7 +11770,7 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-
client.filestorage.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
client.crm.leads.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -11771,7 +11782,7 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-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 list of `RemoteFieldClass` objects.
@@ -11787,32 +11798,8 @@ Update permissions for any Common Model or field for a single Linked Account. An
```typescript -await client.filestorage.scopes.linkedAccountScopesCreate({ - commonModels: [ - { - modelName: "Employee", - modelPermissions: { - READ: { - isEnabled: true, - }, - WRITE: { - isEnabled: false, - }, - }, - fieldPermissions: { - enabledFields: ["avatar", "home_location"], - disabledFields: ["work_location"], - }, - }, - { - modelName: "Benefit", - modelPermissions: { - WRITE: { - isEnabled: false, - }, - }, - }, - ], +await client.crm.leads.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -11829,7 +11816,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-**request:** `Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest` +**request:** `Merge.crm.LeadsRemoteFieldClassesListRequest`
@@ -11837,7 +11824,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `Leads.RequestOptions`
@@ -11848,9 +11835,9 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-## Filestorage DeleteAccount +## Crm LinkToken -
client.filestorage.deleteAccount.delete() -> void +
client.crm.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -11862,7 +11849,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-Delete a linked account. +Creates a link token to be used when linking a new end user.
@@ -11878,7 +11865,12 @@ Delete a linked account.
```typescript -await client.filestorage.deleteAccount.delete(); +await client.crm.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -11894,7 +11886,15 @@ await client.filestorage.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**request:** `Merge.crm.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions`
@@ -11905,9 +11905,9 @@ await client.filestorage.deleteAccount.delete();
-## Filestorage Drives +## Crm LinkedAccounts -
client.filestorage.drives.list({ ...params }) -> Merge.PaginatedDriveList +
client.crm.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -11919,7 +11919,7 @@ await client.filestorage.deleteAccount.delete();
-Returns a list of `Drive` objects. +List linked accounts for your organization.
@@ -11935,7 +11935,7 @@ Returns a list of `Drive` objects.
```typescript -await client.filestorage.drives.list({ +await client.crm.linkedAccounts.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -11953,7 +11953,7 @@ await client.filestorage.drives.list({
-**request:** `Merge.filestorage.DrivesListRequest` +**request:** `Merge.crm.LinkedAccountsListRequest`
@@ -11961,7 +11961,7 @@ await client.filestorage.drives.list({
-**requestOptions:** `Drives.RequestOptions` +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -11972,7 +11972,9 @@ await client.filestorage.drives.list({
-
client.filestorage.drives.retrieve(id, { ...params }) -> Merge.Drive +## Crm Notes + +
client.crm.notes.list({ ...params }) -> Merge.PaginatedNoteList
@@ -11984,7 +11986,7 @@ await client.filestorage.drives.list({
-Returns a `Drive` object with the given `id`. +Returns a list of `Note` objects.
@@ -12000,7 +12002,9 @@ Returns a `Drive` object with the given `id`.
```typescript -await client.filestorage.drives.retrieve("id"); +await client.crm.notes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -12016,15 +12020,7 @@ await client.filestorage.drives.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.DrivesRetrieveRequest` +**request:** `Merge.crm.NotesListRequest`
@@ -12032,7 +12028,7 @@ await client.filestorage.drives.retrieve("id");
-**requestOptions:** `Drives.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12043,9 +12039,7 @@ await client.filestorage.drives.retrieve("id");
-## Filestorage FieldMapping - -
client.filestorage.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.crm.notes.create({ ...params }) -> Merge.NoteResponse
@@ -12057,7 +12051,7 @@ await client.filestorage.drives.retrieve("id");
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Creates a `Note` object with the given values.
@@ -12073,7 +12067,9 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.filestorage.fieldMapping.fieldMappingsRetrieve(); +await client.crm.notes.create({ + model: {}, +}); ```
@@ -12089,7 +12085,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.filestorage.FieldMappingsRetrieveRequest` +**request:** `Merge.crm.NoteEndpointRequest`
@@ -12097,7 +12093,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12108,7 +12104,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-
client.filestorage.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
client.crm.notes.retrieve(id, { ...params }) -> Merge.Note
@@ -12120,7 +12116,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a `Note` object with the given `id`.
@@ -12136,14 +12132,7 @@ Create new Field Mappings that will be available after the next scheduled sync.
```typescript -await client.filestorage.fieldMapping.fieldMappingsCreate({ - targetFieldName: "example_target_field_name", - targetFieldDescription: "this is a example description of the target field", - remoteFieldTraversalPath: ["example_remote_field"], - remoteMethod: "GET", - remoteUrlPath: "/example-url-path", - commonModelName: "ExampleCommonModel", -}); +await client.crm.notes.retrieve("id"); ```
@@ -12159,7 +12148,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.filestorage.CreateFieldMappingRequest` +**id:** `string`
@@ -12167,7 +12156,15 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.crm.NotesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Notes.RequestOptions`
@@ -12178,7 +12175,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-
client.filestorage.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
client.crm.notes.metaPostRetrieve() -> Merge.MetaResponse
@@ -12190,7 +12187,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns metadata for `Note` POSTs.
@@ -12206,7 +12203,7 @@ Deletes Field Mappings for a Linked Account. All data related to this Field Mapp
```typescript -await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +await client.crm.notes.metaPostRetrieve(); ```
@@ -12222,15 +12219,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` - -
-
- -
-
- -**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12241,7 +12230,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.filestorage.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
client.crm.notes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -12253,7 +12242,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of `RemoteFieldClass` objects.
@@ -12269,7 +12258,9 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```typescript -await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +await client.crm.notes.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -12285,15 +12276,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**fieldMappingId:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.PatchedEditFieldMappingRequest` +**request:** `Merge.crm.NotesRemoteFieldClassesListRequest`
@@ -12301,7 +12284,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12312,7 +12295,9 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-
client.filestorage.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +## Crm Opportunities + +
client.crm.opportunities.list({ ...params }) -> Merge.PaginatedOpportunityList
@@ -12324,7 +12309,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-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 `Opportunity` objects.
@@ -12340,7 +12325,9 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.filestorage.fieldMapping.remoteFieldsRetrieve(); +await client.crm.opportunities.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -12356,7 +12343,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.filestorage.RemoteFieldsRetrieveRequest` +**request:** `Merge.crm.OpportunitiesListRequest`
@@ -12364,7 +12351,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12375,7 +12362,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-
client.filestorage.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
client.crm.opportunities.create({ ...params }) -> Merge.OpportunityResponse
@@ -12387,7 +12374,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-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 an `Opportunity` object with the given values.
@@ -12403,7 +12390,9 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.filestorage.fieldMapping.targetFieldsRetrieve(); +await client.crm.opportunities.create({ + model: {}, +}); ```
@@ -12419,7 +12408,15 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.crm.OpportunityEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions`
@@ -12430,9 +12427,7 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-## Filestorage Files - -
client.filestorage.files.list({ ...params }) -> Merge.PaginatedFileList +
client.crm.opportunities.retrieve(id, { ...params }) -> Merge.Opportunity
@@ -12444,7 +12439,7 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-Returns a list of `File` objects. +Returns an `Opportunity` object with the given `id`.
@@ -12460,9 +12455,7 @@ Returns a list of `File` objects.
```typescript -await client.filestorage.files.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.opportunities.retrieve("id"); ```
@@ -12478,7 +12471,7 @@ await client.filestorage.files.list({
-**request:** `Merge.filestorage.FilesListRequest` +**id:** `string`
@@ -12486,7 +12479,15 @@ await client.filestorage.files.list({
-**requestOptions:** `Files.RequestOptions` +**request:** `Merge.crm.OpportunitiesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions`
@@ -12497,7 +12498,7 @@ await client.filestorage.files.list({
-
client.filestorage.files.create({ ...params }) -> Merge.FileStorageFileResponse +
client.crm.opportunities.partialUpdate(id, { ...params }) -> Merge.OpportunityResponse
@@ -12509,7 +12510,7 @@ await client.filestorage.files.list({
-Creates a `File` object with the given values. +Updates an `Opportunity` object with the given `id`.
@@ -12525,7 +12526,7 @@ Creates a `File` object with the given values.
```typescript -await client.filestorage.files.create({ +await client.crm.opportunities.partialUpdate("id", { model: {}, }); ``` @@ -12543,7 +12544,15 @@ await client.filestorage.files.create({
-**request:** `Merge.filestorage.FileStorageFileEndpointRequest` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedOpportunityEndpointRequest`
@@ -12551,7 +12560,7 @@ await client.filestorage.files.create({
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12562,7 +12571,7 @@ await client.filestorage.files.create({
-
client.filestorage.files.retrieve(id, { ...params }) -> Merge.File_ +
client.crm.opportunities.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -12574,7 +12583,7 @@ await client.filestorage.files.create({
-Returns a `File` object with the given `id`. +Returns metadata for `Opportunity` PATCHs.
@@ -12590,7 +12599,7 @@ Returns a `File` object with the given `id`.
```typescript -await client.filestorage.files.retrieve("id"); +await client.crm.opportunities.metaPatchRetrieve("id"); ```
@@ -12614,15 +12623,7 @@ await client.filestorage.files.retrieve("id");
-**request:** `Merge.filestorage.FilesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12633,7 +12634,7 @@ await client.filestorage.files.retrieve("id");
-
client.filestorage.files.downloadRequestMetaRetrieve(id, { ...params }) -> Merge.DownloadRequestMeta +
client.crm.opportunities.metaPostRetrieve() -> Merge.MetaResponse
@@ -12645,7 +12646,7 @@ await client.filestorage.files.retrieve("id");
-Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party. +Returns metadata for `Opportunity` POSTs.
@@ -12661,7 +12662,7 @@ Returns metadata to construct an authenticated file download request for a singu
```typescript -await client.filestorage.files.downloadRequestMetaRetrieve("id"); +await client.crm.opportunities.metaPostRetrieve(); ```
@@ -12677,23 +12678,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12704,7 +12689,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-
client.filestorage.files.downloadRequestMetaList({ ...params }) -> Merge.PaginatedDownloadRequestMetaList +
client.crm.opportunities.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -12716,7 +12701,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party. +Returns a list of `RemoteFieldClass` objects.
@@ -12732,7 +12717,7 @@ Returns metadata to construct authenticated file download requests, allowing you
```typescript -await client.filestorage.files.downloadRequestMetaList({ +await client.crm.opportunities.remoteFieldClassesList({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -12750,7 +12735,7 @@ await client.filestorage.files.downloadRequestMetaList({
-**request:** `Merge.filestorage.FilesDownloadRequestMetaListRequest` +**request:** `Merge.crm.OpportunitiesRemoteFieldClassesListRequest`
@@ -12758,7 +12743,7 @@ await client.filestorage.files.downloadRequestMetaList({
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12769,7 +12754,9 @@ await client.filestorage.files.downloadRequestMetaList({
-
client.filestorage.files.metaPostRetrieve() -> Merge.MetaResponse +## Crm Passthrough + +
client.crm.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -12781,7 +12768,7 @@ await client.filestorage.files.downloadRequestMetaList({
-Returns metadata for `FileStorageFile` POSTs. +Pull data from an endpoint not currently supported by Merge.
@@ -12797,7 +12784,10 @@ Returns metadata for `FileStorageFile` POSTs.
```typescript -await client.filestorage.files.metaPostRetrieve(); +await client.crm.passthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -12813,7 +12803,15 @@ await client.filestorage.files.metaPostRetrieve();
-**requestOptions:** `Files.RequestOptions` +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions`
@@ -12824,9 +12822,9 @@ await client.filestorage.files.metaPostRetrieve();
-## Filestorage Folders +## Crm RegenerateKey -
client.filestorage.folders.list({ ...params }) -> Merge.PaginatedFolderList +
client.crm.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -12838,7 +12836,7 @@ await client.filestorage.files.metaPostRetrieve();
-Returns a list of `Folder` objects. +Exchange remote keys.
@@ -12854,8 +12852,8 @@ Returns a list of `Folder` objects.
```typescript -await client.filestorage.folders.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.crm.regenerateKey.create({ + name: "Remote Deployment Key 1", }); ``` @@ -12872,7 +12870,7 @@ await client.filestorage.folders.list({
-**request:** `Merge.filestorage.FoldersListRequest` +**request:** `Merge.crm.RemoteKeyForRegenerationRequest`
@@ -12880,7 +12878,7 @@ await client.filestorage.folders.list({
-**requestOptions:** `Folders.RequestOptions` +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -12891,7 +12889,9 @@ await client.filestorage.folders.list({
-
client.filestorage.folders.create({ ...params }) -> Merge.FileStorageFolderResponse +## Crm Stages + +
client.crm.stages.list({ ...params }) -> Merge.PaginatedStageList
@@ -12903,7 +12903,7 @@ await client.filestorage.folders.list({
-Creates a `Folder` object with the given values. +Returns a list of `Stage` objects.
@@ -12919,8 +12919,8 @@ Creates a `Folder` object with the given values.
```typescript -await client.filestorage.folders.create({ - model: {}, +await client.crm.stages.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -12937,7 +12937,7 @@ await client.filestorage.folders.create({
-**request:** `Merge.filestorage.FileStorageFolderEndpointRequest` +**request:** `Merge.crm.StagesListRequest`
@@ -12945,7 +12945,7 @@ await client.filestorage.folders.create({
-**requestOptions:** `Folders.RequestOptions` +**requestOptions:** `Stages.RequestOptions`
@@ -12956,7 +12956,7 @@ await client.filestorage.folders.create({
-
client.filestorage.folders.retrieve(id, { ...params }) -> Merge.Folder +
client.crm.stages.retrieve(id, { ...params }) -> Merge.Stage
@@ -12968,7 +12968,7 @@ await client.filestorage.folders.create({
-Returns a `Folder` object with the given `id`. +Returns a `Stage` object with the given `id`.
@@ -12984,7 +12984,7 @@ Returns a `Folder` object with the given `id`.
```typescript -await client.filestorage.folders.retrieve("id"); +await client.crm.stages.retrieve("id"); ```
@@ -13008,7 +13008,7 @@ await client.filestorage.folders.retrieve("id");
-**request:** `Merge.filestorage.FoldersRetrieveRequest` +**request:** `Merge.crm.StagesRetrieveRequest`
@@ -13016,7 +13016,7 @@ await client.filestorage.folders.retrieve("id");
-**requestOptions:** `Folders.RequestOptions` +**requestOptions:** `Stages.RequestOptions`
@@ -13027,7 +13027,7 @@ await client.filestorage.folders.retrieve("id");
-
client.filestorage.folders.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.stages.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -13039,7 +13039,7 @@ await client.filestorage.folders.retrieve("id");
-Returns metadata for `FileStorageFolder` POSTs. +Returns a list of `RemoteFieldClass` objects.
@@ -13055,7 +13055,9 @@ Returns metadata for `FileStorageFolder` POSTs.
```typescript -await client.filestorage.folders.metaPostRetrieve(); +await client.crm.stages.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13071,7 +13073,15 @@ await client.filestorage.folders.metaPostRetrieve();
-**requestOptions:** `Folders.RequestOptions` +**request:** `Merge.crm.StagesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Stages.RequestOptions`
@@ -13082,9 +13092,9 @@ await client.filestorage.folders.metaPostRetrieve();
-## Filestorage GenerateKey +## Crm SyncStatus -
client.filestorage.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -13096,7 +13106,7 @@ await client.filestorage.folders.metaPostRetrieve();
-Create a remote key. +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).
@@ -13112,8 +13122,8 @@ Create a remote key.
```typescript -await client.filestorage.generateKey.create({ - name: "Remote Deployment Key 1", +await client.crm.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -13130,7 +13140,7 @@ await client.filestorage.generateKey.create({
-**request:** `Merge.filestorage.GenerateRemoteKeyRequest` +**request:** `Merge.crm.SyncStatusListRequest`
@@ -13138,7 +13148,7 @@ await client.filestorage.generateKey.create({
-**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `SyncStatus.RequestOptions`
@@ -13149,9 +13159,9 @@ await client.filestorage.generateKey.create({
-## Filestorage Groups +## Crm ForceResync -
client.filestorage.groups.list({ ...params }) -> Merge.PaginatedGroupList +
client.crm.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -13163,7 +13173,7 @@ await client.filestorage.generateKey.create({
-Returns a list of `Group` objects. +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.
@@ -13179,9 +13189,7 @@ Returns a list of `Group` objects.
```typescript -await client.filestorage.groups.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.forceResync.syncStatusResyncCreate(); ```
@@ -13197,15 +13205,7 @@ await client.filestorage.groups.list({
-**request:** `Merge.filestorage.GroupsListRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -13216,7 +13216,9 @@ await client.filestorage.groups.list({
-
client.filestorage.groups.retrieve(id, { ...params }) -> Merge.Group +## Crm Tasks + +
client.crm.tasks.list({ ...params }) -> Merge.PaginatedTaskList
@@ -13228,7 +13230,7 @@ await client.filestorage.groups.list({
-Returns a `Group` object with the given `id`. +Returns a list of `Task` objects.
@@ -13244,7 +13246,9 @@ Returns a `Group` object with the given `id`.
```typescript -await client.filestorage.groups.retrieve("id"); +await client.crm.tasks.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13260,15 +13264,7 @@ await client.filestorage.groups.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.GroupsRetrieveRequest` +**request:** `Merge.crm.TasksListRequest`
@@ -13276,7 +13272,7 @@ await client.filestorage.groups.retrieve("id");
-**requestOptions:** `Groups.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13287,9 +13283,7 @@ await client.filestorage.groups.retrieve("id");
-## Filestorage Issues - -
client.filestorage.issues.list({ ...params }) -> Merge.PaginatedIssueList +
client.crm.tasks.create({ ...params }) -> Merge.TaskResponse
@@ -13301,7 +13295,7 @@ await client.filestorage.groups.retrieve("id");
-Gets all issues for Organization. +Creates a `Task` object with the given values.
@@ -13317,8 +13311,8 @@ Gets all issues for Organization.
```typescript -await client.filestorage.issues.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.crm.tasks.create({ + model: {}, }); ``` @@ -13335,7 +13329,7 @@ await client.filestorage.issues.list({
-**request:** `Merge.filestorage.IssuesListRequest` +**request:** `Merge.crm.TaskEndpointRequest`
@@ -13343,7 +13337,7 @@ await client.filestorage.issues.list({
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13354,7 +13348,7 @@ await client.filestorage.issues.list({
-
client.filestorage.issues.retrieve(id) -> Merge.Issue +
client.crm.tasks.retrieve(id, { ...params }) -> Merge.Task
@@ -13366,7 +13360,7 @@ await client.filestorage.issues.list({
-Get a specific issue. +Returns a `Task` object with the given `id`.
@@ -13382,7 +13376,7 @@ Get a specific issue.
```typescript -await client.filestorage.issues.retrieve("id"); +await client.crm.tasks.retrieve("id"); ```
@@ -13406,7 +13400,15 @@ await client.filestorage.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**request:** `Merge.crm.TasksRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions`
@@ -13417,9 +13419,7 @@ await client.filestorage.issues.retrieve("id");
-## Filestorage LinkToken - -
client.filestorage.linkToken.create({ ...params }) -> Merge.LinkToken +
client.crm.tasks.partialUpdate(id, { ...params }) -> Merge.TaskResponse
@@ -13431,7 +13431,7 @@ await client.filestorage.issues.retrieve("id");
-Creates a link token to be used when linking a new end user. +Updates a `Task` object with the given `id`.
@@ -13447,11 +13447,8 @@ Creates a link token to be used when linking a new end user.
```typescript -await client.filestorage.linkToken.create({ - endUserEmailAddress: "example@gmail.com", - endUserOrganizationName: "Test Organization", - endUserOriginId: "12345", - categories: ["hris", "ats"], +await client.crm.tasks.partialUpdate("id", { + model: {}, }); ``` @@ -13468,7 +13465,7 @@ await client.filestorage.linkToken.create({
-**request:** `Merge.filestorage.EndUserDetailsRequest` +**id:** `string`
@@ -13476,7 +13473,15 @@ await client.filestorage.linkToken.create({
-**requestOptions:** `LinkToken.RequestOptions` +**request:** `Merge.crm.PatchedTaskEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions`
@@ -13487,9 +13492,7 @@ await client.filestorage.linkToken.create({
-## Filestorage LinkedAccounts - -
client.filestorage.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
client.crm.tasks.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -13501,7 +13504,7 @@ await client.filestorage.linkToken.create({
-List linked accounts for your organization. +Returns metadata for `Task` PATCHs.
@@ -13517,9 +13520,7 @@ List linked accounts for your organization.
```typescript -await client.filestorage.linkedAccounts.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.tasks.metaPatchRetrieve("id"); ```
@@ -13535,7 +13536,7 @@ await client.filestorage.linkedAccounts.list({
-**request:** `Merge.filestorage.LinkedAccountsListRequest` +**id:** `string`
@@ -13543,7 +13544,7 @@ await client.filestorage.linkedAccounts.list({
-**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13554,9 +13555,7 @@ await client.filestorage.linkedAccounts.list({
-## Filestorage Passthrough - -
client.filestorage.passthrough.create({ ...params }) -> Merge.RemoteResponse +
client.crm.tasks.metaPostRetrieve() -> Merge.MetaResponse
@@ -13568,7 +13567,7 @@ await client.filestorage.linkedAccounts.list({
-Pull data from an endpoint not currently supported by Merge. +Returns metadata for `Task` POSTs.
@@ -13584,10 +13583,7 @@ Pull data from an endpoint not currently supported by Merge.
```typescript -await client.filestorage.passthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.crm.tasks.metaPostRetrieve(); ```
@@ -13603,15 +13599,7 @@ await client.filestorage.passthrough.create({
-**request:** `Merge.DataPassthroughRequest` - -
-
- -
-
- -**requestOptions:** `Passthrough.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13622,9 +13610,7 @@ await client.filestorage.passthrough.create({
-## Filestorage RegenerateKey - -
client.filestorage.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.tasks.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -13636,7 +13622,7 @@ await client.filestorage.passthrough.create({
-Exchange remote keys. +Returns a list of `RemoteFieldClass` objects.
@@ -13652,8 +13638,8 @@ Exchange remote keys.
```typescript -await client.filestorage.regenerateKey.create({ - name: "Remote Deployment Key 1", +await client.crm.tasks.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -13670,7 +13656,7 @@ await client.filestorage.regenerateKey.create({
-**request:** `Merge.filestorage.RemoteKeyForRegenerationRequest` +**request:** `Merge.crm.TasksRemoteFieldClassesListRequest`
@@ -13678,7 +13664,7 @@ await client.filestorage.regenerateKey.create({
-**requestOptions:** `RegenerateKey.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13689,9 +13675,9 @@ await client.filestorage.regenerateKey.create({
-## Filestorage SyncStatus +## Crm Users -
client.filestorage.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.crm.users.list({ ...params }) -> Merge.PaginatedUserList
@@ -13703,7 +13689,7 @@ await client.filestorage.regenerateKey.create({
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +Returns a list of `User` objects.
@@ -13719,7 +13705,7 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.filestorage.syncStatus.list({ +await client.crm.users.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -13737,7 +13723,7 @@ await client.filestorage.syncStatus.list({
-**request:** `Merge.filestorage.SyncStatusListRequest` +**request:** `Merge.crm.UsersListRequest`
@@ -13745,7 +13731,7 @@ await client.filestorage.syncStatus.list({
-**requestOptions:** `SyncStatus.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -13756,9 +13742,7 @@ await client.filestorage.syncStatus.list({
-## Filestorage ForceResync - -
client.filestorage.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.crm.users.retrieve(id, { ...params }) -> Merge.User
@@ -13770,7 +13754,7 @@ await client.filestorage.syncStatus.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 a `User` object with the given `id`.
@@ -13786,7 +13770,7 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.filestorage.forceResync.syncStatusResyncCreate(); +await client.crm.users.retrieve("id"); ```
@@ -13802,7 +13786,23 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -13813,9 +13813,7 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-## Filestorage Users - -
client.filestorage.users.list({ ...params }) -> Merge.PaginatedUserList +
client.crm.users.ignoreCreate(modelId, { ...params }) -> void
@@ -13827,7 +13825,7 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-Returns a list of `User` objects. +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
@@ -13843,8 +13841,8 @@ Returns a list of `User` objects.
```typescript -await client.filestorage.users.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.crm.users.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", }); ``` @@ -13861,7 +13859,15 @@ await client.filestorage.users.list({
-**request:** `Merge.filestorage.UsersListRequest` +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.IgnoreCommonModelRequest`
@@ -13880,7 +13886,7 @@ await client.filestorage.users.list({
-
client.filestorage.users.retrieve(id, { ...params }) -> Merge.User +
client.crm.users.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -13892,7 +13898,7 @@ await client.filestorage.users.list({
-Returns a `User` object with the given `id`. +Returns a list of `RemoteFieldClass` objects.
@@ -13908,7 +13914,9 @@ Returns a `User` object with the given `id`.
```typescript -await client.filestorage.users.retrieve("id"); +await client.crm.users.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13924,15 +13932,7 @@ await client.filestorage.users.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.UsersRetrieveRequest` +**request:** `Merge.crm.UsersRemoteFieldClassesListRequest`
@@ -13951,9 +13951,9 @@ await client.filestorage.users.retrieve("id");
-## Filestorage WebhookReceivers +## Crm WebhookReceivers -
client.filestorage.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.crm.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -13981,7 +13981,7 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.filestorage.webhookReceivers.list(); +await client.crm.webhookReceivers.list(); ```
@@ -14008,7 +14008,7 @@ await client.filestorage.webhookReceivers.list();
-
client.filestorage.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
client.crm.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -14036,7 +14036,7 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.filestorage.webhookReceivers.create({ +await client.crm.webhookReceivers.create({ event: "event", isActive: true, }); @@ -14055,7 +14055,7 @@ await client.filestorage.webhookReceivers.create({
-**request:** `Merge.filestorage.WebhookReceiverRequest` +**request:** `Merge.crm.WebhookReceiverRequest`
@@ -24919,6 +24919,142 @@ await client.accounting.contacts.retrieve("id");
+
client.accounting.contacts.partialUpdate(id, { ...params }) -> Merge.ContactResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Contact` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.contacts.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.PatchedContactEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Contact` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.contacts.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+
client.accounting.contacts.metaPostRetrieve() -> Merge.MetaResponse
diff --git a/src/Client.ts b/src/Client.ts index 97d3c5687..bff806794 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -6,8 +6,8 @@ import * as environments from "./environments"; import * as core from "./core"; import { mergeHeaders } from "./core/headers"; import { Ats } from "./api/resources/ats/client/Client"; -import { Crm } from "./api/resources/crm/client/Client"; import { Filestorage } from "./api/resources/filestorage/client/Client"; +import { Crm } from "./api/resources/crm/client/Client"; import { Hris } from "./api/resources/hris/client/Client"; import { Ticketing } from "./api/resources/ticketing/client/Client"; import { Accounting } from "./api/resources/accounting/client/Client"; @@ -44,8 +44,8 @@ export declare namespace MergeClient { export class MergeClient { protected readonly _options: MergeClient.Options; protected _ats: Ats | undefined; - protected _crm: Crm | undefined; protected _filestorage: Filestorage | undefined; + protected _crm: Crm | undefined; protected _hris: Hris | undefined; protected _ticketing: Ticketing | undefined; protected _accounting: Accounting | undefined; @@ -58,8 +58,8 @@ export class MergeClient { "X-Account-Token": _options?.accountToken, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "2.1.3", - "User-Agent": "@mergeapi/merge-node-client/2.1.3", + "X-Fern-SDK-Version": "2.2.0", + "User-Agent": "@mergeapi/merge-node-client/2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -72,14 +72,14 @@ export class MergeClient { return (this._ats ??= new Ats(this._options)); } - public get crm(): Crm { - return (this._crm ??= new Crm(this._options)); - } - public get filestorage(): Filestorage { return (this._filestorage ??= new Filestorage(this._options)); } + public get crm(): Crm { + return (this._crm ??= new Crm(this._options)); + } + public get hris(): Hris { return (this._hris ??= new Hris(this._options)); } diff --git a/src/api/resources/accounting/resources/contacts/client/Client.ts b/src/api/resources/accounting/resources/contacts/client/Client.ts index 3d17af894..a55b27763 100644 --- a/src/api/resources/accounting/resources/contacts/client/Client.ts +++ b/src/api/resources/accounting/resources/contacts/client/Client.ts @@ -439,6 +439,188 @@ export class Contacts { } } + /** + * Updates a `Contact` object with the given `id`. + * + * @param {string} id + * @param {Merge.accounting.PatchedContactEndpointRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.accounting.contacts.partialUpdate("id", { + * model: {} + * }) + */ + public partialUpdate( + id: string, + request: Merge.accounting.PatchedContactEndpointRequest, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( + id: string, + request: Merge.accounting.PatchedContactEndpointRequest, + requestOptions?: Contacts.RequestOptions, + ): Promise> { + const { isDebugMode, runAsync, ..._body } = request; + const _queryParams: Record = {}; + if (isDebugMode != null) { + _queryParams["is_debug_mode"] = isDebugMode.toString(); + } + + if (runAsync != null) { + _queryParams["run_async"] = runAsync.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/contacts/${encodeURIComponent(id)}`, + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + requestType: "json", + body: serializers.accounting.PatchedContactEndpointRequest.jsonOrThrow(_body, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.accounting.ContactResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.MergeError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.MergeError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /accounting/v1/contacts/{id}."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Returns metadata for `Contact` PATCHs. + * + * @param {string} id + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.accounting.contacts.metaPatchRetrieve("id") + */ + public metaPatchRetrieve( + id: string, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( + id: string, + requestOptions?: Contacts.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/contacts/meta/patch/${encodeURIComponent(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.MergeError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.MergeError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/contacts/meta/patch/{id}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + /** * Returns metadata for `Contact` POSTs. * diff --git a/src/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts new file mode 100644 index 000000000..8eca40e02 --- /dev/null +++ b/src/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * model: {} + * } + */ +export interface PatchedContactEndpointRequest { + /** Whether to include debug fields (such as log file links) in the response. */ + isDebugMode?: boolean; + /** Whether or not third-party updates should be run asynchronously. */ + runAsync?: boolean; + model: Merge.accounting.PatchedContactRequest; +} diff --git a/src/api/resources/accounting/resources/contacts/client/requests/index.ts b/src/api/resources/accounting/resources/contacts/client/requests/index.ts index 33ecbec66..7c548c9e9 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/index.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/index.ts @@ -1,4 +1,5 @@ export { type ContactsListRequest } from "./ContactsListRequest"; export { type ContactEndpointRequest } from "./ContactEndpointRequest"; export { type ContactsRetrieveRequest } from "./ContactsRetrieveRequest"; +export { type PatchedContactEndpointRequest } from "./PatchedContactEndpointRequest"; export { type ContactsRemoteFieldClassesListRequest } from "./ContactsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts b/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts index 8a5cab0ae..87c879a16 100644 --- a/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts +++ b/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts @@ -5,66 +5,134 @@ export type TransactionsListRequestExpand = | "account" | "account,accounting_period" + | "account,company" + | "account,company,accounting_period" | "accounting_period" + | "company" + | "company,accounting_period" | "contact" | "contact,account" | "contact,account,accounting_period" + | "contact,account,company" + | "contact,account,company,accounting_period" | "contact,accounting_period" + | "contact,company" + | "contact,company,accounting_period" | "line_items" | "line_items,account" | "line_items,account,accounting_period" + | "line_items,account,company" + | "line_items,account,company,accounting_period" | "line_items,accounting_period" + | "line_items,company" + | "line_items,company,accounting_period" | "line_items,contact" | "line_items,contact,account" | "line_items,contact,account,accounting_period" + | "line_items,contact,account,company" + | "line_items,contact,account,company,accounting_period" | "line_items,contact,accounting_period" + | "line_items,contact,company" + | "line_items,contact,company,accounting_period" | "line_items,tracking_categories" | "line_items,tracking_categories,account" | "line_items,tracking_categories,account,accounting_period" + | "line_items,tracking_categories,account,company" + | "line_items,tracking_categories,account,company,accounting_period" | "line_items,tracking_categories,accounting_period" + | "line_items,tracking_categories,company" + | "line_items,tracking_categories,company,accounting_period" | "line_items,tracking_categories,contact" | "line_items,tracking_categories,contact,account" | "line_items,tracking_categories,contact,account,accounting_period" + | "line_items,tracking_categories,contact,account,company" + | "line_items,tracking_categories,contact,account,company,accounting_period" | "line_items,tracking_categories,contact,accounting_period" + | "line_items,tracking_categories,contact,company" + | "line_items,tracking_categories,contact,company,accounting_period" | "tracking_categories" | "tracking_categories,account" | "tracking_categories,account,accounting_period" + | "tracking_categories,account,company" + | "tracking_categories,account,company,accounting_period" | "tracking_categories,accounting_period" + | "tracking_categories,company" + | "tracking_categories,company,accounting_period" | "tracking_categories,contact" | "tracking_categories,contact,account" | "tracking_categories,contact,account,accounting_period" - | "tracking_categories,contact,accounting_period"; + | "tracking_categories,contact,account,company" + | "tracking_categories,contact,account,company,accounting_period" + | "tracking_categories,contact,accounting_period" + | "tracking_categories,contact,company" + | "tracking_categories,contact,company,accounting_period"; export const TransactionsListRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", + AccountCompany: "account,company", + AccountCompanyAccountingPeriod: "account,company,accounting_period", AccountingPeriod: "accounting_period", + Company: "company", + CompanyAccountingPeriod: "company,accounting_period", Contact: "contact", ContactAccount: "contact,account", ContactAccountAccountingPeriod: "contact,account,accounting_period", + ContactAccountCompany: "contact,account,company", + ContactAccountCompanyAccountingPeriod: "contact,account,company,accounting_period", ContactAccountingPeriod: "contact,accounting_period", + ContactCompany: "contact,company", + ContactCompanyAccountingPeriod: "contact,company,accounting_period", LineItems: "line_items", LineItemsAccount: "line_items,account", LineItemsAccountAccountingPeriod: "line_items,account,accounting_period", + LineItemsAccountCompany: "line_items,account,company", + LineItemsAccountCompanyAccountingPeriod: "line_items,account,company,accounting_period", LineItemsAccountingPeriod: "line_items,accounting_period", + LineItemsCompany: "line_items,company", + LineItemsCompanyAccountingPeriod: "line_items,company,accounting_period", LineItemsContact: "line_items,contact", LineItemsContactAccount: "line_items,contact,account", LineItemsContactAccountAccountingPeriod: "line_items,contact,account,accounting_period", + LineItemsContactAccountCompany: "line_items,contact,account,company", + LineItemsContactAccountCompanyAccountingPeriod: "line_items,contact,account,company,accounting_period", LineItemsContactAccountingPeriod: "line_items,contact,accounting_period", + LineItemsContactCompany: "line_items,contact,company", + LineItemsContactCompanyAccountingPeriod: "line_items,contact,company,accounting_period", LineItemsTrackingCategories: "line_items,tracking_categories", LineItemsTrackingCategoriesAccount: "line_items,tracking_categories,account", LineItemsTrackingCategoriesAccountAccountingPeriod: "line_items,tracking_categories,account,accounting_period", + LineItemsTrackingCategoriesAccountCompany: "line_items,tracking_categories,account,company", + LineItemsTrackingCategoriesAccountCompanyAccountingPeriod: + "line_items,tracking_categories,account,company,accounting_period", LineItemsTrackingCategoriesAccountingPeriod: "line_items,tracking_categories,accounting_period", + LineItemsTrackingCategoriesCompany: "line_items,tracking_categories,company", + LineItemsTrackingCategoriesCompanyAccountingPeriod: "line_items,tracking_categories,company,accounting_period", LineItemsTrackingCategoriesContact: "line_items,tracking_categories,contact", LineItemsTrackingCategoriesContactAccount: "line_items,tracking_categories,contact,account", LineItemsTrackingCategoriesContactAccountAccountingPeriod: "line_items,tracking_categories,contact,account,accounting_period", + LineItemsTrackingCategoriesContactAccountCompany: "line_items,tracking_categories,contact,account,company", + LineItemsTrackingCategoriesContactAccountCompanyAccountingPeriod: + "line_items,tracking_categories,contact,account,company,accounting_period", LineItemsTrackingCategoriesContactAccountingPeriod: "line_items,tracking_categories,contact,accounting_period", + LineItemsTrackingCategoriesContactCompany: "line_items,tracking_categories,contact,company", + LineItemsTrackingCategoriesContactCompanyAccountingPeriod: + "line_items,tracking_categories,contact,company,accounting_period", TrackingCategories: "tracking_categories", TrackingCategoriesAccount: "tracking_categories,account", TrackingCategoriesAccountAccountingPeriod: "tracking_categories,account,accounting_period", + TrackingCategoriesAccountCompany: "tracking_categories,account,company", + TrackingCategoriesAccountCompanyAccountingPeriod: "tracking_categories,account,company,accounting_period", TrackingCategoriesAccountingPeriod: "tracking_categories,accounting_period", + TrackingCategoriesCompany: "tracking_categories,company", + TrackingCategoriesCompanyAccountingPeriod: "tracking_categories,company,accounting_period", TrackingCategoriesContact: "tracking_categories,contact", TrackingCategoriesContactAccount: "tracking_categories,contact,account", TrackingCategoriesContactAccountAccountingPeriod: "tracking_categories,contact,account,accounting_period", + TrackingCategoriesContactAccountCompany: "tracking_categories,contact,account,company", + TrackingCategoriesContactAccountCompanyAccountingPeriod: + "tracking_categories,contact,account,company,accounting_period", TrackingCategoriesContactAccountingPeriod: "tracking_categories,contact,accounting_period", + TrackingCategoriesContactCompany: "tracking_categories,contact,company", + TrackingCategoriesContactCompanyAccountingPeriod: "tracking_categories,contact,company,accounting_period", } as const; diff --git a/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts index 419e267a5..f193a878b 100644 --- a/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts @@ -5,66 +5,134 @@ export type TransactionsRetrieveRequestExpand = | "account" | "account,accounting_period" + | "account,company" + | "account,company,accounting_period" | "accounting_period" + | "company" + | "company,accounting_period" | "contact" | "contact,account" | "contact,account,accounting_period" + | "contact,account,company" + | "contact,account,company,accounting_period" | "contact,accounting_period" + | "contact,company" + | "contact,company,accounting_period" | "line_items" | "line_items,account" | "line_items,account,accounting_period" + | "line_items,account,company" + | "line_items,account,company,accounting_period" | "line_items,accounting_period" + | "line_items,company" + | "line_items,company,accounting_period" | "line_items,contact" | "line_items,contact,account" | "line_items,contact,account,accounting_period" + | "line_items,contact,account,company" + | "line_items,contact,account,company,accounting_period" | "line_items,contact,accounting_period" + | "line_items,contact,company" + | "line_items,contact,company,accounting_period" | "line_items,tracking_categories" | "line_items,tracking_categories,account" | "line_items,tracking_categories,account,accounting_period" + | "line_items,tracking_categories,account,company" + | "line_items,tracking_categories,account,company,accounting_period" | "line_items,tracking_categories,accounting_period" + | "line_items,tracking_categories,company" + | "line_items,tracking_categories,company,accounting_period" | "line_items,tracking_categories,contact" | "line_items,tracking_categories,contact,account" | "line_items,tracking_categories,contact,account,accounting_period" + | "line_items,tracking_categories,contact,account,company" + | "line_items,tracking_categories,contact,account,company,accounting_period" | "line_items,tracking_categories,contact,accounting_period" + | "line_items,tracking_categories,contact,company" + | "line_items,tracking_categories,contact,company,accounting_period" | "tracking_categories" | "tracking_categories,account" | "tracking_categories,account,accounting_period" + | "tracking_categories,account,company" + | "tracking_categories,account,company,accounting_period" | "tracking_categories,accounting_period" + | "tracking_categories,company" + | "tracking_categories,company,accounting_period" | "tracking_categories,contact" | "tracking_categories,contact,account" | "tracking_categories,contact,account,accounting_period" - | "tracking_categories,contact,accounting_period"; + | "tracking_categories,contact,account,company" + | "tracking_categories,contact,account,company,accounting_period" + | "tracking_categories,contact,accounting_period" + | "tracking_categories,contact,company" + | "tracking_categories,contact,company,accounting_period"; export const TransactionsRetrieveRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", + AccountCompany: "account,company", + AccountCompanyAccountingPeriod: "account,company,accounting_period", AccountingPeriod: "accounting_period", + Company: "company", + CompanyAccountingPeriod: "company,accounting_period", Contact: "contact", ContactAccount: "contact,account", ContactAccountAccountingPeriod: "contact,account,accounting_period", + ContactAccountCompany: "contact,account,company", + ContactAccountCompanyAccountingPeriod: "contact,account,company,accounting_period", ContactAccountingPeriod: "contact,accounting_period", + ContactCompany: "contact,company", + ContactCompanyAccountingPeriod: "contact,company,accounting_period", LineItems: "line_items", LineItemsAccount: "line_items,account", LineItemsAccountAccountingPeriod: "line_items,account,accounting_period", + LineItemsAccountCompany: "line_items,account,company", + LineItemsAccountCompanyAccountingPeriod: "line_items,account,company,accounting_period", LineItemsAccountingPeriod: "line_items,accounting_period", + LineItemsCompany: "line_items,company", + LineItemsCompanyAccountingPeriod: "line_items,company,accounting_period", LineItemsContact: "line_items,contact", LineItemsContactAccount: "line_items,contact,account", LineItemsContactAccountAccountingPeriod: "line_items,contact,account,accounting_period", + LineItemsContactAccountCompany: "line_items,contact,account,company", + LineItemsContactAccountCompanyAccountingPeriod: "line_items,contact,account,company,accounting_period", LineItemsContactAccountingPeriod: "line_items,contact,accounting_period", + LineItemsContactCompany: "line_items,contact,company", + LineItemsContactCompanyAccountingPeriod: "line_items,contact,company,accounting_period", LineItemsTrackingCategories: "line_items,tracking_categories", LineItemsTrackingCategoriesAccount: "line_items,tracking_categories,account", LineItemsTrackingCategoriesAccountAccountingPeriod: "line_items,tracking_categories,account,accounting_period", + LineItemsTrackingCategoriesAccountCompany: "line_items,tracking_categories,account,company", + LineItemsTrackingCategoriesAccountCompanyAccountingPeriod: + "line_items,tracking_categories,account,company,accounting_period", LineItemsTrackingCategoriesAccountingPeriod: "line_items,tracking_categories,accounting_period", + LineItemsTrackingCategoriesCompany: "line_items,tracking_categories,company", + LineItemsTrackingCategoriesCompanyAccountingPeriod: "line_items,tracking_categories,company,accounting_period", LineItemsTrackingCategoriesContact: "line_items,tracking_categories,contact", LineItemsTrackingCategoriesContactAccount: "line_items,tracking_categories,contact,account", LineItemsTrackingCategoriesContactAccountAccountingPeriod: "line_items,tracking_categories,contact,account,accounting_period", + LineItemsTrackingCategoriesContactAccountCompany: "line_items,tracking_categories,contact,account,company", + LineItemsTrackingCategoriesContactAccountCompanyAccountingPeriod: + "line_items,tracking_categories,contact,account,company,accounting_period", LineItemsTrackingCategoriesContactAccountingPeriod: "line_items,tracking_categories,contact,accounting_period", + LineItemsTrackingCategoriesContactCompany: "line_items,tracking_categories,contact,company", + LineItemsTrackingCategoriesContactCompanyAccountingPeriod: + "line_items,tracking_categories,contact,company,accounting_period", TrackingCategories: "tracking_categories", TrackingCategoriesAccount: "tracking_categories,account", TrackingCategoriesAccountAccountingPeriod: "tracking_categories,account,accounting_period", + TrackingCategoriesAccountCompany: "tracking_categories,account,company", + TrackingCategoriesAccountCompanyAccountingPeriod: "tracking_categories,account,company,accounting_period", TrackingCategoriesAccountingPeriod: "tracking_categories,accounting_period", + TrackingCategoriesCompany: "tracking_categories,company", + TrackingCategoriesCompanyAccountingPeriod: "tracking_categories,company,accounting_period", TrackingCategoriesContact: "tracking_categories,contact", TrackingCategoriesContactAccount: "tracking_categories,contact,account", TrackingCategoriesContactAccountAccountingPeriod: "tracking_categories,contact,account,accounting_period", + TrackingCategoriesContactAccountCompany: "tracking_categories,contact,account,company", + TrackingCategoriesContactAccountCompanyAccountingPeriod: + "tracking_categories,contact,account,company,accounting_period", TrackingCategoriesContactAccountingPeriod: "tracking_categories,contact,accounting_period", + TrackingCategoriesContactCompany: "tracking_categories,contact,company", + TrackingCategoriesContactCompanyAccountingPeriod: "tracking_categories,contact,company,accounting_period", } as const; diff --git a/src/api/resources/accounting/types/PatchedContactRequest.ts b/src/api/resources/accounting/types/PatchedContactRequest.ts new file mode 100644 index 000000000..1f9ad106b --- /dev/null +++ b/src/api/resources/accounting/types/PatchedContactRequest.ts @@ -0,0 +1,46 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The Contact Object + * ### Description + * A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. + * * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + * * A `Contact` is a customer if the `is_customer` property is true. + * + * ### Usage Example + * Fetch from the `LIST Contacts` endpoint and view a company's contacts. + */ +export interface PatchedContactRequest { + /** The contact's name. */ + name?: string; + /** Whether the contact is a supplier. */ + isSupplier?: boolean; + /** Whether the contact is a customer. */ + isCustomer?: boolean; + /** The contact's email address. */ + emailAddress?: string; + /** The contact's tax number. */ + taxNumber?: string; + /** + * The contact's status + * + * * `ACTIVE` - ACTIVE + * * `ARCHIVED` - ARCHIVED + */ + status?: string; + /** The currency the contact's transactions are in. */ + currency?: string; + /** The company the contact belongs to. */ + company?: string; + /** `Address` object IDs for the given `Contacts` object. */ + addresses?: (Merge.accounting.PatchedContactRequestAddressesItem | undefined)[]; + /** `AccountingPhoneNumber` object for the given `Contacts` object. */ + phoneNumbers?: Merge.accounting.AccountingPhoneNumberRequest[]; + integrationParams?: Record; + linkedAccountParams?: Record; + remoteFields?: Merge.accounting.RemoteFieldRequest[]; +} diff --git a/src/api/resources/accounting/types/PatchedContactRequestAddressesItem.ts b/src/api/resources/accounting/types/PatchedContactRequestAddressesItem.ts new file mode 100644 index 000000000..4e4ace68e --- /dev/null +++ b/src/api/resources/accounting/types/PatchedContactRequestAddressesItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type PatchedContactRequestAddressesItem = string | Merge.accounting.Address; diff --git a/src/api/resources/accounting/types/index.ts b/src/api/resources/accounting/types/index.ts index e19fdfe80..73f02eb79 100644 --- a/src/api/resources/accounting/types/index.ts +++ b/src/api/resources/accounting/types/index.ts @@ -367,6 +367,8 @@ export * from "./PaginatedTaxRateList"; export * from "./PaginatedTrackingCategoryList"; export * from "./PaginatedTransactionList"; export * from "./PaginatedVendorCreditList"; +export * from "./PatchedContactRequestAddressesItem"; +export * from "./PatchedContactRequest"; export * from "./PatchedItemRequestRequestStatus"; export * from "./PatchedItemRequestRequestType"; export * from "./PatchedItemRequestRequest"; diff --git a/src/api/resources/ats/types/EventTypeEnum.ts b/src/api/resources/ats/types/EventTypeEnum.ts index 38d61753c..261c00e43 100644 --- a/src/api/resources/ats/types/EventTypeEnum.ts +++ b/src/api/resources/ats/types/EventTypeEnum.ts @@ -53,6 +53,7 @@ export type EventTypeEnum = | "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" @@ -96,6 +97,7 @@ export const EventTypeEnum = { CreatedTestApiKey: "CREATED_TEST_API_KEY", DeletedTestApiKey: "DELETED_TEST_API_KEY", RegeneratedProductionApiKey: "REGENERATED_PRODUCTION_API_KEY", + RegeneratedWebhookSignature: "REGENERATED_WEBHOOK_SIGNATURE", InvitedUser: "INVITED_USER", TwoFactorAuthEnabled: "TWO_FACTOR_AUTH_ENABLED", TwoFactorAuthDisabled: "TWO_FACTOR_AUTH_DISABLED", diff --git a/src/api/resources/filestorage/resources/files/client/Client.ts b/src/api/resources/filestorage/resources/files/client/Client.ts index 8790b2b14..ca11d5847 100644 --- a/src/api/resources/filestorage/resources/files/client/Client.ts +++ b/src/api/resources/filestorage/resources/files/client/Client.ts @@ -84,6 +84,8 @@ export class Files { name, orderBy, pageSize, + remoteCreatedAfter, + remoteCreatedBefore, remoteId, } = request; const _queryParams: Record = {}; @@ -151,6 +153,14 @@ export class Files { _queryParams["page_size"] = pageSize.toString(); } + if (remoteCreatedAfter != null) { + _queryParams["remote_created_after"] = remoteCreatedAfter.toISOString(); + } + + if (remoteCreatedBefore != null) { + _queryParams["remote_created_before"] = remoteCreatedBefore.toISOString(); + } + if (remoteId != null) { _queryParams["remote_id"] = remoteId; } @@ -608,6 +618,7 @@ export class Files { createdAfter, createdBefore, cursor, + ids, includeDeletedData, mimeTypes, modifiedAfter, @@ -628,6 +639,14 @@ export class Files { _queryParams["cursor"] = cursor; } + if (ids != null) { + if (Array.isArray(ids)) { + _queryParams["ids"] = ids.map((item) => item); + } else { + _queryParams["ids"] = ids; + } + } + if (includeDeletedData != null) { _queryParams["include_deleted_data"] = includeDeletedData.toString(); } diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts index d8ebc5413..82bdb5c1d 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.ts @@ -17,6 +17,8 @@ export interface FilesDownloadRequestMetaListRequest { createdBefore?: string; /** The pagination cursor value. */ cursor?: string; + /** If provided, will only return objects with the given IDs. Comma-separated list of strings. */ + ids?: string | string[]; /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ includeDeletedData?: boolean; /** A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our export format help center article. */ diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts index a244bf092..2f3e1a7c8 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts @@ -41,6 +41,10 @@ export interface FilesListRequest { orderBy?: Merge.filestorage.FilesListRequestOrderBy; /** Number of results to return per page. */ pageSize?: number; + /** If provided, will only return files created in the third party platform after this datetime. */ + remoteCreatedAfter?: Date; + /** If provided, will only return files created in the third party platform before this datetime. */ + remoteCreatedBefore?: Date; /** The API provider's ID for the given object. */ remoteId?: string; } diff --git a/src/api/resources/hris/types/Benefit.ts b/src/api/resources/hris/types/Benefit.ts index c2e45a91e..18559021a 100644 --- a/src/api/resources/hris/types/Benefit.ts +++ b/src/api/resources/hris/types/Benefit.ts @@ -34,10 +34,10 @@ export interface Benefit { startDate?: Date; /** The day and time the benefit ended. */ endDate?: Date; - /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ - remoteWasDeleted?: boolean; /** The employer benefit plan the employee is enrolled in. */ employerBenefit?: string; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ + remoteWasDeleted?: boolean; fieldMappings?: Record; remoteData?: Merge.hris.RemoteData[]; } diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 2be011c93..7df440533 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,6 +1,6 @@ export * as ats from "./ats"; -export * as crm from "./crm"; export * as filestorage from "./filestorage"; +export * as crm from "./crm"; export * as hris from "./hris"; export * as ticketing from "./ticketing"; export * as accounting from "./accounting"; diff --git a/src/api/resources/ticketing/resources/tickets/client/Client.ts b/src/api/resources/ticketing/resources/tickets/client/Client.ts index 510e15eb2..105258442 100644 --- a/src/api/resources/ticketing/resources/tickets/client/Client.ts +++ b/src/api/resources/ticketing/resources/tickets/client/Client.ts @@ -76,6 +76,7 @@ export class Tickets { contactId, createdAfter, createdBefore, + creatorId, cursor, dueAfter, dueBefore, @@ -134,6 +135,10 @@ export class Tickets { _queryParams["created_before"] = createdBefore.toISOString(); } + if (creatorId != null) { + _queryParams["creator_id"] = creatorId; + } + if (cursor != null) { _queryParams["cursor"] = cursor; } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts index 930084c0f..b929b7bdf 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts @@ -27,6 +27,8 @@ export interface TicketsListRequest { createdAfter?: Date; /** If provided, will only return objects created before this datetime. */ createdBefore?: Date; + /** If provided, will only return tickets created by this creator_id. */ + creatorId?: string; /** The pagination cursor value. */ cursor?: string; /** If provided, will only return tickets due after this datetime. */ diff --git a/src/api/resources/ticketing/types/PatchedTicketRequest.ts b/src/api/resources/ticketing/types/PatchedTicketRequest.ts index 71f492aff..55be61422 100644 --- a/src/api/resources/ticketing/types/PatchedTicketRequest.ts +++ b/src/api/resources/ticketing/types/PatchedTicketRequest.ts @@ -54,8 +54,6 @@ export interface PatchedTicketRequest { accessLevel?: Merge.ticketing.PatchedTicketRequestAccessLevel; tags?: (string | undefined)[]; roles?: (string | undefined)[]; - /** When the ticket was completed. */ - completedAt?: Date; /** The 3rd party url of the Ticket. */ ticketUrl?: string; /** @@ -67,6 +65,8 @@ export interface PatchedTicketRequest { * * `LOW` - LOW */ priority?: Merge.ticketing.PatchedTicketRequestPriority; + /** When the ticket was completed. */ + completedAt?: Date; integrationParams?: Record; linkedAccountParams?: Record; remoteFields?: Merge.ticketing.RemoteFieldRequest[]; diff --git a/src/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts b/src/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts new file mode 100644 index 000000000..0cfdfd4c7 --- /dev/null +++ b/src/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; +import * as core from "../../../../../../../core"; +import { PatchedContactRequest } from "../../../../types/PatchedContactRequest"; + +export const PatchedContactEndpointRequest: core.serialization.Schema< + serializers.accounting.PatchedContactEndpointRequest.Raw, + Omit +> = core.serialization.object({ + model: PatchedContactRequest, +}); + +export declare namespace PatchedContactEndpointRequest { + export interface Raw { + model: PatchedContactRequest.Raw; + } +} diff --git a/src/serialization/resources/accounting/resources/contacts/client/requests/index.ts b/src/serialization/resources/accounting/resources/contacts/client/requests/index.ts index 00e858c60..b5ae8a3b4 100644 --- a/src/serialization/resources/accounting/resources/contacts/client/requests/index.ts +++ b/src/serialization/resources/accounting/resources/contacts/client/requests/index.ts @@ -1 +1,2 @@ export { ContactEndpointRequest } from "./ContactEndpointRequest"; +export { PatchedContactEndpointRequest } from "./PatchedContactEndpointRequest"; diff --git a/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts b/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts index 214121ee9..71972758e 100644 --- a/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts @@ -12,68 +12,132 @@ export const TransactionsListRequestExpand: core.serialization.Schema< > = core.serialization.enum_([ "account", "account,accounting_period", + "account,company", + "account,company,accounting_period", "accounting_period", + "company", + "company,accounting_period", "contact", "contact,account", "contact,account,accounting_period", + "contact,account,company", + "contact,account,company,accounting_period", "contact,accounting_period", + "contact,company", + "contact,company,accounting_period", "line_items", "line_items,account", "line_items,account,accounting_period", + "line_items,account,company", + "line_items,account,company,accounting_period", "line_items,accounting_period", + "line_items,company", + "line_items,company,accounting_period", "line_items,contact", "line_items,contact,account", "line_items,contact,account,accounting_period", + "line_items,contact,account,company", + "line_items,contact,account,company,accounting_period", "line_items,contact,accounting_period", + "line_items,contact,company", + "line_items,contact,company,accounting_period", "line_items,tracking_categories", "line_items,tracking_categories,account", "line_items,tracking_categories,account,accounting_period", + "line_items,tracking_categories,account,company", + "line_items,tracking_categories,account,company,accounting_period", "line_items,tracking_categories,accounting_period", + "line_items,tracking_categories,company", + "line_items,tracking_categories,company,accounting_period", "line_items,tracking_categories,contact", "line_items,tracking_categories,contact,account", "line_items,tracking_categories,contact,account,accounting_period", + "line_items,tracking_categories,contact,account,company", + "line_items,tracking_categories,contact,account,company,accounting_period", "line_items,tracking_categories,contact,accounting_period", + "line_items,tracking_categories,contact,company", + "line_items,tracking_categories,contact,company,accounting_period", "tracking_categories", "tracking_categories,account", "tracking_categories,account,accounting_period", + "tracking_categories,account,company", + "tracking_categories,account,company,accounting_period", "tracking_categories,accounting_period", + "tracking_categories,company", + "tracking_categories,company,accounting_period", "tracking_categories,contact", "tracking_categories,contact,account", "tracking_categories,contact,account,accounting_period", + "tracking_categories,contact,account,company", + "tracking_categories,contact,account,company,accounting_period", "tracking_categories,contact,accounting_period", + "tracking_categories,contact,company", + "tracking_categories,contact,company,accounting_period", ]); export declare namespace TransactionsListRequestExpand { export type Raw = | "account" | "account,accounting_period" + | "account,company" + | "account,company,accounting_period" | "accounting_period" + | "company" + | "company,accounting_period" | "contact" | "contact,account" | "contact,account,accounting_period" + | "contact,account,company" + | "contact,account,company,accounting_period" | "contact,accounting_period" + | "contact,company" + | "contact,company,accounting_period" | "line_items" | "line_items,account" | "line_items,account,accounting_period" + | "line_items,account,company" + | "line_items,account,company,accounting_period" | "line_items,accounting_period" + | "line_items,company" + | "line_items,company,accounting_period" | "line_items,contact" | "line_items,contact,account" | "line_items,contact,account,accounting_period" + | "line_items,contact,account,company" + | "line_items,contact,account,company,accounting_period" | "line_items,contact,accounting_period" + | "line_items,contact,company" + | "line_items,contact,company,accounting_period" | "line_items,tracking_categories" | "line_items,tracking_categories,account" | "line_items,tracking_categories,account,accounting_period" + | "line_items,tracking_categories,account,company" + | "line_items,tracking_categories,account,company,accounting_period" | "line_items,tracking_categories,accounting_period" + | "line_items,tracking_categories,company" + | "line_items,tracking_categories,company,accounting_period" | "line_items,tracking_categories,contact" | "line_items,tracking_categories,contact,account" | "line_items,tracking_categories,contact,account,accounting_period" + | "line_items,tracking_categories,contact,account,company" + | "line_items,tracking_categories,contact,account,company,accounting_period" | "line_items,tracking_categories,contact,accounting_period" + | "line_items,tracking_categories,contact,company" + | "line_items,tracking_categories,contact,company,accounting_period" | "tracking_categories" | "tracking_categories,account" | "tracking_categories,account,accounting_period" + | "tracking_categories,account,company" + | "tracking_categories,account,company,accounting_period" | "tracking_categories,accounting_period" + | "tracking_categories,company" + | "tracking_categories,company,accounting_period" | "tracking_categories,contact" | "tracking_categories,contact,account" | "tracking_categories,contact,account,accounting_period" - | "tracking_categories,contact,accounting_period"; + | "tracking_categories,contact,account,company" + | "tracking_categories,contact,account,company,accounting_period" + | "tracking_categories,contact,accounting_period" + | "tracking_categories,contact,company" + | "tracking_categories,contact,company,accounting_period"; } diff --git a/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts index 7d04cb8b0..bc48f7958 100644 --- a/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts @@ -12,68 +12,132 @@ export const TransactionsRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_([ "account", "account,accounting_period", + "account,company", + "account,company,accounting_period", "accounting_period", + "company", + "company,accounting_period", "contact", "contact,account", "contact,account,accounting_period", + "contact,account,company", + "contact,account,company,accounting_period", "contact,accounting_period", + "contact,company", + "contact,company,accounting_period", "line_items", "line_items,account", "line_items,account,accounting_period", + "line_items,account,company", + "line_items,account,company,accounting_period", "line_items,accounting_period", + "line_items,company", + "line_items,company,accounting_period", "line_items,contact", "line_items,contact,account", "line_items,contact,account,accounting_period", + "line_items,contact,account,company", + "line_items,contact,account,company,accounting_period", "line_items,contact,accounting_period", + "line_items,contact,company", + "line_items,contact,company,accounting_period", "line_items,tracking_categories", "line_items,tracking_categories,account", "line_items,tracking_categories,account,accounting_period", + "line_items,tracking_categories,account,company", + "line_items,tracking_categories,account,company,accounting_period", "line_items,tracking_categories,accounting_period", + "line_items,tracking_categories,company", + "line_items,tracking_categories,company,accounting_period", "line_items,tracking_categories,contact", "line_items,tracking_categories,contact,account", "line_items,tracking_categories,contact,account,accounting_period", + "line_items,tracking_categories,contact,account,company", + "line_items,tracking_categories,contact,account,company,accounting_period", "line_items,tracking_categories,contact,accounting_period", + "line_items,tracking_categories,contact,company", + "line_items,tracking_categories,contact,company,accounting_period", "tracking_categories", "tracking_categories,account", "tracking_categories,account,accounting_period", + "tracking_categories,account,company", + "tracking_categories,account,company,accounting_period", "tracking_categories,accounting_period", + "tracking_categories,company", + "tracking_categories,company,accounting_period", "tracking_categories,contact", "tracking_categories,contact,account", "tracking_categories,contact,account,accounting_period", + "tracking_categories,contact,account,company", + "tracking_categories,contact,account,company,accounting_period", "tracking_categories,contact,accounting_period", + "tracking_categories,contact,company", + "tracking_categories,contact,company,accounting_period", ]); export declare namespace TransactionsRetrieveRequestExpand { export type Raw = | "account" | "account,accounting_period" + | "account,company" + | "account,company,accounting_period" | "accounting_period" + | "company" + | "company,accounting_period" | "contact" | "contact,account" | "contact,account,accounting_period" + | "contact,account,company" + | "contact,account,company,accounting_period" | "contact,accounting_period" + | "contact,company" + | "contact,company,accounting_period" | "line_items" | "line_items,account" | "line_items,account,accounting_period" + | "line_items,account,company" + | "line_items,account,company,accounting_period" | "line_items,accounting_period" + | "line_items,company" + | "line_items,company,accounting_period" | "line_items,contact" | "line_items,contact,account" | "line_items,contact,account,accounting_period" + | "line_items,contact,account,company" + | "line_items,contact,account,company,accounting_period" | "line_items,contact,accounting_period" + | "line_items,contact,company" + | "line_items,contact,company,accounting_period" | "line_items,tracking_categories" | "line_items,tracking_categories,account" | "line_items,tracking_categories,account,accounting_period" + | "line_items,tracking_categories,account,company" + | "line_items,tracking_categories,account,company,accounting_period" | "line_items,tracking_categories,accounting_period" + | "line_items,tracking_categories,company" + | "line_items,tracking_categories,company,accounting_period" | "line_items,tracking_categories,contact" | "line_items,tracking_categories,contact,account" | "line_items,tracking_categories,contact,account,accounting_period" + | "line_items,tracking_categories,contact,account,company" + | "line_items,tracking_categories,contact,account,company,accounting_period" | "line_items,tracking_categories,contact,accounting_period" + | "line_items,tracking_categories,contact,company" + | "line_items,tracking_categories,contact,company,accounting_period" | "tracking_categories" | "tracking_categories,account" | "tracking_categories,account,accounting_period" + | "tracking_categories,account,company" + | "tracking_categories,account,company,accounting_period" | "tracking_categories,accounting_period" + | "tracking_categories,company" + | "tracking_categories,company,accounting_period" | "tracking_categories,contact" | "tracking_categories,contact,account" | "tracking_categories,contact,account,accounting_period" - | "tracking_categories,contact,accounting_period"; + | "tracking_categories,contact,account,company" + | "tracking_categories,contact,account,company,accounting_period" + | "tracking_categories,contact,accounting_period" + | "tracking_categories,contact,company" + | "tracking_categories,contact,company,accounting_period"; } diff --git a/src/serialization/resources/accounting/types/PatchedContactRequest.ts b/src/serialization/resources/accounting/types/PatchedContactRequest.ts new file mode 100644 index 000000000..c00fd57c4 --- /dev/null +++ b/src/serialization/resources/accounting/types/PatchedContactRequest.ts @@ -0,0 +1,56 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; +import * as core from "../../../../core"; +import { PatchedContactRequestAddressesItem } from "./PatchedContactRequestAddressesItem"; +import { AccountingPhoneNumberRequest } from "./AccountingPhoneNumberRequest"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; + +export const PatchedContactRequest: core.serialization.ObjectSchema< + serializers.accounting.PatchedContactRequest.Raw, + Merge.accounting.PatchedContactRequest +> = core.serialization.object({ + name: core.serialization.string().optional(), + isSupplier: core.serialization.property("is_supplier", core.serialization.boolean().optional()), + isCustomer: core.serialization.property("is_customer", core.serialization.boolean().optional()), + emailAddress: core.serialization.property("email_address", core.serialization.string().optional()), + taxNumber: core.serialization.property("tax_number", core.serialization.string().optional()), + status: core.serialization.string().optional(), + currency: core.serialization.string().optional(), + company: core.serialization.string().optional(), + addresses: core.serialization.list(PatchedContactRequestAddressesItem.optional()).optional(), + phoneNumbers: core.serialization.property( + "phone_numbers", + core.serialization.list(AccountingPhoneNumberRequest).optional(), + ), + integrationParams: core.serialization.property( + "integration_params", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + linkedAccountParams: core.serialization.property( + "linked_account_params", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), +}); + +export declare namespace PatchedContactRequest { + export interface Raw { + name?: string | null; + is_supplier?: boolean | null; + is_customer?: boolean | null; + email_address?: string | null; + tax_number?: string | null; + status?: string | null; + currency?: string | null; + company?: string | null; + addresses?: (PatchedContactRequestAddressesItem.Raw | null | undefined)[] | null; + phone_numbers?: AccountingPhoneNumberRequest.Raw[] | null; + integration_params?: Record | null; + linked_account_params?: Record | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; + } +} diff --git a/src/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.ts b/src/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.ts new file mode 100644 index 000000000..2e2606b94 --- /dev/null +++ b/src/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; +import * as core from "../../../../core"; +import { Address } from "./Address"; + +export const PatchedContactRequestAddressesItem: core.serialization.Schema< + serializers.accounting.PatchedContactRequestAddressesItem.Raw, + Merge.accounting.PatchedContactRequestAddressesItem +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); + +export declare namespace PatchedContactRequestAddressesItem { + export type Raw = string | Address.Raw; +} diff --git a/src/serialization/resources/accounting/types/index.ts b/src/serialization/resources/accounting/types/index.ts index e19fdfe80..73f02eb79 100644 --- a/src/serialization/resources/accounting/types/index.ts +++ b/src/serialization/resources/accounting/types/index.ts @@ -367,6 +367,8 @@ export * from "./PaginatedTaxRateList"; export * from "./PaginatedTrackingCategoryList"; export * from "./PaginatedTransactionList"; export * from "./PaginatedVendorCreditList"; +export * from "./PatchedContactRequestAddressesItem"; +export * from "./PatchedContactRequest"; export * from "./PatchedItemRequestRequestStatus"; export * from "./PatchedItemRequestRequestType"; export * from "./PatchedItemRequestRequest"; diff --git a/src/serialization/resources/ats/types/EventTypeEnum.ts b/src/serialization/resources/ats/types/EventTypeEnum.ts index 5513924d8..35f8bd7ae 100644 --- a/src/serialization/resources/ats/types/EventTypeEnum.ts +++ b/src/serialization/resources/ats/types/EventTypeEnum.ts @@ -13,6 +13,7 @@ export const EventTypeEnum: core.serialization.Schema | null; remote_data?: RemoteData.Raw[] | null; } diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 2be011c93..7df440533 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,6 +1,6 @@ export * as ats from "./ats"; -export * as crm from "./crm"; export * as filestorage from "./filestorage"; +export * as crm from "./crm"; export * as hris from "./hris"; export * as ticketing from "./ticketing"; export * as accounting from "./accounting"; diff --git a/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts b/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts index e059e4c29..2a355e621 100644 --- a/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts +++ b/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts @@ -32,9 +32,9 @@ export const PatchedTicketRequest: core.serialization.ObjectSchema< accessLevel: core.serialization.property("access_level", PatchedTicketRequestAccessLevel.optional()), tags: core.serialization.list(core.serialization.string().optional()).optional(), roles: core.serialization.list(core.serialization.string().optional()).optional(), - completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), ticketUrl: core.serialization.property("ticket_url", core.serialization.string().optional()), priority: PatchedTicketRequestPriority.optional(), + completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), @@ -63,9 +63,9 @@ export declare namespace PatchedTicketRequest { access_level?: PatchedTicketRequestAccessLevel.Raw | null; tags?: (string | null | undefined)[] | null; roles?: (string | null | undefined)[] | null; - completed_at?: string | null; ticket_url?: string | null; priority?: PatchedTicketRequestPriority.Raw | null; + completed_at?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; remote_fields?: RemoteFieldRequest.Raw[] | null; diff --git a/src/version.ts b/src/version.ts index b057ce51a..13d998520 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "2.1.3"; +export const SDK_VERSION = "2.2.0"; diff --git a/tests/wire/accounting/contacts.test.ts b/tests/wire/accounting/contacts.test.ts index 0f4d93caa..ebb439198 100644 --- a/tests/wire/accounting/contacts.test.ts +++ b/tests/wire/accounting/contacts.test.ts @@ -358,6 +358,577 @@ describe("Contacts", () => { }); }); + test("partialUpdate", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { model: {} }; + const rawResponseBody = { + model: { + id: "c640b80b-fac9-409f-aa19-1f9221aec445", + remote_id: "11167", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Gil Feig's pickleball store", + is_supplier: true, + is_customer: true, + email_address: "pickleball@merge.dev", + tax_number: "12-3456789", + status: "ACTIVE", + currency: "USD", + remote_updated_at: "2020-03-31T00:00:00Z", + company: "595c8f97-2ac4-45b7-b000-41bdf43240b5", + addresses: ["2f2702aa-8948-492b-a412-2acdf6d2c499", "d98c7428-8dda-48a8-a1da-c570f65e2375"], + phone_numbers: [ + { + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + number: "+3198675309", + type: "Mobile", + }, + ], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/actions", data: ["Varies by platform"] }], + remote_fields: [{ remote_field_class: "remote_field_class" }], + }, + warnings: [ + { + source: { pointer: "pointer" }, + title: "Unrecognized Field", + detail: "An unrecognized field, age, was passed in with request data.", + problem_type: "UNRECOGNIZED_FIELD", + }, + ], + errors: [ + { + source: { pointer: "pointer" }, + title: "Missing Required Field", + detail: "custom_fields is a required field on model.", + problem_type: "MISSING_REQUIRED_FIELD", + }, + ], + logs: [ + { + log_id: "99433219-8017-4acd-bb3c-ceb23d663832", + dashboard_view: "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", + log_summary: { + url: "www.exampleintegration.com/api/v1/exampleapi", + method: "POST", + status_code: 200, + }, + }, + ], + }; + server + .mockEndpoint() + .patch("/accounting/v1/contacts/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.accounting.contacts.partialUpdate("id", { + model: {}, + }); + expect(response).toEqual({ + model: { + id: "c640b80b-fac9-409f-aa19-1f9221aec445", + remoteId: "11167", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + name: "Gil Feig's pickleball store", + isSupplier: true, + isCustomer: true, + emailAddress: "pickleball@merge.dev", + taxNumber: "12-3456789", + status: "ACTIVE", + currency: "USD", + remoteUpdatedAt: new Date("2020-03-31T00:00:00.000Z"), + company: "595c8f97-2ac4-45b7-b000-41bdf43240b5", + addresses: ["2f2702aa-8948-492b-a412-2acdf6d2c499", "d98c7428-8dda-48a8-a1da-c570f65e2375"], + phoneNumbers: [ + { + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + number: "+3198675309", + type: "Mobile", + }, + ], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/actions", + data: ["Varies by platform"], + }, + ], + remoteFields: [ + { + remoteFieldClass: "remote_field_class", + }, + ], + }, + warnings: [ + { + source: { + pointer: "pointer", + }, + title: "Unrecognized Field", + detail: "An unrecognized field, age, was passed in with request data.", + problemType: "UNRECOGNIZED_FIELD", + }, + ], + errors: [ + { + source: { + pointer: "pointer", + }, + title: "Missing Required Field", + detail: "custom_fields is a required field on model.", + problemType: "MISSING_REQUIRED_FIELD", + }, + ], + logs: [ + { + logId: "99433219-8017-4acd-bb3c-ceb23d663832", + dashboardView: "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", + logSummary: { + url: "www.exampleintegration.com/api/v1/exampleapi", + method: "POST", + statusCode: 200, + }, + }, + ], + }); + }); + + test("metaPatchRetrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + request_schema: { + type: "object", + properties: { + model: { + type: "object", + required: [ + "last_name", + "first_name", + "merge_categories", + "new_york_city_neighborhood", + "favorite_tv_shows", + "favorite_watch", + ], + properties: { + email_addresses: { + type: "array", + items: { + type: "object", + properties: { + value: { type: "string", title: "value" }, + email_address_type: { type: "string", title: "email_address_type" }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "email_addresses", + description: "Array of email_addresses objects", + }, + urls: { + type: "array", + items: { + type: "object", + properties: { + value: { type: "string", title: "value" }, + url_type: { type: "string", title: "url_type" }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "urls", + description: "Array of urls objects", + }, + first_name: { type: "string", title: "first_name", description: "The first name." }, + last_name: { type: "string", title: "last_name", description: "The last name." }, + phone_numbers: { + type: "array", + items: { + type: "object", + properties: { + value: { type: "string", title: "value" }, + phone_number_type: { type: "string", title: "phone_number_type" }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "phone_numbers", + description: "Array of phone_numbers objects", + }, + tags: { + type: "array", + items: { type: "string", format: "uuid" }, + title: "tags", + description: "Array of tags names", + }, + attachments: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string", title: "id" }, + file_url: { type: "string", title: "file_url" }, + file_name: { type: "string", title: "file_name" }, + attachment_type: { type: "string", title: "attachment_type" }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "attachments", + description: "Array of attachments objects ", + }, + merge_categories: { + type: "array", + categories: { + type: "string", + enum: [ + "HRIS", + "ATS", + "Accounting", + "Ticketing", + "File Storage", + "CRM", + "Marketing Automation", + ], + enum_information: [ + { value: "HRIS", description: "Merge HRIS Category" }, + { value: "ATS", description: "Merge ATS Category" }, + { value: "Accounting", description: "Merge Accounting Category" }, + { value: "Ticketing", description: "Merge Ticketing Category" }, + { value: "File Storage", description: "Merge File Storage Category" }, + { value: "CRM", description: "Merge CRM Category" }, + { + value: "Marketing Automation", + description: "Merge Marketing Automation Category", + }, + ], + }, + title: "Merge Categories", + description: "Array of Merge's Unified API Categories", + }, + new_york_city_neighborhood: { + type: "string", + title: "Borough", + description: "One of the 5 Boroughs of New York City", + }, + favorite_tv_shows: { + type: "array", + items: { type: "string", format: "uuid" }, + title: "Favorite TV Shows", + description: "Array of TV Show objects on merge.tv_shows", + }, + favorite_watch: { + type: "string", + title: "Favorite Watch", + description: "Favorite watch of all time", + }, + }, + }, + }, + }, + remote_field_classes: { key: "value" }, + status: { linked_account_status: "linked_account_status", can_make_request: true }, + has_conditional_params: true, + has_required_linked_account_params: true, + }; + server + .mockEndpoint() + .get("/accounting/v1/contacts/meta/patch/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.accounting.contacts.metaPatchRetrieve("id"); + expect(response).toEqual({ + requestSchema: { + type: "object", + properties: { + model: { + type: "object", + required: [ + "last_name", + "first_name", + "merge_categories", + "new_york_city_neighborhood", + "favorite_tv_shows", + "favorite_watch", + ], + properties: { + email_addresses: { + type: "array", + items: { + type: "object", + properties: { + value: { + type: "string", + title: "value", + }, + email_address_type: { + type: "string", + title: "email_address_type", + }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "email_addresses", + description: "Array of email_addresses objects", + }, + urls: { + type: "array", + items: { + type: "object", + properties: { + value: { + type: "string", + title: "value", + }, + url_type: { + type: "string", + title: "url_type", + }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "urls", + description: "Array of urls objects", + }, + first_name: { + type: "string", + title: "first_name", + description: "The first name.", + }, + last_name: { + type: "string", + title: "last_name", + description: "The last name.", + }, + phone_numbers: { + type: "array", + items: { + type: "object", + properties: { + value: { + type: "string", + title: "value", + }, + phone_number_type: { + type: "string", + title: "phone_number_type", + }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "phone_numbers", + description: "Array of phone_numbers objects", + }, + tags: { + type: "array", + items: { + type: "string", + format: "uuid", + }, + title: "tags", + description: "Array of tags names", + }, + attachments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + title: "id", + }, + file_url: { + type: "string", + title: "file_url", + }, + file_name: { + type: "string", + title: "file_name", + }, + attachment_type: { + type: "string", + title: "attachment_type", + }, + integration_params: { + type: "object", + title: "integration_params", + properties: {}, + }, + linked_account_params: { + type: "object", + title: "linked_account_params", + properties: {}, + }, + }, + }, + title: "attachments", + description: "Array of attachments objects ", + }, + merge_categories: { + type: "array", + categories: { + type: "string", + enum: [ + "HRIS", + "ATS", + "Accounting", + "Ticketing", + "File Storage", + "CRM", + "Marketing Automation", + ], + enum_information: [ + { + value: "HRIS", + description: "Merge HRIS Category", + }, + { + value: "ATS", + description: "Merge ATS Category", + }, + { + value: "Accounting", + description: "Merge Accounting Category", + }, + { + value: "Ticketing", + description: "Merge Ticketing Category", + }, + { + value: "File Storage", + description: "Merge File Storage Category", + }, + { + value: "CRM", + description: "Merge CRM Category", + }, + { + value: "Marketing Automation", + description: "Merge Marketing Automation Category", + }, + ], + }, + title: "Merge Categories", + description: "Array of Merge's Unified API Categories", + }, + new_york_city_neighborhood: { + type: "string", + title: "Borough", + description: "One of the 5 Boroughs of New York City", + }, + favorite_tv_shows: { + type: "array", + items: { + type: "string", + format: "uuid", + }, + title: "Favorite TV Shows", + description: "Array of TV Show objects on merge.tv_shows", + }, + favorite_watch: { + type: "string", + title: "Favorite Watch", + description: "Favorite watch of all time", + }, + }, + }, + }, + }, + remoteFieldClasses: { + key: "value", + }, + status: { + linkedAccountStatus: "linked_account_status", + canMakeRequest: true, + }, + hasConditionalParams: true, + hasRequiredLinkedAccountParams: true, + }); + }); + test("metaPostRetrieve", async () => { const server = mockServerPool.createServer(); const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); diff --git a/tests/wire/hris/benefits.test.ts b/tests/wire/hris/benefits.test.ts index 460e68c36..bab3c99de 100644 --- a/tests/wire/hris/benefits.test.ts +++ b/tests/wire/hris/benefits.test.ts @@ -25,8 +25,8 @@ describe("Benefits", () => { company_contribution: 150, start_date: "2020-11-15T00:59:25Z", end_date: "2021-10-15T00:23:25Z", - remote_was_deleted: true, employer_benefit: "025fjlc6-6000-430a-848e-aafacbadf4fe", + remote_was_deleted: true, field_mappings: { organization_defined_targets: { custom_key: "custom_value" }, linked_account_defined_targets: { custom_key: "custom_value" }, @@ -55,8 +55,8 @@ describe("Benefits", () => { companyContribution: 150, startDate: new Date("2020-11-15T00:59:25.000Z"), endDate: new Date("2021-10-15T00:23:25.000Z"), - remoteWasDeleted: true, employerBenefit: "025fjlc6-6000-430a-848e-aafacbadf4fe", + remoteWasDeleted: true, fieldMappings: { organization_defined_targets: { custom_key: "custom_value", @@ -91,8 +91,8 @@ describe("Benefits", () => { company_contribution: 150, start_date: "2020-11-15T00:59:25Z", end_date: "2021-10-15T00:23:25Z", - remote_was_deleted: true, employer_benefit: "025fjlc6-6000-430a-848e-aafacbadf4fe", + remote_was_deleted: true, field_mappings: { organization_defined_targets: { custom_key: "custom_value" }, linked_account_defined_targets: { custom_key: "custom_value" }, @@ -119,8 +119,8 @@ describe("Benefits", () => { companyContribution: 150, startDate: new Date("2020-11-15T00:59:25.000Z"), endDate: new Date("2021-10-15T00:23:25.000Z"), - remoteWasDeleted: true, employerBenefit: "025fjlc6-6000-430a-848e-aafacbadf4fe", + remoteWasDeleted: true, fieldMappings: { organization_defined_targets: { custom_key: "custom_value", diff --git a/yarn.lock b/yarn.lock index 20472489a..be449d538 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,14 +292,6 @@ dependencies: statuses "^2.0.1" -"@bundled-es-modules/tough-cookie@^0.1.6": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@bundled-es-modules/tough-cookie/-/tough-cookie-0.1.6.tgz#fa9cd3cedfeecd6783e8b0d378b4a99e52bde5d3" - integrity sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw== - dependencies: - "@types/tough-cookie" "^4.0.5" - tough-cookie "^4.1.4" - "@inquirer/confirm@^5.0.0": version "5.1.16" resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.16.tgz#4f99603e5c8a1b471b819343f708c75e8abd2b88" @@ -744,16 +736,16 @@ form-data "^4.0.4" "@types/node@*": - version "24.3.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.0.tgz#89b09f45cb9a8ee69466f18ee5864e4c3eb84dec" - integrity sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow== + version "24.3.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.1.tgz#b0a3fb2afed0ef98e8d7f06d46ef6349047709f3" + integrity sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g== dependencies: undici-types "~7.10.0" "@types/node@^18.19.70": - version "18.19.123" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.123.tgz#08a3e4f5e0c73b8840c677b7635ce59d5dc1f76d" - integrity sha512-K7DIaHnh0mzVxreCR9qwgNxp3MH9dltPNIEddW9MYUlcKAzm+3grKNSTe2vCJHI1FaLpvpL5JGJrz1UZDKYvDg== + version "18.19.124" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.124.tgz#6f49e4fab8274910691a900e8a14316cbf3c7a31" + integrity sha512-hY4YWZFLs3ku6D2Gqo3RchTd9VRCcrjqp/I0mmohYeUVA5Y8eCXKJEasHxLAJVZRJuQogfd1GiJ9lgogBgKeuQ== dependencies: undici-types "~5.26.4" @@ -774,7 +766,7 @@ resolved "https://registry.yarnpkg.com/@types/statuses/-/statuses-2.0.6.tgz#66748315cc9a96d63403baa8671b2c124f8633aa" integrity sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA== -"@types/tough-cookie@*", "@types/tough-cookie@^4.0.5": +"@types/tough-cookie@*": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== @@ -954,7 +946,7 @@ acorn-walk@^8.0.2: dependencies: acorn "^8.11.0" -acorn@^8.1.0, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.15.0, acorn@^8.8.1: +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.8.1: version "8.15.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== @@ -1183,9 +1175,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001737: - version "1.0.30001737" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001737.tgz#8292bb7591932ff09e9a765f12fdf5629a241ccc" - integrity sha512-BiloLiXtQNrY5UyF0+1nSJLXUENuhka2pzy2Fx5pGxqavdrxSCW4U6Pn/PoG3Efspi2frRbHpBV2XsrPE6EDlw== + version "1.0.30001739" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001739.tgz#b34ce2d56bfc22f4352b2af0144102d623a124f4" + integrity sha512-y+j60d6ulelrNSwpPyrHdl+9mJnQzHBr08xm48Qno0nSk4h3Qojh+ziv2qE6rXf4k3tadF4o1J/1tAbVm1NtnA== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1339,9 +1331,9 @@ decimal.js@^10.4.2: integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg== dedent@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.6.0.tgz#79d52d6389b1ffa67d2bcef59ba51847a9d503b2" - integrity sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA== + version "1.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.0.tgz#c1f9445335f0175a96587be245a282ff451446ca" + integrity sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ== deepmerge@^4.2.2: version "4.3.1" @@ -1380,9 +1372,9 @@ dunder-proto@^1.0.1: gopd "^1.2.0" electron-to-chromium@^1.5.211: - version "1.5.211" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.211.tgz#749317bf9cf894c06f67980940cf8074e5eb08ca" - integrity sha512-IGBvimJkotaLzFnwIVgW9/UD/AOJ2tByUmeOrtqBfACSbAw5b1G0XpvdaieKyc7ULmbwXVx+4e4Be8pOPBrYkw== + version "1.5.214" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.214.tgz#f7bbdc0796124292d4b8a34a49e968c5e6430763" + integrity sha512-TpvUNdha+X3ybfU78NoQatKvQEm1oq3lf2QbnmCEdw+Bd9RuIAY+hJTvq1avzHM0f7EJfnH3vbCnbzKzisc/9Q== emittery@^0.13.1: version "0.13.1" @@ -2457,13 +2449,12 @@ ms@^2.1.3: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== msw@^2.8.4: - version "2.10.5" - resolved "https://registry.yarnpkg.com/msw/-/msw-2.10.5.tgz#3e43f12e97581c260bf38d8817732b9fec3bfdb0" - integrity sha512-0EsQCrCI1HbhpBWd89DvmxY6plmvrM96b0sCIztnvcNHQbXn5vqwm1KlXslo6u4wN9LFGLC1WFjjgljcQhe40A== + version "2.11.1" + resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.1.tgz#77f7c5c60ffd08e4bc351cca4608418db15e5ac2" + integrity sha512-dGSRx0AJmQVQfpGXTsAAq4JFdwdhOBdJ6sJS/jnN0ac3s0NZB6daacHF1z5Pefx+IejmvuiLWw260RlyQOf3sQ== dependencies: "@bundled-es-modules/cookie" "^2.0.1" "@bundled-es-modules/statuses" "^1.0.1" - "@bundled-es-modules/tough-cookie" "^0.1.6" "@inquirer/confirm" "^5.0.0" "@mswjs/interceptors" "^0.39.1" "@open-draft/deferred-promise" "^2.2.0" @@ -2477,6 +2468,7 @@ msw@^2.8.4: path-to-regexp "^6.3.0" picocolors "^1.1.1" strict-event-emitter "^0.5.1" + tough-cookie "^6.0.0" type-fest "^4.26.1" yargs "^17.7.2" @@ -2962,12 +2954,12 @@ terser-webpack-plugin@^5.3.11: terser "^5.31.1" terser@^5.31.1: - version "5.43.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.43.1.tgz#88387f4f9794ff1a29e7ad61fb2932e25b4fdb6d" - integrity sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg== + version "5.44.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.0.tgz#ebefb8e5b8579d93111bfdfc39d2cf63879f4a82" + integrity sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w== dependencies: "@jridgewell/source-map" "^0.3.3" - acorn "^8.14.0" + acorn "^8.15.0" commander "^2.20.0" source-map-support "~0.5.20" @@ -2980,6 +2972,18 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +tldts-core@^7.0.12: + version "7.0.12" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.12.tgz#b471e773dc23ff881a9d187ec145e36edde57c27" + integrity sha512-3K76aXywJFduGRsOYoY5JzINLs/WMlOkeDwPL+8OCPq2Rh39gkSDtWAxdJQlWjpun/xF/LHf29yqCi6VC/rHDA== + +tldts@^7.0.5: + version "7.0.12" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.12.tgz#e11008e9a3f27448e7aecb8d0fa51f929ec9549d" + integrity sha512-M9ZQBPp6FyqhMcl233vHYyYRkxXOA1SKGlnq13S0mJdUhRSwr2w6I8rlchPL73wBwRlyIZpFvpu2VcdSMWLYXw== + dependencies: + tldts-core "^7.0.12" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -2992,7 +2996,7 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tough-cookie@^4.1.2, tough-cookie@^4.1.4: +tough-cookie@^4.1.2: version "4.1.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== @@ -3002,6 +3006,13 @@ tough-cookie@^4.1.2, tough-cookie@^4.1.4: universalify "^0.2.0" url-parse "^1.5.3" +tough-cookie@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.0.tgz#11e418b7864a2c0d874702bc8ce0f011261940e5" + integrity sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w== + dependencies: + tldts "^7.0.5" + tr46@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9"